Commit graph

7338 commits

Author SHA1 Message Date
weitianhua b6415d9a91 Remove (x2) variable in BCM_STRNCPY_S and BCM_STRCPY_S when performance optimization enabled 2020-03-14 14:45:57 +08:00
weitianhua ce55956a8f Fix mem_start uninitialized error when compiler optimization performance enabled 2020-03-14 14:45:04 +08:00
weitianhua 7c2f1287ec Bugfix for HFP and some Github issue.
1. Bugfix for AG audio crash (change the return position)
2. Fix the error macro name and error return in hfp_hf demo
3. Fix the annotation error using UTF-8 ' (from Github)
4. Change or remove the log in SCO related code region.
5. Correct error of introduction of a function.
2020-03-14 14:19:54 +08:00
lly eee8bd4612 ble_mesh: Move dev_role to the end of model_pub 2020-03-13 19:27:55 +08:00
lly 4dde86e45d ble_mesh: Use the right netkey during iv update 2020-03-13 19:27:54 +08:00
lly e6b4eb60ef ble_mesh: Use the right net_idx & app_idx for publish 2020-03-13 19:27:54 +08:00
lly c5b2f693b8 ble_mesh: Check buf->ref before unref the buffer 2020-03-13 19:27:54 +08:00
lly 7cf29e0f3f ble_mesh: Fix mesh memory use-after-free issue 2020-03-13 19:27:54 +08:00
lly cb31c71877 ble_mesh: Add ble mesh deinit in btc task 2020-03-13 19:27:54 +08:00
lly 50040e8e99 ble_mesh: Free beacon timer when deinit mesh 2020-03-13 19:27:53 +08:00
lly a364541193 ble_mesh: Use lock for mesh timer operations 2020-03-13 19:27:53 +08:00
Mahavir Jain fdbdf9a0ec Merge branch 'bugfix/unicore_config_prevent_ipc_code_v4.0' into 'release/v4.0'
ipc: prevent code getting pulled in for unicore configuration (v4.0)

See merge request espressif/esp-idf!7943
2020-03-12 13:31:44 +08:00
KonstantinKondrashov 1c12e67c8a lwip: Add to sys_arch_protect() a check that the mutex is created before use if not then creates it
Closes: https://github.com/espressif/esp-idf/issues/944
Closes: https://github.com/espressif/esp-idf/issues/3931
Closes: WIFI-1019
2020-03-11 19:18:09 +08:00
xueyunfei cf77068675 fix bug for after udp close select_waiting assert for v4.0 2020-03-11 10:04:32 +00:00
Michael (XIAO Xufeng) 68b4177f70 Merge branch 'bugfix/ledc_driver_enums_v4.0' into 'release/v4.0'
driver: Avoid possible accidental mismatch between ledc_clk_src_t & ledc_clk_cfg_t enum (v4.0)

See merge request espressif/esp-idf!7910
2020-03-11 16:39:11 +08:00
Mahavir Jain 0cc802e6ab ipc: prevent code getting pulled in for unicore configuration 2020-03-11 14:04:45 +05:30
KonstantinKondrashov cb10ba5785 esp32: Add a Kconfig option- Number of attempts to repeat 32k XTAL calibration
Closes: IDF-1479
2020-03-10 19:39:56 +08:00
Michael (XIAO Xufeng) 6023d60966 Merge branch 'bugfix/put_spihost_handle_in_sram_v4.0' into 'release/v4.0'
spi: always put spihost handle in SRAM (backport 4.0)

See merge request espressif/esp-idf!7902
2020-03-10 15:32:24 +08:00
Jiang Jiang Jian 2161d09079 Merge branch 'Bugfix/netconn_marked_close_crash_for_v4.0' into 'release/v4.0'
lw-ip:fix bug for netconn marked close crash for v4.0

See merge request espressif/esp-idf!7897
2020-03-09 16:36:45 +08:00
Michael (XIAO Xufeng) 1b08b7c5fb Merge branch 'bugfix/spiflash_read_psram_v4.0' into 'release/v4.0'
spi_flash: Fix over-allocation and OOM crash when reading from SPI flash to PSRAM buffers (v4.0)

See merge request espressif/esp-idf!7878
2020-03-09 11:10:52 +08:00
xueyunfei 8ea128ded5 fix bug for netconn marked close crash for v4.0 2020-03-09 02:49:57 +00:00
Angus Gratton c5a5b34ba4 driver: Avoid possible accidental mismatch between ledc_clk_src_t & ledc_clk_cfg_t enum
ledc.h includes two similar enums, ledc_clk_src_t & ledc_clk_cfg_t.

The two enums do different things but there are two similar names: LEDC_REF_TICK / LEDC_USE_REF_TICK
and LEDC_APB_CLK / LEDC_USE_APB_CLK.

Because C will accept any enum or integer value for an enum argument, there's no easy way to check
the correct enum is passed without using static analysis.

To avoid accidental errors, make the numeric values for the two similarly named enums the same.,

Noticed when looking into https://github.com/espressif/esp-idf/issues/4476
2020-03-09 11:32:18 +11:00
Angus Gratton c38c3ff3f0 spi_flash: Remove 16KB free internal heap limit for esp_flash_read() into PSRAM
Allocation of the temporary internal buffer will now repeat until a small enough buffer can be
allocated, and only fail if less than a 256 byte block of internal RAM is free.

Adds unit test for the same, and generic test utility for creating memory pressure.
2020-03-09 09:59:43 +11:00
morris bcedff5a12 spi: always put spihost handle in SRAM
Closes https://github.com/espressif/esp-idf/issues/4635
2020-03-06 17:39:14 +08:00
Angus Gratton af4c6ac0f3 spi_flash: Fix over-allocation and OOM crash when reading from SPI flash to PSRAM buffers
Previously would try allocate buffer of minimum size 16KB not maximum size 16KB, causing
out of memory errors for any large reads, or if less than 16KB contiguous free heap.

Also, if using legacy API and internal allocation failed then implementation would abort()
instead of returning the error to the caller.

Added test for using large buffers in PSRAM.

Closes https://github.com/espressif/esp-idf/issues/4769

Also reported on forum: https://esp32.com/viewtopic.php?f=13&t=14304&p=55972
2020-03-05 17:11:26 +11:00
Chinmay Chhajed abab19ad4d This MR is intended to fix Bluetooth event scheduling when WiFi is also
enabled. The global interrupts will be disabled before taking current
    time for scheduling further bluetooth events. Earlier disabling
    interrupts was taking some time because of which WiFi events were
    interrupting in current bluetooth scheduling.

    Also fixes ble crash issue triggered by ble event irq miss(0x20000) (819979b9)
2020-03-04 20:30:37 +05:30
xueyunfei 5bcdce8272 add host name in discover packet for v4.0 2020-03-03 12:18:57 +00:00
Jakob Hasse d5d2d716f6 NVS: Changed all new to new (nothrow) 2020-03-03 17:08:28 +08:00
David Čermák 2a467d17bd Merge branch 'bugfix/ws_rcv_exceed_buf_v4.0' into 'release/v4.0'
tcp_transport/ws_client: websockets now correctly handle messages longer than buffer (backport v4.0)

See merge request espressif/esp-idf!7755
2020-03-03 16:29:10 +08:00
Jiang Jiang Jian e6a59ac038 Merge branch 'feat/ble_mesh_update_4.0' into 'release/v4.0'
Feat/ble mesh update 4.0

See merge request espressif/esp-idf!7799
2020-03-02 15:33:14 +08:00
Angus Gratton a2af518069 Merge branch 'bugfix/ci_weekend_test_update_v4.0' into 'release/v4.0'
ci: a build_system_test(_cmake) fix and some mqtt fixes (backport v4.0)

See merge request espressif/esp-idf!7773
2020-03-02 12:43:34 +08:00
ronghulin dc193cea49 bugfix: Place the Vendor Specific element at the end according to the protocol 2020-03-02 12:03:32 +08:00
June ea3d70382b backport esp325p0 new features to release/v4.0 2020-02-29 09:11:30 +00:00
Jiang Jiang Jian 2f8af222e9 Merge branch 'bugfix/IPV6_multicast_adress_error_for_v4.0' into 'release/v4.0'
lw-ip:fix ipv6 bug when input the wrong broadcast for v4.0

See merge request espressif/esp-idf!7805
2020-02-29 17:08:32 +08:00
Jiang Jiang Jian 198c8333d1 Merge branch 'bugfix/btdm_div_by_zero_in_slp_clk_conversion_v4.0' into 'release/v4.0'
bugfix/btdm_div_by_zero_in_slp_clk_conversion_v4.0(backport v4.0)

See merge request espressif/esp-idf!7787
2020-02-28 17:19:55 +08:00
Marius Vikhammer f542c979e9 tcp_transport/ws_client: websockets now correctly handle messages longer than buffer
transport_ws can now be read multiple times in a row to read frames larger than the buffer.

Added reporting of total payload length and offset to the user in websocket_client.

Added local example test for long messages.

Closes IDF-1083
2020-02-28 10:53:08 +08:00
xueyunfei 1351e94a0e fix ipv6 bug when input the wrong broadcast for v4.0 2020-02-27 17:15:09 +08:00
lly 6eaeda9cf4 ble_mesh: Calc incomplete timeout based on msg info 2020-02-27 14:42:25 +08:00
lly f2e5ee5d25 ble_mesh: Start the timer when starting to send the client message 2020-02-27 14:42:25 +08:00
lly 4a3b06dde3 ble_mesh: No timeout for client message to non-unicast address 2020-02-27 14:42:25 +08:00
lly ef7461ae1d ble_mesh: Unify client application and lower transport layer timeout 2020-02-27 14:42:25 +08:00
lly bfed4fc90c ble_mesh: Allow maximum 377 octets payload 2020-02-27 14:42:25 +08:00
lly 6d61f6667a ble_mesh: Reset transport info when node is removed 2020-02-27 14:42:25 +08:00
lly 41cef4b1bb ble_mesh: Provisioner ignores msg from removed node 2020-02-27 14:42:25 +08:00
lly e24641cc89 ble_mesh: Miscellaneous modifications
1. Add an API to set Provisioner static oob value
2. Add an API to deinit BLE Mesh stack
3. Add an API to set Provisioner unicast address
4. Add an API to provision devices with fixed address
5. Add an API to store node composition data
6. Add an API to get node with device uuid
7. Add an API to get node with unicast address
8. Add an API to delete node with device uuid
9. Add an API to delete node with unicast address
10. Add an API for Provisioner to update local AppKey
11. Add an API for Provisioner to update local NetKey
12. Support Provisioner persistent functionality
13. Fix Provisioner entering IV Update procedure
14. Fix an issue which may cause client failing to send msg
15. Use bt_mesh.flags to indicate device role
16. Remove several useless macros
17. Callback RSSI of received mesh provisioning packets
18. Modify the Provisioner disable function
19. Change some log level from debug to info
20. Add parameters to Provisioner bind AppKey completion event
21. Fix node ignoring relay messages issue
22. Support using a specific partition for BLE Mesh
23. Fix compile warning when proxy related macros are disabled
24. Clean up BLE Mesh stack included header files
25. NULL can be input if client message needs no parameters
26. Fix compile warning when BT log is disabled
27. Initilize BLE Mesh stack local variables
28. Support using PSRAM for BLE Mesh mutex, queue and task
29. Add a menuconfig option to enable using memory from PSRAM
30. Clean up sdkconfig.defaults of BLE Mesh examples
2020-02-27 14:42:25 +08:00
Jiang Jiang Jian 280f0effc1 Merge branch 'bugfix/mesh_ie_issues_4.0' into 'release/v4.0'
Bugfix/mesh ie issues (Backport 4.0)

See merge request espressif/esp-idf!7308
2020-02-27 14:38:36 +08:00
wangmengyang 2236449f47 component/bt: set non-zero initial value for bt sleep clock cycle to avoid div-by-zero error in function "btdm_us_2_lpcycles" when BT modem sleep is not enabled 2020-02-26 16:19:43 +08:00
Michael (XIAO Xufeng) e2cba84555 Merge branch 'bugfix/add_missing_ledc_set_pin_declaration_v4.0' into 'release/v4.0'
Bugfix: Add missing ledc_set_pin declaration in led.h (v4.0)

See merge request espressif/esp-idf!7371
2020-02-26 15:20:29 +08:00
David Cermak daf95803ec websocket_client: fix locking mechanism in ws-client task and when sending data
closes https://github.com/espressif/esp-idf/issues/4169
2020-02-25 20:52:29 +00:00
chenyudong b006ffa643 mesh: fix mesh ie issues
Fix an error of mesh deinit lock.
Fix mesh send returns TIMEOUT.
Increase root window close time to 120s.
Clear ie.child when the child connected or fully associated.
Update rc_rssi when roots direct/forward.
ix assoc in mesh ie wrong.
Mesh packets use AC_VI instead of AC_BE.
2020-02-25 20:50:22 +08:00
David Cermak a7f573c3a1 ci: fix weekend test confguration update per latest refactoring of
grouping tests
2020-02-25 18:32:11 +07:00
Jiang Jiang Jian d292907fb7 Merge branch 'bugfix/btdm_check_EXT_CRYS_state_for_sleep_clk_for_v4.0' into 'release/v4.0'
bugfix/btdm_check_EXT_CRYS_state_for_sleep_clk(backport v4.0)

See merge request espressif/esp-idf!7747
2020-02-25 17:55:59 +08:00
Mahavir Jain 4fa13a8575 Merge branch 'bugfix/softap_prov_disconnect_v4.0' into 'release/v4.0'
Bugfix/softap prov disconnect (v4.0)

See merge request espressif/esp-idf!7684
2020-02-25 15:40:18 +08:00
Angus Gratton 216b8b4088 Merge branch 'bugfix/child_cmake_uninitialized_vars_v4.0' into 'release/v4.0'
cmake: Set uninitialized variable warnings in ULP & bootloader subprojects (v4.0)

See merge request espressif/esp-idf!7630
2020-02-25 15:27:24 +08:00
Angus Gratton a8fe083017 cmake: Set uninitialized variable warnings in ULP & bootloader subprojects
Fixes issue where PYTHON was not being expanded when running ulp_mapgen.py,
causing Windows launch setting to be used - reported here:
https://esp32.com/viewtopic.php?f=13&t=12640&p=50283#p50283

Closes https://github.com/espressif/esp-idf/issues/4785
2020-02-25 17:16:42 +11:00
Jiang Jiang Jian 25dfb08435 Merge branch 'bugfix/btdm_role_switch_v4.0' into 'release/v4.0'
Fix bugs about role switch

See merge request espressif/esp-idf!6924
2020-02-25 14:13:58 +08:00
Piyush Shah 5136605cb1 wifi_prov_manager: Delay the Wi-Fi connect call
For SoftAP provisioning, if we start Wi-Fi connection as soon as the
apply config request is received, it has been observed that the clients
(Phone apps mostly) do not get the response for this as we switch the
Wi-Fi channel, causing a momentary disconnection.

Delaying the connection calls helps mitigate the issue.

Signed-off-by: Piyush Shah <piyush@espressif.com>
2020-02-24 09:25:33 +00:00
Piyush Shah 63d3fd17f9 wifi_prov_manager: Change the name of an internal timer handle to better reflect the purpose
Signed-off-by: Piyush Shah <piyush@espressif.com>
2020-02-24 09:25:33 +00:00
wangmengyang 636195fb29 component/bt: fall back to main XTAL as Bluetooth sleep clock when EXT 32K CRYS is configured but not detected 2020-02-24 12:14:25 +08:00
Jiang Jiang Jian 6c19711778 Merge branch 'feature/dev_security_restore_backport_v4p0' into 'release/v4.0'
feature/dev_security_restore_backport_v4p0(backport release/v4.0)

See merge request espressif/esp-idf!7738
2020-02-24 11:48:27 +08:00
Jiang Jiang Jian 28788e2d66 Merge branch 'bugfix/mbedtls_esp_bignum_v4.0' into 'release/v4.0'
mbedtls: esp bignum fix for 4096 keys (v4.0)

See merge request espressif/esp-idf!7705
2020-02-24 11:44:16 +08:00
June 9d15ffb573 backport mr !6031 - fix security info restore bug 2020-02-21 20:00:25 +08:00
Jiang Jiang Jian 6fee9da72e Merge branch 'bugfix/enable_ipv6_address_autoconfig_v4.0' into 'release/v4.0'
lw-ip: Enable IPv6 stateless address autoconfiguration (backport v4.0)

See merge request espressif/esp-idf!7653
2020-02-21 14:53:47 +08:00
Mahavir Jain 54f7ed5dcc Merge branch 'bugfix/esp_log_timestamp_v4.0' into 'release/v4.0'
Use proper API to get Tick Count is esp_log_timestamp (v4.0)

See merge request espressif/esp-idf!7719
2020-02-20 20:52:33 +08:00
Shubham Kulkarni 2966f8cb8c log: Check for ISR context and use proper API to get Tick Count 2020-02-20 15:55:22 +05:30
Amit Sheth b59bcb88ce project_include.cmake: Make esptool_py_custom_target callable from other directories 2020-02-20 15:17:05 +05:30
David Cermak f8fc84813c mbedtls: fix hw accelerated big-num mul if operand and result overlap
this issue is mainly exposed when using larger (4096) client key in TLS mutual auth,
since it uses multiplications > 2048 when mbedtls_mpi_mul_mpi is used in recursion,
which works only if both operands point to different location than result since
mpi_mult_mpi_overlong() called mbedtls_mpi_grow() to reallocate buffers used in previous
pointer arithmetics and thus corrupting it. Fixed by growing the mpi buffer before
calling mpi_mult_mpi_overlong()
2020-02-20 10:03:00 +01:00
David Cermak e29d17fcd0 mbedtls: added mpi multiplication test for large numbers 2020-02-20 10:03:00 +01:00
baohongde 06ff1ceae3 Fix bugs about role switch
Jitter in FHS
Jitter in first PULL
Receive EDR packet fail after role switch
2020-02-20 15:21:28 +08:00
Jiang Jiang Jian b04e643bd0 Merge branch 'bugfix/coex_schm_v4.0' into 'release/v4.0'
Bugfix/coex schm v4.0

See merge request espressif/esp-idf!7636
2020-02-20 14:49:32 +08:00
xiehang e4696f077d lwip: Enable IPv6 stateless address autoconfiguration 2020-02-20 13:53:55 +08:00
baohongde 53e355b355 components/coex: Fix misspell in Kconfig 2020-02-19 11:48:45 +08:00
baohongde d07b9e97d7 components/coex: Fix a2dp stuck after creating anther connection 2020-02-19 11:48:33 +08:00
Jiang Jiang Jian 615dc00e86 Merge branch 'bugfix/some_host_and_example_bugfix_Backport_to_4v0' into 'release/v4.0'
Bugfix/some host and example bugfix backport to v4.0

See merge request espressif/esp-idf!7360
2020-02-18 21:02:34 +08:00
Jiang Jiang Jian 8dd98715a4 Merge branch 'bugfix/unified_prov_bluedroid_v4.0' into 'release/v4.0'
Unified Provisioning - BLE: Fix characteristics read response issue (backport v4.0)

See merge request espressif/esp-idf!7650
2020-02-18 20:57:33 +08:00
Jiang Jiang Jian 3b954fb6d6 Merge branch 'bugfix/ble_mesh_fix_compile_error_with_cpp_4.0' into 'release/v4.0'
ble_mesh: Fix compile error with c++ files (v4.0)

See merge request espressif/esp-idf!7584
2020-02-18 20:44:41 +08:00
Hrishikesh Dhayagude 6f875f2db2 Unified Provisioning - BLE: Fix characteristics read response issue
Fix the issue when number of bytes to be read is an exact multiple of [MTU-1]
2020-02-18 15:09:30 +05:30
baohongde 78ecc043d5 Improve coexistence performance according to specific WiFi/BT/BLE scienario
1. Improve WiFi performance in some Classic BT scienario(idle, inquire scan,
       connecting, connected, sniff, a2dp pause, etc).

    2. Support WiFi + Classic BT + BLE mesh coexistence scienario.

    3. Improve WiFi scan and connect performance in coexistence scienario.
2020-02-18 12:40:48 +08:00
baohongde c48a94d4a8 components/mesh: Fix some bugs about mesh
fix send acl pkt after ble have sent terminate ind
modify min adv interval to 10ms
2020-02-18 11:07:16 +08:00
baohongde 6f4e257601 Increase TCP send buffer and receive window limitation when TCP window scale is enabled 2020-02-18 11:06:15 +08:00
Angus Gratton 2fdb56e741 Merge branch 'feat/mcpwm_hal_fixes_v4.0' into 'release/v4.0'
mcpwm: add HAL layer support (fix part, backport v4.0)

See merge request espressif/esp-idf!7105
2020-02-18 09:45:13 +08:00
Jiang Jiang Jian 0f64291700 Merge branch 'bugfix/backport_some_wifi_bugs_0107_v4.0' into 'release/v4.0'
backport some Wi-Fi bugs 0107 (backport v4.0)

See merge request espressif/esp-idf!7260
2020-02-17 20:44:50 +08:00
Michael (XIAO Xufeng) 9037b8fb52 mcpwm: decrease test time
cherry-pick 538540ce
2020-02-15 23:10:33 +08:00
michael 0f10d12b81 mcpwm: fix the fault handling and capture issues
1. The fault signal 3 for unit 2 is corrected to the right value

2. Now `mcpwm_fault_set_oneshot_mode` will clear the status before, no
need to reset the peripheral.

3. The capture feature relies on the prescaler, but it's only
initialized in the mcpwm_init funciton, which is used to initialize a
PWM channel. This means, the capture may not work correctly if no PWM
channel is enabled.

   Now the prescaler is also updated when `mcpwm_capture_enable` is
called.
2020-02-15 18:39:28 +08:00
michael 8c148ede22 mcpwm: enable some unit tests again 2020-02-15 18:39:27 +08:00
Jiang Jiang Jian f92534f95d Merge branch 'bugfix/btdm_error_type_in_config_eir_evt_v4.0' into 'release/v4.0'
components/bt: Fix error EIR type in config eir event

See merge request espressif/esp-idf!7407
2020-02-14 16:41:58 +08:00
xiehang d2af36c9fb lwip: Drop packets larger than MTU 2020-02-14 12:03:49 +08:00
zhangyanjiao 5894e049bc esp_wifi: fix some WiFi issues
Fix following WiFi issues:
1. Fix WiFi buffer reload issue
2. Fix AMSDU decrypt issue
3. Fix some WiFi timer issues
4. Fix the crash caused by too big of association request RSN information
5. Fix the crash caused by block scan
6. Fix the bug for getting channel and bandwidth
7. Fix some Sniffer bugs
8. Fix some ESP-NOW issues
   1> fix the bug when modifying the channel info of peer node
   2> fix the crash when modifying peer node between unencrypted and encrypted
   3> fix the bug for fetch peer
   4> modify the esp_wifi_set_channel() function
   5> fix the bug that the channel parameter doesn't work when adding peer node

Closes https://github.com/espressif/esp-idf/issues/2833
Closes https://github.com/espressif/esp-idf/issues/4311
2020-02-14 12:03:18 +08:00
Jiang Jiang Jian 50b686bfb4 Merge branch 'bugfix/fix_performance_issues_new_v4.0' into 'release/v4.0'
esp_wifi: fix WiFi performance issue (backport v4.0)

See merge request espressif/esp-idf!7227
2020-02-14 11:47:06 +08:00
Xia Xiaotian 0a2bec85f3 soc: clear PHY status when cpu start 2020-02-13 14:36:11 +08:00
Jiang Jiang Jian b6bec84c6e Merge branch 'bugfix/ble_mesh_utf_8_comma_4_0' into 'release/v4.0'
ble_mesh: Kconfig included a UTF-8 comma (v4.0)

See merge request espressif/esp-idf!7576
2020-02-13 11:13:02 +08:00
Jiang Jiang Jian fb924ece79 Merge branch 'bugfix/btdm_fix_multi_open_evt_and_clear_blufi_prepare_write_len' into 'release/v4.0'
component/bt: fix multi open evt and clear blufi prepare write len(backport v4.0)

See merge request espressif/esp-idf!7324
2020-02-13 11:08:41 +08:00
Jiang Jiang Jian e07a64925b Merge branch 'bugfix/coex_bt_ble_stuck_v4.0' into 'release/v4.0'
components/bt: Fix A2DP stuck when BLE's interval is too small

See merge request espressif/esp-idf!7220
2020-02-13 11:08:20 +08:00
Jiang Jiang Jian e07ecea868 Merge branch 'hfp_a2dp_iphone_4.1' into 'release/v4.0'
components bt/: Disable sniff mode during (e)SCO connection for HFP. [backport 4.0]

See merge request espressif/esp-idf!7249
2020-02-13 11:08:10 +08:00
Jiang Jiang Jian 5b9cb366c2 Merge branch 'bugfix/fix_airkiss_bug_v4.0' into 'release/v4.0'
fix the bug for Airkiss

See merge request espressif/esp-idf!7346
2020-02-13 11:07:41 +08:00
Jiang Jiang Jian d5bd2256f4 Merge branch 'bugfix/fix_ble_mesh_memory_leak_v4.0' into 'release/v4.0'
ble_mesh: Fix memory leak when node is reset (v4.0)

See merge request espressif/esp-idf!7278
2020-02-13 10:58:09 +08:00
Jiang Jiang Jian c235640bf4 Merge branch 'bugfix/ble_mesh_update_lightness_last_v4.0' into 'release/v4.0'
ble_mesh: Update lightness last state when actual state is changed (v4.0)

See merge request espressif/esp-idf!7281
2020-02-13 10:58:06 +08:00
Jiang Jiang Jian 6193a439a3 Merge branch 'bugfix/sync_zephyr_v2.0_ble_mesh_fixes_v4.0' into 'release/v4.0'
ble_mesh: sync Zephyr v2.0 ble mesh fixes (v4.0)

See merge request espressif/esp-idf!7300
2020-02-13 10:58:03 +08:00
liu zhifu a3cd5ab1ae esp_wifi: improve WiFi performance 2020-02-13 10:50:48 +08:00
lly 3bf1b9b8ab ble_mesh: Fix compile error with c++ files 2020-02-13 09:52:10 +08:00
lly 04fc15a4f3 ble_mesh: Fix memory leak when node is reset
When node is being reset, the init functions of each sig-defined
models will be invoked again, this will cause memory leak because
some model internal data will be allocated again.
Hence before trying to allocate memory for them, we add some check
to make sure no memory has been allocated previously.
And for client model, when the init functions are invoked again,
we will clear the list items.
2020-02-12 12:03:31 +00:00
lly e95b59c089 ble_mesh: Kconfig included a UTF-8 comma 2020-02-12 18:28:06 +08:00
Angus Gratton 91dc4d78f8 Merge branch 'bugfix/select_driver_not_installed_v4.0' into 'release/v4.0'
VFS: Check in select() if the UART driver is installed or not (v4.0)

See merge request espressif/esp-idf!7417
2020-02-11 12:08:48 +08:00
Angus Gratton 2bee223250 Merge branch 'bugfix/part_gen_subtype_fix_v4.0' into 'release/v4.0'
partition_table: Fix subtype in gen_esp32part.py (v4.0)

See merge request espressif/esp-idf!7536
2020-02-11 12:06:25 +08:00
Mahavir Jain 8df70a1728 cJSON: include only source file objects for cmake build
Test file can cause build issues in some cases, since it has its own main() function
2020-02-10 17:32:26 +05:30
boarchuz 8c88f0f1f6 Fix subtype in PartitionTable.find_by_type
Fix ptype->subtype

Closes https://github.com/espressif/esp-idf/pull/4723
2020-02-10 12:04:45 +01:00
Ivan Grokhotkov 313c1ed1ba Merge branch 'bugfix/esp_log_from_critical_v4.0' into 'release/v4.0'
intr_alloc: don't call ESP_LOG from a critical section (backport v4.0)

See merge request espressif/esp-idf!7159
2020-02-10 17:34:53 +08:00
Ivan Grokhotkov 0c2c821f8f Merge branch 'bugfix/esp_ptr_executable_single_core_v4.0' into 'release/v4.0'
soc: Fix esp_ptr_executable() for single core ESP32 config & cache memory (v4.0)

See merge request espressif/esp-idf!7464
2020-02-10 16:30:34 +08:00
Ivan Grokhotkov f5dc81aaae Merge branch 'bugfix/panic_cache_err_dig_reset_v4.0' into 'release/v4.0'
esp32: panic: do digital reset if cache error interrupt is set (backport v4.0)

See merge request espressif/esp-idf!7484
2020-02-10 16:30:02 +08:00
Angus Gratton 3f76083e8c Merge branch 'bugfix/several_ethernet_bugfix_from_4.1' into 'release/v4.0'
Ethenret driver bugfix and optimization (4.0)

See merge request espressif/esp-idf!7426
2020-02-06 14:38:47 +08:00
Hrudaynath Dhabe 8f0f3e8f88 WPS_CONFIG_INIT_DEFAULT(type) error 2020-02-06 14:06:38 +08:00
Ivan Grokhotkov 4ce7b666a6 esp32: panic: do digital reset if cache error interrupt is set
Even if frame->exccause != PANIC_RSN_CACHEERR, it is possible that
the cache error interrupt status is set. For example, this may happen
due to an invalid cache access in the panic handler itself.
Check cache error interrupt status instead of frame->exccause to
decide whether to do CPU reset or digital reset.

Also remove unnecessary esp_dport_access_int_pause from
esp_cache_err_get_cpuid, since the panic handler already calls
esp_dport_access_int_abort on entry.
2020-01-30 12:28:22 +01:00
Angus Gratton f27a344fc9 Merge branch 'bugfix/parttool_backtraces_v4.0' into 'release/v4.0'
parttool: Avoid unnecessary exception backtrace for legitimate errors (v4.0)

See merge request espressif/esp-idf!7463
2020-01-30 13:36:52 +08:00
Angus Gratton a61fd1e42b Merge branch 'bugfix/esp_timer_stucks_into_esp_timer_impl_set_alarm_v4.0' into 'release/v4.0'
esp_timer/esp32: Fix esp_timer_impl_set_alarm() when CPU and APB freqs are changed (v4.0)

See merge request espressif/esp-idf!7304
2020-01-29 14:25:27 +08:00
Angus Gratton d897e522af soc: Fix esp_ptr_executable() for single core ESP32 config & cache memory
In single core mode, APP CPU cache region is added to the available range.
2020-01-29 10:03:30 +11:00
Angus Gratton 59649ea825 parttool: Fix regression when parsing binary partition data
Regression in a91de43537
2020-01-29 09:40:23 +11:00
Angus Gratton bdb0851065 parttool: Avoid unnecessary exception backtrace for legitimate errors
Previous version used exception handling for program control flow,
which makes for long and confusing backtrace messages if an error
occurs while parsing the CSV (as it also prints the phony error that
occurred while trying to parse as a binary, then prints
"During handling of the above exception, another exception occurred:",
then prints the real error).

Use the same heuristic that is applied in gen_esp32_part, instead.

Also, avoid printing the entire backtrace if the error is a gen_esp32_part
InputError, same as gen_esp32part does.

Found while looking into https://github.com/espressif/esp-idf/issues/4474
2020-01-29 09:40:22 +11:00
KonstantinKondrashov 9a24d95907 esp_timer/esp32: Fix case when alarm_reg > counter_reg but FRC_TIMER_INT_STATUS is not set
Closes: WIFI-1576
Closes: https://github.com/espressif/esp-idf/issues/2954
2020-01-28 21:41:27 +08:00
Angus Gratton 08219f3cf5 Merge branch 'bugfix/esp_tls_blocking_timeout_v4.0' into 'release/v4.0'
esp-tls: add timeout for blocking connection (v4.0)

See merge request espressif/esp-idf!7396
2020-01-22 11:44:48 +08:00
Angus Gratton b324ab9c6e Merge branch 'bugfix/mqtt_submodule_ref_update_v4.0' into 'release/v4.0'
mqtt: update submodule to point to latest commit (backport 4.0)

See merge request espressif/esp-idf!7276
2020-01-22 11:29:34 +08:00
morris 93e5a31685 ethernet: always put eth_driver handle in SRAM
Closes https://github.com/espressif/esp-idf/issues/4635
2020-01-21 21:30:34 +08:00
morris 01cc5a38cc ethernet: work with cache disabled 2020-01-21 21:30:18 +08:00
morris 7b128595ac ethernet: optimise tx and rx 2020-01-21 20:51:03 +08:00
Roland Dobai 642dc19c25 VFS: Check in select() if the UART driver is installed or not
Closes https://github.com/espressif/esp-idf/issues/4627
2020-01-21 10:11:08 +01:00
baohongde e38c080f79 components/bt: Fix error EIR type in config eir event 2020-01-20 21:50:01 +08:00
David Cermak c7e1416174 esp_tls: added connection timeout to esp_tls_conn_new_sync() 2020-01-20 07:26:51 +01:00
David Cermak e0c88dbd73 esp_tls: fail connection if esp_tls_conn_new() timeouts 2020-01-20 07:08:40 +01:00
Paul Abbott a58fa7665a Bugfix(LEDC): Add missing ledc_set_pin declaration in led.h 2020-01-17 10:22:36 +08:00
gengyuchao 443ea78e78 bugfix:Fix length check for snprintf in osi config. And remove the error code when there is no file in the nvs in config.c 2020-01-16 16:20:43 +08:00
gengyuchao ed6805625c ble:set a esp api to get size of controller send packets buffer. 2020-01-16 16:09:34 +08:00
gengyuchao 74a89774fd bugfix:Fixed throughput wasting memory and packet loss issues. 2020-01-16 16:09:17 +08:00
gengyuchao 7dc5c2af59 ble Fix typo and add some comment 2020-01-16 16:05:44 +08:00
Brian Friedkin e5bd8b1982 add missing gatt descriptors 2020-01-16 16:05:29 +08:00
Geng Yu Chao 5445c80a8e component/bt: Fix the issue with pointer type conversion in gattc. Unified count pointer type in bta and btc, change pointer type in bta from int to uint16_t. 2020-01-16 15:26:37 +08:00
Geng Yu Chao 69d341f7f0 Fix some typo in idf 2020-01-16 15:26:37 +08:00
KonstantinKondrashov f927957950 esp32: Add UT for DPORT 2020-01-16 13:31:20 +08:00
KonstantinKondrashov 6fca0e3861 esp32: Fix esp_dport_access_reg_read 2020-01-16 13:31:20 +08:00
zhangyanjiao 5202be013a fix the bug for Airkiss 2020-01-16 11:54:02 +08:00
gengyuchao 4900ead609 bugfix:btmd fix the problem that fixed_queue_enqueue may give the wrong semaphore if list_append fail to calloc a new node 2020-01-16 11:32:40 +08:00
Ivan Grokhotkov 386804d407 intr_alloc: don't call ESP_LOG from a critical section
Calling ESP_LOG from a critical section leads to abort() in 4.1, and
may also randomly abort() in earlier versions.

Closes FCS-268
2020-01-15 04:16:24 +00:00
zhiweijian 93409bd57e component/bt: fix blufi prepare write buf len invalid 2020-01-14 17:25:54 +08:00
zhiweijian 32ba52760f Component/bt: Fix GATTC trigger open event multiple times 2020-01-14 17:24:36 +08:00
Marius Vikhammer 158f2d065d mqtt: update submodule to point to latest commit.
Adds bugfixes for:
 - Too early publishing
 - Potential mutex memory leak
 - CI related issues.
 - Wait for entire connack message
 - Event loop not getting cleaned up

Adds support for ALPN, configurable reconnect time, QEMU CI tests and password
protected client key.

MQTT MR: esp-mqtt/merge_requests/46
Closes IDF-1162
Closes https://github.com/espressif/esp-mqtt/issues/137

MQTT MR: esp-mqtt/merge_requests/47
Closes IDF-1126

MQTT MR: esp-mqtt/merge_requests/48
Closes IDFGH-2197
Closes https://github.com/espressif/esp-idf/issues/4349
Closes https://github.com/espressif/esp-mqtt/issues/140

MQTT MR: esp-mqtt/merge_requests/48
Closes IDFGH-2235
Closes https://github.com/espressif/esp-idf/issues/4384

MQTT MR: esp-mqtt/merge_requests/49
Closes https://github.com/espressif/esp-idf/issues/4433
Closes IDFGH-2293

MQTT MR: esp-mqtt/merge_requests/50
Closes FCS-254

MQTT MR: esp-mqtt/merge_requests/53
Closes FCS-267
2020-01-14 10:55:50 +08:00
lly 14a408c478 ble_mesh: Fix PreviousAddress endianess in Friend Request
The upper transport layer is using big endian ordering. The
PreviousAddress field of a Friend Request message should therefore
be converted to native endianess using sys_cpu_to_be16().
2020-01-13 10:40:25 +08:00
lly 92d0d7ad49 ble_mesh: Fix next_period computation
If the duration to publish is roughly the same as the period, we might
end up with elapsed == period, which returns 0 and cancel the periodic
publication. Instead 1 should be returned, just like when the elapsed
time is greater than the period.
2020-01-13 10:40:20 +08:00
lly 19c9ae400b ble_mesh: Make model publication struct more compact
Previously the FastPeriodDivisor value was introduced to the model
publication struct. Based on the way it was grouped it seems the
intention was to fit it within the same octet as other bit fields,
but it actually makes the octet overflow by one bit. This ends up
creating another u8_t variable which in turn adds 24 bits of padding
after it.

To keep the size of the struct as compact as possible, group the flag
together with the key index, since that only requires 12 bits. Some
care is needed here, since the mesh stack does have special internal
key index values that require more than 12 bits such as
BLE_MESH_KEY_UNUSED and BLE_MESH_KEY_DEV. In this case restricting
ourselves to 12 bits is fine since the value in the model publication
struct follows 1:1 the value received in the Config Model Publication
Set message, and there the parameter is defined to be exactly 12 bits.
2020-01-13 10:40:13 +08:00
lly 566fb11a73 ble_mesh: Fix compile error when using release optimization level 2020-01-13 10:40:05 +08:00
lly 928480ada9 ble_mesh: Remove useless CONFIG_BLE_MESH_NODE
For Low Power node and Proxy Server, the two features
depend on BLE_MESH_NODE in Kconfig.in, here in the
stack there is no need to judge if CONFIG_BLE_MESH_NODE
is enabled.
2020-01-13 10:39:57 +08:00
lly da0205b166 ble_mesh: Fixes Provisioner not support friend feature 2020-01-13 10:39:52 +08:00
lly 610fc8124a ble_mesh: Fixes wrong subnet info used for Friend Clear
When Friend node tries to send Friend Clear message to other
Friend nodes, it should use the subnet information based on
the net_idx from friendship.
2020-01-13 10:39:42 +08:00