Compare commits

...

1965 Commits

Author SHA1 Message Date
weiyuhan dd9987d469 change(version): Update version to 5.0.9 2025-05-16 15:47:52 +08:00
Jiang Jiang Jian d9f9b7d8ed Merge branch 'bugfix/fix_tbtt_timming_error_esp32' into 'release/v5.0'
bugfix: fix tbtt timing error esp32(v5.0)

See merge request espressif/esp-idf!38981
2025-05-12 17:53:11 +08:00
sibeibei 0687165375 Revert "fix(esp32): Fixed qa program may fail issue when cpu 240m (v5.0)"
This reverts commit 453f78e011.
2025-05-08 17:39:10 +08:00
Jiang Jiang Jian 84801979ff Merge branch 'feat/pawr_bugfix_v5.0' into 'release/v5.0'
fix(nimble): Fix sync handle assignment for pawr connection (v5.0)

See merge request espressif/esp-idf!38506
2025-05-07 14:12:11 +08:00
Jiang Jiang Jian c91fa88602 Merge branch 'feat/spi_ble_log_improvement_v5.0' into 'release/v5.0'
feat(ble): Improved SPI BLE Log functionality (v5.0)

See merge request espressif/esp-idf!38737
2025-05-07 10:12:20 +08:00
Jiang Jiang Jian 6dcddbc94d Merge branch 'docs/update_ble_feature_support_status_v5.0' into 'release/v5.0'
Docs: update ble feature support status (v5.0)

See merge request espressif/esp-idf!37087
2025-05-07 10:11:02 +08:00
Jiang Jiang Jian d1b2ad339d Merge branch 'fix/ble_mesh_trans_pending_fix_v5.0' into 'release/v5.0'
fix(ble_mesh): remove tx pending assert (v5.0)

See merge request espressif/esp-idf!38641
2025-05-07 10:10:26 +08:00
Jiang Jiang Jian ae32f091fc Merge branch 'fix/multi_core_race_cond_in_panic_handler_v5.0' into 'release/v5.0'
fix(panic_handler): Prevent race condition in panic handler (v5.0)

See merge request espressif/esp-idf!38668
2025-05-07 10:09:57 +08:00
weiyuhan 8e363d1a0b docs(ble): Removed the Bluetooth SIG Qualification information for ESP32C6 and ESP32C5 on 5.0 2025-05-05 15:21:46 +08:00
Wei Yu Han 6fdad98ece Updated BLE feature status
(cherry picked from commit 6a584e9698)

Co-authored-by: weiyuhan <weiyuhan@espressif.com>
2025-05-05 15:21:46 +08:00
Island 54ec0a99f1 Merge branch 'bugfix/fix_cble50y25_207_v5.0' into 'release/v5.0'
Fixed MIC error disconnection when pairing with iOS devices on ESP32-C3 and ESP32-S3(7dcd455) (v5.0)

See merge request espressif/esp-idf!38760
2025-04-30 11:17:56 +08:00
chenjianhua 790859ef1a fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(edf923e)
- Fixed ble lib linkage issue
2025-04-28 12:15:29 +08:00
chenjianhua e79ae69a92 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(edf923e)
- Fixed MIC error disconnection when pairing with iOS devices
2025-04-28 12:14:46 +08:00
Zhou Xiao 80b64e21a7 feat(ble): Improved SPI BLE Log functionality
* Added checksum for every frame
* Added SPI slave transaction interval workaround
* Added SPI tx done isr issue workaround
* Turned buffer flush to a menuconfig and disabled by default
* Modified packet loss write operation and trigger condition
* Optimized buffer append efficiency for controller ISR
2025-04-25 16:03:08 +08:00
Sudeep Mohanty a896bc5b7d fix(panic_handler): Prevent race condition in panic handler
This commit updates all RTC WDT contexts to be local instead of global
to avoid race conditions when both cores enter the panic handler
simultaneously.
2025-04-23 15:13:35 +02:00
luoxu 8493d2b42b fix(ble_mesh): remove tx pending assert 2025-04-23 14:20:15 +08:00
Jiang Jiang Jian a7d6b07851 Merge branch 'bugfix/fix_not_update_country_in_beacon' into 'release/v5.0'
fix(wifi): fix not update country in beacon(backport v5.0)

See merge request espressif/esp-idf!38585
2025-04-22 10:19:07 +08:00
Jiang Jiang Jian c58641e9d0 Merge branch 'fix/s2_adc_cali_loss_resolution_v5.0' into 'release/v5.0'
fix(adc): fix s2 cali loss resolution (v5.0)

See merge request espressif/esp-idf!38599
2025-04-22 10:12:34 +08:00
Jiang Jiang Jian a5ecb8a5dc Merge branch 'bugfix/fix_some_ble_bugs_2503_v5.0' into 'release/v5.0'
Bugfix/fix some ble bugs 2503 (v5.0)

See merge request espressif/esp-idf!38287
2025-04-22 10:08:08 +08:00
Jiang Jiang Jian 1779887800 Merge branch 'bugfix/fix_some_ble_bugs_250331_esp32c3_v5.0' into 'release/v5.0'
Fixed some BLE bugs 250331 on esp32c3 (v5.0)

See merge request espressif/esp-idf!38576
2025-04-21 21:45:24 +08:00
gaoxu aac8132912 fix(adc): fix s2 cali loss resolution 2025-04-21 19:48:05 +08:00
zhanghaipeng 287f45ad8b fix(ble/bluedroid): Fix potential uint32_t overflow in BLE btu_start_timer 2025-04-21 19:15:09 +08:00
Zhang Hai Peng 3a16029484 fix(ble/bluedrooid): Fixed memory leak issue when deinit the host
(cherry picked from commit 6becf74cbb)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-04-21 16:28:50 +08:00
Zhang Hai Peng 1660aa1a84 fix(ble/bluedroid): Fix missing event reporting in esp_ble_create_sc_oob_data
(cherry picked from commit f291725936)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-04-21 16:28:50 +08:00
Zhang Hai Peng be5aa8712b fix(ble/bluedroid): Fixed BLE crash when disable bluedroid host
(cherry picked from commit 9dfa6ab0e9)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-04-21 16:28:50 +08:00
yinqingzhao 8ab3480ea9 fix(wifi): fix not update country in beacon 2025-04-21 16:07:21 +08:00
Chen Jian Hua f726c1d454 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(a684dd5)
- Fixed clear legacy adv error when adv not exist
- Disable anonymous extended adv reporting
- Fixed BLE assert lld_adv.c 2992
- Fixed heap assert due to adv data buffer double freeing
- Fixed BLE 0x08 disconnect when the win size is greater than half of the conn interval


(cherry picked from commit 4602665e5d)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-04-21 14:33:18 +08:00
Jiang Jiang Jian 36a8ce4896 Merge branch 'fix/blemesh25-92_v5.0' into 'release/v5.0'
fix(ble_mesh): fixed issues with decrypt failed when resending messages (v5.0)

See merge request espressif/esp-idf!38556
2025-04-21 14:07:47 +08:00
Jiang Jiang Jian 77819073b7 Merge branch 'bugfix/tsens_read_abnormal_value_v5.0' into 'release/v5.0'
fix: tsens read abnormal value in esp32c2eco4(backport v5.0)

See merge request espressif/esp-idf!38553
2025-04-21 11:40:30 +08:00
Jiang Jiang Jian 26e70c3969 Merge branch 'bugfix/fix_phy_data_partition_restoring_default_fails_issue_v5.0' into 'release/v5.0'
fix(phy): fix phy data partition restoring default fails issue(Backport v5.0)

See merge request espressif/esp-idf!38552
2025-04-21 11:06:31 +08:00
Jiang Jiang Jian 0e567403ba Merge branch 'fix/revert_esp32s2_phy_lib_v50' into 'release/v5.0'
fix(phy): revert esp32s2 libphy txrx time change

See merge request espressif/esp-idf!38554
2025-04-19 15:04:36 +08:00
Jiang Jiang Jian 02f3948a84 Merge branch 'bugfix/pmkid_password_mismatch_regression_v5.0' into 'release/v5.0'
fix(wifi): Avoid writing to NVS if station configuration is not changed (Backport v5.0)

See merge request espressif/esp-idf!38466
2025-04-19 14:44:17 +08:00
Sarvesh Bodakhe 455df4ff02 fix(wifi): Avoid writing to NVS if station configuration is not changed
Fixes the regression introduced by e93ddfd739
2025-04-19 10:20:16 +05:30
Luo Xu 9e944c86a5 fix(ble_mesh): fixed issues with decrypt failed when resending messages
(cherry picked from commit 4803cea3cc)

Co-authored-by: luoxu <luoxu@espressif.com>
2025-04-18 20:23:26 +08:00
Jiang Jiang Jian 5082a268a6 Merge branch 'bugfix/crypto_reset_on_exit_v5.0' into 'release/v5.0'
fix(esp_system): reset crypto peripherals before device restart (v5.0)

See merge request espressif/esp-idf!38480
2025-04-18 19:27:10 +08:00
Jiang Jiang Jian 1303c62078 Merge branch 'bugfix/fix_bt_access_ext_mem_in_intr_v5.0' into 'release/v5.0'
fix(bt/controller): update libbtdm_app.a (backport v5.0)

See merge request espressif/esp-idf!38550
2025-04-18 19:21:40 +08:00
wangtao@espressif.com ee271a44af fix(phy): revert esp32s2 libphy txrx time change 2025-04-18 19:16:13 +08:00
sibeibei aeeccb7a7c fix: tsens read abnormal value in esp32c2eco4 2025-04-18 19:05:27 +08:00
muhaidong 26d9925393 fix(phy): fix phy data partition restoring default fails issue
Closes https://github.com/espressif/esp-idf/issues/14698
2025-04-18 17:49:16 +08:00
linruihao 1d6002c6c2 fix(bt/controller): Fixed access external memory in isr context 2025-04-18 15:56:48 +08:00
Jin Cheng 8bd0b2dcff fix(bt/controller): update libbtdm_app.a
- fixed errors in the coexistance of ACL and SCO
- fixed dynamic priority config error in dual mode
2025-04-18 15:56:31 +08:00
Jiang Jiang Jian ef9dbc787b Merge branch 'fix/fix_wifi_connect_mem_leakage_v50' into 'release/v5.0'
fix(wifi): fix wifi connect mem leakage v50

See merge request espressif/esp-idf!38488
2025-04-18 14:43:32 +08:00
Island 5fe7b4c80f Merge branch 'change/ble_update_lib_20250414_v5.0' into 'release/v5.0'
change(ble): [AUTO_MR] 20250414 - Update ESP BLE Controller Lib (v5.0)

See merge request espressif/esp-idf!38490
2025-04-18 11:09:18 +08:00
Jiang Jiang Jian 2d8537a8f9 Merge branch 'bugfix/no_write_evt_report_v5.0' into 'release/v5.0'
fix(bt): fixed spp not reporting write event(v5.0)

See merge request espressif/esp-idf!38462
2025-04-17 15:38:55 +08:00
Abhinav Kudnar 18f69e8ef5 fix(nimble): Fix sync handle assignment for pawr connection 2025-04-17 14:33:15 +08:00
Zhou Xiao 3673c57cdd fix(ble): remove null pointer assert in npl event deinit
(cherry picked from commit ece108c0bf)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-04-17 14:05:22 +08:00
Zhou Xiao fb1267a01a change(ble): bugs fixed on spi ble log
* removed spi master in iram select for flash only firmware
* fixed memory issue in transaction init function
* fixed memory issue in transaction deinit function
2025-04-17 14:05:22 +08:00
cjin 4124ce77aa feat(ble): use new section for ble sleep on ESP32-C2 2025-04-17 14:05:22 +08:00
Jiang Jiang Jian 43005566ac Merge branch 'fix/some_issues_in_bt_controller_v5.0' into 'release/v5.0'
fix(bt): fixed some issues in bt controller(backport v5.0)

See merge request espressif/esp-idf!38446
2025-04-17 12:50:17 +08:00
Jiang Jiang Jian 2122c077de Merge branch 'change/allow_keep_sar_poweron_in_light_sleep_v5.0' into 'release/v5.0'
change(esp_hw_support): allow sar power keep on during lightsleep (v5.0)

See merge request espressif/esp-idf!38427
2025-04-17 11:12:38 +08:00
Zhou Xiao 3adf9fd579 change(ble): [AUTO_MR] Update lib_esp32c2 to fca2b9ea
(cherry picked from commit 09467baed0)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-04-17 10:53:37 +08:00
wangtao@espressif.com 22bc32930c fix(wifi): fix wifi connect mem leakage 2025-04-17 10:45:46 +08:00
Jiang Jiang Jian 152eb37307 Merge branch 'fix/fix_incorrect_ota_address_assignment_v5.0' into 'release/v5.0'
fix(nimble): Fix incorrect OTA address type assignment (v5.0)

See merge request espressif/esp-idf!38352
2025-04-17 10:37:34 +08:00
Mahavir Jain f22fd00f93 fix(esp_system): reset crypto peripherals before device restart
This change addresses a rare but critical issue observed on certain
ESP32-C3 and ESP32-S3 devices, where secure boot verification
intermittently fails due to improper cleanup of crypto peripherals
during a restart.

Background – Restart Behavior in IDF
------------------------------------
In ESP-IDF, when the device restarts (via `esp_restart()` or due to a
panic/exception), a partial peripheral reset is performed followed by a
CPU reset. However, until now, crypto-related peripherals were not
included in this selective reset sequence.

Problem Scenario
----------------
If a restart occurs while the application is in the middle of a bignum
operation (i.e., using the MPI/Bignum peripheral), the ROM code may
encounter an inconsistent peripheral state during the subsequent boot.
This leads to transient RSA-PSS secure boot verification failures.

Following such a failure, the ROM typically triggers a full-chip reset
via the watchdog timer (WDT). This full reset clears the crypto
peripheral state, allowing secure boot verification to succeed on the
next boot.

Risk with Aggressive Revocation
-------------------------------
If secure boot aggressive revocation is enabled (disabled by default in
IDF), this transient verification failure could mistakenly lead to
revocation of the secure boot digest.

If your product configuration has aggressive revocation enabled,
applying this fix is strongly recommended.

Frequency of Occurrence
-----------------------
The issue is rare and only occurs in corner cases involving
simultaneous use of the MPI peripheral and an immediate CPU reset.

Fix
---
This fix ensures that all crypto peripherals are explicitly reset prior
to any software-triggered restart (including panic scenarios),
guaranteeing a clean peripheral state for the next boot and preventing
incorrect secure boot behavior.
2025-04-16 20:45:18 +08:00
xiongweichao 5abe6e4c52 fix(bt): fixed spp not reporting write event 2025-04-16 17:14:23 +08:00
Jiang Jiang Jian bb02c680fa Merge branch 'fix/fix_uart_console_broken_after_sleep' into 'release/v5.0'
fix(esp_hw_support): fixed gpio sleep switching filling junk data to the console UART FIFO (v5.0)

See merge request espressif/esp-idf!38426
2025-04-16 16:40:10 +08:00
Jiang Jiang Jian f1af5bbd8e Merge branch 'fix/fix_current_leakage_after_ext_osc_detect_failed_v5.0' into 'release/v5.0'
fix(esp_hw_support): fix current leakage if ext32k slow clock source not exists (v5.0)

See merge request espressif/esp-idf!38428
2025-04-16 16:39:26 +08:00
gongyantao 90c4674d4f fix(bt): fixed some issues in bt controller
- add check for Wi-Fi channel
- fix the incorrect unit of duration_min in cpb tx
- recalculate the channel map when afh is enabled
- fix incorrect vendor event count causing an assertion failure
2025-04-16 15:24:54 +08:00
Shreeyash 04f9e94dea fix(nimble): Fix incorrect OTA address assignment 2025-04-16 11:54:18 +05:30
wuzhenghui 6af2629bcd fix(esp_hw_support): fix unused OSC source deinit breaks XTAL32K configuration 2025-04-15 22:07:23 +08:00
wuzhenghui 2d1501f25d fix(esp_hw_support): fix current leakage if ext32k slow clock source not exists 2025-04-15 22:06:05 +08:00
wuzhenghui f421ec9443 change(esp_hw_support): allow sar power keep on during lightsleep 2025-04-15 22:00:24 +08:00
wuzhenghui 9dc0805ccb fix(esp_hw_support): fixed gpio sleep switching filling junk data to the console UART FIFO 2025-04-15 21:57:04 +08:00
Jiang Jiang Jian cc29434655 Merge branch 'refactor/sae_pt_flag_v5.0' into 'release/v5.0'
refactor(wifi): Optimize wifi bin size for station mode (Backport v5.0)

See merge request espressif/esp-idf!38312
2025-04-15 14:37:06 +08:00
Jiang Jiang Jian 60d1381286 Merge branch 'bugfix/esp32s2_memprot_clear_v5.0' into 'release/v5.0'
fix(esp_hw_support): clear the memory protection interrupt status on boot (backport v5.0)

See merge request espressif/esp-idf!38056
2025-04-15 14:14:37 +08:00
Jiang Jiang Jian f3e272a293 Merge branch 'bugfix/handle_missing_unlock_v5.0' into 'release/v5.0'
fix(nimble): Fixed one missing ble_hs_unlock() (v5.0)

See merge request espressif/esp-idf!38197
2025-04-15 10:44:33 +08:00
Omar Chebib ffe8d09f17 fix(esp_hw_support): clear the memory protection interrupt status on boot
Fixes https://github.com/espressif/esp-idf/issues/15359
2025-04-14 19:05:36 +08:00
Sajia 3d0ceacd35 refactor(wifi): Optimize wifi bin size for station mode 2025-04-14 14:26:13 +05:30
Jiang Jiang Jian 4426dd5e8d Merge branch 'fix/sdmmc_write_sectors_dma_always_send_cmd13_v5.0' into 'release/v5.0'
fix(sdmmc): sdmmc_write_sectors_dma always check card status after write (v5.0)

See merge request espressif/esp-idf!34344
2025-04-14 15:04:17 +08:00
Jiang Jiang Jian e8d1e3ced7 Merge branch 'fix/ssdmmc_send_cmd_set_relative_addr_rca_v5.0' into 'release/v5.0'
fix(sdmmc): Retry to get another RCA if the previous response was 0 (v5.0)

See merge request espressif/esp-idf!34348
2025-04-14 15:03:07 +08:00
Jiang Jiang Jian 0318fe86ba Merge branch 'refactor/improve_p4_psram_timing_tuning_point_selection_v5.0' into 'release/v5.0'
mspi: improve p4 psram timing tuning point selection (v5.0)

See merge request espressif/esp-idf!38192
2025-04-14 15:01:34 +08:00
Jiang Jiang Jian e2aa03c18d Merge branch 'fix/update_os_time_struct_v5.0' into 'release/v5.0'
fix(esp_wifi): Modifying os_time_t datatype for platform and compiler independence

See merge request espressif/esp-idf!36710
2025-04-11 19:32:39 +08:00
tarun.kumar 04b73079b4 fix(esp_wifi): Modifying os_time_t datatype for platform and compiler independence 2025-04-10 13:05:55 +05:30
Rahul Tank 5321b3726e fix(nimble): Fixed one missing ble_hs_unlock() 2025-04-10 11:29:07 +05:30
Jiang Jiang Jian 8df0a41ec4 Merge branch 'fix/examples_python3.13_ssl_conn_failure_v5.0' into 'release/v5.0'
Change in Python3.13's default ssl context caused SSL connection failure (v5.0)

See merge request espressif/esp-idf!38203
2025-04-10 11:16:27 +08:00
Jiang Jiang Jian e8d066f8d4 Merge branch 'fix/fix_sleep_reject_on_esp32_v5.0' into 'release/v5.0'
fix(esp_hw_support): fix short duration sleep requests rejected in pd_flash lightsleep (v5.0)

See merge request espressif/esp-idf!38225
2025-04-10 11:15:48 +08:00
Jiang Jiang Jian 5fa881ddb0 Merge branch 'ci/add_test_for_ecos_wifi_enterprise_v50' into 'release/v5.0'
ci(c2/c3): add major eco version tests(v5.0)

See merge request espressif/esp-idf!37796
2025-04-10 11:15:27 +08:00
armando 9a713f9b7d refactor(mspi): improved timing tuning max consecutive success points calculation 2025-04-10 10:49:02 +08:00
Jiang Jiang Jian e5dc75ea6a Merge branch 'bugfix/handle_invalid_rd_rem_feat_v5.0' into 'release/v5.0'
fix(nimble): Handle connection posting condition (v5.0)

See merge request espressif/esp-idf!38231
2025-04-10 10:46:20 +08:00
Jiang Jiang Jian c08af7bd46 Merge branch 'feat/optimize_cble50y24_111_v5.0' into 'release/v5.0'
feat(bt/bluedroid): Added BLE eddystone sender example (v5.0)

See merge request espressif/esp-idf!38154
2025-04-10 10:38:59 +08:00
Jiang Jiang Jian a5b58094ec Merge branch 'bugfix/fix_sscanf_usage_v5.0' into 'release/v5.0'
fix(nimble): Updated sscanf usage in examples to work for all versions (v5.0)

See merge request espressif/esp-idf!38025
2025-04-10 10:37:01 +08:00
Jiang Jiang Jian 34240b11c6 Merge branch 'feat/update_mbedtls_3.6.3_v5.0' into 'release/v5.0'
feat(component/mbedtls): update to upstream v3.6.3 (v5.0)

See merge request espressif/esp-idf!38183
2025-04-10 10:34:35 +08:00
Jiang Jiang Jian a8e0e0b1f7 Merge branch 'feat/eap_domain_check_v5.0' into 'release/v5.0'
esp_wifi: Add EAP domain validation support (v5.0)

See merge request espressif/esp-idf!38283
2025-04-10 10:33:59 +08:00
Rahul Tank cd79294cfb fix(nimble): Updated sscanf usage in examples to work for all versions 2025-04-09 18:33:48 +05:30
Kapil Gupta 816e7bf914 fix(esp_wifi): Flush PMK when EAP configuration is changed 2025-04-09 14:43:46 +05:30
Kapil Gupta 8a57b738e9 fix(esp_wifi): Code cleanup for PR#15550 PR#15551
Closes https://github.com/espressif/esp-idf/pull/15550
Closes https://github.com/espressif/esp-idf/pull/15551
2025-04-08 18:08:36 +05:30
zhangbowen 7ec49b1c01 feat(bt/bluedroid): Added BLE eddystone sender example 2025-04-07 19:54:10 +08:00
Michael Stoll ef0ab70bd2 fix: Force validate when using the default crt bundle 2025-04-07 14:53:03 +05:30
Michael Stoll dbb1715325 feat: Add domain match to wifi_enterprise example 2025-04-07 14:53:02 +05:30
Michael Stoll b004916c87 feat(esp_wifi): Implement esp_eap_client_set_domain_match 2025-04-07 14:53:02 +05:30
Island 8efb55e925 Merge branch 'bugfix/fixed_c2eco4_ble_crash_issue_5.0' into 'release/v5.0'
fix(ble): fixed a heap assertion issue when enabling BLE for esp32c2 v2.0

See merge request espressif/esp-idf!38218
2025-04-03 14:43:52 +08:00
Rahul Tank 4249e00820 fix(nimble): Handle connection posting condition 2025-04-03 11:11:41 +05:30
harshal.patil 8094b821c8 fix(examples): Example CA certs must contain the Key Usage parameter
- Example CA certificates that are used for self-signed client certificates
need to include the Key Usage parameter.
- Python3.13 changed the default context of the SSL context that is
generated using ssl.create_default_context() by enabling the VERIFY_X509_STRICT
flag by default
2025-04-03 11:06:18 +05:30
wuzhenghui fc823576ac fix(esp_hw_support): fix min sleep time calculation missmatch in powerdown flash decision 2025-04-03 11:50:34 +08:00
Shen Weilong a8f3e33fbe fix(ble): fixed a heap assertion issue when enabling BLE for esp32c2 v2.0 2025-04-03 09:00:03 +08:00
luaijun 302eb16a60 ci(c2/c3): add major eco version tests(v5.0) 2025-04-02 19:09:48 +08:00
Ashish Sharma 905f73a4ab feat(mbedtls): new config to allow weak cert verification 2025-04-02 10:21:44 +05:30
Ashish Sharma ea79647066 feat(mbedtls): update to version 3.6.3 2025-04-02 10:12:17 +05:30
Jiang Jiang Jian 6cb14d5b2f Merge branch 'support/add_srp_salt_ver_gen_api_v5.0' into 'release/v5.0'
Generate Salt and verifier pair for given username and password (v5.0)

See merge request espressif/esp-idf!37914
2025-04-02 10:41:23 +08:00
Jiang Jiang Jian dda08430cd Merge branch 'bugfix/pmkid_password_mismatch_v5.0' into 'release/v5.0'
fix(wifi): Fix wrong PMKSA cache entry being used when wifi password is changed (Backport v5.0)

See merge request espressif/esp-idf!38167
2025-04-02 10:40:32 +08:00
Sajia a2bf35b1a5 fix(wifi): Fix crash when set config is called with changed password
Closes https://github.com/espressif/esp-idf/issues/15584
2025-04-01 19:38:36 +08:00
Sarvesh Bodakhe e93ddfd739 fix(wifi): Fix wrong PMKSA cache entry being used when wifi password is changed 2025-04-01 19:38:36 +08:00
Jiang Jiang Jian 9842b1fac1 Merge branch 'feature/support_sco_coexist_v5.0' into 'release/v5.0'
feat(coex): Support BR/EDR (e)SCO and Wi-Fi coexistence

See merge request espressif/esp-idf!38137
2025-04-01 19:29:59 +08:00
Rahul Tank d1deab0248 Merge branch 'bugfix/reattempt_sync_failed_unlock_v5.0' into 'release/v5.0'
fix(nimble): Added ble_hs_unlock for resync failed (v5.0)

See merge request espressif/esp-idf!38101
2025-04-01 14:42:19 +08:00
Vikram Dattu f5a5db5057 feat(provisioning): Generate Salt and verifier pair for given username and password
This commit adds a new feature to generate a salt and verifier pair for a given username and
password during the provisioning process. This is useful in scenarios where the pairing pin is
randomly generated and shown via some interface such as a display or console.

- Uses the provided username and password to generate a salt and verifier pair
- Adds support for dev mode where the pin/password can still be read from flash
2025-04-01 10:56:21 +05:30
Vikram Dattu 6eb74a9f41 refactor(esp_srp): Expose esp_srp.h and add API docs
- Also added missing `protocomm_security2` reference in `protocomm.rst`
2025-04-01 10:56:17 +05:30
Island be5933cc61 Merge branch 'feat/support_blecrt_359_v5.0' into 'release/v5.0'
Support BLE vendor hci set rx sensie and max gain on esp32c3 (v5.0)

See merge request espressif/esp-idf!38126
2025-04-01 11:04:25 +08:00
baohongde f0023145c7 feat(coex): Support BR/EDR (e)SCO and Wi-Fi coexistence 2025-04-01 10:39:29 +08:00
Jiang Jiang Jian 68448cf7e1 Merge branch 'fix/__atomic_test_and_set_v5.0' into 'release/v5.0'
fix(newlib): fix __atomic_test_and_set to ensure atomicity (v5.0)

See merge request espressif/esp-idf!37454
2025-04-01 10:32:31 +08:00
Jiang Jiang Jian 3f94b6b77b Merge branch 'fix/fix_dhcp_server_recv_decline_issue_v50' into 'release/v5.0'
fix(dhcp): fix dhcp server recv decline issue v50

See merge request espressif/esp-idf!38131
2025-04-01 10:32:02 +08:00
wangtao@espressif.com 1e29e38919 fix(dhcp): fix dhcp server recv decline issue 2025-03-31 14:07:20 +08:00
Alexey Lapshin 742d7a9f37 fix(newlib): fix __atomic_test_and_set to ensure atomicity
Before the change described in
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631393.html it
appeared that inlining built-in GCC function __atomic_test_and_set() was
incorrect. It resulted in a non-atomic write.
For GCC toolchains which do not have such patch yet, this commit fixes
__atomic_test_and_set to be atomic in IDF's builds.
2025-03-31 11:58:17 +07:00
Chen Jian Hua 45670f7761 feat(bt): Update bt lib for ESP32-C3 and ESP32-S3(566c8e3)
- Support BLE vendor hci set RX sensitivity and AGC gain command


(cherry picked from commit 8742bbe553)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-03-31 12:05:08 +08:00
Jiang Jiang Jian 02cead408e Merge branch 'fix/fix_esp32s2_recv_24m_ba_issue_v50' into 'release/v5.0'
fix(wifi): fix esp32s2 recv 24M BA issue v50

See merge request espressif/esp-idf!38116
2025-03-31 11:41:54 +08:00
Jiang Jiang Jian c5436dd14f Merge branch 'ci/add_build_test_eco_versions_v5.0' into 'release/v5.0'
ci: add build test for eco versions (v5.0)

See merge request espressif/esp-idf!35822
2025-03-31 11:30:40 +08:00
Adam Múdry 91b891c259 fix(sdmmc): Send status (CMD13) even if write/read command fails 2025-03-31 11:09:44 +08:00
Adam Múdry 20e0788361 fix(sdmmc): Improve SD card state checking after write/read command 2025-03-31 11:09:44 +08:00
Adam Múdry a908cf2aea fix(sdmmc): Retry to get another RCA if the previous response was 0 2025-03-31 10:54:48 +08:00
Jiang Jiang Jian f7faec9bee Merge branch 'bugfix/fix_wep_shared_auth_association_timeout_issue_v5.0' into 'release/v5.0'
fix(wifi): fix association timeout timer issue for wep shared auth(Backport v5.0)

See merge request espressif/esp-idf!38111
2025-03-31 10:50:37 +08:00
Rahul Tank 3adb4edd92 Merge branch 'fix/periodic_adv_example_v5.0' into 'release/v5.0'
fix(nimble):Fix conversion for min-max itvl of periodic adv param (v5.0)

See merge request espressif/esp-idf!38095
2025-03-29 19:46:07 +08:00
wangtao@espressif.com 665fd1a895 fix(wifi): fix esp32s2 recv 24M BA issue 2025-03-29 15:18:51 +08:00
Michael (XIAO Xufeng) 6471d88303 Merge branch 'bugfix/cache2phys_xip_v5.0' into 'release/v5.0'
fix(mmap): fixed spi_flash_cache2phys return addr in PSRAM issue (v5.0)

See merge request espressif/esp-idf!38051
2025-03-28 18:13:42 +08:00
muhaidong d377d94877 fix(wifi): fix association timeout timer issue for wep shared auth 2025-03-28 17:15:41 +08:00
Astha Verma ed3f29442f fix(nimble): Added ble_hs_unlock for resync failed 2025-03-28 12:20:38 +05:30
Abhinav Kudnar fbfc85feac fix(nimble): Fix conversion for min-max itvl of periodic adv param 2025-03-28 14:24:12 +08:00
Xiao Xufeng b71af88f45 ci: increase UT_C2 parallel num 2025-03-28 13:34:49 +08:00
Xiao Xufeng 4e6af199f2 ci(spi_flash): add tests for cache2phys with XIP 2025-03-28 13:34:49 +08:00
Xiao Xufeng 0f1c8cc986 fix(mmap): fixed spi_flash_phys2cache return addr in PSRAM issue
When SPIRAM_FETCH_INSTRUCTIONS or SPIRAM_RODATA enabled
2025-03-28 13:34:48 +08:00
Xiao Xufeng 2e3c42e41f fix(mmap): fixed spi_flash_cache2phys return addr in PSRAM issue
When SPIRAM_FETCH_INSTRUCTIONS or SPIRAM_RODATA enabled
2025-03-28 13:34:48 +08:00
morris 5214c71dec Merge branch 'bugfix/ledc_fade_stop_race_condition_v5.0' into 'release/v5.0'
fix(ledc): fix race condition in ledc_fade_stop causing assert failure (v5.0)

See merge request espressif/esp-idf!38084
2025-03-28 11:49:08 +08:00
morris 89bcbca982 Merge branch 'fix/mmu_multicore_app_bl_v5.0' into 'release/v5.0'
fix(MMU): fixed mmap deadlock when using multicore app with unicore bootloader (v5.0)

See merge request espressif/esp-idf!32899
2025-03-28 10:59:42 +08:00
Jiang Jiang Jian 22789f45d6 Merge branch 'backport/backport_some_changes_to_v5.0' into 'release/v5.0'
fix(wifi): fix some wifi bugs(Backport v5.0)

See merge request espressif/esp-idf!38071
2025-03-28 10:02:22 +08:00
Wang Meng Yang c0478d2ed7 Merge branch 'bugfix/sec_service_record_conn_fail_v5.0' into 'release/v5.0'
fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles(v5.0)

See merge request espressif/esp-idf!38078
2025-03-28 09:14:34 +08:00
Song Ruo Jing 3e44f63640 fix(ledc): fix race condition in ledc_fade_stop causing assert failure
Closes https://github.com/espressif/esp-idf/issues/15580
2025-03-27 20:17:36 +08:00
xiongweichao 481022f028 fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles
- Due to the number of service security records exceeding the maximum value, the connection failed
2025-03-27 20:05:57 +08:00
Roland Dobai 90712386fd Merge branch 'fix/check_python_dependencies_v5.0' into 'release/v5.0'
fix(tools): handle packages with dots in their names during dependency checks (v5.0)

See merge request espressif/esp-idf!38066
2025-03-27 19:37:46 +08:00
Xiao Xufeng 8532aab32b ci(mmu): add unicore test 2025-03-27 18:15:28 +08:00
yinqingzhao fe923b3b4b fix(sniffer): fix channel in rx_ctrl is zero when using sniffer 2025-03-27 17:29:15 +08:00
Island 87a728c41d Merge branch 'feature/add_vendor_ble_cmd_definitions_5.0' into 'release/v5.0'
Feature/add vendor ble cmd definitions (v5.0)

See merge request espressif/esp-idf!37962
2025-03-27 17:14:49 +08:00
Frantisek Hrbata fd3b6c61c7 fix(tools): handle packages with dots in their names during dependency checks
The `setuptools` package starting with `v70.1.0`[1] contains built-in
`bdist_wheel` command. Before this version `setuptools` relied on the
`bdist_wheel` command implementation from the `wheel` package. Starting with
`setuptools` `v75.8.1` the `PEP 491`[3] restrictions on the distribution name
of a wheel package are enforced[4], replacting also `.` with `_`.  Note that
`PEP 491` actually allows `.` in the distribution name, but for some reason the
latest packaging docs[10][11] does not, stating that `.` should be replaced
with `_`. This was discussion here[12].

Also the `wheel` package starting with `v0.45.0`[5] is using the `bdist_wheel`
command from `setuptools`.  This means that any package which has `.` in its
distribution name, like `ruamel.yaml.clib`, can have different wheel name,
depending on which version of the `bdist_wheel` command was used.

The `bdist_wheel` command from setuptools prior `v75.8.1` or `wheel` prior
`v0.45.0` will keep the dots in distribution name preserved.  For exaple the
`ruamel.yaml.clib` package will have distribution name
`ruamel.yaml.clib-0.2.12.dist-info. Newer versions will replace the dots with
`_` according to [10][11], creating distribution like
`ruamel_yaml_clib-0.2.12.dist-info`.

From packaging point of view `ruamel.yaml.clib-0.2.12.dist-info` and
`ruamel_yaml_clib-0.2.12.dist-info` are the same packages, but this is not
reflected in `importlib.metadata` prior python 3.10[9], which does not perform
name normalization prior the distribution search. This causes the `version`
from `importlib.metadata` to fail on python prior the 3.10 version if the
package with dots in distribution name was generated with normalized paths with
newer `setuptools`. Note that the distribution name normalization was
backported to some later 3.9 python version.

Let's demonstrate this behavior on a simple package with the
`my.minimal.package` name.

```
my_minimal_package/
├── pkg
│   └── __init__.py
└── setup.py

from setuptools import setup, find_packages

setup(
    name='my.minimal.package',
    version='0.1.0',
    packages=find_packages(),
    install_requires=[],
    entry_points={},
)
```

With python 3.9.0 search for `my.minimal.package` fails because
of the missing name normalization.
```
docker run --rm -it --platform linux/x86_64 python:3.9.0 bash
python -m venv venv
. venv/bin/activate
pip install setuptools==v75.8.1
python setup.py bdist_wheel
pip install dist/my_minimal_package-0.1.0-py3-none-any.whl
python
Python 3.9.0 (default, Nov 18 2020, 13:28:38)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.metadata import version as get_version
>>> get_version('my.minimal.package')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 551, in version
    return distribution(distribution_name).version
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 524, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 187, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: my.minimal.package
>>> get_version('my_minimal_package')
'0.1.0'
```

With python 3.10.0 search for both `my.minimal.package` and
`my_minimal_package` succeeds.
```
docker run --rm -it --platform linux/x86_64 python:3.10.0 bash
python
Python 3.10.0 (default, Dec  3 2021, 00:21:30) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.metadata import version as get_version
>>> get_version('my.minimal.package')
'0.1.0'
>>> get_version('my_minimal_package')
'0.1.0'
```

In our `tools/check_python_dependencies.py` we cannot relay on the default
distribution finder, used in the `version` function from `importlib.metadata`,
to do name normalization on older python versions.  To cope with this,
implement a fallback version search. If `version` fails with
`PackageNotFoundError`, do the name normalization according to [10][11] and try
again.

Note: There is also a `wheel`[6][7] `v0.43.0` package embeded in `setuptools`
along with the new implementation[8].  This one seems to be used if the
external `wheel` package is not available but imported. TBH this is all kinda
messy and I may have overlooked something.

* [1] https://setuptools.pypa.io/en/stable/history.html#v70-1-0
* [2] https://setuptools.pypa.io/en/stable/history.html#v75-8-1
* [3] https://peps.python.org/pep-0491/#escaping-and-unicode
* [4] https://github.com/pypa/setuptools/pull/4766/files
* [5] https://wheel.readthedocs.io/en/stable/news.html
* [6] https://github.com/pypa/setuptools/blob/main/setuptools/_vendor/wheel/__init__.py
* [7] https://github.com/pypa/setuptools/issues/1386
* [8] https://github.com/pypa/setuptools/blob/main/setuptools/command/bdist_wheel.py
* [9] https://github.com/python/cpython/commit/c6ca368867bd68d44f333df840aa85d425a51410
* [10] https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
* [11] https://packaging.python.org/en/latest/specifications/binary-distribution-format/
       #escaping-and-unicode
* [12] https://github.com/pypa/setuptools/issues/3777

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-03-27 08:05:45 +01:00
Jiang Jiang Jian b39b0cc47f Merge branch 'bugfix/fix_scan_info_error_in_lr_only_mode_v5.0' into 'release/v5.0'
fix(wifi): Fixed the scan information error in LR only mode (v5.0)

See merge request espressif/esp-idf!37904
2025-03-27 14:27:22 +08:00
morris ac8137d181 Merge branch 'fix/i2s_iram_safe_issue_while_use_psram_v5.0' into 'release/v5.0'
fix(i2s): fixed failure when dma is iram_safe but i2s not (v5.0)

See merge request espressif/esp-idf!38007
2025-03-27 14:18:44 +08:00
morris 10130e92d7 Merge branch 'contrib/github_pr_15484_v5.0' into 'release/v5.0'
fix(twai): fixed twai assert fail during recover (GitHub PR) (v5.0)

See merge request espressif/esp-idf!37996
2025-03-27 13:45:35 +08:00
diplfranzhoepfinger d1b03d36ba fix(twai): fixed twai assert fail when recover
driver try start new frame in ISR however already bus off

Closes https://github.com/espressif/esp-idf/issues/9697
2025-03-27 11:24:07 +08:00
zhangyanjiao 02cebb0975 fix(wifi): Added timer to send wake null after STA received assoc response 2025-03-27 10:48:02 +08:00
zhangyanjiao f41ea3257d fix(wifi): Fixed the scan information error in LR only mode 2025-03-27 10:43:10 +08:00
zhangyanjiao b7a612cd00 fix(wifi): Fixed the max log level not work when it exceeds the default log level 2025-03-27 10:43:10 +08:00
zhangyanjiao 7157645d65 docs(wifi): update the description for esp_mesh_send() return value
Closes https://github.com/espressif/esp-idf/issues/14440
2025-03-27 10:43:10 +08:00
zhangyanjiao 852feea9dd fix(wifi): Update the doc for espnow add peer 2025-03-27 10:43:10 +08:00
Xiao Xufeng c1bd3d2925 fix(MMU): fixed mmap deadlock when using multicore app with unicore bootloader
Closes https://github.com/espressif/esp-idf/issues/11617
2025-03-27 00:23:49 +08:00
Jiang Jiang Jian 29797ad298 Merge branch 'bugfix/pmf_enabled_sae_query_v5.0' into 'release/v5.0'
fix(wifi): SA Query responses not transmitted (Backport v5.0)

See merge request espressif/esp-idf!38009
2025-03-26 21:28:24 +08:00
Shen Weilong 1e3a0daddf feat(bt): fixed some doc error and add ocf parameters description 2025-03-26 13:26:38 +08:00
Rahul Tank ac367ac8b8 Merge branch 'feature/expose_ble_gap_wl_tx_add_v5.0' into 'release/v5.0'
fix(nimble): Exposed the ble_gap_wl_tx_add API to add a device in whitelist(v5.0)

See merge request espressif/esp-idf!37649
2025-03-25 19:09:04 +08:00
akshat e458f633d7 fix(wifi): Fix occasional dropping of SA Query responses by SoftAP 2025-03-25 13:00:20 +05:30
laokaiyao 02799dbee2 fix(i2s): add check for i2s DMA buffer array allocation
Closes https://github.com/espressif/esp-idf/issues/15607
2025-03-25 15:28:55 +08:00
Shen Weilong 98acfd514b feat(bt): added definitions for bluetooth hci vendor commands and events 2025-03-25 15:24:21 +08:00
laokaiyao 1b7004fdeb fix(i2s): fixed mismatch of the i2s and gdma iram-safe config
Closes https://github.com/espressif/esp-idf/issues/15533
2025-03-25 15:21:53 +08:00
Shen Weilong 8c74230b77 feat(ble/controller): Added memory boundary check for ESP32-C2 2025-03-25 14:38:00 +08:00
zhiweijian 33e15accdd fix(bt): Update bt lib for ESP32-C3 and ESP32-S3 (03d0f8a6)
- Remove unused functions in the controller
2025-03-25 14:38:00 +08:00
baohongde b03bac9a72 feat(bt): added definitions for BR/EDR hci vendor commands and events 2025-03-25 14:38:00 +08:00
chenjianhua 85a2c95aa7 fix(bt): Update bt lib for ESP32(dc1cd581)
- Remove unused functions in the controller
- Add an SDK config for the minimum size of encryption key
2025-03-25 14:38:00 +08:00
Abhinav Kudnar c9b4a39dea fix(nimble): Exposed the ble_gap_wl_tx_add API to add a device in whitelist 2025-03-25 11:45:15 +05:30
Aditya Patwardhan 7ff465074f Merge branch 'bugfix/provisioning_sec2_aes_iv_usage_v5.0' into 'release/v5.0'
fix(provisioning): fix incorrect AES-GCM IV usage in security2 scheme (v5.0)

See merge request espressif/esp-idf!37666
2025-03-25 13:57:29 +08:00
Island 096fb7f96e Merge branch 'feat/optimize_hci_data_recv_process_v5.0' into 'release/v5.0'
Feat/optimize hci data recv process (v5.0)

See merge request espressif/esp-idf!37830
2025-03-25 11:04:51 +08:00
Zhao Wei Liang 72f23505ed feat(ble): optimize reconfig hci uart pin code 2025-03-24 17:28:41 +08:00
Zhao Wei Liang 9c64256462 feat(ble): change nimble whitelist max size to 31
(cherry picked from commit 93357e8613)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-24 17:28:41 +08:00
Zhao Wei Liang a9d9e092d2 feat(ble): change whitelist max size to 31 on ESP32-C2
(cherry picked from commit 578f2358c6)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-24 17:28:41 +08:00
Zhao Wei Liang ea3f6d7329 fix(ble): fixed hci driver stack protection fault issue on ESP32-C2
(cherry picked from commit afd44d14b9)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-24 17:28:41 +08:00
Zhao Wei Liang 922db69683 fix(ble): fixed hci assertion issue when uart interference occurs
(cherry picked from commit 84f0b39e4d)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-24 17:28:41 +08:00
morris da555cce40 Merge branch 'bugfix/usj_wrong_return_value_v5.0' into 'release/v5.0'
fix(usb_serial_jtag): wrong return value in usb_serial_jtag_write_bytes (v5.0)

See merge request espressif/esp-idf!37973
2025-03-24 16:06:16 +08:00
Jiang Jiang Jian 1920192291 Merge branch 'bugfix/wps_reconnect_failure_v5.0' into 'release/v5.0'
fix(wpa_suppplicant): Fix for issue in wps reconnection (Backport v5.0)

See merge request espressif/esp-idf!37646
2025-03-24 15:01:27 +08:00
Wang Meng Yang 6683d50054 Merge branch 'bugfix/fix_esp32_bt_disable_crash_v5.0' into 'release/v5.0'
fix(bt): Fix controller disable cause iwdt timeout on esp32 (v5.0)

See merge request espressif/esp-idf!37776
2025-03-24 14:29:47 +08:00
Wang Meng Yang 63b16bcdda Merge branch 'bugfix/err_disc_state_changed_evt_v5.0' into 'release/v5.0'
fix(bt/bluedroid): fixed other events being reported when disconnected(v5.0)

See merge request espressif/esp-idf!37940
2025-03-24 14:10:16 +08:00
Island e29cfa8952 Merge branch 'change/ble_update_lib_20250313_v5.0' into 'release/v5.0'
change(ble): [AUTO_MR] 20250313 - Update ESP BLE Controller Lib (v5.0)

See merge request espressif/esp-idf!37818
2025-03-24 12:53:40 +08:00
morris 1f86a3e289 fix(usb_serial_jtag): wrong return value in usb_serial_jtag_write_bytes
Closes https://github.com/espressif/esp-idf/issues/15620
2025-03-24 11:47:44 +08:00
Mahavir Jain 9d73231cf9 Merge branch 'refactor/protocomm_public_hdr_v5.0' into 'release/v5.0'
refactor(protocomm): Make the protocomm `proto-c` headers public (v5.0)

See merge request espressif/esp-idf!37786
2025-03-21 12:02:15 +08:00
xiongweichao a227b6ad44 fix(bt/bluedroid): fixed other events being reported when disconnected
- Since no initial value is assigned, the variable evt is a random value,
causing the ESP_BT_GAP_DISC_STATE_CHANGED_EVT event to be reported when
the connection is disconnected.
2025-03-21 11:24:18 +08:00
morris 4d78c54a95 Merge branch 'feat/unilc_psram_s3_v5.0' into 'release/v5.0'
psram: supported UnilC octal psram on s3 (v5.0)

See merge request espressif/esp-idf!37858
2025-03-21 10:06:37 +08:00
Roland Dobai 83b9a4de2e Merge branch 'fix/extractall_deprecation_v5.0' into 'release/v5.0'
fix(idf_tools): Patch extractall() deprecation warning (v5.0)

See merge request espressif/esp-idf!37887
2025-03-21 02:03:06 +08:00
Roland Dobai 6bbaf8b88d Merge branch 'fix/install_input_validation_v5.0' into 'release/v5.0'
fix(idf_tools): Validate input features (v5.0)

See merge request espressif/esp-idf!37893
2025-03-21 01:58:40 +08:00
Rahul Tank 30ff8658a7 Merge branch 'bugfix/fix_smp_command_allocation_v5.0' into 'release/v5.0'
fix(nimble): Fix SMP command allocation (v5.0)

See merge request espressif/esp-idf!37850
2025-03-20 20:32:59 +08:00
Geng Yuchao 32e72c42e8 fix(ble): Add link requires esp_phy for ble. 2025-03-20 09:48:47 +08:00
Zhou Xiao 9ac3dcf07d feat(ble): support ble log simple output via SPI interface 2025-03-20 09:48:35 +08:00
Radim Karniš 52d60d161c fix(idf_tools): Patch extractall() deprecation warning 2025-03-19 22:07:57 +01:00
Radim Karniš 59ca6c93b4 fix(idf_tools): Validate input features 2025-03-19 22:04:17 +01:00
Rahul Tank 39e996bac0 fix(nimble): Fix SMP command allocation 2025-03-19 20:58:33 +05:30
Rahul Tank 0ba9ba4b78 Merge branch 'feat/implement_vendor_event_mask_vsc_v5.0' into 'release/v5.0'
feat(nimble): Add support for Vendor Event mask VSC(v5.0)

See merge request espressif/esp-idf!37733
2025-03-19 20:45:08 +08:00
Laukik Hase 2c0fcb7a1f refactor(protocomm): Make the protocomm proto-c headers public 2025-03-19 16:29:21 +05:30
armando ed545ba844 feat(psram): supported new octal psram on s3 2025-03-19 10:26:47 +08:00
Zhou Xiao a72a99dae5 fix(ble): fix ble log init failure mem leak for ESP32
(cherry picked from commit bb9dc5a927)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-03-18 12:53:43 +08:00
Zhou Xiao f3b25c4b34 fix(ble): fix ble log init failure mem leak for ESP32-C3
(cherry picked from commit 9ff9fb0661)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-03-18 12:53:41 +08:00
Zhou Xiao d21703765b feat(ble): add enhanced connect function on ESP32-C2
(cherry picked from commit 71cea01694)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-18 12:53:39 +08:00
Zhou Xiao b424d7bcb6 feat(ble): support ble log simple output via SPI interface for ESP32-C2
(cherry picked from commit df829ac919)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-03-18 12:53:37 +08:00
Zhou Xiao 32c92aed88 change(ble): [AUTO_MR] Update lib_esp32c2 to 5d9a6661
(cherry picked from commit f198302067)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-03-18 12:53:34 +08:00
Mahavir Jain 4909d72f9e feat(protocomm): add (hidden) config option to indicate security patch feature 2025-03-17 13:37:22 +05:30
Shreeyash c05421bd88 feat(nimble): support vendor event mask set and vendor HCI event on nimble host 2025-03-15 16:56:13 +05:30
Rahul Tank e6c139e56f Merge branch 'bugfix/fix_event_deinit_sequence_v5.0' into 'release/v5.0'
fix(nimble): Fix incorrect event deinit in gatt caching discovery (v5.0)

See merge request espressif/esp-idf!37727
2025-03-15 19:18:26 +08:00
Rahul Tank 5676daedfb fix(nimble): Fix incorrect event deinit in gatt caching discovery 2025-03-14 19:18:24 +05:30
linruihao af82753edd fix(bt): Fix controller disable cause iwdt timeout on esp32 2025-03-14 17:53:24 +08:00
Island 3d2ad66e4c Merge branch 'feature/move_tinycrypt_to_bt_common_v5.0' into 'release/v5.0'
Feature/move tinycrypt to bt common (v5.0)

See merge request espressif/esp-idf!37578
2025-03-14 15:41:56 +08:00
morris 7a59dfe095 Merge branch 'bugfix/sdmmc_high_prio_timeout_v5.0' into 'release/v5.0'
fix(sdmmc): move DMA descriptor refilling into the ISR (v5.0)

See merge request espressif/esp-idf!37691
2025-03-14 11:48:52 +08:00
Island 651fa8fd41 Merge branch 'bugfix/reduce_controller_bin_size_v5.0' into 'release/v5.0'
fix(ble/controller): reduce controller bin size (backport v5.0)

See merge request espressif/esp-idf!37745
2025-03-14 10:59:56 +08:00
Island 62e181e185 Merge branch 'fix/feed_wdts_during_ble_log_dump_c2_v5.0' into 'release/v5.0'
fix(ble): add feed wdts during ble log dump for ESP32-C2 (v5.0)

See merge request espressif/esp-idf!37716
2025-03-13 19:34:15 +08:00
zhiweijian 997d96157e fix(ble/controller): reduce controller bin size 2025-03-13 17:42:36 +08:00
Shen Weilong 32370b047e feat(bt): support hardware ecc acceleration for bt tinycrypt 2025-03-13 17:35:20 +08:00
Island 95cafb5a32 Merge branch 'bugfix/fix_some_ble_bugs_250220_esp32c3_v5.0' into 'release/v5.0'
Fixed some BLE bugs 250220 on esp32c3(b34b7d6) (v5.0)

See merge request espressif/esp-idf!37697
2025-03-13 17:34:20 +08:00
Island b230faf2e1 Merge branch 'feature/update_controller_lib_20250310_v5.0' into 'release/v5.0'
Feature/update controller lib 20250310 (v5.0)

See merge request espressif/esp-idf!37678
2025-03-13 14:24:28 +08:00
Zhou Xiao 35f1090636 fix(ble): add feed wdts during ble log dump for ESP32-C2
(cherry picked from commit e2e8e7dce1)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-03-13 12:53:30 +08:00
Island 1f51604a5d Merge branch 'bugfix/disable_dbg_hci_cmd_on_esp32_v5.0' into 'release/v5.0'
Disable debug vendor hci command on ESP32 (v5.0)

See merge request espressif/esp-idf!37626
2025-03-13 10:55:46 +08:00
Jiang Jiang Jian efd8975a65 Merge branch 'fix/add_sta_authmode_for_sta_connect_v5.0' into 'release/v5.0'
Modify authmode to sta for sta connect event(backport v5.0)

See merge request espressif/esp-idf!37653
2025-03-12 22:17:29 +08:00
Wang Meng Yang 36f41bfc45 Merge branch 'bugfix/spp_free_server_slot_err_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed freeing spp server memory when disconnected(v5.0)

See merge request espressif/esp-idf!37612
2025-03-12 17:26:33 +08:00
Wang Meng Yang 7de84062c9 Merge branch 'feat/update_phy_lib_250304_5.0' into 'release/v5.0'
feat(phy): update libphy to add rx sens set api

See merge request espressif/esp-idf!37665
2025-03-12 16:26:19 +08:00
Chen Jian Hua aaa7cb9920 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(b34b7d6)
- Fixed enhanced TX power setting and getting for legacy adv
- Fixed BLE assert lld_con.c 2387
- Fixed compatibility issues during the encryption procedure
- Support BLE vendor hci enable CCA command


(cherry picked from commit d672f909f3)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-03-12 15:33:18 +08:00
armando 304fc07c45 fix(sdmmc): move DMA descriptor refilling into the ISR 2025-03-12 11:32:13 +08:00
morris 2cec465293 Merge branch 'fix/pr_15513_psram_bss_noinit_calc_issue_v5.0' into 'release/v5.0'
psram: correct .bss and .noinit vaddr calculation (v5.0)

See merge request espressif/esp-idf!37662
2025-03-12 10:32:08 +08:00
Marius Vikhammer be7ea1c1c2 Merge branch 'bug/xtensa_cpu1_sys_lockup_v5.0' into 'release/v5.0'
fix(panic_handler): Updated panic handler to use RTC WDT (v5.0)

See merge request espressif/esp-idf!37125
2025-03-12 10:01:25 +08:00
Shen Wei Long dfaa34b9c6 feat(ble): tell controller if vhci is enabled for ESP32-C2
(cherry picked from commit 892b3a0b0e)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2025-03-11 20:53:37 +08:00
shenmengjing 16bbfbff93 docs(provisioning): Sync CN translation and EN source 2025-03-11 15:57:11 +05:30
Mahavir Jain 76bd80a56b fix(esp_local_ctrl): update for changes in protocomm security2 scheme 2025-03-11 11:26:07 +05:30
Mahavir Jain e708375782 fix(docs): update for changes in provisioning security2 scheme 2025-03-11 10:11:30 +05:30
Mahavir Jain 14bc1b4b07 fix(provisioning): fix incorrect AES-GCM IV usage in security2 scheme
Using same IV in AES-GCM across multiple invocation of
encryption/decryption operations can pose a security risk. It can help
to reveal co-relation between different plaintexts.

This commit introduces a change to use part of IV as a monotonic
counter, which must be incremented after every AES-GCM invocation
on both the client and the device side.

Concept of patch version for a security scheme has been introduced here
which can help to differentiate a protocol behavior for the provisioning
entity. The security patch version will be available in the JSON
response for `proto-ver` endpoint request with the field
`sec_patch_ver`.

Please refer to documentation for more details on the changes required
on the provisioning entity side (e.g., PhoneApps).
2025-03-11 10:11:02 +05:30
Mahavir Jain d887709d45 fix(protocomm): memory leak issue for session command0 failure case 2025-03-11 10:09:52 +05:30
zwl 86b721cdd9 feat(phy): update libphy to add rx sens set api 2025-03-11 11:53:45 +08:00
armando 85e9d68324 refactor(psram): rename .bss .noinit segments to sections
Closes https://github.com/espressif/esp-idf/pull/15513
2025-03-11 11:49:04 +08:00
Erki Aring 93bdc2dd2d fix(psram): correct heap vaddr calculation
- fixes https://github.com/espressif/esp-idf/issues/15496

Signed-off-by: armando <douyiwen@espressif.com>
2025-03-11 11:48:58 +08:00
Island cedd9a1db4 Merge branch 'feat/support_read_periodic_adv_size_v5.0' into 'release/v5.0'
feat(ble/bluedroid): Support read periodic advertiser list size command (v5.0)

See merge request espressif/esp-idf!37500
2025-03-11 10:52:41 +08:00
tarun.kumar 09f26ece10 fix(wifi): Modify authmode to sta for sta connect event 2025-03-10 22:52:27 +05:30
Sarvesh Bodakhe 88cce45a89 fix(wifi): Resolved WPS connectivity issue with pre-connected stations
This fixes the issue where station was not able connect using WPS if it was
already in connected state.

wifi_wps_scan_done() issues an esp_wifi_disconnect() before
calling esp_wifi_connect() to associate with the newly discovered AP. This
behavior incorrectly triggered a failure event (WIFI_EVENT_STA_WPS_ER_FAILED)
even though the disconnection was part of the normal WPS flow. This commit
prevents sending the false failure event, ensuring expected WPS behavior.
2025-03-10 15:22:22 +05:30
Aditi 51c0d400d8 fix(wpa_suppplicant): Add fix for issue in wps reconnection 2025-03-10 15:22:17 +05:30
chenjianhua f5b012fe41 fix(bt): Update bt lib for ESP32(e250cf1)
- Disable debug vendor hci command
2025-03-10 15:39:41 +08:00
gongyantao 9e3859f666 fix(bt): fixed some issues in bt controller
- fixed the issue where the NULL pointer was deferenced in lc_free state
- avoid accessing released ACL resources in SCO logic
2025-03-10 15:39:32 +08:00
zhanghaipeng 135a1990af feat(ble/bluedroid): Support read periodic advertiser list size command 2025-03-10 14:37:24 +08:00
Jiang Jiang Jian 44c38da499 Merge branch 'fix/fix_esp32s3_reboot_cache_failure_v5.0' into 'release/v5.0'
fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart (v5.0)

See merge request espressif/esp-idf!37589
2025-03-10 11:40:53 +08:00
xiongweichao 18e13f2868 fix(bt/bluedroid): Fixed freeing spp server memory when disconnected 2025-03-10 11:11:54 +08:00
Shen Weilong 8ab6cc3bf3 change(bt): moved porting/ext/tinycrypt into common 2025-03-10 09:21:58 +08:00
wuzhenghui 6f59a9ea51 fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart 2025-03-07 20:31:32 +08:00
Roland Dobai a1577d26bc Merge branch 'fix/remove-unnecessary-select_v5.0' into 'release/v5.0'
fix(esp_system): Remove unnecessary select from esp_system/Kconfig (v5.0)

See merge request espressif/esp-idf!37525
2025-03-07 02:22:45 +08:00
Alexey Gerenkov f5fc6672ff Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20250226_v5.0' into 'release/v5.0'
feat(tools): update openocd version to v0.12.0-esp32-20250226 (v5.0)

See merge request espressif/esp-idf!37531
2025-03-06 21:52:47 +08:00
Rahul Tank c22e7ae6f3 Merge branch 'bugfix/fix_sc_only_pairing_v5.0' into 'release/v5.0'
fix(nimble): Fix SC only pairing failure (v5.0)

See merge request espressif/esp-idf!37536
2025-03-06 17:07:19 +08:00
Erhan Kurubas b6af603098 feat(tools): update openocd version to v0.12.0-esp32-20250226 2025-03-05 15:56:04 +01:00
Rahul Tank 0118cb6f1b fix(nimble): Fix SC only pairing failure 2025-03-05 19:48:48 +05:30
Jan Beran 2fcd18fb5a fix(esp_system): Remove unnecessary select from esp_system/Kconfig 2025-03-05 15:17:26 +01:00
Island df5d6cdd4e Merge branch 'feat/ble_read_long_value_v5.0' into 'release/v5.0'
feat(ble/bluedroid): Add Read Long Characteristic Values example (v5.0)

See merge request espressif/esp-idf!37485
2025-03-05 20:06:44 +08:00
Rahul Tank 16a07891d3 Merge branch 'feat/added_change_to_ble_spp_client_v5.0' into 'release/v5.0'
feat(nimble): Allow BLE SPP Client to subscribe to the server (v5.0)

See merge request espressif/esp-idf!37459
2025-03-05 16:17:29 +08:00
Island 3b60206f3b Merge branch 'bugfix/fix_ble_kconfig_v5.0' into 'release/v5.0'
fix(ble/controller): Fix BLE Kconfig on ESP32 to avoid unexpected behavior (v5.0)

See merge request espressif/esp-idf!37418
2025-03-05 15:08:05 +08:00
zhanghaipeng 5117099572 feat(ble/bluedroid): Add Read Long Characteristic Values example 2025-03-05 14:59:20 +08:00
Rahul Tank f55e6c385b Merge branch 'bugfix/fix_link_estab_compile_failure_v5.0' into 'release/v5.0'
fix(nimble): Handle probable release breaking change (v5.0)

See merge request espressif/esp-idf!37438
2025-03-05 14:56:11 +08:00
Shreeyash 62ac09eb8f feat(nimble): Allow BLE SPP Client to subscribe to the server 2025-03-05 11:45:08 +05:30
morris 4ddfbf7941 Merge branch 'fix/build_when_rom_patch_disable_v5.0' into 'release/v5.0'
fix(spi_flash): Fix build fail when rom_patch config disabled (backport v5.0)

See merge request espressif/esp-idf!37111
2025-03-05 10:11:31 +08:00
Jiang Jiang Jian 638bb70758 Merge branch 'bugfix/fix_some_wifi_bugs_250303_v5.0' into 'release/v5.0'
fix(wifi): fix some wifi bugs 250303(Backport v5.0)

See merge request espressif/esp-idf!37444
2025-03-04 17:59:58 +08:00
Jiang Jiang Jian 0d92239a72 Merge branch 'bugfix/bt_ctrl_issues_v5.0' into 'release/v5.0'
fix(bt/controller): fixed some controller bugs on ESP32. (v5.0)

See merge request espressif/esp-idf!37400
2025-03-04 17:44:16 +08:00
C.S.M 64e169c86e refactor(spi_flash): remove redundent flash suspend check 2025-03-03 19:14:19 +08:00
Rahul Tank 99f0ecf35d fix(nimble): Handle probable release breaking change
link_estab event may be handled by customers in application and the previous would break it.
Revert few changes so as to not break the customer's code
2025-03-03 14:57:35 +05:30
muhaidong a6a4cdf3b2 fix(wifi): fix some wifi bugs 250303
1. fix disable external coexist fail issue
2. fix the issue of failing to connect to a shared wep ap
2025-03-03 16:45:58 +08:00
muhaidong 085153fb82 feat(phy): update libphy for RXDC cal opt, no antenna current opt, add cca api 2025-03-03 15:58:23 +08:00
zhanghaipeng d6f803079b fix(ble/controller): Fix BLE Kconfig on ESP32 to avoid unexpected behavior 2025-03-03 11:19:22 +08:00
Jiang Jiang Jian c7ed859d8a Merge branch 'bugfix/fix_cache_count_flash_pages_patchs_return_wrong_value_v5.0' into 'release/v5.0'
fix(rom): Fix s2 and s3 Cache_Count_Flash_Pages rom function wrapper (v5.0)

See merge request espressif/esp-idf!37159
2025-03-03 10:39:19 +08:00
Jiang Jiang Jian 54e0f77af2 Merge branch 'bugfix/check_ssid_before_sa_query_v5.0' into 'release/v5.0'
fix(esp_wifi): Check SSID in Assoc Req before starting SA Query (Backport v5.0)

See merge request espressif/esp-idf!37213
2025-03-02 17:05:26 +08:00
Tomasz Kramkowski bf5ce28592 fix(rom): Fix s2 and s3 Cache_Count_Flash_Pages rom function wrapper
The rom function on the s2 and s3 only counts one page for any pages
which are mapped to page 0 of flash as the Cache_Flash_To_SPIRAM_Copy
function attempts to map all flash page 0 mapped pages to one PSRAM
page.

As this function can be called for multiple regions, it needs to track
if a page mapped to page 0 has previously been accounted for by a
previous call. It does this using the page0_mapped in-out parameter.
This logic contains an error:

```
if (*page0_mapped == 0) {
    // BUG: If page0_count is 0, 1 is still added
    count = valid_flash_count + 1 - page0_count;
} else {
    count = valid_flash_count - page0_count;
}
*page0_mapped += page0_count;
return count;
```

The current Cache_Count_Flash_Pages wrapper in the idf attempts to
compensate for this bug by checking if the page0_mapped parameter was
changed by a call to the function and reducing the count if it has not.

This, however, will incorrectly over-compensate in situations where the
initial value of page0_mapped was not zero as the code above only
miscounts when it was zero.

This patch addresses the issue in this wrapper function by correctly
compensating for the bug only in cases where the final page0_mapped
value is 0.
2025-03-02 17:03:16 +08:00
Jiang Jiang Jian 8fbdf6c409 Merge branch 'bugfix/spp_mem_leak_v5.0' into 'release/v5.0'
fix(bt/bluedroid): fixed memory leaks in SPP callback mode (v5.0)

See merge request espressif/esp-idf!37389
2025-03-02 17:00:48 +08:00
Rahul Tank e85dbe06b4 Merge branch 'bugfix/set_data_len_post_conn_v5.0' into 'release/v5.0'
fix(nimble): update data length after connection for all chips (v5.0)

See merge request espressif/esp-idf!37292
2025-03-01 16:29:37 +08:00
Sajia 4f427f63c4 fix(esp_wifi): Check SSID in Assoc Req before starting SA Query 2025-02-28 15:11:07 +05:30
Jin Cheng 01dec39ed2 fix(bt/controller): fixed some controller bugs on ESP32.
1. added a VSC to control whether to initiate lmp_auto_rate
        - Closes https://github.com/espressif/esp-idf/issues/15133
    2. fixed EA resource cleanup error after SNIFF negotiation failure
        - Closes https://github.com/espressif/esp-idf/issues/13605
    3. removed an assertion in SCO data TX handler after disconnection
        - Closes https://github.com/espressif/esp-idf/issues/15176
2025-02-28 17:36:44 +08:00
Jin Cheng fab1b432fb fix(bt/bluedroid): fixed memory leaks in SPP callback mode 2025-02-28 16:18:50 +08:00
Island e69a86629a Merge branch 'feat/support_ble_vendor_hci_event_report_v5.0' into 'release/v5.0'
feat(bt/bluedroid): Support BLE vendor hci event reporting (v5.0)

See merge request espressif/esp-idf!37350
2025-02-28 14:30:32 +08:00
Island e831ba7722 Merge branch 'feat/add_ble_ctrl_log_module_on_esp32c3_v5.0' into 'release/v5.0'
feat(bt): Added BLE log module on ESP32-C3 and ESP32-S3(723439d) (v5.0)

See merge request espressif/esp-idf!37357
2025-02-28 14:30:20 +08:00
Jiang Jiang Jian f2fd69cd67 Merge branch 'bugfix/reason_code_error_v50' into 'release/v5.0'
fix(esp_wifi): Fix disconnect reason code error

See merge request espressif/esp-idf!36530
2025-02-28 13:24:32 +08:00
Jiang Jiang Jian cae81c6d0b Merge branch 'bugfix/ifdef_cplusplus_bracket_v5.0' into 'release/v5.0'
bugfix(wifi): Add missing brackets in the C++ guard (Backport v5.0)

See merge request espressif/esp-idf!36849
2025-02-28 11:50:17 +08:00
Jiang Jiang Jian ad2af15233 Merge branch 'fix/fix_s2_s3_rtc_iomux_clock_management_v5.0' into 'release/v5.0'
fix(esp_hw_support): fix esp32s2/esp32s3 RTC IOMUX clock management (v5.0)

See merge request espressif/esp-idf!37172
2025-02-28 11:41:20 +08:00
Jiang Jiang Jian 386c346fa2 Merge branch 'fix/fix_bad_dslp_param_after_lightsleep_v5.0' into 'release/v5.0'
fix(esp_hw_support): Fixed the issue that light sleep destroyed the parameters of subsequent deep sleep (v5.0)

See merge request espressif/esp-idf!37306
2025-02-28 11:36:46 +08:00
Rahul Tank 14ff0f1836 fix(nimble): update data length after connection for all chips 2025-02-27 21:00:13 +05:30
Rahul Tank 57ed699feb Merge branch 'bugfix/deprecate_link_estab_v5.0' into 'release/v5.0'
fix(nimble): Deprecate link_estab event (v5.0)

See merge request espressif/esp-idf!37061
2025-02-27 23:22:27 +08:00
Island 66319fbcae Merge branch 'feat/add_ble_spi_log_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Support SPI log output options for HCI (v5.0)

See merge request espressif/esp-idf!37337
2025-02-27 20:18:07 +08:00
wuzhenghui fedda1cb23 fix(esp_hw_support): fix esp32s2/esp32s3 RTC IOMUX clock management 2025-02-27 17:31:14 +08:00
chenjianhua 1d489be168 feat(bt): Update bt lib for ESP32-C3 and ESP32-S3(723439d)
- Added BLE controller debug log trace
- Added BLE controller log module
2025-02-27 16:12:18 +08:00
Wang Meng Yang 45acdc00ba Merge branch 'feat/support_ble_debug_with_gpio_v5.0' into 'release/v5.0'
Support change HID task size by Kconfig in HID example (v5.0)

See merge request espressif/esp-idf!36995
2025-02-27 15:07:43 +08:00
chenjianhua ee8fbde1a2 feat(bt/bluedroid): Support BLE vendor hci event reporting 2025-02-27 15:02:38 +08:00
chenjianhua 735daff1e5 feat(bt/bluedroid): Support BLE setting vendor event mask 2025-02-27 15:00:54 +08:00
Jiang Jiang Jian cefc3e2b26 Merge branch 'esp32/run_panic_debug_v5.0' into 'release/v5.0'
fix(esp32): Fixed qa program may fail issue when cpu 240m (v5.0)

See merge request espressif/esp-idf!37236
2025-02-27 14:20:37 +08:00
akshat d753986556 bugfix(wifi): Fix header file errors and remove esp_supplicant from check_public_headers_exceptions.txt 2025-02-27 13:56:17 +08:00
akshat 8cb861890a bugfix(wifi): Add missing brackets in the C++ guard
Closes https://github.com/espressif/esp-idf/issues/14991
2025-02-27 13:56:17 +08:00
Jiang Jiang Jian a4f233eacf Merge branch 'docs/fix_some_coexist_doc_issue_v5.0' into 'release/v5.0'
docs(coex): update rf coexistence documents (v5.0)

See merge request espressif/esp-idf!37348
2025-02-27 13:48:10 +08:00
Zhou Xiao 02e415448e fix(ble): fix flushout and sync issues 2025-02-27 13:13:59 +08:00
zhanghaipeng ae24c6e9b2 fix(ble/bluedroid): Added SPI output support for Bluedroid host log 2025-02-27 13:13:51 +08:00
zhanghaipeng 3cebdc731a fix(ble/bluedroid): Support SPI log output options for HCI 2025-02-27 13:13:43 +08:00
linruihao 06d58996fb docs(coex): update rf coexistence documents
- remove BLE connecting state in coexistence scenario
2025-02-27 11:40:00 +08:00
Martin Vychodil 331e9be3b4 Merge branch 'fix/esp_vfs_register_fd_range_warning_message_v5.0' into 'release/v5.0'
fix(storage/vfs): incorrect log level in esp_vfs_register_fd_range (v5.0)

See merge request espressif/esp-idf!36322
2025-02-27 04:27:40 +08:00
Tomáš Rohlínek 4b3d802ba5 fix(storage/vfs): incorrect log level in esp_vfs_register_fd_range
Closes https://github.com/espressif/esp-idf/issues/14327
2025-02-26 15:09:40 +01:00
Martin Vychodil e59cc9822c Merge branch 'fix/incorrect_console_open_and_close_behaviour_v5.0' into 'release/v5.0'
fix(storage/vfs_console): stop new console opens from overwriting existing fds (v5.0)

See merge request espressif/esp-idf!35271
2025-02-26 21:39:44 +08:00
Aditi babc6045f0 fix(esp_wifi): Fix disconnect reason code error 2025-02-26 18:15:38 +05:30
wuzhenghui 011d60e6ec fix(esp_hw_support): fix lightsleep destroys deepsleep rtc parameters 2025-02-26 17:03:36 +08:00
zhanghaipeng 162331877c fix(ble): Update bt lib for ESP32(2a2631f)
- Support ESP32 BLE GPIO DEBUG
2025-02-26 16:20:54 +08:00
Sudeep Mohanty 68277df469 fix(panic_handler): Updated panic handler to use RTC WDT
This commit updates the following:
- Updates the panic handler to use only the RTC WDT to reset the system.
- Refactors some of the panic handler code.
- Updates Bluetooth files where in they now feed the WDTs instead of
  reconfiguring them.
- Removes some unnecessary configuration of WDTs from various files.
- Added a unit test to verify that the system does not lock up when the
  panic handler is stuck.
- Updates the memprot unit tests to work with the refactored panic
  handler.

Closes https://github.com/espressif/esp-idf/issues/15166
Closes https://github.com/espressif/esp-idf/issues/15018
Closes https://github.com/espressif/esp-idf/issues/10110
2025-02-26 08:38:05 +01:00
Island 94adab5492 Merge branch 'bugfix/fix_ble_report_len_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fix adv data and scan rsp data not reported together in BLE active scan (v5.0)

See merge request espressif/esp-idf!37199
2025-02-26 14:11:51 +08:00
morris 16aba9936a Merge branch 'fix/hub_error_handling_v5.0' into 'release/v5.0'
fix(usb/host): Fix disconnection error handling (backport to v5.0)

See merge request espressif/esp-idf!37229
2025-02-26 10:00:41 +08:00
Island 90766acef1 Merge branch 'feat/add_ble_log_spi_out_printf_v5.0' into 'release/v5.0'
feat(ble): add printf interface for ble log spi out (v5.0)

See merge request espressif/esp-idf!37183
2025-02-25 10:35:19 +08:00
Roland Dobai a5099fa00b Merge branch 'backport/fix/empty_int_handling' into 'release/v5.0'
fix(kconfgen): Improve error message for int/hex without default

See merge request espressif/esp-idf!37215
2025-02-24 21:30:09 +08:00
chaijie@espressif.com 453f78e011 fix(esp32): Fixed qa program may fail issue when cpu 240m (v5.0) 2025-02-24 19:27:22 +08:00
Tomas Rezucha e3b21fb932 fix(usb/host): Fix disconnection error handling
In a very rare case of having 2 or more events of type
DISCONNECTION/ERROR/OVERCURRENT in a short time,
the driver has not yet recovered from
the 1st error but already got a 2nd error.

Closes https://github.com/espressif/esp-idf/issues/13364
Closes https://github.com/espressif/esp-idf/issues/15290
2025-02-24 10:29:20 +01:00
Zhang Hai Peng 2f9c756d74 feat(ble/bluedroid): Support change HID task size by Kconfig in HID example
(cherry picked from commit d4b3a7e99d)

Co-authored-by: Mitch Cairns <mitch.cairns@handheldlegend.com>
2025-02-23 17:49:07 +08:00
Zhang Hai Peng fe57c1bfb9 docs(ble/bluedroid): Optimize doc for implementation of a characteristic with 128 bit UUID
(cherry picked from commit fa40d971a5)

Co-authored-by: Erast  <78802792+MatoiDev@users.noreply.github.com>
2025-02-23 17:48:57 +08:00
Zhang Hai Peng 358020ad8f fix(ble/bluedroid): Don't log error on 16/128-bit UUID mixed descriptors
(cherry picked from commit fed1d41aa7)

Co-authored-by: Nebojša Cvetković <nebkat@gmail.com>
2025-02-23 17:48:47 +08:00
Zhang Hai Peng ae6d5f8c29 fix(ble/bluedroid): Allow 0 length indications
(cherry picked from commit 9b5a52e2f7)

Co-authored-by: Nebojsa Cvetkovic <nebkat@gmail.com>
2025-02-23 17:48:28 +08:00
Rahul Tank 5d95056424 fix(nimble): Keep only BLE_GAP_EVENT_CONNECT gap event 2025-02-23 15:16:31 +05:30
Jan Beran 2c501d5bac fix(kconfgen): Improve error message for int/hex without default
Non string values without (valid) default value will have their
str_value equal to "" (empty string). If this is detected, a warning is
printed and the value is set to None.
2025-02-21 13:11:31 +01:00
Zhang Hai Peng e202883133 fix(ble/bluedroid): Fix adv data and scan rsp data not reported together in BLE active scan
(cherry picked from commit 7f2cedc048)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-02-21 16:13:27 +08:00
wuzhenghui 0a89efed63 fix(esp_driver_gpio): manage lp_io module clock by driver 2025-02-21 14:00:52 +08:00
Zhou Xiao 91d8d8ed11 feat(ble): add printf and write with timestamp interface for ble log spi out
(cherry picked from commit f8efa4cd80)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-21 11:53:31 +08:00
Martin Vychodil ae11fd5c92 Merge branch 'bugfix/memprot_s2_intr_peri1_v5.0' into 'release/v5.0'
fix(security): ESP32S2 memory protection check for Peri1 RTCSLOW interrupt (v5.0)

See merge request espressif/esp-idf!37122
2025-02-21 04:56:44 +08:00
Island f0756ef7cd Merge branch 'feat/improve_bt_log_spi_output_interface_v5.0' into 'release/v5.0'
Feat/improve bt log spi output interface (v5.0)

See merge request espressif/esp-idf!37133
2025-02-20 19:51:30 +08:00
Jiang Jiang Jian 5949919086 Merge branch 'bugfix/fix_delete_queue_error_in_espnow_example_v5.0' into 'release/v5.0'
fix(wifi): fix the delete queue error in espnow exapmle (v5.0)

See merge request espressif/esp-idf!37018
2025-02-20 15:44:05 +08:00
Island 0364a68eee Merge branch 'change/ble_update_lib_20250114_v5.0' into 'release/v5.0'
change(ble): [AUTO_MR] 20250114 - Update ESP BLE Controller Lib (v5.0)

See merge request espressif/esp-idf!36476
2025-02-20 14:48:07 +08:00
Jiang Jiang Jian f299f69d04 Merge branch 'bugfix/sdp_uuid16_match_err_v5.0' into 'release/v5.0'
fix(bt): Fix the incorrect record found using uuid16 search(v5.0)

See merge request espressif/esp-idf!36853
2025-02-20 10:58:35 +08:00
Zhou Xiao 09eef742ea feat(ble): improved ble log spi output interface to support multisource log 2025-02-20 10:34:27 +08:00
Martin Vychodil 889cfabc89 fix(security): Fixed ESP32S2 memory protection check for Peri1 RTCSLOW interrupt
- fixes the issue found in https://github.com/espressif/esp-idf/issues/15359
- extends debug printouts in the related tests
2025-02-19 19:40:23 +01:00
Zhou Xiao 06c6996a2c feat(ble): support ble log spi out for ESP32-C3 and ESP32-S3
(cherry picked from commit e41f619566)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-19 20:53:26 +08:00
Zhou Xiao 56e38729b1 feat(ble): support ble log spi out for ESP32
(cherry picked from commit e2fbec5d2e)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-19 20:53:23 +08:00
Zhou Xiao 6bd2ef0083 change(ble): update ble log spi out config for ESP32-C2
(cherry picked from commit e4b698fc32)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-19 20:53:21 +08:00
Jiang Jiang Jian a2e76fa5aa Merge branch 'feat/add_inq_page_coex_schm_v5.0' into 'release/v5.0'
feat(coex): add coexist scheme for bt inquiry/page coexist with wifi

See merge request espressif/esp-idf!37009
2025-02-19 20:21:02 +08:00
C.S.M d28197b74f fix(spi_flash): Fix build fail when rom_patch config disabled,
Closes https://github.com/espressif/esp-idf/issues/15229
2025-02-19 17:33:33 +08:00
Island 4d1964212c Merge branch 'change/ble_update_lib_20250212_v5.0' into 'release/v5.0'
change(ble): [AUTO_MR] 20250212 - Update ESP BLE Controller Lib (v5.0)

See merge request espressif/esp-idf!37040
2025-02-19 17:19:00 +08:00
xiongweichao dc7b0241ae fix(bt): Fixed SDP record integrity check bug 2025-02-18 14:10:26 +08:00
xiongweichao dd5155ea9c fix(bt/bluedroid): fixed the format error of passkey printing 2025-02-18 14:10:26 +08:00
xiongweichao 76da49327e fix(bt/bluedroid): Fixed incorrect types of some variables in SDP 2025-02-18 14:10:26 +08:00
xiongweichao 559bcf1ec9 fix(bt): Fix incorrect type returned when searching SAP record 2025-02-18 14:10:26 +08:00
xiongweichao bf9f271ca7 fix(bt): Fix the incorrect record found using uuid16 search 2025-02-18 14:10:26 +08:00
morris 085bf84090 Merge branch 'bugfix/gpio_rom_patch_fix_v5.0' into 'release/v5.0'
fix(gpio): fix esp_rom_gpio_connect_out_signal for gpio num over 31 on esp32/s2 (v5.0)

See merge request espressif/esp-idf!36869
2025-02-18 10:24:53 +08:00
Zhou Xiao 3fcc64cc05 feat(ble): support enhanced controller log capabilities on ESP32-C2
(cherry picked from commit bbcb4a2e1f)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-02-18 10:22:43 +08:00
Rahul Tank 608d5a7626 Merge branch 'fix/wifi_provisioning_ble_v5.0' into 'release/v5.0'
fix(nimble): Handle nested locks when BT_NIMBLE_DEBUG enabled (v5.0)

See merge request espressif/esp-idf!36502
2025-02-17 18:59:52 +08:00
zhangyanjiao d6b268361c fix(wifi): fix the delete queue error in espnow exapmle
Closes https://github.com/espressif/esp-idf/issues/15383
2025-02-17 14:59:56 +08:00
liuning 69ae8735c7 feat(coex): add coexist scheme for bt inquiry/page coexist with wifi 2025-02-17 14:23:03 +08:00
Astha Verma 8391e9a02b fix(nimble): Handle nested locks when BT_NIMBLE_DEBUG enabled 2025-02-17 10:34:48 +05:30
Rahul Tank 85109aff8f Merge branch 'fix/ble_issue_05022025_v5.0' into 'release/v5.0'
fix(nimble): Fix/ble issue 05022025 v5.0

See merge request espressif/esp-idf!36759
2025-02-17 12:58:35 +08:00
Island 10bebf8139 Merge branch 'feat/add_spi_output_v5.0' into 'release/v5.0'
Feat/add spi output (v5.0)

See merge request espressif/esp-idf!36952
2025-02-17 11:04:29 +08:00
Abhinav Kudnar f7f91702b8 feat(nimble): Add offset in GATT server long read context 2025-02-15 20:28:36 +05:30
Rahul Tank 30116f0522 fix(nimble): Handle not sending disconnect event if connect was not sent 2025-02-15 20:27:56 +05:30
Astha Verma 698badd76a fix(nimble): Added sync reattempt for periodic adv 2025-02-15 20:26:35 +05:30
Astha Verma bcb9511858 fix(nimble): Handle NVS corruption due to incorrect security record
deletion
2025-02-15 20:25:55 +05:30
Rahul Tank 9297010c2e fix(nimble): Fixed warnings with COMPILTER_WARN_WRITE_STRINGS set 2025-02-15 20:25:00 +05:30
Astha Verma 2b5d70b4cf fix(nimble): Enhanced error handling by adding to print core error definitions 2025-02-15 20:22:41 +05:30
Kapil Gupta e2a2dcd808 Merge branch 'bugfix/skip_memory_reordering_wpa2_semaphr_v5.0' into 'release/v5.0'
fix(esp_wifi): fixed stack corruption in WiFi tasks (v5.0)

See merge request espressif/esp-idf!36940
2025-02-14 19:06:36 +08:00
zhouxiao 0563abdd5e change(ble): [AUTO_MR] Update lib_esp32c2 to 7b7ee440 2025-02-14 17:39:58 +08:00
Kapil Gupta e7e15d954c fix(esp_wifi): Fix stack curruption in btm task (v5.2) 2025-02-14 13:03:32 +05:30
Zhou Xiao e456978606 change(ble): update esp32c2 rom ld file
(cherry picked from commit e5feba6ed3)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-14 14:09:25 +08:00
Jiang Jiang Jian 5dbf151488 Merge branch 'change/ble_update_lib_20250103_v5.0' into 'release/v5.0'
change(ble): [AUTO_MR] 20250103 - Update ESP BLE Controller Lib (v5.0)

See merge request espressif/esp-idf!36369
2025-02-14 13:43:40 +08:00
Zhou Xiao 22bec7a569 feat(ble): add spi output interface for esp ble controller log 2025-02-14 12:18:31 +08:00
Zhou Xiao 11230d884a feat(ble): support esp ble controller spi output interface for ESP32-C2
(cherry picked from commit 0b57f8ae87)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-14 11:53:23 +08:00
Kapil Gupta cbe890bde6 fix(esp_wifi): fixed Stack corruption in DPP task 2025-02-13 15:57:48 +05:30
Kapil Gupta 968b8a215a fix(esp_wifi): fixed Stack corruption in WPS processing 2025-02-13 15:57:48 +05:30
Kapil Gupta 90b29be236 fix(esp_wifi): Fixed memory corruption in wifi enterprise
Closes https://github.com/espressif/esp-idf/issues/15370
2025-02-13 15:57:41 +05:30
Jiang Jiang Jian 9d8fc56139 Merge branch 'fix/stack_overuse_by_failure_retry_cnt_v5.0' into 'release/v5.0'
fix(wifi): Fix stack overflow when failure_retry_cnt is set in station configuration (Backport v5.0)

See merge request espressif/esp-idf!36856
2025-02-12 18:04:50 +08:00
Jiang Jiang Jian dc58edb50d Merge branch 'bugfix/fix_i2s_reconfig_slot_issue_v5.0' into 'release/v5.0'
fix(i2s): fixed incorrect logic in slot reconfig (v5.0)

See merge request espressif/esp-idf!36645
2025-02-12 16:13:32 +08:00
Jiang Jiang Jian 92f710f8c8 Merge branch 'fix/ringbuf_receives_after_aq_wraparound_v5.0' into 'release/v5.0'
fix(esp_ringbuf): Fixed no-split ringbuf issue where acquire pointer  wraps around (v5.0)

See merge request espressif/esp-idf!35871
2025-02-12 16:12:49 +08:00
Jiang Jiang Jian a3136838fa Merge branch 'bugfix/analyzer_issues_supplicant_v5.0' into 'release/v5.0'
fix(esp_wifi): fix some analyzer issues (v5.0)

See merge request espressif/esp-idf!36834
2025-02-12 16:11:16 +08:00
Jiang Jiang Jian 45ff2887e7 Merge branch 'bugfix/wps_scan_freq_v5.0' into 'release/v5.0'
fix(esp_wifi): Reduce scan frequency in WPS (v5.0)

See merge request espressif/esp-idf!36824
2025-02-12 16:10:45 +08:00
Island 9aea05c4cd Merge branch 'bugfix/fix_blufi_crash_v5.0' into 'release/v5.0'
fix(blufi): Fixed crash issue during memcpy in example (v5.0)

See merge request espressif/esp-idf!36548
2025-02-12 15:02:38 +08:00
Island 8dde4f9233 Merge branch 'fix/blufi_example_mem_access_v5.0' into 'release/v5.0'
fix(ble/blufi): Fixed blufi example security issue (v5.0)

See merge request espressif/esp-idf!36160
2025-02-12 15:02:33 +08:00
Jiang Jiang Jian 30eba26e51 Merge branch 'bugfix/remove_unused_sco_state_v5.0' into 'release/v5.0'
Bugfix/remove unused sco state (v5.0)

See merge request espressif/esp-idf!36733
2025-02-12 14:00:57 +08:00
Wang Meng Yang a55d6bc08f Merge branch 'feat/add_vsc_to_support_test_v5.0' into 'release/v5.0'
feat(bt): add vendor hci command and event to support test (v5.0)

See merge request espressif/esp-idf!36567
2025-02-12 11:15:14 +08:00
Zhou Xiao f73fdaa744 fix(ble): fixed ld file for c2eco0 and c2eco4
(cherry picked from commit 937fe2a6e3)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-02-12 10:55:00 +08:00
Zhou Xiao 79627f0151 fix(ble): fixed esp_ble_tx_power_set api issue on ESP32-C2
(cherry picked from commit 6a752eeb89)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-02-12 10:55:00 +08:00
Zhou Xiao 14b81fd066 change(ble): Update lib_esp32c2 to 2a00fb0b
(cherry picked from commit 7cd3fe6953)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-02-12 10:55:00 +08:00
Song Ruo Jing 834c9da833 fix(gpio): fix esp_rom_gpio_connect_out_signal for gpio num over 31 on esp32/s2
Closes https://github.com/espressif/esp-idf/issues/15209
2025-02-11 19:15:08 +08:00
zhanghaipeng 770f713e65 fix(ble): Update bt lib for ESP32(194dd63)
- Fix the issue where disconnection events were not reported as a slave.
- Enhance Access Address validation in compatibility mode.
2025-02-11 16:56:31 +08:00
gongyantao bb039cc318 feat(bt): add vendor hci command and event to support test
- add afh related vendor hci command and event
- add vendor event mask command
2025-02-11 16:56:31 +08:00
linruihao 7db6f812af feat(bt): add coexist scheme status support for bt page 2025-02-11 16:56:31 +08:00
Jin Cheng 13d598d50f fix(bt/controller): fixed missing critical protections on linked-list structure of (e)SCO buffers 2025-02-11 16:56:31 +08:00
chenjianhua 01d9a716b9 fix(bt): Update bt lib for ESP32(ba6739f)
- Fixed assert in lld_evt.c at line 2353
- Fixed interrupt WDT when shutdown bt controller
- Added config for BLE vendor HCI QA command
- Added config for BLE channel assessment and ping procedure
2025-02-11 16:56:31 +08:00
zhanghaipeng cc00e9f2fc fix(blufi): Enhance security in BLUFI example 2025-02-11 15:24:04 +08:00
Sarvesh Bodakhe d2306adc5e fix(wifi): Fix stack overflow when failure_retry_cnt is set
Fix issue of increased stack usage when failure_retry_cnt is set
and wifi driver internally retries connection attempts
2025-02-11 12:25:37 +05:30
zhanghaipeng b5b9f9559e docs(ble/bluedroid): Added BLE log when bond info was deleted 2025-02-11 14:17:03 +08:00
zhanghaipeng d2d3ce7f0c docs(ble/bluedroid): Optimize doc for registering BLE callback functions 2025-02-11 14:16:53 +08:00
zhanghaipeng a4c4601e59 fix(ble/blufi): Fixed blufi example security issue 2025-02-11 14:16:43 +08:00
Jiang Jiang Jian 9659bb2d03 Merge branch 'feat/esp32_set_get_bt_lpclk_src_v5.0' into 'release/v5.0'
feat(ble): Added API to get/set low power clock source(v5.0)

See merge request espressif/esp-idf!36575
2025-02-11 11:34:04 +08:00
Rahul Tank f9358b74f0 Merge branch 'bugfix/fix_scan_rsp_evt' into 'release/v5.0'
fix(nimble): Add support for missing legacy event type in report parsing (v5.0)

See merge request espressif/esp-idf!36782
2025-02-11 00:23:56 +08:00
Kapil Gupta b37f89bbce fix(esp_wifi): fix some analyzer issues
Closes https://github.com/espressif/esp-idf/issues/15097
Closes https://github.com/espressif/esp-idf/issues/15098
Closes https://github.com/espressif/esp-idf/issues/15099
2025-02-10 20:16:35 +05:30
Kapil Gupta 55c6945957 fix(esp_wifi): Reduce scan frequency in WPS 2025-02-10 15:45:39 +05:30
Jiang Jiang Jian 1443536abb Merge branch 'revert/use_wpa3_ent_authmode_naming_v5.0' into 'release/v5.0'
fix(wifi): Revert support for WPA3 Enterprise mode (v5.0)

See merge request espressif/esp-idf!36708
2025-02-10 14:42:39 +08:00
Wang Mengyang 01c34d4b62 change(bt): Remove unused state variable for (e)SCO disconnect reason in Bluedroid 2025-02-08 17:58:18 +08:00
xiongweichao a1d6fc04a4 feat(bt): Added API to get/set low power clock source 2025-02-08 14:29:33 +08:00
Wang Meng Yang 90e98f1dbc Merge branch 'docs/refactor_ceva_bt_controller_api_v5.0' into 'release/v5.0'
docs(ble): Refactored the API reference for esp32/c3/s3 BT controller (v5.0)

See merge request espressif/esp-idf!35349
2025-02-08 11:05:55 +08:00
Wei Yu Han 11f791c6c6 docs(ble): Refactored the API reference for esp32/c3/s3 BT controller (v5.0) 2025-02-08 11:05:55 +08:00
morris 8f817ec1b4 Merge branch 'fix/spi_hd_seg_fix_iwdt_timeout_v5.0' into 'release/v5.0'
fix(spi_slave_hd): fix seg mode potential iwdt timeout when multi task call (v5.0)

See merge request espressif/esp-idf!31845
2025-02-08 10:11:26 +08:00
Rahul Tank 1f004ce6fe fix(nimble): Add support for missing legacy event type in report parsing 2025-02-06 18:02:51 +05:30
Martin Vychodil c562688d32 Merge branch 'bugfix/storage_generic_pytests_v5.0' into 'release/v5.0'
fix(ci): Removed storage related entries in known generate test child pipeline warnings (v5.0)

See merge request espressif/esp-idf!36688
2025-02-05 23:57:27 +08:00
morris 1730e74921 Merge branch 'bugfix/uart_single_wire_mode_v5.0' into 'release/v5.0'
fix(uart): allow same pin for tx and rx in uart_set_pin; UART_SELECT_READ_NOTIF race conditon fix (v5.0)

See merge request espressif/esp-idf!36300
2025-02-05 14:53:30 +08:00
Marius Vikhammer 2260b66eb1 Merge branch 'bugfix/remove_wdt_both_cpus_test_v5.0' into 'release/v5.0'
test(panic): remove WDT both CPU test (v5.0)

See merge request espressif/esp-idf!36624
2025-02-05 11:50:24 +08:00
Sarvesh Bodakhe 19f29ca11b Revert "fix(wifi): Add support to recongize different WPA3 Authentication modes from specs"
This reverts commit fbc0c3e9fe.
2025-02-04 10:23:34 +05:30
Rocha Euripedes 9bc65542a4 Merge branch 'fix/test_app_certificate_v5.0' into 'release/v5.0'
Regenerate certificates for testing (v5.0)

See merge request espressif/esp-idf!36676
2025-01-31 16:00:24 +08:00
radek.tandler 3d6cf0f904 fix(storage/nvs): Fixed failing test cases in example folder 2025-01-30 12:05:39 +01:00
Euripedes Rocha 42351e8d15 fix(mqtt): Regenerate certificates for testing
- Previous fix ommited one of the client certificates by mistaque.
- This regenerates all certificates to clean that up.
2025-01-29 14:04:58 +01:00
Marius Vikhammer 6401cad494 test(panic): remove WDT both CPU test
Test never worked on S3/P4 and was flakey on ESP32. Hard to design a reliable test
case that triggers both WDT at the exact same time.
2025-01-27 11:20:39 +01:00
Mahavir Jain 0ce2167242 Merge branch 'feature/memprot_test_app_v5.0' into 'release/v5.0'
test_app: Split `panic` test app into separate source files (v5.0)

See merge request espressif/esp-idf!36625
2025-01-27 17:47:07 +08:00
Laukik Hase 87058b125e test_app: Split panic test app into separate source files
- Added minor improvements to  `panic` test app
  * Replaced existing API to disable flash cache which did not disabled cache always
    (`esp_flash_default_chip->os_func->start(esp_flash_default_chip->os_func_data)`)
    with `spi_flash_enable_interrupts_caches_and_other_cpu`
  * Included some required headers explicitly (`esp_memory_utils.h` and `esp_heap_caps.h`)
2025-01-27 08:33:00 +01:00
laokaiyao 1cef1b3e4d fix(i2s): fixed incorrect logic in slot reconfig
Closes https://github.com/espressif/esp-idf/issues/15256
2025-01-27 14:17:03 +08:00
Song Ruo Jing 1f69df2a37 fix(uart): allow same pin for tx and rx in uart_set_pin
Closes https://github.com/espressif/esp-idf/issues/14787
2025-01-24 22:06:53 +08:00
Song Ruo Jing ac2ca7bdb4 fix(uart): fix race condition with the use of UART_SELECT_READ_NOTIF
UART_SELECT_READ_NOTIF needs to be sent after received data got processed
to avoid the potential race condition
2025-01-24 22:04:12 +08:00
wanlei ace1578670 fix(spi_slave_hd): fix seg mode potential iwdt timeout when multi task call 2025-01-24 20:20:33 +08:00
Rahul Tank d7e63ef591 Merge branch 'bugfix/rename_variable_name_v5.0' into 'release/v5.0'
fix(nimble): fix compilation issue due to incorrect variable name type (v5.0)

See merge request espressif/esp-idf!36606
2025-01-24 20:01:52 +08:00
morris 85443b12f5 Merge branch 'fix/twai_io_init_glitch_v5.0' into 'release/v5.0'
fix(driver_twai): fixed bus-off when twai_init due to wrong gpio config (v5.0)

See merge request espressif/esp-idf!34824
2025-01-24 17:09:25 +08:00
morris db9e335093 Merge branch 'fix/spi_slave_no_dma_rx_overwrite_v5.0' into 'release/v5.0'
fix(driver_spi): fixed slave no dma rx overwrite when trans_len below or over (v5.0)

See merge request espressif/esp-idf!34177
2025-01-24 16:57:13 +08:00
Astha Verma 773c52b599 fix(nimble): Fix compilation issue in ble_enc_adv_data examples 2025-01-24 12:15:05 +05:30
morris f3e576a727 Merge branch 'bugfix/modbus_serial_examples_fix_mode' into 'release/v5.0'
fix(modbus): Fix the mode setup in modbus slave (backport v5.0)

See merge request espressif/esp-idf!36114
2025-01-24 13:23:24 +08:00
Rahul Tank 7de5c22f44 Merge branch 'bugfix/fix_few_nimble_issues_v5.0' into 'release/v5.0'
fix(nimble): Fix few nimble issues 11012025 (v5.0)

See merge request espressif/esp-idf!36315
2025-01-24 12:37:30 +08:00
morris a7b8aed433 Merge branch 'bugfix/esp_rom_gpio_connect_out_signal_patch_v5.0' into 'release/v5.0'
fix(gpio): patched esp_rom_gpio_connect_out_signal for esp32 and esp32s2 (v5.0)

See merge request espressif/esp-idf!35943
2025-01-24 11:16:51 +08:00
aleks 395ad7cd63 fix(modbus): Fix the mode setup in modbus slave
https://github.com/espressif/esp-idf/pull/14878
2025-01-24 11:01:42 +08:00
Kabir Waraich 32b86e8dcd Update slave.c to fix the mode
There is an issue in the lines that I have changed. I think it was copied over from the enum by mistake.
2025-01-24 11:01:42 +08:00
Island 245fb725f2 Merge branch 'bugfix/fixed_ble_issues_241220_v5.0' into 'release/v5.0'
Bugfix/fixed ble issues 241220 (v5.0)

See merge request espressif/esp-idf!35920
2025-01-24 10:53:40 +08:00
Island 743ed7b1d7 Merge branch 'feat/add_get_started_example_on_bluedroid_v5.0' into 'release/v5.0'
feat(bt/bluedroid): Added BLE get started examples for Bluedroid (v5.0)

See merge request espressif/esp-idf!35649
2025-01-24 10:53:13 +08:00
Island a68962b30c Merge branch 'refactor/optimize_ble_gatt_api_doc_v5.0' into 'release/v5.0'
refactor(bt/bluedroid): Optimize BLE GATT related APIs reference (v5.0)

See merge request espressif/esp-idf!35915
2025-01-24 10:53:08 +08:00
Island eb5c888782 Merge branch 'bugfix/fix_some_ble_bugs_241224_esp32c3_v5.0' into 'release/v5.0'
Fixed some BLE bugs 241224 on ESP32C3(fd62b31) (v5.0)

See merge request espressif/esp-idf!36192
2025-01-24 10:53:05 +08:00
morris 66745df896 Merge branch 'bugfix/fix_i2s_24b_buf_size_calc_v5.0' into 'release/v5.0'
fix(i2s): fixed some issues in I2S driver (v5.0)

See merge request espressif/esp-idf!35772
2025-01-24 10:29:31 +08:00
Rahul Tank 607a4efccf fix(nimble): Fixed encrypted advertisement menu option dependancy 2025-01-23 17:17:09 +05:30
morris b3e2d38022 Merge branch 'feat/xmc_32d_support_v5.0' into 'release/v5.0'
feat(spi_flash): support 120M on xmc25q32d flash (backport v5.0)

See merge request espressif/esp-idf!36082
2025-01-23 16:10:59 +08:00
Jiang Jiang Jian d452461f4c Merge branch 'bugfix/enable_eap_workarounds_v5.0' into 'release/v5.0'
fix(esp_wifi): Enable EAP workarounds by default (v5.0)

See merge request espressif/esp-idf!36156
2025-01-23 16:06:15 +08:00
morris 02e655706d Merge branch 'fix/fix_psram_mode_reg_wrong_timing_v5.0' into 'release/v5.0'
psram: fixed mode reg read bad timing on octal and hex psrams (v5.0)

See merge request espressif/esp-idf!35954
2025-01-23 15:39:18 +08:00
morris c6de21b7ca Merge branch 'bugfix/channel_resolution_calculation_v5.0' into 'release/v5.0'
fix(rmt): channel resolution divider rounding issue (v5.0)

See merge request espressif/esp-idf!36036
2025-01-23 15:36:02 +08:00
Rahul Tank 62c2eb733b fix(nimble): Corrected storing method of csfc to nvs 2025-01-23 11:23:34 +05:30
shreeyash 437ccaa366 fix(nimble):Updated peer OTA address type 2025-01-23 11:23:34 +05:30
Shreeyash 87c61ee4c6 fix(nimble): Added a check for invalid offset 2025-01-23 11:23:34 +05:30
Rahul Tank 3db0f28c94 fix(nimble): Fix compilation issue for combination of Ext Adv and Reattempt conn flag 2025-01-23 11:23:34 +05:30
Abhinav Kudnar 967a727e24 fix(nimble): Save the gatt context in case of preemption 2025-01-23 11:23:34 +05:30
Astha Verma f3de540bda fix(nimble): Added a function for printing HCI error definition 2025-01-23 11:23:34 +05:30
Astha Verma fadd347a41 fix(nimble): fix memory leak issue in Blufi example 2025-01-23 11:23:34 +05:30
Abhinav Kudnar dd6dfb798b feat(nimble): Additional changes in PAWR IDF Examples/support for ESP IP 2025-01-23 11:23:34 +05:30
Rahul Tank d4f6071227 fix(nimble): Reset data length global variables 2025-01-23 11:23:34 +05:30
Rahul Tank e9dde5b336 fix(nimble): Fixed a typo in Kconfig file 2025-01-23 11:23:34 +05:30
Astha Verma ddfe0657e0 fix(nimble): Added HCI_Read_Remote_Version_Information command 2025-01-23 11:23:34 +05:30
Rahul Tank c2874d469e fix(nimble): Clear our and peer security records during unpair 2025-01-23 11:23:34 +05:30
Sarvesh Bodakhe c5e3bc98ee fix(wifi): Fix bug in authmode detection for wpa2/wpa3 enterprise
1. WPA3-Enterprise mandates the use of AKM suite selector
   00:0F:AC:5 (IEEE80211 802.1X with SHA-256)
2. Add placeholder enums in 'wifi_auth_mode_t' for maintaining
   forward compatibility with minor versions > v5.0
2025-01-23 11:23:34 +05:30
Zhang Hai Peng 9cb7206d4a fix(blufi): Fixed some security issue in blufi example
(cherry picked from commit abc18e93eb)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-22 16:34:19 +08:00
wanckl 562111939e fix(driver_twai): fixed bus-off when twai_init due to wrong gpio config
Closes https://github.com/espressif/esp-idf/issues/14548
2025-01-14 15:58:58 +08:00
Aditya Patwardhan 789db760d6 change(version): Update version to 5.0.8 2025-01-10 13:09:53 +05:50
morris 21fb8b2a47 fix(rmt): channel resolution divider rounding issue
Closes https://github.com/espressif/esp-idf/issues/15092
2025-01-09 14:34:09 +08:00
Chen Jian Hua 01bcc85fd9 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(fd62b31)
- Fixed periodic adv enable params checking
- Fixed BLE assert lld_scan.c 1728 when receiving directed adv
- Support resolving RPA to identity address when creating connection
- Fixed BLE assert rwble.c 505 param 00400010
- Fixed peer address type error in HCI LE meta event
- Fixed setting random address failed when extended adv is enabled


(cherry picked from commit 326f391f9c)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-01-07 14:33:16 +08:00
Sudeep Mohanty 089baafa5b fix(esp_ringbuf): Fixed no-split ringbuf issue where acquire pointer wraps around
This commit fixes an issue with no-split ring buffers where in the the
buffer did not receive items correctly if the acquire pointer wraps
around before items are sent to it.
2025-01-06 16:45:46 +08:00
Kapil Gupta 92f5736c21 fix(esp_wifi): Enable EAP workarounds by default
Enabling this will make sure our behavior is same as upstream
wpa_supplicant.
2025-01-03 17:46:33 +05:30
Jiang Jiang Jian 89c330995c Merge branch 'bugfix/fix_sta_tsf_active_failed_v5.0' into 'release/v5.0'
fix(wifi): fix sta tsf active failed  and fix double max active time backport v5.0

See merge request espressif/esp-idf!36110
2025-01-03 19:52:39 +08:00
liuning 3e60901efe fix some wifi issues
1. fix(wifi): fix sta tsf active failed
2. fix(wifi): fix double max active time
3. fix(wifi): fix coex pwr period cant been updated by ps type set
2025-01-03 16:04:46 +08:00
Jiang Jiang Jian 3412aebe4b Merge branch 'bugfix/ledc_get_freq_calc_v5.0' into 'release/v5.0'
fix(ledc): fix ledc_get_freq calculation err due to overflow (v5.0)

See merge request espressif/esp-idf!36023
2025-01-03 15:25:10 +08:00
Jiang Jiang Jian b4a8e2adbc Merge branch 'fix/fix_flash_leakage_workaroud_config_dependcy_v5.0' into 'release/v5.0'
fix(esp_hw_support): fix FLASH leakage workaround kconfig dependcy (v5.0)

See merge request espressif/esp-idf!35994
2025-01-03 15:15:48 +08:00
Jiang Jiang Jian 0b5fbeba6e Merge branch 'fix/disable_timer_wakeup_source_with_auto_sleep_off_v5.0' into 'release/v5.0'
fix(esp_pm): disable timer wakeup source with auto light-sleep off (v5.0)

See merge request espressif/esp-idf!35889
2025-01-03 13:10:37 +08:00
Jiang Jiang Jian 717cc7cda1 Merge branch 'bugfix/use_wpa3_ent_authmode_naming_v5.0' into 'release/v5.0'
fix(wifi): Add support to recongize different WPA3 Authentication modes from specifications (Backport v5.0)

See merge request espressif/esp-idf!35759
2025-01-03 13:09:25 +08:00
Sarvesh Bodakhe 463e98e75e fix(ci): Enable public headers md5 checksum check for esp32c2 2025-01-02 19:58:51 +08:00
Sarvesh Bodakhe fbc0c3e9fe fix(wifi): Add support to recongize different WPA3 Authentication modes from specs
Add support  to recognize APs supporting 'WPA3-Enterprise-Only Mode' and
'WPA3-Enterprise-Transition Mode' using authmodes WIFI_AUTH_WPA3_ENTERPRISE
and WIFI_AUTH_WPA2_WPA3_ENTERPRISE, respectively.
2025-01-02 19:58:51 +08:00
C.S.M 15e2b9f04b feat(spi_flash): support 120M on xmc25q32d flash 2024-12-31 11:45:44 +08:00
Michael (XIAO Xufeng) 4b261859be Merge branch 'feat/increase_c2_supported_ver_v5.0' into 'release/v5.0'
feat(soc): increase c2 max supported version (v5.0)

See merge request espressif/esp-idf!35976
2024-12-30 17:19:57 +08:00
Armando 0bd7ee15f6 fix(psram): fixed mode reg read bad timing on octal and hex psrams 2024-12-27 11:35:57 +08:00
Xiao Xufeng 1dea28a8c9 feat(soc): increase c2 max supported version 2024-12-27 02:24:07 +08:00
Song Ruo Jing c6fc6d9c6c fix(ledc): fix ledc_get_freq calculation err due to overflow
Closes https://github.com/espressif/esp-idf/pull/14882
2024-12-26 19:00:43 +08:00
Island 486f7c552e Merge branch 'bugfix/force_att_tx_q_cleanup_v5.0' into 'release/v5.0'
fix(nimble): Add ATT Tx queue cleanup during link disconnection (v5.0)

See merge request espressif/esp-idf!35948
2024-12-26 18:32:01 +08:00
Marius Vikhammer c66c6dcc50 Merge branch 'ci/fix_sdmmc' into 'release/v5.0'
ci(sd): disable esp32 sd emmc tests

See merge request espressif/esp-idf!35977
2024-12-26 14:30:20 +08:00
wuzhenghui 0c773ee481 fix(esp_hw_support): fix FLASH leakage workaround kconfig dependcy 2024-12-26 11:46:02 +08:00
Marius Vikhammer 56a3aef9b1 ci(sd): disable esp32 sd emmc tests 2024-12-26 10:03:07 +08:00
Sumeet Singh 8cedbc526c fix(nimble): Add ATT Tx queue cleanup during link disconnection (v5.0) 2024-12-25 17:20:47 +05:30
Island ae9cbb0f6a Merge branch 'bugfix/solve_memory_prints_v5.0' into 'release/v5.0'
fix(nimble): Changing esp_rom_printf to ESP_LOGI when memory allocation fails (v5.0)

See merge request espressif/esp-idf!35840
2024-12-25 18:41:13 +08:00
Marius Vikhammer 49267de04a Merge branch 'ci/disable_emmc_esp32_test' into 'release/v5.0'
emmc: disable emmc esp32 ci test

See merge request espressif/esp-idf!35885
2024-12-25 17:02:27 +08:00
Song Ruo Jing d555ea2b00 fix(gpio): patched esp_rom_gpio_connect_out_signal for esp32 and esp32s2
The original ROM function enabled output for the pad first, and then connected the signal
This could result in an undesired level change at the pad

Closes https://github.com/espressif/esp-idf/issues/12826
2024-12-25 13:56:46 +08:00
Song Ruo Jing a1da3ac136 fix(uart): eliminated potential glitch on TX at setup if TX signal is inversed
Closes https://github.com/espressif/esp-idf/issues/14285
2024-12-25 13:56:18 +08:00
zwl 4ad39f320d feat(ble): add dtm configuration command in hci example 2024-12-25 10:02:01 +08:00
laokaiyao 133cbda732 fix(i2s): add check for the tdm frame bits num 2024-12-24 15:47:53 +08:00
laokaiyao f8e363e307 fix(i2s): fixed the issue in PR 14879
Closes https://github.com/espressif/esp-idf/pull/14879

[Kevin: Update to only remove the limitation for PCM short format]
2024-12-24 15:47:53 +08:00
laokaiyao 45e3474568 fix(i2s): return error when mclk_div is smaller than 2 2024-12-24 15:47:53 +08:00
laokaiyao ff937be091 fix(i2s): fixed incorrect buf size calculation 2024-12-24 15:47:53 +08:00
Zhao Wei Liang 85e299b939 feat(ble): Support get ble controller free heap size on ESP32-C2
(cherry picked from commit 2cb7d2437b)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:20:54 +08:00
Zhao Wei Liang 2cc6e7c173 feat(ble): fixed some ble issues on ESP32-C2
(cherry picked from commit 5f9a3cdd1a)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:20:51 +08:00
Zhao Wei Liang f95343e4cd feat(ble): adjust bt default scheme position
(cherry picked from commit 446239251c)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:20:49 +08:00
Chen Jian Hua 67700a0688 Merge branch 'refactor/optimize_ble_gatt_api_doc' into 'master'
refactor(bt/bluedroid): Optimize BLE GATT related APIs reference

See merge request espressif/esp-idf!34650

(cherry picked from commit 19b5381c99)

7320c77d refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
8a80617c refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
0ac97e98 refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
27b17c69 refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
ea8d7686 docs: Update gattc & gatts api header files
f508772f Apply 3 suggestion(s) to 2 file(s)
03469b52 Apply 2 suggestion(s) to 1 file(s)
aa2cf7a5 docs: fix minor issue
46dc6e96 docs(ble): Replaced "closed" with "terminated" for physical connection.

Co-authored-by: Wei Yu Han <weiyuhan@espressif.com>
2024-12-24 15:19:41 +08:00
wuzhenghui 25c5b6398d fix(esp_pm): configure timer wakeup source with auto light-sleep congiguration 2024-12-23 17:46:09 +08:00
Armando dbfbda90b9 ci(emmc): disable emmc tests on esp32 2024-12-23 16:01:56 +08:00
Chen Jian Hua 15d3576137 feat(bt/bluedroid): Added BLE get started examples for Bluedroid
(cherry picked from commit d051a2a39d)

Co-authored-by: xuzhekai <xuzhekai@espressif.com>
2024-12-21 18:40:36 +08:00
Abhinav Kudnar 9340acfc4f fix(nimble): Changing esp_rom_printf to ESP_LOGI when memory allocation fails 2024-12-20 21:47:12 +05:30
Rahul Tank e5b60eb20b Merge branch 'bugfix/fix_link_estab_param_v5.0' into 'release/v5.0'
fix(nimble): Corrected link_estab event handling parameters (v5.0)

See merge request espressif/esp-idf!35811
2024-12-21 00:09:58 +08:00
Jiang Jiang Jian a5b5d8480c Merge branch 'backport/backport_some_changes_20241219_v5.0' into 'release/v5.0'
fix(wifi): fix ap set_tx_desc for auth frame with err tid when wpa3(Backport v5.0)

See merge request espressif/esp-idf!35817
2024-12-20 10:27:29 +08:00
Jiang Jiang Jian c37f469b46 Merge branch 'bugfix/fix_btqabr2023330_v5.0' into 'release/v5.0'
fix(bt): Fix error code returned by create_conn_cancel_cmd at different status (backport v5.0)

See merge request espressif/esp-idf!35573
2024-12-20 02:01:41 +08:00
Jiang Jiang Jian 21afddd657 Merge branch 'bugfix/test_esp_flash_write_v5.0' into 'release/v5.0'
fix(spi_flash): Fix Test esp_flash_write (v5.0)

See merge request espressif/esp-idf!34560
2024-12-19 23:16:50 +08:00
Alexey Gerenkov bba2971f34 Merge branch 'change/sysview_test_config_v5.0' into 'release/v5.0'
change(sysview): run heap_log tracing tests on existing cores (v5.0)

See merge request espressif/esp-idf!35199
2024-12-19 23:08:02 +08:00
Chen Yudong af2fe64500 ci: add build test for eco versions 2024-12-19 21:06:04 +08:00
Jiang Jiang Jian 3f7d78c26c Merge branch 'fix/esp_hiram_heap_v5.0' into 'release/v5.0'
fix(esp_psram): fix a bug in PSRAM heap registration (backport v5.0)

See merge request espressif/esp-idf!35703
2024-12-19 20:36:11 +08:00
yinqingzhao 16af99f287 fix(wifi): fix ap set_tx_desc for auth frame with err tid when wpa3 and tim_offset value not correct 2024-12-19 20:25:40 +08:00
Jiang Jiang Jian 3b9ed0d780 Merge branch 'fix/coredump_checksum_error_v5.0' into 'release/v5.0'
Fix/coredump checksum error (v5.0)

See merge request espressif/esp-idf!35766
2024-12-19 20:18:50 +08:00
Jiang Jiang Jian f67494970f Merge branch 'fix/fix_adc_cali_check_scheme_api_issue_v5.0' into 'release/v5.0'
adc: fixed adc_cali_check_scheme wrong return on c2/h2/c6 (v5.0)

See merge request espressif/esp-idf!35723
2024-12-19 20:18:13 +08:00
Rahul Tank 972254c884 fix(nimble): Corrected link_estab event handling parameters 2024-12-19 15:58:54 +05:30
Jiang Jiang Jian 9f304aa98e Merge branch 'fix/tools_pip_upgrade_v5.0' into 'release/v5.0'
fix(idf_tools.py): Upgrade pip and setuptools separately (v5.0)

See merge request espressif/esp-idf!35778
2024-12-19 17:25:53 +08:00
Jiang Jiang Jian 8b93db7ee7 Merge branch 'bugfix/fix_set_perfer_ext_conn_param_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed setting perfer conn params complete event report (v5.0)

See merge request espressif/esp-idf!35744
2024-12-19 17:24:58 +08:00
Konstantin Kondrashov fc9c0fb045 fix(spi_flash): Fix Test esp_flash_write 2024-12-19 13:57:01 +08:00
wanckl cd4b074267 fix(driver_spi): fixed slave no dma rx overwrite when trans_len below or over
Closes https://github.com/espressif/esp-idf/issues/14462
2024-12-19 13:54:10 +08:00
Jiang Jiang Jian 25288d1fa7 Merge branch 'fix/fix_rssi_and_snr_issue_v50' into 'release/v5.0'
fix(wifi): fix rssi and snr issue v50

See merge request espressif/esp-idf!35781
2024-12-19 12:53:50 +08:00
wangtao@espressif.com 19c3a5a27e fix(wifi): fix rssi and snr issue 2024-12-18 20:19:54 +08:00
Roland Dobai 4450952227 fix(idf_tools.py): Upgrade pip and setuptools separately
This way the setuptools version dependency resolution will be done by
the upgraded pip.
2024-12-18 12:57:55 +01:00
Erhan Kurubas a2023c6241 change(coredump): make sure consistency with written data and calculated checksum 2024-12-18 13:34:38 +03:00
chenjianhua d6942282e8 fix(bt/bluedroid): Fixed LE channel selection algorithm event reporting 2024-12-18 11:51:22 +08:00
Chen Jian Hua 5fe21ee66f fix(bt/bluedroid): Fixed setting perfer conn params complete event report
(cherry picked from commit 4b352d1c4f)

Co-authored-by: xuzhekai <xuzhekai@espressif.com>
2024-12-18 11:33:16 +08:00
Island 94f3007db0 Merge branch 'bugfix/fix_blufi_prepare_write_v5.0' into 'release/v5.0'
fix(blufi): Fixed crash issue in Blufi example during prepare write operation (v5.0)

See merge request espressif/esp-idf!35713
2024-12-18 10:42:03 +08:00
Island 548ad60b8e Merge branch 'bugfix/fix_ble_aa_zero_c3_s3_v5.0' into 'release/v5.0'
fix(bt/ble): Update esp32c3/s3 libbtdm_app.a (555b0a2) (v5.0)

See merge request espressif/esp-idf!35688
2024-12-18 10:41:58 +08:00
Island 1ce40e18bf Merge branch 'docs/add_ble_qualification_table_v5.0' into 'release/v5.0'
docs(ble): Added BLE Qualification Information to API Guides (v5.0)

See merge request espressif/esp-idf!35707
2024-12-18 10:41:30 +08:00
Wei Yu Han ef3548fc51 docs(ble): Added BLE Qualification Information to API Guides (v5.0) 2024-12-18 10:41:30 +08:00
xiongweichao 7d340965dc fix(bt): Fixed some controller bugs
- Fix epr not being initiated after authentication is completed
- Fixed the issue HCI_READ_CLOCK returned parameter in slot
- Fixed the missmatching of CLKN and FCNT after clock update
2024-12-17 20:38:48 +08:00
chenqingqing 1feb1eab58 fix(bt): Fix error code returned by create_conn_cancel_cmd at different status
- Closes https://github.com/espressif/esp-idf/issues/7763
2024-12-17 20:38:48 +08:00
Jiang Jiang Jian 57414f787a Merge branch 'bugfix/fix_some_wifi_bugs_20241217_v5.0' into 'release/v5.0'
fix some wifi bugs(Backport v5.0)

See merge request espressif/esp-idf!35700
2024-12-17 19:48:33 +08:00
Jiang Jiang Jian c444fc3da1 Merge branch 'bugfix/fix_some_wifi_bugs_20241216_v5.0' into 'release/v5.0'
fix(wifi): fix some wifi issues(Backport v5.0)

See merge request espressif/esp-idf!35675
2024-12-17 19:19:19 +08:00
Island d0a52ca6de Merge branch 'feat/support_some_vendor_hci_for_qa_v5.0' into 'release/v5.0'
fix(ble): fixed the connect issue when rx error aa on ESP32-C2 (v5.0)

See merge request espressif/esp-idf!35643
2024-12-17 16:49:20 +08:00
Mahavir Jain d855d1d9ec Merge branch 'feature/add_support_for_http_1.0_requests_v5.0' into 'release/v5.0'
feat(esp_http_server): add support to handle HTTP 1.0 requests (v5.0)

See merge request espressif/esp-idf!35663
2024-12-17 16:38:49 +08:00
Armando 1822062bb7 fix(adc): fixed adc_cali_check_scheme wrong return on c2/h2/c6 2024-12-17 16:20:24 +08:00
Zhang Hai Peng 1db0eddb97 fix(blufi): Fixed crash issue in Blufi example during prepare write operation
(cherry picked from commit 5acb9c9b5f)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-12-17 16:13:23 +08:00
Jiang Jiang Jian 7981e5fd53 Merge branch 'bugfix/fix_sniffer_fail_on_ci_v5.0' into 'release/v5.0'
fix(ci): Enlarge the pcap memory size in sniffer example (v5.0)

See merge request espressif/esp-idf!35693
2024-12-17 14:01:55 +08:00
Omar Chebib 7e208d8284 fix(esp_psram): fix a bug in PSRAM heap registration
This commit fixes a bug in the PSRAM heap initialization that didn't take into
account the reserved himem area when registering the PSRAM virtual space as a heap.
2024-12-17 12:26:47 +08:00
muhaidong 44f074d719 fix(wifi): fixed blufi connect wep or wpa ap fail issue 2024-12-17 11:34:03 +08:00
muhaidong bf58767f95 fix(phy): fixed calibration warning infomation inaccurate issue
Closes https://github.com/espressif/esp-idf/issues/14963
2024-12-17 11:31:43 +08:00
muhaidong b3a3053c1a fix(phy): fix esp32 rx sense issue
improve esp32 rx sense from -94 to -97 which was introduced by 4dfeb9c2
2024-12-17 11:27:16 +08:00
zhanghaipeng 7f7efaccfc docs(ble/bluedroid): Optimize BLE example documentation 2024-12-17 11:19:18 +08:00
Jiang Jiang Jian 9d5c70637e Merge branch 'fix/littlefs_image_creation_windows_v5.0' into 'release/v5.0'
fix(littlefs): Allow LittleFS image generation on Windows + version bump (v5.0)

See merge request espressif/esp-idf!34919
2024-12-17 11:17:25 +08:00
Troy cf5bcefef1 fix(wifi/mesh): Modify examples/mesh/internal_communication
Delete the secondary judgment of whether it is the root node in the sending task

Closes https://github.com/espressif/esp-idf/pull/14373

Signed-off-by: zhangyanjiao <zhangyanjiao@espressif.com>
2024-12-17 11:05:41 +08:00
zhangyanjiao ddfaec54ed fix(ci): Enlarge the pcap memory size in sniffer example 2024-12-17 11:05:19 +08:00
xiongweichao 72cfdbe569 fix(ble): fixed that the resolvable private address does not change when light sleep is enabled 2024-12-17 10:48:14 +08:00
zhanghaipeng 64a5f4e20d fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(555b0a2)
- Check Access Address when receive connection request PDU
- Fix issue with BLE5.0 duplicate scan for chained packets
2024-12-17 10:47:55 +08:00
muhaidong 5e1d512dab fix(wifi): fix some wifi issues
1. fixed softap rx bar from null bss issue
2. fixed association refused temporarily lead auth timeout issue
2024-12-16 21:07:20 +08:00
Jiang Jiang Jian fc9cbc7072 Merge branch 'feat/add_no_bss_deauth_protect_v50' into 'release/v5.0'
feat(wifi): add protect for softap send no bss deauth releated code

See merge request espressif/esp-idf!35655
2024-12-16 20:43:20 +08:00
nilesh.kale 6af45b5f1c feat(esp_http_server): add support to handle HTTP 1.0 requests
This commit adds support to handle HTTP/1.0 requests alongside HTTP/1.1 for
legacy compliance purposes.
2024-12-16 14:11:44 +05:30
Island 57ef4c4965 Merge branch 'feat/support_bleqabr24_1539_v5.0' into 'release/v5.0'
feat(bt/bluedroid): Added config for saving BLE bonding keys to NVS (v5.0)

See merge request espressif/esp-idf!35600
2024-12-16 14:25:51 +08:00
wangtao@espressif.com 5cbedb4df0 feat(wifi): add protect for softap send no bss deauth releated code 2024-12-16 14:24:39 +08:00
Jiang Jiang Jian 265569f647 Merge branch 'feature/reason_for_ap_stadisconnected_event_v5.0' into 'release/v5.0'
refactor(wifi): Cleanup in disconnecting station path for softAP (Backport v5.0)

See merge request espressif/esp-idf!35630
2024-12-16 11:07:38 +08:00
Zhao Wei Liang cd6a69ed01 fix(ble): fixed the connect issue when rx error aa on ESP32-C2
(cherry picked from commit 6b01a56e09)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-16 11:03:16 +08:00
Island dddc60a0ee Merge branch 'fix/ble_mesh_enable_high_duty_itvl_on_nimble_v5.0' into 'release/v5.0'
feat(ble_mesh): select BT_NIMBLE_HIGH_DUTY_ADV_ITVL when using random adv itvl (v5.0)

See merge request espressif/esp-idf!35595
2024-12-13 16:22:06 +08:00
Sarvesh Bodakhe e769f8aa0c refactor(wifi): Cleanup in disconnecting station path for softAP 2024-12-13 13:03:46 +05:30
Rahul Tank cc57e36ee4 Merge branch 'bugfix/fix_vulnerability_v5.0' into 'release/v5.0'
fix(nimble): Fixes for security vulnerabilities reported in NimBLE (v5.0)

See merge request espressif/esp-idf!35503
2024-12-13 10:19:22 +08:00
Chen Jian Hua 87475cd99c fix(bt/bluedroid): Fixed failure to get host status when host is not enabled
(cherry picked from commit 23455ea9c2)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-12-12 12:33:18 +08:00
Chen Jian Hua 0de7c62918 feat(bt/bluedroid): Added config for saving BLE bonding keys to NVS
(cherry picked from commit 6d1160b2e6)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-12-12 12:33:16 +08:00
Luo Xu 6c9f24b109 feat(ble_mesh): select BT_NIMBLE_HIGH_DUTY_ADV_ITVL
(cherry picked from commit 6faf0a59fdcf063d40fc1000a209341318131185)

Co-authored-by: luoxu <luoxu@espressif.com>

(cherry picked from commit a7622efd0c)

Co-authored-by: Luo Xu <luoxu@espressif.com>
2024-12-12 12:23:17 +08:00
Island bdfc959da2 Merge branch 'fix/ble_mesh_bugs_fixed_v5.0' into 'release/v5.0'
fix(ble_mesh): Miscellaneous update (v5.0)

See merge request espressif/esp-idf!35423
2024-12-12 10:53:33 +08:00
Island f924f612cf Merge branch 'bugfix/fix_hid_crash_v5.0' into 'release/v5.0'
fix(ble): Fix crash issue during logging (v5.0)

See merge request espressif/esp-idf!35507
2024-12-12 09:06:02 +08:00
Rahul Tank 882e739cc9 fix(nimble): Fixes for security vulnerabilities reported in NimBLE 2024-12-11 19:10:59 +05:30
Jiang Jiang Jian b3f2d7f343 Merge branch 'bugfix/sae_pk_transition_disable_v5.0' into 'release/v5.0'
fix(wifi): Fix bug in wrong profile checking of AP's RSNXE IE and other fixes (Backport v5.0)

See merge request espressif/esp-idf!35235
2024-12-11 18:09:52 +08:00
Rahul Tank 1d78ba8af8 Merge branch 'feat/pts_changes_v5.0' into 'release/v5.0'
feat(nimble): BLE 5.4 PTS Related Features and Fixes (v5.0)

See merge request espressif/esp-idf!35024
2024-12-11 16:00:45 +08:00
luoxu 7e41682eb3 fix(ble_mesh): Miscellaneous update 2024-12-11 11:04:52 +08:00
Shyamal Khachane 7a7b6be32a fix(esp_wifi): Populate appropriate reason codes when softAP sends deauthentication
Populate appropriate reason for sending deauthentication when softAP receives
invalid RSN IE from association request
2024-12-10 22:39:21 +05:30
Sarvesh Bodakhe 8058b97326 fix(wifi): Fix wrong wifi reason codes reported on station and softAP
- Fix wrong reason code reported when softAP issues a disconnect for station
- Fix wrong reason code reported when association timeout happens at station
- Deprecate enums WIFI_REASON_ASSOC_EXPIRE, WIFI_REASON_NOT_AUTHED, WIFI_REASON_NOT_ASSOCED
  and use WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY,
  WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA,
  WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA respectively
- Update wifi documentation related to reason codes
2024-12-10 22:39:21 +05:30
Sarvesh Bodakhe eeaf6714a5 fix(wpa_supplicant): Fix debug print in wps_start_msg_timer() 2024-12-10 22:39:21 +05:30
Sarvesh Bodakhe 887cce927b fix(wifi): Fix bug in wrong profile checking of AP's RSNXE IE 2024-12-10 22:39:19 +05:30
Sumeet Singh 444cb8778a feat(nimble): backport fixes for BLE 5.4 PTS Related Features and Fixes 2024-12-10 16:56:34 +05:30
Abhinav Kudnar 071f0f9a92 feat(nimble): Added PAwR support for nimble with IDF examples 2024-12-10 15:45:26 +05:30
Sumeet Singh 7b5a7a5401 fix(nimble): Added
1. Option to disable automatic discovery when receiving out-of-sync
2. Fixed bugs related to robust caching
2024-12-10 15:45:26 +05:30
Sumeet Singh 253b72254e feat(nimble): Added ways to enable/disable some menuconfig options at runtime 2024-12-10 15:45:26 +05:30
Sumeet Singh 5c18ac288a feat(nimble): Added option to disable automatically sending extra credits to peer 2024-12-10 15:45:26 +05:30
Sumeet Singh ab7d0558d2 feat(nimble): Added support for persisting csf characteristic for bonded devices 2024-12-10 15:45:26 +05:30
Sumeet Singh 1355375592 feat(nimble): Added option in menuconfig to enable Secure Connections Only mode 2024-12-10 15:45:26 +05:30
Sumeet Singh cfe927007b fix(nimble): fix and enable connection subrating 2024-12-10 15:45:26 +05:30
Sumeet Singh 006a6b29f1 fix(nimble): Added option to enable code under Enhanced COC 2024-12-10 15:45:26 +05:30
Sumeet Singh b7ace3d6c6 fix(nimble): Fixed Device Information and Scan Parameters service 2024-12-10 15:45:26 +05:30
Sumeet Singh c240d55f6c fix(nimble): Fixed encrypted advertisement data example 2024-12-10 15:45:26 +05:30
Sumeet Singh c9337d120b feat(nimble): Added LE GATT Security Levels Characteristic 2024-12-10 15:45:26 +05:30
Sumeet Singh 5d0009316a feat(nimble): Added support for EATT Credit Based Flow Control Mode 2024-12-10 15:45:26 +05:30
Sumeet Singh 8997abe064 feat(nimble): read multiple variable length characteristics 2024-12-10 15:45:26 +05:30
Roshan Bangar 91578aafcf feat(nimble): Gatt caching support 2024-12-10 15:45:26 +05:30
Roshan Bangar 0fd1300d50 feat(nimble): added HID over Gatt profile support 2024-12-10 15:45:26 +05:30
Roshan Bangar 5c7ae46538 feat(nimble): Added support for dynamic services 2024-12-10 15:45:26 +05:30
SumeetSingh19 ba6a2dbb42 feat(nimble): signed write support 2024-12-10 15:45:26 +05:30
SumeetSingh19 2031366e54 feat(nimble): authorization permission on gatt read and write 2024-12-10 15:45:26 +05:30
SumeetSingh19 404c548ad1 fix(nimble): allow auto connection and observer role 2024-12-10 15:45:25 +05:30
Sumeet Singh 98e38a5d2a NimBLE: Exposed macros used by GAP service to menuconfig 2024-12-10 15:44:56 +05:30
zhanghaipeng d5446608e3 feat(bt): Add support for converting BT HCI logs to btsnoop format 2024-12-09 17:50:19 +08:00
Zhang Hai Peng 00f6929123 fix(blufi): Fixed blufi init fail after deinit
(cherry picked from commit 7addb57ccd)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-12-09 17:45:19 +08:00
Zhang Hai Peng 722a69a1f7 fix(ble): Fixed crash in BLE HID host example during logging
(cherry picked from commit ab1e3c1ffd)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-12-09 17:14:51 +08:00
Jiang Jiang Jian 8059b611c3 Merge branch 'bugfix/fix_wifi_bugs_241206_v5.0' into 'release/v5.0'
bugfix: fix some wifi bugs 241206 v5.0

See merge request espressif/esp-idf!35481
2024-12-09 15:28:46 +08:00
Rahul Tank 689c804eff Merge branch 'fix/hci_err_code_def_v5.0' into 'release/v5.0'
fix(nimble): Added a function for printing HCI error definition (v5.0)

See merge request espressif/esp-idf!35205
2024-12-06 23:59:50 +08:00
Erhan Kurubas c8d57f3c5e fix(sysview): fix test failure 2024-12-06 19:52:10 +08:00
Erhan Kurubas d55663f07b fix(sysview): add prefix to the module desc to avoid stuck in Segger SystemView app
Closes https://github.com/espressif/esp-idf/issues/10483
2024-12-06 19:52:10 +08:00
morris 09e84586d1 Merge branch 'bugfix/uart_vfs_read_behavior_v5.0' into 'release/v5.0'
fix(uart_vfs): read() now aligned to POSIX defined behavior (v5.0)

See merge request espressif/esp-idf!35397
2024-12-06 18:38:30 +08:00
wangtao@espressif.com 25143e1e4a fix(wifi): fix ampdu to normal cause free buffer twice issue 2024-12-06 17:59:17 +08:00
sibeibei 78aba309f3 fix(wifi): fix some wifi issues 241031
1. fix cant sleep if reconnect to connected ap
    2. clear pmk in internal reconnection
    3. update connect status for init-->auth
2024-12-06 17:57:25 +08:00
Island 29013b4263 Merge branch 'bugfix/fix_ble_creat_conn_fail_enh_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fixed BLE create connection fail because of invalid own address type (v5.0)

See merge request espressif/esp-idf!35015
2024-12-06 15:49:32 +08:00
Wang Meng Yang 566ada5401 Merge branch 'bugfix/sdp_get_uuid_error_v5.0' into 'release/v5.0'
fix(bt/bluedroid): fixed issues introduced by byte alignment(v5.0)

See merge request espressif/esp-idf!35254
2024-12-06 15:14:29 +08:00
Wang Meng Yang 26254ac73b Merge branch 'bugfix/access_null_in_hf_cb_v5.0' into 'release/v5.0'
fix(bt/bluedroid): fixed access NULL in HFP callback handler (v5.0)

See merge request espressif/esp-idf!35410
2024-12-06 15:08:56 +08:00
Jiang Jiang Jian 70049e8922 Merge branch 'bugfix/watchdog_timer_ap_sta_esp32c5_v5.0' into 'release/v5.0'
fix(wifi): Prevent overwriting of scan parameters in consecutive scans (Backport v5.0)

See merge request espressif/esp-idf!34487
2024-12-06 14:13:52 +08:00
morris a6acfe3591 Merge branch 'fix/fix_esp32_pico_v3_psram_not_ignored_issue_v5.0' into 'release/v5.0'
psram: fixed esp32p pico-v3 psram init not ignored issue (v5.0)

See merge request espressif/esp-idf!35381
2024-12-05 22:10:13 +08:00
Tomáš Rohlínek dae7bfa69b fix(storage/vfs_console): stop new console opens from overwriting existing fds 2024-12-05 12:39:59 +01:00
akshat cf22b6cff7 fix(wifi): Prevent overwriting of scan parameters in consecutive scans 2024-12-05 15:00:54 +05:30
Rahul Tank efe76e2eb3 Merge branch 'bugfix/change_hci_cb_logging_v5.0' into 'release/v5.0'
fix(nimble): Replace ESP_LOG* with esp_rom_printf in controller context callback (v5.0)

See merge request espressif/esp-idf!35031
2024-12-05 16:42:26 +08:00
Astha Verma adc64031d9 fix(nimble): Added a function for printing HCI error definition 2024-12-05 14:11:35 +05:30
Jiang Jiang Jian a44b49dcfb Merge branch 'bugfix/retry_count_when_sta_disconnect_v5.0' into 'release/v5.0'
fix(wifi): Do not attempt re-connection as per 'failure_retry_cnt' when sta itself issues disconnect in between of connection establishment (Backport v5.0)

See merge request espressif/esp-idf!34188
2024-12-05 16:12:54 +08:00
Rahul Tank 8d085f23d5 Merge branch 'bugfix/resolve_watchdog_crash_v5.0' into 'release/v5.0'
fix(nimble): Resolved watchdog due to memory exceed prints (v5.0)

See merge request espressif/esp-idf!35213
2024-12-05 15:18:57 +08:00
Armando 8257d45b86 fix(psram): fixed esp32p pico-v3 psram init not ignored issue
Closes https://github.com/espressif/esp-idf/issues/14970
2024-12-05 14:41:13 +08:00
Jin Cheng d61db5ca12 fix(bt/bluedroid): fixed access NULL in HFP callback handler 2024-12-05 13:22:25 +08:00
akshat 37531968a8 fix(wifi): Do not try re-connection when sta disconnects with esp_wifi_disconnect()
Do not follow wifi_config::wifi_sta_config::failure_retry_cnt logic when
station itself issues a disconnect from AP/Router using
esp_wifi_disconnect()
2024-12-05 10:12:11 +05:30
Rahul Tank 0dfc977374 fix(nimble): Replace ESP_LOG* with esp_rom_printf in controller context callback 2024-12-04 22:01:41 +08:00
Jiang Jiang Jian 3106c368eb Merge branch 'feat/support_esp32c2_eco4_wifi_v50' into 'release/v5.0'
Feat/support esp32c2 eco4 wifi v50

See merge request espressif/esp-idf!34659
2024-12-04 20:43:06 +08:00
Jiang Jiang Jian 1f5789e649 Merge branch 'fix/duplicated_enc_restart_request_when_change_key_type_v5.0' into 'release/v5.0'
fix(bt): fixed some issues in esp32 bt controller(backport v5.0)

See merge request espressif/esp-idf!35298
2024-12-04 19:21:47 +08:00
Song Ruo Jing f513286872 fix(uart_vfs): read() now aligned to POSIX defined behavior
- For blocking mode, block until data available
- Return with the bytes available in the file at the time,
  it should not block until reaching the requested size

And read() should not realy return on the newline character
Closes https://github.com/espressif/esp-idf/issues/14155
2024-12-04 15:14:18 +08:00
Jiang Jiang Jian e4c871935a Merge branch 'bugfix/fix_ble_ke_mem_267_assert_v5.0' into 'release/v5.0'
fix(bt/controller): Fixed BLE assert ke_mem.c line 267 on ESP32-C3 and ESP32-S3(backport v5.0)

See merge request espressif/esp-idf!35341
2024-12-04 11:11:05 +08:00
Jiang Jiang Jian 8642718288 Merge branch 'bugfix/fix_c2_light_sleep_coex_v5.0' into 'release/v5.0'
fix(ble): fix ble light sleep error on esp32c2 (v5.0)

See merge request espressif/esp-idf!35052
2024-12-04 11:09:52 +08:00
chenjianhua 4fa7610be8 feat(ble/bluedroid): Support setting connection params when creating connection 2024-12-03 18:05:12 +08:00
Abhinav Kudnar e5c4002fd8 fix(nimble): Resolved watchdog due to memory exceed prints 2024-12-03 18:04:56 +08:00
zhanghaipeng f70a669973 fix(ble/bluedroid): Optimize BLE API "esp_ble_gattc_enh_open" 2024-12-03 18:04:46 +08:00
zhanghaipeng 2b08d26dee fix(ble/bluedroid): Fixed BLE create connection fail because of invalid own address type 2024-12-03 18:04:46 +08:00
wangtao@espressif.com 2bf982e747 feat(wifi): support esp32c2 eco4 wifi lib 2024-12-03 11:25:43 +08:00
wangtao@espressif.com c9102147d1 fix(wifi): fix esp32c2 eco4 ci issue ld 2024-12-03 11:04:40 +08:00
xiongweichao 4b7f872177 fix(bt/bluedroid): fixed issues introduced by byte alignment
- esp_bt_uuid_t is byte aligned, tBT_UUID is 4-byte aligned.
2024-12-03 09:13:46 +08:00
zhiweijian 5d8f11ac84 fix(bt/controller): Fixed BLE assert ke_mem.c line 267 on ESP32-C3 and ESP32-S3 2024-12-02 16:23:34 +08:00
Island 2178173ff4 Merge branch 'fix/ble_mesh_heartbeat_bug_v5.0' into 'release/v5.0'
fix(ble_mesh): fixed heartbeat issue (v5.0)

See merge request espressif/esp-idf!34962
2024-12-02 11:29:37 +08:00
gongyantao 21df54c917 fix(bt): fixed some issues in esp32 bt controller
1: fix duplicated lc_enc_restart_req when new lk type is semi-permanent
   key
2: reset PreventEncEvt flag at the end of restart encryption procedure
2024-11-29 14:13:23 +08:00
morris c1802d076e Merge branch 'contrib/github_pr_14767_v5.0' into 'release/v5.0'
fix(gptimer): race on FSM state in gptimer_start() (GitHub PR) (v5.0)

See merge request espressif/esp-idf!35138
2024-11-29 13:32:17 +08:00
Island afea334e3d Merge branch 'bugfix/fix_bleqabr24_1646_v5.0' into 'release/v5.0'
Fixed BLE creating connection when the connection already exists on ESP32 (v5.0)

See merge request espressif/esp-idf!35043
2024-11-27 15:43:00 +08:00
Island 389e738e18 Merge branch 'feat/optimize_cble50y24_110_v5.0' into 'release/v5.0'
feat(bt/bluedroid): Added BLE 5.0 throughput examples (v5.0)

See merge request espressif/esp-idf!35006
2024-11-27 15:37:28 +08:00
Wang Meng Yang 581cf343de Merge branch 'feat/add_profile_state_event_v5.0' into 'release/v5.0'
feat(bt/bluedroid): added events to indicate the profile states of HFP (v5.0)

See merge request espressif/esp-idf!35152
2024-11-27 14:44:09 +08:00
Chen Jian Hua 8f072c63f7 feat(bt/bluedroid): Added BLE 5.0 throughput examples
(cherry picked from commit 6d3a82eecf)

Co-authored-by: zhangbowen <zhangbowen@espressif.com>
2024-11-27 11:57:15 +08:00
Jiang Jiang Jian e057cc258f Merge branch 'bugfix/disconn_sdp_upon_wrong_data_v5.0' into 'release/v5.0'
fix(bt/bluedroid): disconnect SDP connection on receiving incorrect response (v5.0)

See merge request espressif/esp-idf!35147
2024-11-26 10:31:27 +08:00
Jin Chen 1021139898 fix(ble): change ld for ble scan coex issue
(cherry picked from commit dd499d7b2e)

Co-authored-by: cjin <jinchen@espressif.com>
2024-11-25 21:03:50 +08:00
Jin Chen 219244ffaa fix(ble): fix ble light sleep error on esp32c2
(cherry picked from commit 23f7e33a97)

Co-authored-by: cjin <jinchen@espressif.com>
2024-11-25 21:03:50 +08:00
Jin Cheng 6089d7a664 feat(bt/bluedroid): added events to indicate the profile states of HFP 2024-11-25 16:24:38 +08:00
Jiang Jiang Jian 01a851ca9d Merge branch 'bugfix/wps_ie_reset_v50' into 'release/v5.0'
fix(wifi): Remove WPS IEs once WPS succeeds

See merge request espressif/esp-idf!35081
2024-11-25 15:04:09 +08:00
Wang Meng Yang 05a7a1dab4 Merge branch 'bugfix/osi_replace_free_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Replace free/malloc with osi_free/malloc(v5.0)

See merge request espressif/esp-idf!34610
2024-11-25 13:50:49 +08:00
morris aa8e0136bd Merge branch 'bugfix/esp32c3_eco7_usj_console_v5.0' into 'release/v5.0'
fix(esp_rom): fix esp32c3 eco7 console rom function address (v5.0)

See merge request espressif/esp-idf!34742
2024-11-25 10:37:16 +08:00
Jin Cheng 42b9cc11da fix(bt/bluedroid): disconnect SDP connection on receiving incorrect response 2024-11-25 10:21:11 +08:00
Wang Meng Yang 9a1f50e5c6 Merge branch 'bugfix/rx_invalid_cmd_err_code_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed the incorrect error code returned when receiving an invalid command(v5.0)

See merge request espressif/esp-idf!34994
2024-11-25 08:13:26 +08:00
Chen Jian Hua 7498ce744d fix(bt): Update bt lib for ESP32(c3082c4)
- Fixed BLE creating connection when the connection already exists


(cherry picked from commit cada39c3b5)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-11-25 00:05:12 +08:00
xiongweichao 1866feefb6 fix(bt/bluedroid): Replace free/malloc with osi_free/malloc 2024-11-22 21:16:52 +08:00
lsita 3bd624a4b9 fix(gptimer): race condition between start and stop
Merges https://github.com/espressif/esp-idf/pull/14767
2024-11-22 18:28:13 +08:00
Li Bo 17a8462d81 fix(esp_rom): fix esp32c3 eco7 console rom function address 2024-11-22 14:56:45 +08:00
Aditya Patwardhan 8ec2220362 Merge branch 'bugfix/ota_failed_with_openssl_3.0.2_v5.0' into 'release/v5.0'
fix(esp_http_client): Fix ota failure with openssl server (v5.0)

See merge request espressif/esp-idf!35069
2024-11-22 14:54:30 +08:00
Roland Dobai 48ff843ba5 Merge branch 'fix/import_error_msg_v5.0' into 'release/v5.0'
fix(tools): re-raise ImportError without module name (v5.0)

See merge request espressif/esp-idf!35082
2024-11-21 23:05:51 +08:00
wangtao@espressif.com e56f427065 fix(wifi): put more useful rom code in used 2024-11-21 20:24:39 +08:00
Frantisek Hrbata a20539d53e fix(tools): re-raise ImportError without module name
The ImportError or ModuleNotFoundError might be raised without
specifying a module name. In this not so common situation, re-raise the
exception to print all the information that could assist in identifying
the problem.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-21 10:10:12 +01:00
Kapil Gupta 88cb3141bf fix(wifi): Remove WPS IEs once WPS succeeds 2024-11-21 13:49:04 +05:30
nilesh.kale 7abf64f3f3 fix(esp_http_client): Fix ota failure with openssl server
If the TLS server (e.g., openssl) closes connection with encrypted close-notify alert
then `errno` is not explicitly set on the socket by LwIP stack.
For this scenario, we must rely only on `ERR_TCP_TRANSPORT_CONNECTION_CLOSED_BY_FIN`
return value as the connection close case and do the graceful connection closure.

Closes https://github.com/espressif/esp-idf/issues/14724
2024-11-21 12:36:54 +05:30
Jiang Jiang Jian e35c46b29f Merge branch 'fix/fix_deadlock_in_pm_mode_switching_v5.0' into 'release/v5.0'
fix(esp_pm): fix deadlock in pm_mode switching (v5.0)

See merge request espressif/esp-idf!34990
2024-11-19 19:04:27 +08:00
Rahul Tank 4580874d30 Merge branch 'bugfix/memory_issue_v5.0' into 'release/v5.0'
fix(nimble): Nimble Error logs in case of memory overflow/failure (v5.0)

See merge request espressif/esp-idf!35001
2024-11-19 17:12:11 +08:00
wuzhenghui 91d1b1276c fix(esp_pm): fix deadlock in pm_mode switching 2024-11-18 19:23:21 +08:00
Abhinav Kudnar f13bbbb774 fix(nimble): Nimble Error logs in case of memory overflow/failure 2024-11-18 17:57:52 +08:00
xiongweichao a4b0000cc4 fix(bt/bluedroid): Fixed the incorrect error code returned
when receiving an invalid command
2024-11-18 17:02:06 +08:00
wuzhenghui 8038821546 fix(esp_pm): fix missed ccompare update when another core is already in do_switch 2024-11-18 16:51:14 +08:00
wangtao@espressif.com 28621c5d7d ix(wifi): fix esp32c2 eco4 in v5.0 extra ld issue 2024-11-18 15:57:11 +08:00
wangtao@espressif.com c117ea6bfc fix(wifi): fix esp32c2 eco4 ld 2024-11-18 15:57:11 +08:00
wangtao@espressif.com 55184e83aa feat(wifi): support esp32c2 eco4 wifi bringup 2024-11-18 15:57:11 +08:00
Jiang Jiang Jian 37b51f1ec8 Merge branch 'bugfix/lmp_trans_collision_v5.0' into 'release/v5.0'
fix(bt/controller): Fixed some controller bugs on ESP32 (v5.0)

See merge request espressif/esp-idf!34948
2024-11-18 11:20:45 +08:00
Jiang Jiang Jian 879da39498 Merge branch 'bugfix/fix_tbtt_interval_update_fail_v5.0' into 'release/v5.0'
fix(wifi): Optimization for wifi components (v5.0)

See merge request espressif/esp-idf!34891
2024-11-18 11:01:47 +08:00
Jiang Jiang Jian 0c0767b850 Merge branch 'change/change_pm_slp_iram_opt_dependence_v5.0' into 'release/v5.0'
change(esp_pm): change pm_slp_iram_opt dependence(backport v5.0)

See merge request espressif/esp-idf!33863
2024-11-18 10:45:03 +08:00
morris 0e2656ae88 Merge branch 'contrib/github_pr_14859_v5.0' into 'release/v5.0'
fix(usb_host): return ESP_ERR_NO_MEM on failed alloc in client register (GitHub PR) (v5.0)

See merge request espressif/esp-idf!34955
2024-11-15 21:20:53 +08:00
Wang Meng Yang efe70fe234 Merge branch 'bugfix/fix_classic_bt_build_fail_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed classic bt build fail when enable dynamic memory and disable BLE (v5.0)

See merge request espressif/esp-idf!34927
2024-11-15 17:35:24 +08:00
Luo Xu 7fccbcf78d fix(ble_mesh): fixed heartbeat issue
(cherry picked from commit 167cd4762b)

Co-authored-by: luoxu <luoxu@espressif.com>
2024-11-15 17:23:25 +08:00
Daniel Mangum 669565477e fix(usb_host): return ESP_ERR_NO_MEM on failed alloc in client register
Fixes issue where ESP_ERR_NO_MEM was being silently discarded after
cleaning up after a failed malloc in usb_host_client_register.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-11-15 09:17:35 +01:00
Jin Cheng a5d2d906ad fix(bt/controller): Fixed some controller bugs on ESP32
- Fixed wrong logic in handling sniff transaction collision at slave
      side
    - Fixed the issue ACL is stopped too early before eSCO
2024-11-15 11:47:17 +08:00
Jin Cheng 4d7e92bb35 fix(bt/bluedroid): AG should send OK or other error codes to HF client
when it is driven by HF to initiate a call.
2024-11-15 11:47:17 +08:00
Zhang Hai Peng e3f0e10055 fix(bt/bluedroid): Fixed classic bt build fail when enable dynamic memory and disable BLE
(cherry picked from commit 59d20e80d3)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-14 22:13:30 +08:00
Martin Vychodil 94250f0521 Merge branch 'bugfix/nvs_entry_sanity_check_v5.0' into 'release/v5.0'
Bugfix/added nvs entry header sanity checks (v5.0)

See merge request espressif/esp-idf!34296
2024-11-14 21:39:39 +08:00
Adam Múdry cd217a3586 fix(littlefs): Allow LittleFS image generation on Windows + version bump
Closes https://github.com/espressif/esp-idf/issues/12900
2024-11-14 13:23:28 +01:00
radek.tandler 508c251fd2 fix(storage/nvs): Fixed hadling of inconsistent values in NVS entry header
feat(storage/nvs): Added test cases for damaged entries with correct CRC
2024-11-14 11:50:44 +01:00
Island 240dd4fb8d Merge branch 'feature/support_moving_code_to_flash_v5.0' into 'release/v5.0'
feat(ble): Support for putting code in flash on ESP32-C2 (v5.0)

See merge request espressif/esp-idf!34782
2024-11-14 10:09:21 +08:00
zhangyanjiao 29f7ec82d9 fix(wifi): Optimization for wifi components
1. fix(wifi/pm): Fixed the tbtt interval update error when AP's beacon interval changed
   Closes https://github.com/espressif/esp-idf/issues/14720
2. fix(wifi/mesh): Enlarge the mesh TX task stack
3. fix(wifi/espnow): Added check for espnow type and length on v1.0
4. fix(wifi/mesh): Fixed delete group id error in wifi mesh
   Closes https://github.com/espressif/esp-idf/issues/14735
2024-11-14 09:34:34 +08:00
Roland Dobai 6f794b1055 Merge branch 'feat/ninja_use_targz_instead_zip_v5.0' into 'release/v5.0'
feat(tools): ninja tool download - use .tar.gz instead of .zip (v5.0)

See merge request espressif/esp-idf!34854
2024-11-13 21:04:43 +08:00
zhangyanjiao 9a45ad7d46 docs(wifi/espnow): Update the description for ESP-NOW frame 2024-11-13 19:40:36 +08:00
Island c0d14dabfc Merge branch 'bugfix/fix_some_ble_bugs_240926_esp32_v5.0' into 'release/v5.0'
Fixed some BLE bugs 240926 on ESP32 (v5.0)

See merge request espressif/esp-idf!34550
2024-11-13 12:05:11 +08:00
Jiang Jiang Jian cf1bec85a0 Merge branch 'bugfix/support_random_iv_in_esptouch_v2_v5.0' into 'release/v5.0'
fix(wifi): Support AES IV with random value in esptouch v2 (v5.0)

See merge request espressif/esp-idf!34615
2024-11-13 10:40:49 +08:00
Marek Fiala b84b71e625 feat(tools): ninja tool download - use .tar.gz insead of .zip
Changed the download file format for ninja tool from github with .zip file format
to dl.espressif.com with .tar.gz file format.

Closes https://github.com/espressif/esp-idf/pull/14633
2024-11-12 13:39:06 +01:00
Jiang Jiang Jian bc82044cd6 Merge branch 'fix/bypass_some_restore_process_if_sleep_rejected_v5.0' into 'release/v5.0'
fix(esp_hw_support): skip some wakeup steps if sleep is rejected (v5.0)

See merge request espressif/esp-idf!34631
2024-11-12 19:23:34 +08:00
Wang Meng Yang e00cb936a6 Merge branch 'bugfix/fix_avrc_absolute_volume_compatibility_v5.0' into 'release/v5.0'
bugfix/fix_avrc_absolute_volume_compatibility[backport v5.0]

See merge request espressif/esp-idf!34773
2024-11-12 17:55:09 +08:00
morris f1e86424c2 Merge branch 'bugfix/workaround_of_i2s_half_sample_rate_issue_v5.0' into 'release/v5.0'
fix(i2s): fix i2s half sample rate issue (v5.0)

See merge request espressif/esp-idf!34356
2024-11-12 10:02:00 +08:00
Shen Weilong c3290dfd6b feat(ble): Support for putting code in flash on ESP32-C2 2024-11-11 17:38:13 +08:00
Wang Meng Yang 7c02cb4517 Merge branch 'bugfix/hfp_sniff_mng_v5.0' into 'release/v5.0'
bugfix/hf_and_ag_cannot_enter/exit sniff mode. (v5.0)

See merge request espressif/esp-idf!34470
2024-11-11 15:09:23 +08:00
Island 48cb8520b4 Merge branch 'feat/support_controller_run_in_flash_only_v5.0' into 'release/v5.0'
feat(bt/controller): Support controller code run in flash only (backport v5.0)

See merge request espressif/esp-idf!34696
2024-11-11 14:21:42 +08:00
liqigan 9f6dabfacb fix(bt/bluedroid): Fixed AVRCP compatibility issue on absolute volume synchronization 2024-11-08 14:51:34 +08:00
gongyantao d09167aab4 fix(bt): fix some issues in bt controller
1: Store local device name into NVDS when handling hci_wr_local_name_cmd.
2: Set default device name during link manager initialization.
3: Set the QoS value to the minimum value if the calculated QoS is less
   than the minumum.
2024-11-08 14:26:35 +08:00
zhanghaipeng fe6d4ebe1e fix(bt/ble): Update esp32 libbtdm_app.a (17db8bd)
- Added a verification step for the Access Address within the CONNECT_IND PDU
2024-11-08 14:26:15 +08:00
chenjianhua ec7ff931c3 fix(bt): Update bt lib for ESP32(a2a7457)
- Fixed assert in ke_mem.c at line 409 when controller reset
- Added config for BLE instant passed workaround
- Fixed connection can't be established when initiating and advertising coexist
2024-11-08 14:24:54 +08:00
morris e5e4e9779d Merge branch 'feat/mcpwm_dead_time_add_warning_v5.0' into 'release/v5.0'
fix(mcpwm): add warning about generator deadtime (v5.0)

See merge request espressif/esp-idf!34733
2024-11-08 11:48:50 +08:00
Wang Meng Yang 0e74af066e Merge branch 'bugfix/fix_memory_leak_in_sco_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fix memory leak in sco when bluedroid disable (v5.0)

See merge request espressif/esp-idf!34568
2024-11-08 10:47:42 +08:00
Jin Cheng 59020dd176 fix(bt/bluedroid): fixed AG and HF client cannot enter/exit sniff mode 2024-11-08 10:03:02 +08:00
Jin Cheng 95b0cdafdd Revert "Disable sniff mode during (e)SCO connection."
This reverts commit 39a5eb84f3.
2024-11-08 10:03:02 +08:00
Wang Meng Yang daedcb97e4 Merge branch 'bugfix/update_btlib_v5.0' into 'release/v5.0'
fix(bt/controller): Fixed some controller bugs on ESP32 (v5.0)

See merge request espressif/esp-idf!34467
2024-11-07 16:46:24 +08:00
Chen Jichang 1f0ba8f4b1 fix(mcpwm): add warning about generator deadtime
Closes https://github.com/espressif/esp-idf/issues/14773
2024-11-07 10:59:45 +08:00
linruihao f6db0211c6 fix(bt/bluedroid): Fix memory leak in sco when bluedroid disable 2024-11-06 19:42:32 +08:00
Jin Cheng ccb482a38d fix(bt/controller): Fixed some controller bugs on ESP32
- Fixed access NULL in SCO frame end
      Closes https://jira.espressif.com:8443/browse/IDFGH-10796
    - Added LAP checking for Periodic Inquiry
    - Removed an inproper assertion in SCO module
    - Fixed wrong logic in key exchange when
      LMP transaction collision occurred
    - Fixed the using of wrong error code in
      the transaction collision of role switch
2024-11-06 19:38:22 +08:00
Aditya Patwardhan a974ea3a9a Merge branch 'bugfix/update_condition_to_verify_http_version_v5.0' into 'release/v5.0'
fix(esp_http_server): updated condition to verify http version (v5.0)

See merge request espressif/esp-idf!34638
2024-11-06 16:40:32 +08:00
Island e991d160c7 Merge branch 'bugfix/fix_ble_build_fail_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fixed BLE build fail when enable dynamic memory and BLE5.0 (v5.0)

See merge request espressif/esp-idf!34661
2024-11-06 16:37:04 +08:00
zhiweijian 81c56354fb feat(bt/controller): Support controller code run in flash only 2024-11-06 14:24:28 +08:00
Island d062566db8 Merge branch 'bugfix/fix_some_ble_bugs_240926_esp32c3_v5.0' into 'release/v5.0'
Fixed some BLE bugs 240926 on ESP32C3 (v5.0)

See merge request espressif/esp-idf!34554
2024-11-06 11:51:02 +08:00
Island 84cae3aa8c Merge branch 'feat/support_blecrt_90_v5.0' into 'release/v5.0'
feat(bt/bluedroid): Added API to set supported channel selection algorithm (v5.0)

See merge request espressif/esp-idf!34502
2024-11-06 11:50:08 +08:00
Island fb0b52cd79 Merge branch 'bugfix/fix_ble_adv_start_fail_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fixed crash issue in BLE SMP when a disconnection process is ongoing(v5.0)

See merge request espressif/esp-idf!34525
2024-11-05 16:37:14 +08:00
Zhang Hai Peng dff7650b6c fix(ble/bluedroid): Fixed BLE build fail when enable dynamic memory and BLE5.0
(cherry picked from commit 94d1a4f1c0)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-05 16:13:27 +08:00
Michael (XIAO Xufeng) 6afa87ba7d Merge branch 'feat/new_xmc_id_v5.0' into 'release/v5.0'
feat(spi_flash): Add new xmc chip id (backport v5.0)

See merge request espressif/esp-idf!34297
2024-11-05 02:46:11 +08:00
nilesh.kale 63afc49584 fix(esp_http_server): updated condition to verify http version
Closes https://github.com/espressif/esp-idf/issues/14723
2024-11-04 15:51:47 +05:30
wuzhenghui b81dbfb65b fix(esp_hw_support): skip some wakeup steps if sleep is rejected
1. Skip esp_timer time compensation to avoid introducing errors into rtc_timer
    2. Ignore sleep_time_overhead_out measurements when sleep is rejected
2024-11-04 16:41:22 +08:00
zhangyanjiao de69895f38 fix(wifi): Support AES IV with random value in esptouch v2 2024-11-04 09:38:02 +08:00
Jiang Jiang Jian e546409ae5 Merge branch 'bugfix/ftm_apsta_bw_issue_v5.0' into 'release/v5.0'
fix(esp_wifi): Fix FTM issues in AP-STA mode (Backport v5.0)

See merge request espressif/esp-idf!33843
2024-11-01 13:54:04 +08:00
Chen Jian Hua 2d0c9d1837 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(52ee788)
- Fixed BLE vendor HCI set and get tx power
- Support BLE vendor HCI set adv aux offset command
- Support BLE vendor HCI set CSA support command
- Added config for BLE instant passed workaround
- Fixed btdm_sleep_clock_sync timeout workaround


(cherry picked from commit 1e3220b0b0)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-10-31 15:33:43 +08:00
Jiang Jiang Jian abf2f1055c Merge branch 'fix/fix_esp32c2_tx_shake_issue_v50' into 'release/v5.0'
fix(wifi): fix esp32c2 tx shake issue

See merge request espressif/esp-idf!34514
2024-10-31 14:58:06 +08:00
Jiang Jiang Jian aacfeee713 Merge branch 'bugfix/wpa2_ent_fixes_v5.0' into 'release/v5.0'
Few fixes in wpa_supplicant(v5.0)

See merge request espressif/esp-idf!34447
2024-10-31 14:36:50 +08:00
laokaiyao dea7db9cd8 fix(i2s): fix i2s half sample rate issue 2024-10-31 11:00:41 +08:00
Jiang Jiang Jian 111fa0520d Merge branch 'bugfix/fix_miss_internal_wapi_deinit_issue_v5.0' into 'release/v5.0'
fix(wifi): fix miss internal wapi deinit issue(Backport v5.0)

See merge request espressif/esp-idf!34490
2024-10-30 16:45:44 +08:00
Zhang Hai Peng 4074270dd1 fix(ble/bluedroid): Fixed crash issue in BLE SMP when a disconnection process is ongoing
(cherry picked from commit 76e1650161)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-30 15:24:43 +08:00
Zhang Hai Peng f268734259 fix(ble/bluedroid): Support enable BLE topology check by API
(cherry picked from commit dbc94c7056)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-30 15:24:21 +08:00
chenjianhua 1c877b9157 fix(bt/bluedroid): Fixed error when memory debug enabled 2024-10-29 21:53:29 +08:00
chenjianhua 0d4427eddf fix(bt/bluedroid): Fixed GATTC app status check when BT and BLE coexist 2024-10-29 21:53:25 +08:00
chenjianhua f55b6373e6 fix(bt/bluedroid): Update address type for BLE link when the connection is completed 2024-10-29 21:53:21 +08:00
wangtao@espressif.com e0bf41787b fix(wifi): fix esp32c2 tx shake issue 2024-10-29 20:04:59 +08:00
Chen Jian Hua 73453ee3e1 feat(bt/bluedroid): Added API to set supported channel selection algorithm
(cherry picked from commit 4ae7b4aecf)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-10-29 17:35:08 +08:00
Island 90155fa324 Merge branch 'feat/support_enable_ble_hci_log_by_api_v5.0' into 'release/v5.0'
feat(ble/bluedroid): Support enable BLE hci log by API (v5.0)

See merge request espressif/esp-idf!34421
2024-10-29 16:05:46 +08:00
Island 05437c15f8 Merge branch 'bugfix/fix_ble_handle_check_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fixed BLE handle check for GATT API (v5.0)

See merge request espressif/esp-idf!34093
2024-10-29 16:03:12 +08:00
Nachiket Kukade dd049e2cda fix(esp_wifi): Fix FTM issues in AP-STA mode
Add AP-STA mode support in FTM example
Update wifi libs with below changes -
- Use ex-AP's bandwidth in FTM request when connected
- Allow Bandwidth downgrade in FTM negotiation
- Use separate calibration when Initiator performs 20MHz FTM
  while in-AP is in 40MHz
2024-10-29 10:58:11 +05:30
muhaidong 53584bbdce fix(wifi): fix miss internal wapi deinit issue 2024-10-29 11:56:41 +08:00
Jiang Jiang Jian bde38f6398 Merge branch 'bugfix/wifi_set_mode_error_propagation_v5.0' into 'release/v5.0'
Handle missing error propagation in esp_wifi_set_mode() API (Backport v5.0)

See merge request espressif/esp-idf!33862
2024-10-28 20:48:34 +08:00
Aditi 0a84eb907f fix(wpa_supplicant): Add few fixes in dpp task 2024-10-28 17:46:56 +05:30
aditi 3d025d9ecf fix(wpa_supplicant): Add few fixes in btm_rrm task 2024-10-28 17:46:55 +05:30
aditi 20f1057797 fix(wpa_supplicant): Add few fixes in eloop task 2024-10-28 17:46:55 +05:30
aditi 716b4ddc32 fix(wpa_supplicant): Add few fixes in WPS task 2024-10-28 17:46:55 +05:30
aditi a4b83d0c4a fix(wpa_supplicant): Add few fixes in eap client code 2024-10-28 17:46:53 +05:30
akshat 095b16799a fix(esp_wifi): Handle missing error propagation in esp_wifi_set_mode 2024-10-28 16:59:06 +08:00
Jiang Jiang Jian fee009d9c5 Merge branch 'change/improve_some_wifi_releated_introduction_v50' into 'release/v5.0'
change(wifi):improve some wifi releated introduction v50

See merge request espressif/esp-idf!34280
2024-10-28 13:41:36 +08:00
Jiang Jiang Jian d92c4a9183 Merge branch 'fix/freertos_race_cond_in_stream_buffers_send_v5.0' into 'release/v5.0'
fix(freertos): Fixed SMP race condition in xStreamBufferSend() (v5.0)

See merge request espressif/esp-idf!34338
2024-10-28 13:41:13 +08:00
Mahavir Jain 060aefc945 Merge branch 'feat/mbedtls_size_optimization_v5.0' into 'release/v5.0'
Fix the increase in build size of mbedtls while upgrading to v3.x (v5.0)

See merge request espressif/esp-idf!34255
2024-10-28 11:17:26 +08:00
Island 2edaf52ef4 Merge branch 'refactor/ble_example_print_on_bluedroid_v5.0' into 'release/v5.0'
refactor(bt/bluedroid): Refactor the print for BLE examples (v5.0)

See merge request espressif/esp-idf!34307
2024-10-28 10:52:38 +08:00
Anton Maklakov 21b540d11d Merge branch 'ci/temp_disable_sonarqube_v5.0' into 'release/v5.0'
ci: temp disable sonarqube check. keep it for migrating to codechecker (v5.0)

See merge request espressif/esp-idf!34454
2024-10-28 09:44:20 +08:00
Alexey Gerenkov d7bb0f27f6 Merge branch 'jtag_doc_update_v5.0' into 'release/v5.0'
docs(jtag): update OpenOCD related sections (v5.0)

See merge request espressif/esp-idf!34401
2024-10-25 19:27:25 +08:00
wangtao@espressif.com f33707bc89 change(wifi):improve some wifi releated introduction 2024-10-25 19:22:33 +08:00
Fu Hanxi 8484cfd4bb ci: disable sonarqube check 2024-10-25 13:07:23 +02:00
Mahavir Jain 865205120b Merge branch 'feature/update_mbedtls_version_to_3.6.2_v5.0' into 'release/v5.0'
feat(mbedtls): update mbedtls version to 3.6.2(v5.0)

See merge request espressif/esp-idf!34360
2024-10-25 17:36:33 +08:00
Sudeep Mohanty 6571b492f2 fix(freertos): Fixed SMP race condition in xStreamBufferSend()
This commit fixes a race condition in dual-core SMP mode where in the
xStreamBufferSend() makes the xTaskWaitingToSend NULL but it may
have already been evaluated to not be NULL by xStreamBufferReceive()
running on another core and eventually leading to a crash in tasks.c.
2024-10-25 16:32:25 +08:00
C.S.M d00e400552 patch(spi_flash): cleanup XMC flash chip usage according to new information 2024-10-25 15:49:25 +08:00
Zhang Hai Peng eb8f790f3f feat(ble/bluedroid): Support enable BLE hci log by API
(cherry picked from commit 15c895fc6a)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-24 20:13:12 +08:00
chenjianhua 0a93282fde fix(bt/bluedroid): correct the readme links for BLE periodic examples 2024-10-24 18:04:10 +08:00
chenjianhua d4dd65474e refactor(bt/bluedroid): Refactor the print for BLE examples 2024-10-24 18:04:10 +08:00
chenjianhua f4d50858e6 refactor(bt/bluedroid): Refactor the print for gatt_server and gatt_client example 2024-10-24 18:04:10 +08:00
Jiang Jiang Jian 795e2bbae1 Merge branch 'bugfix/backport_supplicant_fixes_v5.0' into 'release/v5.0'
fix(wifi): Backport some fixes(v5.0)

See merge request espressif/esp-idf!33978
2024-10-24 15:47:37 +08:00
Jiang Jiang Jian 5d8cf31912 Merge branch 'bugfix/sae_h2e_vulnerability_fix_v5.0' into 'release/v5.0'
fix(wifi): Sae check for invalid rejected group (v5.0)

See merge request espressif/esp-idf!33982
2024-10-24 15:20:21 +08:00
Erhan Kurubas 5928579960 docs(jtag): update OpenOCD related sections 2024-10-23 20:58:47 +02:00
Sergei Silnov e6a6ccfe5c Merge branch 'fix/gdbgui_py3.13_v5.0' into 'release/v5.0'
fix(tools): Print message about GDBGUI being not supported with Python 3.13 (v5.0)

See merge request espressif/esp-idf!34380
2024-10-23 19:58:53 +08:00
Island 2098c371cc Merge branch 'docs/add_ble_get_started_eng_2024102310_v5.0' into 'release/v5.0'
Docs: Added BLE English version of BLE Get Started (v5.0)

See merge request espressif/esp-idf!34383
2024-10-23 18:55:39 +08:00
Alexey Gerenkov bd7f2d9416 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20241016_v5.0' into 'release/v5.0'
feat(tools): update openocd version to v0.12.0-esp32-20241016 (v5.0)

See merge request espressif/esp-idf!34396
2024-10-23 18:33:03 +08:00
Alexey Gerenkov 797fb852a6 feat(tools): update openocd version to v0.12.0-esp32-20241016 2024-10-23 10:06:08 +02:00
Anton Maklakov 20efbad741 Merge branch 'ci/replace_internal_clang-tidy-runner_v5.0' into 'release/v5.0'
ci: replace internal clang-tidy runner with the pypi project (v5.0)

See merge request espressif/esp-idf!34369
2024-10-23 14:34:10 +08:00
Island 0e477e66ad Merge branch 'bugfix/fix_ble_robust_feature_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fixed error when writing Client Supported Features characteristic (v5.0)

See merge request espressif/esp-idf!34244
2024-10-23 10:51:38 +08:00
Wei Yu Han c0b22cb37b Merge branch 'docs/add_ble_get_started_eng' into 'master'
Docs: Added BLE English version of BLE Get Started

See merge request espressif/esp-idf!34013

(cherry picked from commit 35fd041288)

42601a7a docs(ble): Added ENG version of ble-introduction.rst
615282c4 docs(ble): Added ENG version of ble-device-discovery.rst
645e68f5 docs(ble): Added initial ENG version of ble-device-discovery.rst
d2d95a52 docs(ble): Added ENG version of ble-data-exchange.rst
00ca4dc7 docs(ble):Updated Details table in ble-device-discovery.rst
8e03c200 fix(ble): Removed trailing white space, and fixed some format issues
5b304485 docs(ble):Fixed a indentation in ble-data-exchange.rst
b4c51e7b docs(ble): Deleted some chinese character in ble-data-exchange.rst ENG version
d01d7efe docs(ble):Revised some expression in ENG version of BLE Get Started
a24762c5 docs(ble): Removed a trailing whitespace in ble-introduction.rst
afbe5a1f Apply 44 suggestion(s) to 4 file(s)
4ddab725 docs(ble): Fixed a description in ble-introduction.rst
203dfa03 Apply 5 suggestion(s) to 3 file(s)

Co-authored-by: Island <island@espressif.com>
2024-10-23 10:16:47 +08:00
Roland Dobai 5192bc8e4c fix(tools): Print message about GDBGUI being not supported with Python 3.13 2024-10-22 16:26:44 +02:00
Fu Hanxi 233429b4a3 ci: replace internal clang-tidy runner with the pypi project 2024-10-22 13:23:21 +02:00
nilesh.kale a64c07fdde feat(mbedtls): update mbedtls version to 3.6.2 2024-10-22 13:55:37 +05:30
Marius Vikhammer 45c893d5c5 Merge branch 'fix/freertos_race_cond_in_stream_buffers_v5.0' into 'release/v5.0'
fix(freertos): Fixed SMP race condition in stream_buffers.c (v5.0)

See merge request espressif/esp-idf!34228
2024-10-22 15:59:55 +08:00
Sergei Silnov 9442d35ed0 Merge branch 'ci/5.0_fix_macos_arm_python_version' into 'release/v5.0'
Remove PYTHON_VER=3.7.10 from .gitlab-ci.yml as it breaks test_build_system_cmake_macos on ARM

See merge request espressif/esp-idf!33884
2024-10-21 22:49:03 +08:00
Rahul Tank 74cc06ae0b Merge branch 'bugfix/fix_datalen_issue_v5.0' into 'release/v5.0'
fix(nimble): Adjust time parameter in set Data len API in case BLE 5.0 support is not present (v5.0)

See merge request espressif/esp-idf!34222
2024-10-21 12:45:40 +08:00
Mahavir Jain 03d1834d53 Merge branch 'feat/move_crt_bundle_dummy_cert_to_rodata_v5.0' into 'release/v5.0'
Move cert bundle's dummy cert to .rodata to reduce RAM usage (v5.0)

See merge request espressif/esp-idf!34204
2024-10-21 12:44:07 +08:00
C.S.M 7957815ea3 feat(spi_flash): Add new xmc chip id 2024-10-18 16:43:07 +08:00
Jiang Jiang Jian 5e5c3149b3 Merge branch 'bugfix/fix_funcs_overriding_on_esp32c3_eco7_v5.0' into 'release/v5.0'
fix(bt/controller): Fixed BLE functions overriding on ESP32-C3 ECO7 (v5.0)

See merge request espressif/esp-idf!34197
2024-10-17 19:46:30 +08:00
harshal.patil 47609faf77 fix(mbedtls): Fix the increase in build size of mbedtls when upgrading to v3.x 2024-10-17 14:56:05 +05:30
Zhang Hai Peng 19980e1bd3 fix(ble/bluedroid): Fixed error when writing Client Supported Features characteristic
(cherry picked from commit 5126742003)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-17 16:13:15 +08:00
Jiang Jiang Jian 314b9d5b08 Merge branch 'feat/support_32k_osc_ble_sleep_clk_v5.0' into 'release/v5.0'
feat(ble): Support using 32k oscillator as Bluetooth sleep clock(v5.0)

See merge request espressif/esp-idf!33999
2024-10-17 15:32:07 +08:00
Jiang Jiang Jian 675b5125c4 Merge branch 'bugfix/fix_s3c3_wrong_ext32k_config_bug_v5.0' into 'release/v5.0'
fix(ext_32k): fix the external 32K issue on C3&S3 (v5.0)

See merge request espressif/esp-idf!33154
2024-10-17 15:31:41 +08:00
harshal.patil d2549d425f feat(mbedtls/esp_crt_bundle): Move dummy cert to .rodata to save 408B from dram
Co-authored-by: Hanno <h.binder@web.de>
2024-10-16 16:45:12 +05:30
Roland Dobai e5617c26f7 Merge branch 'fix/ldgen_sort_v5.0' into 'release/v5.0'
fix(ldgen): enable default name SORT in linker fragment (v5.0)

See merge request espressif/esp-idf!34077
2024-10-16 18:53:19 +08:00
morris e7bff6c8e9 Merge branch 'fix/mcpwm_pm_lock_memory_leak_v5.0' into 'release/v5.0'
fix(mcpwm): fix pm_lock memory issues (v5.0)

See merge request espressif/esp-idf!34062
2024-10-16 18:35:00 +08:00
Sudeep Mohanty 0fe7a9d579 fix(freertos): Fixed SMP race condition in stream_buffers.c
This commit fixes a race condition in dual-core SMP mode where in the
xStreamBufferReceive() makes the xTaskWaitingToReceive NULL but it may
have already been evaluated to not be NULL by xStreamBufferSend()
running on another core and eventually leading to a crash in tasks.c.
2024-10-16 09:44:15 +02:00
Rahul Tank 28850f883f fix(nimble): Adjust Data len time in case 5.0 support is not present 2024-10-16 12:01:13 +05:30
Mahavir Jain 84e07d40a6 Merge branch 'bug/ci_test_https_server_file_serving_v5.0' into 'release/v5.0'
fix(protocols): Erased the storage partition for http_server ci test (v5.0)

See merge request espressif/esp-idf!34167
2024-10-16 14:23:28 +08:00
Frantisek Hrbata b56d53dfb8 fix(ldgen): enable default name SORT in linker fragment
Currently, the `SORT` flag mandates the inclusion of at least the
`sort_by_first` argument in the grammar, despite the documentation[1]
indicating that `SORT` can be utilized without any arguments, defaulting
to sorting input sections by name. Fix this by modifying the grammar
to allow a default `SORT` and update a test accordingly.

[1] https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/
    linker-script-generation.html

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-10-15 16:27:52 +02:00
Chen Jian Hua acf16d293b fix(bt/controller): Fixed BLE functions overriding on ESP32-C3 ECO7
(cherry picked from commit 020f7a6297)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-10-15 13:33:21 +08:00
Chen Jichang 53a0bb548b fix(mcpwm): fix pm_lock memory issues 2024-10-15 13:24:29 +08:00
Zhang Hai Peng 9e443ab692 fix(ble/bluedroid): Fixed BLE handle check for GATT API
(cherry picked from commit 514155de3b)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-15 00:03:51 +08:00
hrushikesh.bhosale 01b0add0f3 fix(protocols): Erased the storage partition for http_server ci test
Added api to erase storage partition for http_server ci test
2024-10-14 16:00:07 +05:30
Kapil Gupta 6b3b661774 fix(esp_wifi): Prevent memory overflow in WPS 2024-10-13 18:13:18 +08:00
Kapil Gupta 1b9a66617d fix(esp_wifi): Mask some error conditions in WPS
Mask some error conditions in WPS to increase the probability of
WPS success.
2024-10-13 18:13:18 +08:00
Kapil Gupta 0803307ffe fix(esp_wifi): Disable WPS timers once WPS succeed 2024-10-13 18:13:18 +08:00
Kapil Gupta c1f41cdfd0 fix(esp_wifi): Allow connection with WPA mode in WPS 2024-10-13 18:13:18 +08:00
Kapil Gupta ab99551f8c fix(esp_wifi): Deinit WPS registrar during hostapd deinit 2024-10-13 18:13:18 +08:00
Kapil Gupta 7f9e2044df fix(esp_wifi): Added prints in btm roam for error condition 2024-10-13 18:13:18 +08:00
Island 378dd55e3d Merge branch 'docs/update_ble_feature_support_status_v5.0' into 'release/v5.0'
docs(ble): Updated a feature name in feature status table v5.0

See merge request espressif/esp-idf!34064
2024-10-12 14:26:41 +08:00
Island 1064ad0baa Merge branch 'docs/add_ble_get_started_docs_v5.0' into 'release/v5.0'
docs(ble): Added BLE Get Started (v5.0)

See merge request espressif/esp-idf!34018
2024-10-12 14:25:47 +08:00
Wei Yu Han 8fd56dc107 docs(ble): Added BLE Get Started (v5.0) 2024-10-12 14:25:47 +08:00
xiongweichao cf0261a903 feat(ble): Support using 32k oscillator as Bluetooth sleep clock 2024-10-10 11:28:16 +08:00
Wang Meng Yang 050730e8c0 Merge branch 'feat/add_mode_chg_parem_v5.0' into 'release/v5.0'
feat(bt/bluedroid): Report sniff interval to application layer(v5.0)

See merge request espressif/esp-idf!33870
2024-10-10 11:13:17 +08:00
Wei Yu Han d3d5a1b2ae docs(ble): Updated a feature name in feature status table 2024-10-10 10:09:53 +08:00
Island b980af1ce9 Merge branch 'bugfix/fix_bleqabr24_1282_v5.0' into 'release/v5.0'
Fixed BLE scanning and initiating coexist on ESP32 (v5.0)

See merge request espressif/esp-idf!33831
2024-10-09 17:19:08 +08:00
Island 4b0cee26bd Merge branch 'bugfix/fix_bci_443_v5.0' into 'release/v5.0'
fix(bt/controller): Fixed the timeout of wake up timer when using RC OSC (v5.0)

See merge request espressif/esp-idf!33890
2024-10-09 17:18:55 +08:00
morris d0f8439931 Merge branch 'support_psram_noinit_segment_on_s3_v5.0' into 'release/v5.0'
feat(psram): add psram noinit  segment support on s2/s3/p4/c5 and bss segment on c5 (v5.0)

See merge request espressif/esp-idf!33259
2024-10-09 13:27:59 +08:00
Island dc5567fd5a Merge branch 'bugfix/fix_ext_conn_adv_data_check_v5.0' into 'release/v5.0'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(01cc408) (v5.0)

See merge request espressif/esp-idf!34000
2024-10-09 11:58:32 +08:00
Island 76486eca5e Merge branch 'fix/fix_nimble_gatt_server_example_readme_v5.0' into 'release/v5.0'
docs(ble): Added BLE Get Started documentation link to README.md (v5.0)

See merge request espressif/esp-idf!33827
2024-10-09 10:21:52 +08:00
Zhang Hai Peng 900c6b331a fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(01cc408)
- Fixed extended connectable advertising data length check


(cherry picked from commit 8a80675b7c)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-08 15:13:18 +08:00
Jouni Malinen ae56989c7f SAE: Check for invalid Rejected Groups element length explicitly on STA
Instead of practically ignoring an odd octet at the end of the element,
check for such invalid case explicitly. This is needed to avoid a
potential group downgrade attack.

Fixes: 444d76f74f65 ("SAE: Check that peer's rejected groups are not enabled")
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-10-07 12:31:11 +05:30
Jouni Malinen 92cf32a40b SAE: Check that peer's rejected groups are not enabled
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-10-07 12:31:11 +05:30
Jouni Malinen 8abeae65ed SAE: Reject invalid Rejected Groups element in the parser
There is no need to depend on all uses (i.e., both hostapd and
wpa_supplicant) to verify that the length of the Rejected Groups field
in the Rejected Groups element is valid (i.e., a multiple of two octets)
since the common parser can reject the message when detecting this.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-10-07 12:31:11 +05:30
Jouni Malinen ecea235913 SAE: Check that peer's rejected groups are not enabled in AP
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-10-07 12:30:16 +05:30
Mahavir Jain be14d6c709 Merge branch 'bugfix/null_assign_variable_v5.0' into 'release/v5.0'
fix(wifi_prov): Use calloc instead of malloc to zero initialize variable (v5.0)

See merge request espressif/esp-idf!33967
2024-10-04 21:29:51 +08:00
Rahul Tank caa4defb73 fix(wifi_prov): Use calloc instead of malloc to zero initialize variable 2024-10-04 11:50:45 +05:30
Mahavir Jain e7f8d9789d Merge branch 'feature/update_mbedtls_version_to_3.6.1_v5.0' into 'release/v5.0'
feat(mbedtls): updated mbedtls version to 3.6.1(v5.0)

See merge request espressif/esp-idf!33916
2024-10-01 18:04:16 +08:00
Peter Macko 083841800d Remove PYTHON_VER=3.7.10 from .gitlab-ci.yml as it breaks test_build_system_cmake_macos on ARM 2024-09-30 15:44:15 +02:00
Jiang Jiang Jian 95dda5b00a Merge branch 'bugfix/fix_esp32c2_rom_eco1_mbedtls_issues_v5.0' into 'release/v5.0'
fix(esp_rom): Fixed esp32c2 rom eco1 mbedtls issues (v5.0)

See merge request espressif/esp-idf!33919
2024-09-30 14:00:56 +08:00
Wei Yu Han 33e673985a docs(ble): Added BLE Get Started documentation link to README.md
(cherry picked from commit 5f008828d3)

Co-authored-by: Yuhan Wei <weiyuhan@espressif.com>
2024-09-30 12:04:35 +08:00
Jiang Guang Ming 5dd3f332ca fix(esp_rom): Fixed esp32c2 rom eco1 mbedtls issues 2024-09-30 09:29:26 +08:00
nilesh.kale e20e00df4f feat(mbedtls): updated mbedtls version to 3.6.1 2024-09-29 22:52:29 +05:30
xiongweichao 6d2b9caaee feat(bt/bluedroid): Report sniff interval to application layer 2024-09-29 19:25:53 +08:00
Island 828adbb35a Merge branch 'ble_dev/esp32c2eco4_chip_20240903_v5.0' into 'release/v5.0'
change(ble): update c2 eco4 ld file (v5.0)

See merge request espressif/esp-idf!33666
2024-09-29 10:48:39 +08:00
Island 497d5e0c8d Merge branch 'feat/get_ble_resolve_address_status_v5.0' into 'release/v5.0'
feat(ble/bluedroid): Support resolve BLE address for interval usage (v5.0)

See merge request espressif/esp-idf!33805
2024-09-29 10:30:15 +08:00
Chen Jian Hua f512f059ea fix(bt/controller): Fixed ble get tx power error
(cherry picked from commit 4108a5cc4c)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-27 18:33:18 +08:00
Chen Jian Hua 5bf4347ad9 fix(bt/controller): Fixed the timeout of wake up timer when using RC OSC
(cherry picked from commit 873708579c)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-27 18:33:16 +08:00
zhanghaipeng 74cc3eb3ba fix(ble/bluedroid): Fixed BLE spelling error in word 2024-09-27 15:53:08 +08:00
zhanghaipeng da545604fc feat(ble/bluedroid): Add BLE memory allocation failure message 2024-09-27 15:53:01 +08:00
zhanghaipeng 7207816a3f feat(ble/controller): Display BLE controller init status for ESP32 and ESP32C3/S3 2024-09-27 15:52:49 +08:00
zhanghaipeng ab0d3831db feat(ble/bluedroid): Optimize address resolution status for interval use 2024-09-27 14:48:30 +08:00
Jiang Jiang Jian 4b666f74ff Merge branch 'bugfix/set_sae_pmk_len_v5.0' into 'release/v5.0'
fix(esp_wifi): Set PMK len after SAE exchange (v5.0)

See merge request espressif/esp-idf!33861
2024-09-27 14:34:15 +08:00
Lou Tianhao 1a5a30053a change(esp_pm): change pm_slp_iram_opt dependence 2024-09-27 14:04:16 +08:00
Kapil Gupta 0c0d597f3c fix(esp_wifi): Set PMK after SAE exchange 2024-09-27 09:53:58 +05:30
Shen Weilong 5194671f3b change(ble): update c2 eco4 ld file 2024-09-27 11:09:12 +08:00
Rahul Tank ba69699530 Merge branch 'bugfix/fix_blufi_deinit_fail_v5.0' into 'release/v5.0'
fix(nimble): Fixed deinit sequence in blufi (v5.0)

See merge request espressif/esp-idf!33771
2024-09-26 18:48:52 +08:00
Rahul Tank 45af646f69 Merge branch 'bugfix/fix_clang_compilation_issue_v5.0' into 'release/v5.0'
fix(nimble): Fix clang compilation issue (v5.0)

See merge request espressif/esp-idf!33767
2024-09-26 18:38:37 +08:00
Rahul Tank 14e50e368a fix(nimble): Fix clang compilation issue 2024-09-26 10:00:55 +05:30
Chen Jian Hua 4d97cc84b1 fix(bt): Update bt lib for ESP32(3bf7ef0)
- Fixed BLE scanning and initiating coexist


(cherry picked from commit 241b90f3f0)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-26 10:33:18 +08:00
Mahavir Jain b7c1ad7d1a Merge branch 'feature/add_api_to_get_last_status_code_logged_during_ota_v5.0' into 'release/v5.0'
feat(esp_https_ota): added API to get last status code logged from http resonse (v5.0)

See merge request espressif/esp-idf!33612
2024-09-25 15:38:17 +08:00
Jiang Jiang Jian 339a6c381b Merge branch 'feat/send_data_len_afer_conn_v5.0' into 'release/v5.0'
feat(nimble): Set data length after connection (v5.0)

See merge request espressif/esp-idf!33697
2024-09-25 14:53:16 +08:00
Jiang Jiang Jian 4d0359ffd7 Merge branch 'fix/clang_linker_fix_for_linux_target_v5.0' into 'release/v5.0'
fix(cmake): Fixed linker not supporting -warn_commons for linux target on MacOS (v5.0)

See merge request espressif/esp-idf!33055
2024-09-25 14:34:34 +08:00
Jiang Jiang Jian 1e5d4bfe41 Merge branch 'feat/support_esp32c2_eco4_rom_systimer_hal_v5.0' into 'release/v5.0'
feat(esp_rom):  support esp32c2 rev2.0(ECO4) rom systimer hal (backport v5.0)

See merge request espressif/esp-idf!33797
2024-09-25 14:32:16 +08:00
Zhang Hai Peng d6a0fa813d feat(ble/bluedroid): Support resolve BLE address for interval usage
(cherry picked from commit b88b511362)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-09-25 12:13:13 +08:00
Island e0945a06c8 Merge branch 'bugfix/fix_ble_scan_assert_1728_v5.0' into 'release/v5.0'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(e9ae856) (v5.0)

See merge request espressif/esp-idf!33719
2024-09-25 11:22:26 +08:00
Jiang Guang Ming 0337a3f266 feat(esp_rom): support esp32c2 rev2.0(ECO4) rom systimer hal 2024-09-25 11:21:16 +08:00
Jiang Guang Ming ae2154ab23 feat(esp_rom): add esp32c2.rom.eco4.ld 2024-09-25 11:20:28 +08:00
Jiang Jiang Jian 6fd257d4cb Merge branch 'feat/support_esp32c2_eco4_rom_mbedtls_v3.6.0_lts_v5.0' into 'release/v5.0'
feat(mbedtls): support esp32c2 eco4 rom mbedtls v3.6.0 lts v5.0 (backport v5.0)

See merge request espressif/esp-idf!33424
2024-09-25 11:04:09 +08:00
Island 7c5a9bc45f Merge branch 'bugfix/fixed_c5_ble_cache_error_240919_v5.0' into 'release/v5.0'
Bugfix/fixed c5 ble cache error 240919 (v5.0)

See merge request espressif/esp-idf!33758
2024-09-25 10:31:25 +08:00
Rahul Tank 54e4297346 fix(nimble): Fixed deinit sequence in blufi 2024-09-24 12:21:47 +05:30
Zhao Wei Liang eef071feaa fix(ble): unified ble memory allocation method
(cherry picked from commit 8e4cc79a27)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-24 12:03:15 +08:00
zhanghaipeng dd2809f4ad fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(63eb54d)
- Fixed issue where RPA is not updated after BLE RPA timeout
2024-09-23 13:31:13 +08:00
chenjianhua 338763fae7 test(bt/bluedroid): Support to disable BLE address resolution 2024-09-23 13:30:59 +08:00
Zhang Hai Peng 0badb8863e fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(e9ae856)
- Fixed BLE scan assert in lld_scan.c 1728


(cherry picked from commit 32c7694f56)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-09-23 11:13:14 +08:00
Jiang Jiang Jian c5eb3eaef5 Merge branch 'bugfix/fix_sdp_bugs_v5.0' into 'release/v5.0'
Bugfix/fix sdp bugs[backport 5.0]

See merge request espressif/esp-idf!33605
2024-09-21 15:02:58 +08:00
Jiang Jiang Jian 2d02e60d7d Merge branch 'bugfix/fix_missing_per_adv_sync_est_evt_v5.0' into 'release/v5.0'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(c66a703) (Backport v5.0)

See merge request espressif/esp-idf!33454
2024-09-21 15:02:29 +08:00
Jiang Jiang Jian b2dae87114 Merge branch 'bugfix/fix_ble_max_tx_power_on_esp32c3_v5.0' into 'release/v5.0'
fix(bt/controller): Change the max TX power to +20dBm on ESP32-C3 and ESP32-S3 (v5.0)

See merge request espressif/esp-idf!33614
2024-09-21 15:02:04 +08:00
Jiang Jiang Jian f8a3ba1400 Merge branch 'refactor/rtc_init_before_mspi_tuning_v5.0' into 'release/v5.0'
fix(startup): move rtc initialization before MSPI timing tuning to improve stability (v5.0)

See merge request espressif/esp-idf!33627
2024-09-21 14:59:55 +08:00
Jiang Jiang Jian c01e90daa8 Merge branch 'feat/support_blecrt_242_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed access fault when reading BLE controller information fails (v5.0)

See merge request espressif/esp-idf!33631
2024-09-21 14:57:25 +08:00
Jiang Jiang Jian d067a99a6c Merge branch 'fix/ringbuf_receives_item_not_yet_sent_v5.0' into 'release/v5.0'
fix(esp_ringbuf): Fixed a bug where in a no-split buffer received items prematurely (v5.0)

See merge request espressif/esp-idf!33652
2024-09-21 14:56:40 +08:00
Sudeep Mohanty d07c700af8 test(freertos): Added delay to freertos test to avoid memory leaks
This commit adds a small delay as tolerance to the
"Test xTaskResumeAll resumes pended tasks" test to let the idle task
clean up all suspended test tasks and avoid memory leaks at the end of
the test.
2024-09-20 10:18:40 +02:00
Sudeep Mohanty 645dc8addf fix(esp_ringbuf): Fixed a bug where in a no-split buffer received items prematurely
This commit fixes a bug in the no-split buffer which could receive an
item prematurely if the space on the buffer is acquired until the buffer
is full. The commit also adds a unit test for this scenario.

Closes https://github.com/espressif/esp-idf/issues/14568
2024-09-20 10:18:40 +02:00
Wang Meng Yang 8fc60de3d0 Merge branch 'bugfix/fix_some_bugs_in_avrcp_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed some bugs in AVRCP (Backport v5.0)

See merge request espressif/esp-idf!33581
2024-09-20 11:41:12 +08:00
Xiao Xufeng 563641f948 ci(h2): disable build test for h2 2024-09-19 22:57:13 +08:00
Rahul Tank 85baf1d759 feat(nimble): Set data length after connection 2024-09-19 20:26:13 +05:30
Island 39878b39ce Merge branch 'bugfix/fixed_c6_crash_c2_crash_issue_v5.0' into 'release/v5.0'
Bugfix/fixed c6 crash c2 crash issue (v5.0)

See merge request espressif/esp-idf!33596
2024-09-19 14:34:15 +08:00
Rahul Tank a27a2ddfad Merge branch 'fix/added_a_change_to_print_address_of_advertising_instance_v5.0' into 'release/v5.0'
fix(nimble): Added a change to print address of an advertising instance (v5.0)

See merge request espressif/esp-idf!33564
2024-09-19 14:32:03 +08:00
Chen Jian Hua 856bc4bede fix(bt/bluedroid): Fixed access fault when reading BLE controller information fails
(cherry picked from commit e4e23087ee)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-19 09:12:19 +08:00
Chen Jian Hua 0b8553067c feat(bt/bluedroid): Add BLE connection id param for ESP_GATTS_RESPONSE_EVT
(cherry picked from commit e4a372ab76)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-19 09:12:17 +08:00
Xiao Xufeng f1917f4db3 fix(startup): move rtc initialization before MSPI timing tuning to improve stability 2024-09-18 23:46:41 +08:00
Rahul Tank ea9136226f Merge branch 'bugfix/authorize_perm_gatt_read_write' into 'release/v5.0'
fix(nimble): Add authroize permission for gatt read / write

See merge request espressif/esp-idf!33584
2024-09-18 21:07:08 +08:00
Island 4c993aeb48 Merge branch 'docs/add_nimble_get_started_v5.0' into 'release/v5.0'
feat(ble/example): Added NimBLE Get started examples (v5.0)

See merge request espressif/esp-idf!33031
2024-09-18 17:43:39 +08:00
Chen Jian Hua fc754b2033 fix(bt/controller): Change the max TX power to +20dBm on ESP32-C3 and ESP32-S3
(cherry picked from commit fe43c8f1b5)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-18 17:34:13 +08:00
nilesh.kale 7a163ad9d8 feat(esp_https_ota): added API to get last status code logged from http resonse
Closes https://github.com/espressif/esp-idf/issues/14302
2024-09-18 14:58:49 +05:30
liqigan 5e62d99961 fix(bt/bluedroid): Fixed not deep copy service_name and user1_ptr in RAW SDP search event 2024-09-18 16:43:53 +08:00
liqigan bfd1ea82bd change(bt/bluedroid): Limited SDP service discovery operation 2024-09-18 16:43:46 +08:00
liqigan a29b207ffd change(bt/bluedroid): Release record data after SDP record created 2024-09-18 16:43:28 +08:00
Zhao Wei Liang a9d04549ce fix(ble): fixed memory leak issue when using uart hci
(cherry picked from commit 4d2c44f511)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-18 15:57:33 +08:00
Zhao Wei Liang 5f172ab251 fix(ble): fixed occasional assertion issue when enabling logging on ESP32-C2
(cherry picked from commit 0ef9ecb715)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-18 15:57:31 +08:00
shreeyash d81180b0ec fix(nimble): Add authroize permission for gatt read / write 2024-09-18 11:38:52 +05:30
linruihao cbd12f5ce5 fix(bt/bluedroid): Fixed some bugs in AVRCP 2024-09-18 11:29:40 +08:00
shreeyash 3da3748e61 fix(nimble): Added a change to print address of an advertising instance 2024-09-17 12:19:15 +05:30
Roland Dobai f9effecd04 Merge branch 'feat/update_tools_in_tools_json_v5.0' into 'release/v5.0'
feat(tools): Update tools: cmake, ninja, ccache (v5.0)

See merge request espressif/esp-idf!33533
2024-09-16 19:43:23 +08:00
Rahul Tank 21aa38dcee Merge branch 'bugfix/add_dummy_cb_during_deinit_v5.0' into 'release/v5.0'
fix(nimble): De-register host cb in stack deinit (v5.0)

See merge request espressif/esp-idf!33376
2024-09-16 18:08:05 +08:00
Rahul Tank 9cd7e32a5b fix(nimble): De-register host cb in stack deinit 2024-09-16 11:00:06 +05:30
Marek Fiala 5e52ea47d1 feat(tools): Update tools: cmake, ninja, ccache
cmake  v3.24.0 -> v3.30.2
ninja  v1.11.1 -> v1.12.1
ccache v4.8    -> v4.10.2

Closes https://github.com/espressif/esp-idf/pull/14376
2024-09-13 17:13:08 +02:00
weiyuhan 2d018c5023 fix(ble): Added ble_get_started build rule in build-test-rules.yml 2024-09-13 09:50:39 +08:00
Wei Yu Han e58b10b1f6 fix(ble): Increased the length of addr_str in ble_get_started nimble examples 2024-09-12 12:04:34 +08:00
Yuhan Wei 4ffd741232 fix(ble): Removed unsupported sdkconfig 2024-09-12 12:04:34 +08:00
Zhou Xiao 9a3ae21aa7 docs(ble): Replace advertising interval hex value with BLE_GAP_ADV_ITVL_MS 2024-09-12 12:04:34 +08:00
Zhou Xiao 3e6e68628d docs(ble): Improved as Weilong and Shenhang requested 2024-09-12 12:04:34 +08:00
zhouxiao fe46bf48ce docs(ble): Added BLE Get Started 2024-09-12 12:04:34 +08:00
Chen Jichang 58c3ee2c89 feat(psram): add psram noinit segment support on S2/S3/P4/C5
Closes https://github.com/espressif/esp-idf/issues/14253
2024-09-12 10:40:48 +08:00
Wang Meng Yang 871d0c8c9a Merge branch 'bugfix/fix_hid_cod_setting_v5.0' into 'release/v5.0'
Bugfix/fix hid cod setting[backport 5.0]

See merge request espressif/esp-idf!33340
2024-09-12 09:34:22 +08:00
linruihao 32545d7edb fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(c66a703)
- Fixed missing sync established event after canceling sync
2024-09-11 17:25:51 +08:00
Wang Meng Yang 02e0c7a2b8 Merge branch 'bugfix/exit_sniff_immed_enter_sniff_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fix the protocol stack to exit sniff mode(v5.0)

See merge request espressif/esp-idf!33400
2024-09-11 15:32:43 +08:00
Rahul Tank 26a300b668 Merge branch 'bugfix/bidirectioanl_data_transfer_ble_spp_v5.0' into 'release/v5.0'
fix(nimble): Added support for bidirectional data trasfer (v5.0)

See merge request espressif/esp-idf!33415
2024-09-11 14:05:09 +08:00
Sudeep Mohanty 2602860192 fix(cmake): Fixed linker not supporting -warn_commons for linux target on MacOS
This commit updates the ld linker flags to conditionally include the
-warn_commons flag when the linux target is built on MacOS. This is
because, not all versions of ld support the -warn_commons option.

Closes https://github.com/espressif/esp-idf/issues/13185
2024-09-10 14:46:35 +02:00
Jiang Guang Ming c08e19dd24 fix(mbedtls): fix mbedtls unit-test build issues 2024-09-10 16:13:56 +08:00
xiongweichao dc937198c9 fix(bt/bluedroid): Fix the protocol stack to exit sniff mode
- Already in result mode but request change indication has not been cleared
2024-09-10 11:42:25 +08:00
Island f082886099 Merge branch 'bugfix/fix_some_ble_bugs_240826_v5.0' into 'release/v5.0'
Fixed some BLE bugs 240826 on ESP32C3 (8ce789b) (v5.0)

See merge request espressif/esp-idf!33392
2024-09-10 11:37:54 +08:00
Island c0604365c5 Merge branch 'feat/support_ble_scan_and_init_coex_on_esp32_v5.0' into 'release/v5.0'
Support BLE scanning and initiating coexist on ESP32 (v5.0)

See merge request espressif/esp-idf!33388
2024-09-10 11:37:21 +08:00
Jiang Guang Ming 1f63d1f8a4 fix(heap): rev2.0 still use tlsf patch code 2024-09-10 11:22:03 +08:00
Jiang Guang Ming 612e93ea5d feat(mbedtls): support rom mbedtls threading layer 2024-09-10 11:16:58 +08:00
Jiang Guang Ming 94558b8d61 feat(mbedtls): select MBEDTLS_CMAC_C when MBEDTLS_USE_CRYPTO_ROM_IMPL enabled 2024-09-10 11:16:52 +08:00
Jiang Guang Ming eb87d93219 feat(mbedtls): support ROM mbedtls v3.6.0 on C2 rev2.0(ECO4) 2024-09-10 11:16:46 +08:00
Jiang Guang Ming 437990877d feat(esp_rom): include rom.mbedtls.eco4.ld with C2 rev2.0(ECO4) select 2024-09-10 11:16:34 +08:00
Jiang Guang Ming 779dc07b5b feat(esp_rom): update esp32c2.rom.mbedtls.eco4.ld 2024-09-10 11:14:31 +08:00
Jiang Guang Ming 6d3542194e feat(esp_hw_support): Support esp32c2 rev2.0 chip 2024-09-10 11:13:54 +08:00
Astha Verma bb9134aaf8 fix(nimble): Added support for bidirectional data trasfer 2024-09-09 18:41:37 +05:30
chenjianhua de2631fc9e fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(8ce789b)
- Fixed BLE vendor HCI set scan perfer address command
- Support BLE vendor HCI get controller compile version command
- Fixed BLE util buffer free after controller reset
- Fixed assert when connection already exist and be connected again
2024-09-09 11:35:36 +08:00
chenjianhua b4c98969ae feat(bt): Update esp32 bt-lib(bc393dd)
- Fixed BLE vendor HCI set scan perfer address command
- Support BLE vendor HCI get controller compile version command
- Support BLE scanning and initiating coexist
2024-09-09 11:30:52 +08:00
Krzysztof Budzynski a9d75f56f1 Merge branch 'docs/remove_user_guide_for_esp32_pico_kit_related_migration_v5.0' into 'release/v5.0'
docs: remove user guide for esp32-pico-kit related docs after migration (v5.0)

See merge request espressif/esp-idf!32784
2024-09-06 18:38:24 +08:00
Alexey Gerenkov 4f4adf49b9 Merge branch 'fix/gcov_fault_v5.0' into 'release/v5.0'
fix(gcov): fix exceptions on gcov task_tick_hook (v5.0)

See merge request espressif/esp-idf!30027
2024-09-06 17:33:12 +08:00
Rahul Tank 7580682e9a Merge branch 'bugfix/make_cccd_flags_configurable_v5.0' into 'release/v5.0'
fix(nimble): Make CCCD flags configurable (v5.0)

See merge request espressif/esp-idf!33307
2024-09-06 14:03:03 +08:00
Island 2b6c3c6872 Merge branch 'docs/optimized_ble_gattc_multi_connect_example_v5.0' into 'release/v5.0'
docs(ble/bluedroid): Optimize BLE example documentation for getting characteristic (v5.0)

See merge request espressif/esp-idf!33197
2024-09-06 10:31:41 +08:00
Alexey Lapshin 88c1c6af49 fix(gcov): fix exceptions on gcov task_tick_hook
Closes https://github.com/espressif/esp-idf/issues/13511
2024-09-05 18:28:07 +03:00
liqigan 195f08112b fix(esp_hid): Fixed protocol mode mapping bug
Closes https://github.com/espressif/esp-idf/issues/14232
2024-09-05 14:28:02 +08:00
liqigan 9545b5480f feat(bt/bluedroid): Added definition of minor class of COD for peripheral major class
Closes https://github.com/espressif/esp-idf/issues/13622
2024-09-05 14:27:55 +08:00
Jiang Jiang Jian fe84af3012 Merge branch 'bugfix/fix_wrong_typecast_spp_v5.0' into 'release/v5.0'
fix(wifi): Fix wrong typecasting of sta_info while getting SPP Caps (Backport v5.0)

See merge request espressif/esp-idf!33122
2024-09-04 17:35:43 +08:00
shreeyash ac04fe38e0 fix(nimble): Make CCCD flags configurable 2024-09-04 12:56:48 +05:30
zlq 0357bffbe3 fix(ext_32k): fix the external 32K issue on C3&S3 (v5.0) 2024-09-04 12:05:51 +08:00
Nachiket Kukade 1e88c7a2ff fix(wifi): Fix wrong typecasting of sta_info while getting SPP Caps 2024-09-04 10:53:22 +08:00
Rahul Tank a2d20761f2 Merge branch 'bugfix/add_ad_type_adv_v5.0' into 'release/v5.0'
feat(nimble): additional AD types for advertisements (v5.0)

See merge request espressif/esp-idf!33237
2024-09-03 13:26:01 +08:00
morris 6d947cdb2d Merge branch 'bugfix/eth_plus_wifi_doc_v5.0' into 'release/v5.0'
docs(esp_eth): added warning to not use ESP32 as ETH CLK source with WiFi (v5.0)

See merge request espressif/esp-idf!33248
2024-09-03 10:08:30 +08:00
renpeiying be45adaf95 docs: Remove User Guide for ESP32-Pico-Kit related docs after migration 2024-09-02 19:10:29 +08:00
renpeiying c515d555c2 docs: Update zh_CN translation for MR32736 2024-09-02 11:45:55 +02:00
Ondrej Kosta 025e7b7bd9 docs(esp_eth): added warning to not use ESP32 as ETH CLK source with WiFi 2024-09-02 11:34:36 +02:00
SumeetSingh19 9c64db5659 feat(nimble): additional AD types for advertisements 2024-09-02 09:49:50 +05:30
Jiang Jiang Jian 6c536b1e7d Merge branch 'bugfix/check_tx_conn_traffic_fail_v5.0' into 'release/v5.0'
fix(wifi): add bar check for connection traffic and check ap_eb in txq (Backport v5.0)

See merge request espressif/esp-idf!33226
2024-09-02 11:34:55 +08:00
Marius Vikhammer 5672363887 Merge branch 'task/add_ldgen_exception_for_freertos_v5.0' into 'release/v5.0'
fix(freertos): Added freertos and ringbuf fragments to the exception list of ldgen mapping checks (v5.0)

See merge request espressif/esp-idf!33218
2024-09-02 11:02:55 +08:00
Island 4991ebf2c9 Merge branch 'bugfix/fixed_assert_on_esp32c2_v5.0' into 'release/v5.0'
fix(ble): fixed crash issue during deinit host after deinit controller on ESP32-C2 (v5.0)

See merge request espressif/esp-idf!33208
2024-09-02 10:08:32 +08:00
Jiang Jiang Jian 31ac7874b5 Merge branch 'fix/hfp_pcm_codec_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fix default codec type on PCM datapath for hfp_hf (backport v5.0)

See merge request espressif/esp-idf!33163
2024-09-02 09:47:58 +08:00
Michael (XIAO Xufeng) bb5959be33 Merge branch 'fix_wrong_ap3204_id_check_v5.0' into 'release/v5.0'
fix(psram): fixed ap3204 id check (v5.0)

See merge request espressif/esp-idf!33133
2024-08-31 02:08:19 +08:00
sibeibei 6d4656aeec fix(wifi): add bar check for connection traffic and check ap_eb in txq 2024-08-30 17:27:08 +08:00
Sudeep Mohanty fe2495a2f7 test(freertos): Added build test for function in flash with -Os optimation
This commit adds a build test for when FreeRTOS and esp_ringbuf functions
are placed in flash and the compiler optimizes for code size.
2024-08-30 09:19:24 +02:00
Sudeep Mohanty 90b92791a7 fix(freertos): Added freertos fragments to the exception list of ldgen mapping checks
This commit adds freertos and esp_ringbuf linker fragment sections
to the exception list of the ldgen mappings checker script.
2024-08-30 09:19:24 +02:00
zwl b6fefdaebe fix(ble): fixed crash issue during deinit host after deinit controller on ESP32-C2 2024-08-30 12:03:11 +08:00
Jiang Jiang Jian faa67c770a Merge branch 'contrib/github_pr_14286_v5.0' into 'release/v5.0'
fix(bt): Add a parameter in the two least significant bits of Class of Device (backport v5.0)

See merge request espressif/esp-idf!33168
2024-08-30 11:30:46 +08:00
Jiang Jiang Jian 9e8f286f3e Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20240821_v5.0' into 'release/v5.0'
feat(tools): update openocd version to v0.12.0-esp32-20240821 (v5.0)

See merge request espressif/esp-idf!33173
2024-08-30 11:22:05 +08:00
Jiang Jiang Jian 4a43fbda51 Merge branch 'bugfix/add_bluedroid_support_for_esp_ip_v5.0' into 'release/v5.0'
fix(wifi_prov): Add support for ESP IP controller chips in bluedroid (v5.0)

See merge request espressif/esp-idf!33180
2024-08-30 11:17:57 +08:00
Rahul Tank 1cd4d3041a fix(wifi_prov): Add support for ESP IP controller chips in bluedroid 2024-08-29 15:07:16 +05:30
zhanghaipeng 58baefc0b1 fix(ble/bluedroid): Optimize BLE function 'esp_ble_resolve_adv_data_by_type' 2024-08-29 16:18:00 +08:00
zhanghaipeng d304bc76c7 docs(ble/bluedroid): Optimize BLE example documentation for getting characteristic 2024-08-29 16:18:00 +08:00
Nebojša Cvetković be99097435 fix(bt/bluedroid): Resolve warning: unused variable 'pp' 2024-08-29 16:17:59 +08:00
Island 9b4c775d8a Merge branch 'bugfix/fix_bci_452_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed compile warning when optimize for performance (backport v5.0)

See merge request espressif/esp-idf!33135
2024-08-29 14:43:41 +08:00
Alexey Gerenkov 63d569de07 feat(tools): update openocd version to v0.12.0-esp32-20240821 2024-08-28 13:20:52 +03:00
chenqingqing 6a1f9b291a fix(bt/bluedroid): Fix default codec type on PCM datapath for hfp_hf 2024-08-28 17:03:35 +08:00
chenqingqing 1f15a8d3dd fix(bt): Add a parameter in the two least significant bits of Class of Device 2024-08-28 16:55:19 +08:00
WebDust21 32a0d4a17e fix(bt): Enable use of RESERVED bits in COD (GitHub PR) 2024-08-28 16:55:07 +08:00
Island 57daec06b4 Merge branch 'debug/fix_deep_sleep_wake_up_by_ble_v5.0' into 'release/v5.0'
fix(ble): fix BLE immediately  wakeup deep sleep (v5.0)

See merge request espressif/esp-idf!33098
2024-08-28 15:13:09 +08:00
Jiang Jiang Jian 74a40e6029 Merge branch 'bugfix/fix_esp32c6_rxappend_esp32_tbtt_delay_v5.0' into 'release/v5.0'
fix(coex): fix esp32 crash issue, fix rx issue

See merge request espressif/esp-idf!33107
2024-08-28 13:34:58 +08:00
Jiang Jiang Jian abc7c13430 Merge branch 'fix/freertos_port_assert_in_isr_bug_v5.0' into 'release/v5.0'
fix(freertos): Incorrect assert in FreeRTOS port layer when not in ISR context (v5.0)

See merge request espressif/esp-idf!32375
2024-08-28 11:39:25 +08:00
chenjianhua 7844ccaa8b fix(bt/bluedroid): Fixed compile warning when optimize for performance 2024-08-28 11:13:18 +08:00
Armando 519700827a fix(psram): fixed ap3204 id check 2024-08-28 11:06:49 +08:00
Sudeep Mohanty e9e0e250a6 fix(freertos): Incorrect assert in FreeRTOS port layer when not in ISR context
This commit fixes an issue where in the FreeRTOS port layer would cause
the portASSERT_IF_IN_ISR() assert check to fail even when the system is
not in an interrupt context.
2024-08-27 16:06:25 +08:00
cjin 4d53bda333 feat(ble): add internal api to change ble slow clock source 2024-08-27 15:56:25 +08:00
liuning fbef226525 fix(coex): fix esp32 crash issue, fix rx issue 2024-08-27 15:28:45 +08:00
Island 9468f1939b Merge branch 'bugfix/fixed_c6_c2_issues_master_v5.0' into 'release/v5.0'
Bugfix/fixed c6 c2 issues master (v5.0)

See merge request espressif/esp-idf!33067
2024-08-27 10:05:19 +08:00
Jiang Jiang Jian ef0f7f6d23 Merge branch 'bugfix/fix_ble_resolve_adv_data_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fixed memory out-of-bounds issue when parsing adv data (v5.0)

See merge request espressif/esp-idf!33026
2024-08-26 14:49:23 +08:00
Jiang Jiang Jian fd859c6718 Merge branch 'bugfix/fix_some_ble_bugs_cjh_v5.0' into 'release/v5.0'
Fixed some BLE bugs 240812 (backport v5.0)

See merge request espressif/esp-idf!32795
2024-08-26 14:48:07 +08:00
Jiang Jiang Jian f8a537013b Merge branch 'fix/ble_mesh_github_pr_14140_v5.0' into 'release/v5.0'
fix(ble-mesh): don't use dangling pointer in nimble gatt service (v5.0)

See merge request espressif/esp-idf!32616
2024-08-26 14:44:29 +08:00
Jiang Jiang Jian f3b3974734 Merge branch 'docs/delete_user_guide_esp32s2_kaluga_1_kit_v5.0' into 'release/v5.0'
docs: Delete ESP32-S2-Kaluga-Kit related user guide files (v5.0)

See merge request espressif/esp-idf!32594
2024-08-26 14:42:47 +08:00
Jiang Jiang Jian 9d66c914b4 Merge branch 'feature/ble_example_pytest_v5.0' into 'release/v5.0'
add pytest for classic bt example(backport v5.0)

See merge request espressif/esp-idf!32578
2024-08-26 14:41:17 +08:00
Island af66e74fb4 Merge branch 'docs/add_ble_feature_status_table_v5.0' into 'release/v5.0'
docs(ble): Added BLE feature support status (v5.0)

See merge request espressif/esp-idf!32925
2024-08-26 14:02:45 +08:00
Rahul Tank 55226dff3a Merge branch 'fix/change_bt_hci_log_to_nimble_nomenclature_v5.0' into 'release/v5.0'
fix(nimble): Added BT_HCI_LOG_INCLUDED macro into esp nimble configuration according to nimble nomenclature(v5.0)

See merge request espressif/esp-idf!33042
2024-08-26 11:59:21 +08:00
zwl 8a65b300bd fix(ble): fixed ble controller issues on ESP32-C2 2024-08-24 13:58:28 +08:00
Astha Verma 847b1f719d fix(nimble): Added BT_HCI_LOG_INCLUDED macros according to nimble nomenclature 2024-08-24 11:01:11 +05:30
chenjianhua 08b30f0e89 fix(bt/bluedroid): Fixed work queue delete when create thread failed 2024-08-23 16:57:55 +08:00
chenjianhua 0010bdf34c feat(bt/bluedroid): Report HCI error code to app when command fails 2024-08-23 16:57:46 +08:00
chenjianhua ed35ce2c22 fix(bt/bluedroid): Fixed BLE create conn cancel when conn already exist 2024-08-23 16:57:46 +08:00
chenjianhua cbb637515f feat(bt/bluedroid): Add print and assert when failed to alloc memory 2024-08-23 16:57:46 +08:00
Jiang Jiang Jian 436a17e904 Merge branch 'bugfix/fix_clkn_lost_after_modem_sleep_v5.0' into 'release/v5.0'
fix(bt/controller): Fixed bluetooth disconnect issue after modem sleep on ESP32 (v5.0)

See merge request espressif/esp-idf!33005
2024-08-23 16:29:11 +08:00
Rahul Tank 18d9d2ad9b Merge branch 'bugfix/blesmp_getlist_bond_fail_v5.0' into 'release/v5.0'
fix(nimble): Fixed blesmp getbondlist issue (v5.0)

See merge request espressif/esp-idf!32825
2024-08-23 13:00:39 +08:00
linruihao 1882e5e6cc fix(bt/controller): Fixed bluetooth disconnect issue after modem sleep on ESP32 2024-08-23 11:01:00 +08:00
Jiang Jiang Jian 16077ec3e8 Merge branch 'bugfix/fix_mesh_ie_issue_from_leaf_to_root_v5.0' into 'release/v5.0'
fix(wifi/mesh): clear the rootless state in mesh ie when changing from leaf to root (v5.0)

See merge request espressif/esp-idf!32992
2024-08-23 10:45:08 +08:00
Jiang Jiang Jian b47d198928 Merge branch 'docs/fix_typo_adc_oneshot_v5.0' into 'release/v5.0'
docs: fix a typo in adc_oneshot (v5.0)

See merge request espressif/esp-idf!33009
2024-08-23 10:41:23 +08:00
gongyantao f183884dbe fix(bt): remove redundant space in hid example path 2024-08-23 10:24:46 +08:00
gongyantao 86507e6c18 fix(bt): change example sdkconfig name to sdkconfig.ci.test 2024-08-23 10:24:46 +08:00
gongyantao 319efedb76 change(ci): remove device name check in bt example 2024-08-23 10:24:46 +08:00
gongyantao 602bd2d89a fix(bt): get remote device name from eir data 2024-08-23 10:24:45 +08:00
gongyantao 85ded0b544 feat(bt/example): add ci sdkconfig for bt examples 2024-08-23 10:24:42 +08:00
Yuan Hong Hui 171b5e7a24 feat(bt):add pytest for classic bt example 2024-08-23 10:22:42 +08:00
zhanghaipeng ae186b888b feat(ble/controller): Support get BLE controller free heap size 2024-08-23 09:42:32 +08:00
zhanghaipeng 7c6ecc6b26 docs(blufi): Optimize documentation for Blufi example 2024-08-23 09:42:32 +08:00
zhanghaipeng 3818ca3a46 fix(ble/bluedroid): Fixed memory out-of-bounds issue when parsing adv data 2024-08-23 09:42:32 +08:00
shreeyash b01014a840 fix(nimble): Fixed blesmp getbondlist issue 2024-08-22 17:51:38 +05:30
Yuhan Wei d7ff26825b docs(ble): Updated example links in zh_CN ble-mesh-feature-list.rst 2024-08-22 16:59:21 +08:00
Island 326316f63e Merge branch 'bugfix/fix_bleqabr24_1152_v5.0' into 'release/v5.0'
Fixed BLE vendor HCI get controller status command on ESP32 (v5.0)

See merge request espressif/esp-idf!32968
2024-08-22 16:57:13 +08:00
Rahul Tank d889c006ff Merge branch 'feat/ble_link_estab_event_v5.0' into 'release/v5.0'
feat(nimble): BLE_GAP_EVENT_LINK_ESTAB event to ensure link is established (v5.0)

See merge request espressif/esp-idf!32261
2024-08-22 15:33:06 +08:00
Mahavir Jain 3747cb436f Merge branch 'fix/docs_nvs_encryption_update_v5.0' into 'release/v5.0'
docs(nvs_encryption): Updated the docs of nvs_encryption (v5.0)

See merge request espressif/esp-idf!32912
2024-08-22 14:04:29 +08:00
Linda 8462c7d1c2 docs: fix a typo in adc_oneshot 2024-08-22 10:33:02 +08:00
Yuhan Wei aa06bdb836 docs(ble): Removed original blufi.rst 2024-08-22 09:52:45 +08:00
Island b87b33c97f Merge branch 'bugfix/fixed_c2_blufi_issue_when_use_only_4.2_adv_5.0_branch' into 'release/v5.0'
fix(ble): fixed blufi issue on ESP32-C2

See merge request espressif/esp-idf!32945
2024-08-22 00:34:17 +08:00
Rahul Tank 91a0c33322 feat(nimble): BLE_GAP_EVENT_LINK_ESTAB event to ensure link established 2024-08-21 20:55:28 +05:30
zhangyanjiao fe6cbdc3bd fix(wifi/mesh): update the mesh ip_internal_network example 2024-08-21 19:07:20 +08:00
zhangyanjiao 1c4806dadc fix(wifi/mesh): fixed the dhcp offer send error issue when root restart multiple times
Closes https://github.com/espressif/esp-idf/issues/13212
2024-08-21 19:07:12 +08:00
zhangyanjiao ef8cf5fbe4 fix(wifi/mesh): clear the rootless state in mesh ie when changing from leaf to root
Closes https://github.com/espressif/esp-idf/issues/14063
2024-08-21 19:06:26 +08:00
hrushikesh.bhosale 745e08b499 docs(nvs_flash): Updated the docs of nvs_flash
Updated the documentation by changing subtype from key to
nvs_keys in nvs_flash.rst
2024-08-21 14:44:47 +05:30
Island ec0f177135 Merge branch 'fix/ble_mesh_gh_pr_13135_v5.0' into 'release/v5.0'
fix(ble_mesh): Fix OP_TIME_SET and OP_TIME_STATUS (v5.0)

See merge request espressif/esp-idf!32772
2024-08-21 16:55:18 +08:00
zwl feb21f46b6 fix(ble): fixed blufi issue on ESP32-C2 2024-08-21 15:24:43 +08:00
chenjianhua 2eb21737f4 fix(bt): Update bt lib for ESP32(241c96c)
- Fixed BLE vendor HCI get controller status command
2024-08-20 19:31:19 +08:00
Krzysztof Budzynski f17564303e Merge branch 'docs/delete_user_guides_three_esp32_dev_boards_v5.0' into 'release/v5.0'
docs: delete user guides of ESP32-DevKitC, ESP-WROVER-KIT and ESP32-PICO-DevKitM-2 (v5.0)

See merge request espressif/esp-idf!32751
2024-08-20 18:37:33 +08:00
Rahul Tank ba6f51ce10 Merge branch 'feat/allow_connect_during_scan_v5.0' into 'release/v5.0'
feat(nimble): Add support to allow connection during scanning (v5.0)

See merge request espressif/esp-idf!32846
2024-08-20 17:31:44 +08:00
Linda 17de132b94 docs: delete user guides of ESP32-DevKitC, ESP-WROVER-KIT and ESP32-PICO-DevKitM-2 2024-08-20 14:36:20 +08:00
Jiang Jiang Jian 9ed93caadd Merge branch 'fix/hfp_pcm_api_set_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Add PCM configuration about pcm frame sync signal shape (backport v5.0)

See merge request espressif/esp-idf!32467
2024-08-20 11:34:27 +08:00
Jiang Jiang Jian ca6515d219 Merge branch 'bugfix/dpp_auth_failure_v5.0' into 'release/v5.0'
fix(wpa_supplicant):Deinit old dpp authentication data after receiving config.(v5.0)

See merge request espressif/esp-idf!32431
2024-08-20 11:33:15 +08:00
Jiang Jiang Jian b54d9925fb Merge branch 'feat/save_ble_log_to_flash_0605_v5.0' into 'release/v5.0'
Feat/save ble log to flash 0605 v5.0

See merge request espressif/esp-idf!32398
2024-08-20 11:32:31 +08:00
Jiang Jiang Jian a01bd13a9f Merge branch 'bugfix/provide_random_addr_api_v5.0' into 'release/v5.0'
fix(wifi_prov): Added API to set random address (v5.0)

See merge request espressif/esp-idf!32328
2024-08-20 10:35:16 +08:00
Jiang Jiang Jian 27eeabbabd Merge branch 'fix/ble_mesh_24_76_v5.0' into 'release/v5.0'
fix(ble_mesh): fixed BLEMESH24-76_v5.0

See merge request espressif/esp-idf!32229
2024-08-20 10:31:43 +08:00
Rahul Tank 261ec35a8f feat(nimble): Add support to allow connection during scanning 2024-08-19 15:31:52 +05:30
Yuhan Wei 742f28cc88 docs(ble): Updated ble fast provision example link in ble-mesh-faq.rst 2024-08-19 17:23:39 +08:00
Rahul Tank 79c3c405e7 Merge branch 'bugfix/fix_nimble_issues_v5.0' into 'release/v5.0'
Bugfix/fix nimble issues v5.0

See merge request espressif/esp-idf!32865
2024-08-19 16:51:39 +08:00
Rahul Tank 46d33080c3 fix(nimble): Remove ESP IP dependancy on enc_adv_data example 2024-08-19 10:08:58 +05:30
Rahul Tank fe5355697a fix(nimble): Modify Advertising Tx power levels 2024-08-19 10:08:58 +05:30
Rahul Tank e0393330a7 Merge branch 'doc/update_readme_enc_adv_kconfig_v5.0' into 'release/v5.0'
fix(nimble): Remove ESP IP dependancy on enc_adv_data example (v5.0)

See merge request espressif/esp-idf!32647
2024-08-19 12:20:16 +08:00
Rahul Tank 4870ada14a Merge branch 'bugfix/handle_linked_om_blufi_v5.0' into 'release/v5.0'
fix(nimble) Added change to handle linked om data at blufi layer (v5.0)

See merge request espressif/esp-idf!31977
2024-08-19 12:19:32 +08:00
Yuhan Wei f399708eb9 docs(ble): Updated the support status for some NimBLE features 2024-08-19 09:43:57 +08:00
Pat Erley 09442d9289 fix(ble_mesh): Fix OP_TIME_SET and OP_TIME_STATUS
When a user app is handling these messages, the tai_utc_delta and
time_zone_offset fields are not correctly populated.  Resolve by
properly setting the fields.

Signed-off-by: luoxu <luoxu@espressif.com>
Closes https://github.com/espressif/esp-idf/pull/13135
2024-08-17 06:03:52 +08:00
Sergei Silnov a819f7b565 Merge branch 'fix/component_manager_load_all_local_components_v5.0' into 'release/v5.0'
fix: component manager load all component dirs even set(COMPONENTS ...) (v5.0)

See merge request espressif/esp-idf!32041
2024-08-16 21:25:14 +08:00
Yuhan Wei c162aa01b4 docs(ble): Added BLE feature support status 2024-08-16 17:56:14 +08:00
aditi 3769a10ef7 fix(wpa_supplicant):Deinit old dpp authentication data after receiving config. 2024-08-16 10:41:36 +05:30
xiongweichao 831d2f484b fix(bt/controller): Fixed disconnection issue
- Fixed the issue of disconnection caused by updating the channel map in sniff mode
2024-08-16 12:19:02 +08:00
chenqingqing 616869b554 fix(bt/bluedroid): Add PCM configuration about pcm frame sync signal shape 2024-08-16 12:19:02 +08:00
Jiang Jiang Jian cb74823a38 Merge branch 'bugfix/sae_gcmp_conn_failure' into 'release/v5.0'
Fix SAE connection failure when GCMP cipher is used (v5.0)

See merge request espressif/esp-idf!32601
2024-08-15 21:05:22 +08:00
Fu Hanxi 72d9a29a52 fix: component manager load all component dirs even set(COMPONENTS ...) 2024-08-15 20:42:12 +08:00
Jiang Jiang Jian 7ae93db789 Merge branch 'bugfix/fix_ble_gattc_app_unregister_v5.0' into 'release/v5.0'
Bugfix/fix ble gattc app unregister (v5.0)

See merge request espressif/esp-idf!32441
2024-08-15 19:44:33 +08:00
Wang Meng Yang 745cd37220 Merge branch 'bugfix/fix_ble_channel_map_update_v5.0' into 'release/v5.0'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(f583012) (v5.0)

See merge request espressif/esp-idf!32584
2024-08-15 18:35:05 +08:00
Wang Meng Yang dba15f8d34 Merge branch 'bugfix/fix_ble_security_param_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fixed issue with resetting BLE security parameters during initialization (v5.0)

See merge request espressif/esp-idf!32508
2024-08-15 18:35:04 +08:00
Wang Meng Yang 054d8c9c9d Merge branch 'bugfix/fix_ble_cannot_create_conn_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fixed BLE cannot create connection(v5.0)

See merge request espressif/esp-idf!32310
2024-08-15 18:35:00 +08:00
Jiang Jiang Jian 4019318c60 Merge branch 'bugfix/handle_no_pmkid_case_owe_v5.0' into 'release/v5.0'
Recompute keys in OWE incase of PMKID absence or mismatch (Backport v5.0)

See merge request espressif/esp-idf!32336
2024-08-15 16:14:04 +08:00
Jiang Jiang Jian b99f0f9b7a Merge branch 'bugfix/heap_corrupt_in_bt_mem_release_on_esp32_v5.0' into 'release/v5.0'
fix(bt): Fix heap corruption in the call of esp_bt_mem_release on ESP32 (v5.0)

See merge request espressif/esp-idf!32804
2024-08-15 16:10:34 +08:00
Jiang Jiang Jian 0c829b34b7 Merge branch 'fix/setuptools_constraint_v5.0' into 'release/v5.0'
fix: ensure the constraint file is followed also for setuptools (v5.0)

See merge request espressif/esp-idf!32551
2024-08-15 16:08:52 +08:00
Jiang Jiang Jian 6aa56f8c34 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20240726_v5.0' into 'release/v5.0'
feat(tools): update openocd version to v0.12.0-esp32-20240726 (v5.0)

See merge request espressif/esp-idf!32607
2024-08-15 16:02:00 +08:00
Jiang Jiang Jian 9bf654fdf5 Merge branch 'fix/incorrect_config_name_v5.0' into 'release/v5.0'
Fix encrypt image instead of the partition optimisation not being enabled (v5.0)

See merge request espressif/esp-idf!32642
2024-08-15 16:01:00 +08:00
Jiang Jiang Jian a08133327d Merge branch 'change/exclude_cves_v5.0' into 'release/v5.0'
change: exclude CVEs that do not impact ESP-IDF components (v5.0)

See merge request espressif/esp-idf!32662
2024-08-15 16:00:31 +08:00
Jiang Jiang Jian 08fc43a63d Merge branch 'feat/print_the_ble_mac_when_init_5.0' into 'release/v5.0'
feat(ble): Print out the BT mac when the controller is initialized

See merge request espressif/esp-idf!32733
2024-08-15 15:58:40 +08:00
Jiang Jiang Jian 018e50895c Merge branch 'docs/optimized_ble_adv_data_type_v5.0' into 'release/v5.0'
docs(ble/bluedroid): Optimize BLE example for setting advertising data (v5.0)

See merge request espressif/esp-idf!32758
2024-08-15 15:58:15 +08:00
Jiang Jiang Jian bcbb9d1b90 Merge branch 'docs/remove_user_guide_for_esp32_ethernet_migration_v5.0' into 'release/v5.0'
docs: remove user guide for esp32-ethernet-kit migration (v5.0)

See merge request espressif/esp-idf!32589
2024-08-15 15:54:58 +08:00
Jiang Jiang Jian bb2b6c38dc Merge branch 'fix/fatfs_f_mount_immediately_after_formatting_v5.0' into 'release/v5.0'
fix(vfs): FATFS mount immediately after format if mount failed (v5.0)

See merge request espressif/esp-idf!32382
2024-08-15 15:52:11 +08:00
Jiang Jiang Jian 27b870c7e8 Merge branch 'bugfix/increase_timer_task_depth_v5.0' into 'release/v5.0'
fix(nimble): Increase Timer stack size for nimble application (v5.0)

See merge request espressif/esp-idf!32272
2024-08-15 15:51:18 +08:00
Jiang Jiang Jian d69673aee4 Merge branch 'bugfix/fix_ble_phy_compilation_issue' into 'release/v5.0'
fix(nimble): Remove extra spaces from example CMake file (v5.0)

See merge request espressif/esp-idf!32268
2024-08-15 15:50:46 +08:00
Jiang Jiang Jian 1dd21078f8 Merge branch 'bugfix/remove_duplicate_fn_dpp_v5.0' into 'release/v5.0'
wifi: backport some dpp fixes (v5.0)

See merge request espressif/esp-idf!32263
2024-08-15 15:50:11 +08:00
Jiang Jiang Jian e7c91416ce Merge branch 'fix/stack_overflow_in_example_spp_initiator_v5.0' into 'release/v5.0'
Fix/stack overflow in example spp initiator(backport v5.0)

See merge request espressif/esp-idf!32235
2024-08-15 15:49:51 +08:00
Jiang Jiang Jian d7710f65b6 Merge branch 'bugfix/reset_irk_when_all_unpair_v5.0' into 'release/v5.0'
fix(nimble): Fixed BLE security vulnerability when using fixed IRK (v5.0)

See merge request espressif/esp-idf!32202
2024-08-15 15:49:37 +08:00
Wang Meng Yang 06dba23ce0 Merge branch 'bugfix/fix_hidh_integrity_check_bug_v5.0' into 'release/v5.0'
fix(esp_hid): Loose the check of input report length to be more compatible[backport 5.0]

See merge request espressif/esp-idf!32723
2024-08-15 12:13:37 +08:00
Marius Vikhammer fb8bef8ce3 Merge branch 'test/fix_flaky_sched_time_test_v5.0' into 'release/v5.0'
test(freertos): Fixed flaky scheduling time test (v5.0)

See merge request espressif/esp-idf!32852
2024-08-15 10:13:05 +08:00
morris ee7d5be8f8 Merge branch 'contrib/github_pr_14310_v5.0' into 'release/v5.0'
fix(gptimer): remove incorrect param from example (GitHub PR) (v5.0)

See merge request espressif/esp-idf!32687
2024-08-15 10:02:04 +08:00
morris 1d6e6f1099 Merge branch 'feat/support_psram_aps3204l_v5.0' into 'release/v5.0'
psram: support APS3204L (v5.0)

See merge request espressif/esp-idf!32393
2024-08-15 09:57:44 +08:00
morris 49570b42a9 Merge branch 'bugfix/rmt_memory_power_up_v5.0' into 'release/v5.0'
fix(rmt): power up memory block (v5.0)

See merge request espressif/esp-idf!32174
2024-08-15 09:57:03 +08:00
Sudeep Mohanty 7b6c138a95 test(freertos): Fixed flaky scheduling time test
This commit updates the scheduling time test to test for median
scheduling time values instead of average values.
2024-08-14 10:46:03 +02:00
Rahul Tank f5d916d512 fix(nimble) Added change to handle linked om data at blufi layer 2024-08-13 16:56:31 +05:30
Michael (XIAO Xufeng) e01962e02e Merge branch 'update/version_5_0_7' into 'release/v5.0'
Update version to 5.0.7

See merge request espressif/esp-idf!32696
2024-08-13 17:55:59 +08:00
Wang Mengyang a372e0ee88 fix(bt): Fix heap corruption in the call of esp_bt_mem_release on ESP32
Closes https://github.com/espressif/esp-idf/issues/14263
2024-08-13 07:55:23 +08:00
zhanghaipeng 5140188496 docs(ble/bluedroid): Optimize BLE example for setting advertising data 2024-08-12 11:38:38 +08:00
Shen Weilong 553b97e84c feat(ble): Print out the BT mac when the controller is initialized 2024-08-09 20:58:57 +08:00
zhanghaipeng ffa51a0932 feat(ble/bluedroid): Support getting BLE address type in bond list 2024-08-09 20:29:48 +08:00
zhanghaipeng 01a40193a8 docs(ble/bluedroid): Optimize documentation for BLE connection parameter updates 2024-08-09 20:29:20 +08:00
liqigan 4d4d4b8abc fix(esp_hid): Loose the check of input report length to be more compatible
Closes https://github.com/espressif/esp-idf/issues/14259
2024-08-09 15:57:17 +08:00
Xiao Xufeng 9cd7dad6e9 change(version): Update version to 5.0.7 2024-08-08 16:04:23 +08:00
LonerDan 61edd6c83f docs(gptimer): remove incorrect param from example
Fixes call to `gptimer_start` in one of the examples
which includes extra second parameter `&alarm_config`,
when the function takes only one.

Mreges https://github.com/espressif/esp-idf/pull/14310
2024-08-08 10:05:58 +08:00
Shyamal Khachane cad8a7c41c fix(esp_wifi): Refactor and update wpa_supplicant with upstream 2024-08-07 12:36:13 +05:30
zhanghaipeng 256895f89f fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(f583012)
- Fix BLE channel map update when latency is not zero
2024-08-07 13:13:49 +08:00
Frantisek Hrbata 8027ab8398 change: exclude CVEs that do not impact ESP-IDF components
cJSON:    CVE-2024-31755 - Resolved in cJSON v1.7.18
FreeRTOS: CVE-2024-28115 - Affects only ARMv7-M MPU ports, and ARMv8-M ports

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-08-06 17:26:15 +02:00
Rahul Tank 4ed10e555d fix(nimble): Remove ESP IP dependancy on enc_adv_data example 2024-08-06 14:40:57 +05:30
harshal.patil 1bf5d48df5 fix(bootloader_support): Fix encrypt image instead of the partition feature not being enabled 2024-08-06 13:46:10 +05:30
Alexey Gerenkov 3cc27da00b feat(tools): update openocd version to v0.12.0-esp32-20240726 2024-08-05 22:39:22 +02:00
Mario Schlegel 74d8feabca fix(ble-mesh): don't use dangling pointer in nimble gatt service
Signed-off-by: luoxu <luoxu@espressif.com>
Merges https://github.com/espressif/esp-idf/pull/14140
2024-08-05 21:00:50 +08:00
renpeiying 3145eac6c5 docs: remove user guide for esp32-ethernet-kit migration 2024-08-05 18:01:27 +08:00
shenmengjing 4f89864651 docs: Delete ESP32-S2-Kaluga-Kit related user guide files 2024-08-05 16:10:53 +08:00
chenjianhua 3d143a235c feat(bt): Update bt lib for ESP32-C3 and ESP32-S3(4e58df9)
- Support enhanced BLE TX power setting and getting
2024-08-05 15:26:03 +08:00
zhiweijian 8f2dca5c69 feat(bt/controller): support mesh duplicate with extend scan 2024-08-05 15:25:49 +08:00
zwl 730230d9cf fix: fixed directed adv can't be conneted when adv filter is 0x2 on ESP32C2 2024-08-02 17:46:34 +08:00
Frantisek Hrbata 6197d1a256 fix: ensure the constraint file is followed also for setuptools
Currently, when the venv is installed or updated, we attempt to
automatically update pip and setuptools within the venv. Unfortunately,
the setuptools package is installed or updated without adhering to the
constraints file, which restricts the setuptools version due to
https://github.com/pypa/setuptools/issues/4480. Resolve this issue by
applying the constraints file to the installation and update of both pip
and setuptools.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-08-02 10:10:29 +02:00
Jiang Jiang Jian 6d79a72d62 Merge branch 'bugfix/avoid_offchan_ftm_retries_v5.0' into 'release/v5.0'
fix(wifi): Avoid internal retries for offchannel FTM Requests (Backport v5.0)

See merge request espressif/esp-idf!32491
2024-08-01 19:33:18 +08:00
zhanghaipeng a9b0b618ab fix(ble/bluedroid): Fixed issue with resetting BLE security parameters during initialization 2024-08-01 16:18:13 +08:00
Nachiket Kukade d5c1431340 fix(wifi): Avoid internal retries for offchannel FTM Requests 2024-07-31 22:38:30 +05:30
zhanghaipeng 915c312c8a fix(ble/bluedroid): Fix incorrect state issue when unregistering BLE GATTC application 2024-07-30 19:11:40 +08:00
Jiang Jiang Jian 4794e31652 Merge branch 'bugfix/fix_beacon_timeout_issue_in_mesh_v5.0' into 'release/v5.0'
fix(wifi/mesh): fix the beacon timeout issue in mesh (v5.0)

See merge request espressif/esp-idf!32410
2024-07-30 13:44:17 +08:00
zhangyanjiao dcd9758708 fix(wifi/mesh): fix the beacon timeout issue in mesh 2024-07-29 16:26:53 +08:00
zwl a27c82c69a feat(bluetooth/controller): support switching log output mode on ESP32-C2 2024-07-29 12:11:09 +08:00
zwl 13b9b65904 feat(bluetooth/controller): storage ble controller log to flash on ESP32C2 2024-07-29 12:10:36 +08:00
Armando f095432fc0 feat(psram): support APS3204L 2024-07-29 11:44:49 +08:00
Island 4a46dce746 Merge branch 'feat/support_default_tx_level_for_esp32h2_esp32c6_esp32c2_v5.0' into 'release/v5.0'
feat(bluetooth/controller): support default tx power configurable on ESP32C2

See merge request espressif/esp-idf!32196
2024-07-29 10:32:14 +08:00
Adam Múdry 567cf951bd fix(vfs): FATFS mount immediately after format if mount failed 2024-07-26 17:59:56 +02:00
Island 0a615a6783 Merge branch 'bugfix/fixed_start_adv_error_on_esp32c2' into 'release/v5.0'
fix(ble): fixed tx memory leak issue when controller disable

See merge request espressif/esp-idf!32322
2024-07-26 13:56:04 +08:00
zhanghaipeng efd0a06db6 fix(ble/bluedroid): Fixed BLE cannot create connection 2024-07-26 10:38:05 +08:00
Island 13033ac582 Merge branch 'bugfix/fix_ble_intr_alloc_failure' into 'release/v5.0'
fix(bt/controller): Change level of BLE interrupt to avoid allocation failure

See merge request espressif/esp-idf!32199
2024-07-25 12:10:07 +08:00
Shyamal Khachane 9a746e5b4e fix(esp_wifi): Handle PMKID mismatch or absence in OWE
Compute keys incase PMKID does not match or PMKID is absent in association response
2024-07-25 08:42:53 +05:30
Rahul Tank a644f49cf7 fix(wifi_prov): Added API to set random address 2024-07-24 21:00:54 +05:30
zwl 04418cbf48 fix(ble): fixed tx memory leak issue when controller disable 2024-07-24 17:42:32 +08:00
Jiang Jiang Jian a528f1326c Merge branch 'bugfix/fix_coexist_beacon_monitor_timer_issue' into 'release/v5.0'
fix(coex): fix coexist beacon monitor timer carsh issue

See merge request espressif/esp-idf!32239
2024-07-23 15:43:56 +08:00
Rahul Tank df0d5bc4fa fix(nimble): Increase Timer stack size for nimble application 2024-07-22 15:52:34 +05:30
Rahul Tank 74431934a5 fix(nimble): Remove extra spaces from example CMake file 2024-07-22 15:26:29 +05:30
Kapil Gupta a3ef4cb054 fix(esp_wifi): backport some dpp fixes 2024-07-22 12:09:27 +05:30
liuning c80c955997 fix(coex): fix coexist beacon monitor timer carsh issue 2024-07-19 14:06:32 +08:00
gongyantao 7d040b7d44 feat(bt): add bt address printing for all bt examples 2024-07-19 11:51:58 +08:00
gongyantao beab75487b fix(bt): fix uTask stack overflow in bt example spp_initiator 2024-07-19 11:50:17 +08:00
chenjianhua 84657b9d74 fix(bt/controller): Change level of BLE interrupt to avoid allocation failure 2024-07-18 14:10:33 +08:00
Rahul Tank d651e5265d fix(nimble): Fixed BLE security vulnerability when using fixed IRK 2024-07-18 11:25:28 +05:30
luoxu c6b5c5893b fix(ble_mesh): fixed BLEMESH24-76 2024-07-18 11:40:56 +08:00
zwl eeea47ec5f feat(bluetooth/controller): support default tx power configurable on ESP32C2 2024-07-18 10:50:54 +08:00
Jiang Jiang Jian ce8dd3997d Merge branch 'bugfix/fix_coex_loadprohibit_issue_v5.0' into 'release/v5.0'
fix(coex): Update bt lib for ESP32-C3 and ESP32-S3(e4ba7f6) (Backport v5.0)

See merge request espressif/esp-idf!32148
2024-07-17 20:05:57 +08:00
Jiang Jiang Jian a783022fb2 Merge branch 'fix/netif_ppp_ip6_autoconfig_v5.0' into 'release/v5.0'
fix(esp_netif): Fix missing IPv6 autoconfig for PPP netifs (v5.0)

See merge request espressif/esp-idf!32181
2024-07-17 20:00:48 +08:00
Jiang Jiang Jian 98d3c8219a Merge branch 'bugfix/fix_mesh_xon_request_timeout_issue_v5.0' into 'release/v5.0'
fix(wifi/mesh): fix the issue that xon request timeout constantly when root reboot (v5.0)

See merge request espressif/esp-idf!32167
2024-07-17 16:02:28 +08:00
linruihao 3a08385930 fix(coex): Update bt lib for ESP32-C3 and ESP32-S3(e4ba7f6)
- Fixed coexist LoadProhibited issue
2024-07-17 15:45:19 +08:00
Jiang Jiang Jian 8d86ea02a2 Merge branch 'feat/optimize_bt_porting_hci_0628_5.0' into 'release/v5.0'
Feat/optimize bt porting hci 0628 5.0

See merge request espressif/esp-idf!32130
2024-07-17 15:39:33 +08:00
David Cermak 35da10990a fix(esp_netif): Fix missing IPv6 autoconfig for PPP netifs
Closes https://github.com/espressif/esp-idf/issues/13713
2024-07-17 08:47:42 +02:00
morris d357849205 fix(rmt): power up memory block 2024-07-17 13:55:18 +08:00
zhangyanjiao e0ed2f9cd8 fix(wifi/mesh): fix the issue that xon request timeout constantly when root reboot
Closes https://github.com/espressif/esp-idf/issues/13212
2024-07-17 11:19:22 +08:00
Jiang Jiang Jian 01ac18f468 Merge branch 'bugfix/11r_disable_sdkconfig_v5.0' into 'release/v5.0'
fix(wifi): Ignore 11R, ENT AP when disabled in sdkconfig

See merge request espressif/esp-idf!32149
2024-07-17 10:43:41 +08:00
zwl 4569090b6b fix(ble): fixed ble_htp example ci build error 2024-07-17 10:38:55 +08:00
zwl cec91a1c10 feat(bluetooth/controller): adopting new HCI layer code on ESP32-C2 2024-07-16 20:10:03 +08:00
zwl 18efdefafe feat(bluetooth/controller): optimize bt hci layer code 2024-07-16 20:10:03 +08:00
Shreyas Sheth 8ee63672db fix(wifi): Ignore 11R, ENT AP when disabled in sdkconfig 2024-07-16 11:53:43 +05:30
Jiang Jiang Jian 7109734d01 Merge branch 'bugfix/fix_some_ble_bugs_cjh_v5.0' into 'release/v5.0'
Fixed some BLE bugs 240715 (backport v5.0)

See merge request espressif/esp-idf!32123
2024-07-16 10:28:41 +08:00
Jiang Jiang Jian 88ee1f5c68 Merge branch 'bugfix/ld_acl_c_3576_v5.0' into 'release/v5.0'
fix(bt/controller): Removed an improper assertion in ACL link driver (v5.0)

See merge request espressif/esp-idf!32120
2024-07-16 10:25:15 +08:00
Jiang Jiang Jian 17bdbedcd2 Merge branch 'bugfix/fix_some_wifi_bugs_240715_v5.0' into 'release/v5.0'
fix(wifi): fix some wifi bugs 240715(Backport v5.0)

See merge request espressif/esp-idf!32129
2024-07-15 21:53:13 +08:00
muhaidong ab10ce03cd fix(wifi): fix some wifi bugs 240715
1. fixed association refused temporarily too many times issue
2. send auth after sae association refused temporarily
3. give some information when password length mismatch authmode threshold
4. send deauth when first connect and pmf disabled
5. fix sta may join bad signal ap when set by signal
2024-07-15 18:59:14 +08:00
zhanghaipeng 3752c0ad5f fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(abd7733)
- Fix the issue where RSSI is incorrect when latency is not zero
2024-07-15 15:55:17 +08:00
chenjianhua 7efd230264 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(66b5cc0)
- Fixed vendor hci get controller status command
- Prevent BLE interrupt from being preempted
2024-07-15 15:55:09 +08:00
Jin Cheng ae7fe9eff9 fix(bt/controller): Removed an improper assertion in ACL link driver.
It can be triggered on peripheral SNIFF mode
when RX window is adjusted on ESP32.
2024-07-15 15:27:23 +08:00
Jiang Jiang Jian 6a09e585dd Merge branch 'docs/optimized_ble_controller_api_references_esp32_v5.0' into 'release/v5.0'
docs(ble): Revised the esp32 controller API explanations (v5.0)

See merge request espressif/esp-idf!31928
2024-07-15 10:39:15 +08:00
Jiang Jiang Jian eaca226745 Merge branch 'bugfix/wps_reg_state_handling_v5.0' into 'release/v5.0'
fix(wpa_supplicant): Handle case when WPS registrar misses WSC_DONE sent by station (Backport v5.0)

See merge request espressif/esp-idf!32079
2024-07-15 10:37:59 +08:00
Rahul Tank 4780f809f5 Merge branch 'feature/periodic_adv_enhancement_v5.0' into 'release/v5.0'
NimBLE : Added periodic Adv Feature Updates in BLE 5.3 (v5.0)

See merge request espressif/esp-idf!32078
2024-07-13 19:31:34 +08:00
Roshan Bangar d2c4efae24 feat(nimble): Added periodic Adv Feature Updates in BLE 5.3 2024-07-12 18:41:02 +05:30
Rahul Tank a1ce7ed947 Merge branch 'feat/enc_adv_data_v5.0' into 'release/v5.0'
NimBLE: Added support of encrypted advertising data (v5.0)

See merge request espressif/esp-idf!32046
2024-07-12 21:07:06 +08:00
Island a8f8936b48 Merge branch 'feat/add_ble50_instant_v5.0' into 'release/v5.0'
Add support for BLE 5.0 instances in related events (v5.0)

See merge request espressif/esp-idf!31993
2024-07-12 14:52:52 +08:00
Sarvesh Bodakhe 12d58c893d fix(wpa_supplicant): Avoid delaying removal of wps enrollee by 10ms
This is no longer needed as eloop timers are now executed in wifi task context.
2024-07-12 12:01:11 +05:30
Sarvesh Bodakhe c36c3920fc fix(wpa_supplicant): Handle case when WPS registrar misses WSC_DONE sent by station
When registrar somehow misses the WSC_DONE sent by station and station
goes for next connection after sending deauth, make sure that softAP
disables the registrar.
2024-07-12 11:58:56 +05:30
Jiang Jiang Jian 517ca1b97e Merge branch 'bugfix/wps_bug_v5.0' into 'release/v5.0'
fix(wpa_supplicant):Fix for setting wps status fail when connection fails(v5.0)

See merge request espressif/esp-idf!31223
2024-07-12 11:57:21 +08:00
Wei Yu Han e8d99f1b28 docs(ble): Removed duplicate note in esp_bt_mem_release 2024-07-12 09:19:11 +08:00
Wei Yu Han 7e1bc2879d docs(ble): Revised the explanation of esp_bt_mem_release and esp_bt_controller_mem_release 2024-07-12 09:10:46 +08:00
aditi 30effe7894 fix(wpa_supplicant):Fix for setting wps status fail when connection fails 2024-07-11 18:17:00 +05:30
Jiang Jiang Jian 2dc5e29012 Merge branch 'fix/usb_isoc_error_status_backport_v5.0' into 'release/v5.0'
fix(usb/host): Decode error flags in ISOC transfers backport to v5.0

See merge request espressif/esp-idf!31881
2024-07-11 20:21:07 +08:00
isha.pardikar@espressif.com cdb3864e2c NimBLE: Added support of encrypted advertising data 2024-07-11 15:07:21 +05:30
Rahul Tank 1b89cfc46d Merge branch 'bugfix/fix_example_menuconfig_error_v5.0' into 'release/v5.0'
fix(nimble): Update menuconfig option to consider 5.0 support (v5.0)

See merge request espressif/esp-idf!32038
2024-07-10 22:24:25 +08:00
Tomas Rezucha 02fdd5f60e fix(usb/host): Decode error flags in ISOC transfers 2024-07-10 20:44:32 +08:00
Rahul Tank 3e9f77e434 fix(nimble): Update menuconfig option to consider 5.0 support 2024-07-10 17:23:16 +05:30
Jiang Jiang Jian a2434a844c Merge branch 'feature/support_coex_pwr_v5.0' into 'release/v5.0'
feat(wifi): support coex pwr, fix tbtt intr miss issue, fix esp32 cant tx after reset

See merge request espressif/esp-idf!32019
2024-07-10 19:42:03 +08:00
Island 41b89275c1 Merge branch 'bugfix/split_hci_log_in_nimble_v5.0' into 'release/v5.0'
fix(bt/nimble): split hci log in nimble (backport v5.0)

See merge request espressif/esp-idf!32003
2024-07-10 18:38:59 +08:00
liuning 9689526f76 feat(wifi): support coex pwr, fix tbtt intr miss issue, fix esp32 cant tx after reset 2024-07-10 16:27:17 +08:00
Mahavir Jain 6a284148f3 Merge branch 'contrib/github_pr_13945_v5.0' into 'release/v5.0'
fix(esp_http_client): Do not allocate client->if_name twice in esp_http_client_init. (GitHub PR) (v5.0)

See merge request espressif/esp-idf!31945
2024-07-10 13:53:03 +08:00
zhanghaipeng 4593ae0741 fix(ble/bluedroid): Fixed BLE set adv param check 2024-07-10 12:23:55 +08:00
Wei Yu Han 0fa8fa367c docs(ble): Add the parameter name data in esp_vhci_host_send_packet 2024-07-10 10:43:25 +08:00
zhiweijian 0e504dbc90 fix(bt/nimble): split hci log in nimble 2024-07-09 17:38:40 +08:00
morris 67e446d6c2 Merge branch 'bugfix/fix_modbus_tcp_slave_examples_use_events_v50' into 'release/v5.0'
fix(examples/modbus): fix modbus slave examples may process event flags incorrectly (Backport v5.0)

See merge request espressif/esp-idf!28250
2024-07-09 16:29:22 +08:00
Alex Lisitsyn cf53d01a6c fix(examples/modbus): fix modbus slave examples may process event flags incorrectly (Backport v5.0) 2024-07-09 16:29:22 +08:00
zhanghaipeng 7212e4e1a8 feat(ble/bluedroid): Support BLE50 instance in related event 2024-07-09 15:45:10 +08:00
Mahavir Jain fddb503d69 Merge branch 'fix/fix_esp_tls_client_key_parsing_v5.0' into 'release/v5.0'
fix(esp_tls): Fixed client key parsing for ECC key (v5.0)

See merge request espressif/esp-idf!31841
2024-07-09 12:59:24 +08:00
Aditya Patwardhan 9cad274092 fix(esp_tls): Fixed client key parsing for ECC key
Client key parsing for ECC keys was failing as the
    RNG supplied to the key parsing API was uninitialized.
    This commit fixes that behaviour
2024-07-09 12:36:20 +08:00
Jiang Jiang Jian a808db00c9 Merge branch 'bugfix/fix_esco_conflict_with_sniff_v5.0' into 'release/v5.0'
fix(bt/controller): Fixed some controller bugs (v5.0)

See merge request espressif/esp-idf!31955
2024-07-08 20:25:02 +08:00
Jiang Jiang Jian 97bac418a8 Merge branch 'fix/fix_sta_scan_when_connected_cause_bcn_timeout_loop_v5.0' into 'release/v5.0'
fix(wifi): fix sta scan when connected cause bcn timeout loop issue v5.0

See merge request espressif/esp-idf!31956
2024-07-08 20:20:54 +08:00
Jiang Jiang Jian 2691bbacbe Merge branch 'bugfix/i2c_timeout_issue_v5.0' into 'release/v5.0'
fix(i2c): fix issues related to timeout and alive interval tick (backport v5.0)

See merge request espressif/esp-idf!29981
2024-07-08 20:11:08 +08:00
wangtao@espressif.com bc6afecff1 fix(wifi): fix sta scan when connected cause bcn timeout loop issue v5.0 2024-07-08 14:31:19 +08:00
linruihao 33b517a273 fix(bt/controller): Fixed some controller bugs
- Fixed fail to establish eSCO when connected to two devices
- Changed some error log level to Debug if the error have a workaround

Closes https://github.com/espressif/esp-idf/issues/12340
2024-07-08 14:27:06 +08:00
liqigan efdda3105d fix(bt/controller): Fixed not report HCI_Disconnection_Complete event 2024-07-08 14:27:06 +08:00
Rahul Tank 404d41c71c Merge branch 'bugfix/revert_extra_print_v5.0' into 'release/v5.0'
Revert "fix(nimble): Added debug print to check for skipped adv report" (v5.0)

See merge request espressif/esp-idf!31934
2024-07-08 14:16:06 +08:00
Island 6ed2802567 Merge branch 'fix/blemesh24_61_v5.0' into 'release/v5.0'
fix/blemesh24_61 (v5.0)

See merge request espressif/esp-idf!31567
2024-07-08 14:06:51 +08:00
fbp2m 98260d0c5c fix: fixed allocating if_name in client context multiple times
Do not allocate client->if_name twice in esp_http_client_init().

Signed-off-by: Harshit Malpani <harshit.malpani@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/13945
2024-07-07 21:21:31 +08:00
Rahul Tank e5e63be1b8 Revert "fix(nimble): Added debug print to check for skipped adv report"
This reverts commit 69ad6bb5d1.
2024-07-05 18:10:27 +05:30
Wang Ning a4496994f2 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Wang Ning <wangning@espressif.com>
2024-07-05 18:08:19 +08:00
Yuhan Wei 69c9719b0d docs(ble): Add the explanations to controller parameters configurable in menuconfig 2024-07-05 18:08:19 +08:00
Wang Ning 3412201140 Apply 35 suggestion(s) to 1 file(s)
Co-authored-by: Wang Ning <wangning@espressif.com>
2024-07-05 18:08:19 +08:00
Yuhan Wei dfaa5a960c docs(ble): Removed note in esp_bt_controller_config_t 2024-07-05 18:08:19 +08:00
Yuhan Wei fb6595059d docs(ble): Replaced BT with Bluetooth 2024-07-05 18:08:19 +08:00
Yuhan Wei faeab638d4 docs(ble): Removed unnecessary explanations 2024-07-05 18:08:19 +08:00
Yuhan Wei 65cdf659c6 docs(ble): Added corresponding values to the controller mode 2024-07-05 18:08:19 +08:00
Yuhan Wei 314e964764 docs(ble): Fixed the explanation of TX power type 2024-07-05 18:08:19 +08:00
Yuhan Wei 1446d2b9bd docs(ble): Added typeof for BLE sleep clock accuracy enum 2024-07-05 18:08:19 +08:00
Yuhan Wei 45d84a1afd docs(ble): Added a name for BLE sleep clock accuracy enum 2024-07-05 18:08:19 +08:00
Yuhan Wei 6d65a7db74 docs(ble): Revised the esp32 controller API explanations 2024-07-05 18:08:18 +08:00
Island 8599e25cfe Merge branch 'bugfix/fixed_ble_issues_on_esp32c2_esp32c6_v5.0' into 'release/v5.0'
Bugfix/fixed ble issues on esp32c2 esp32c6 (v5.0)

See merge request espressif/esp-idf!31862
2024-07-05 10:39:18 +08:00
luoxu 110b7adc6a fix(ble_mesh): ensure the operation of adv busy is thread-safe 2024-07-04 12:12:48 +08:00
luoxu 006086c50b feat(ble_mesh): add cas operation for bt_mesh_atomic_val_t 2024-07-04 12:12:48 +08:00
Jiang Jiang Jian 3bb82f7ce4 Merge branch 'staging/espcoredump_move_strings_flash_v5.0' into 'release/v5.0'
change(espcoredump): save RAM space by placing constants in flash (backport v5.0)

See merge request espressif/esp-idf!29192
2024-07-04 10:38:35 +08:00
Jiang Jiang Jian e9f1311892 Merge branch 'feature/add-newlib-sbom_v5.0' into 'release/v5.0'
feat(newlib): Add sbom manifest file (v5.0)

See merge request espressif/esp-idf!31834
2024-07-04 10:14:03 +08:00
Jiang Jiang Jian f0c2da6dc4 Merge branch 'feature/ipc_noblocking_call_v5.0' into 'release/v5.0'
feat(ipc): Adds a new no blocking IPC call (v5.0)

See merge request espressif/esp-idf!28447
2024-07-03 21:01:52 +08:00
Jiang Jiang Jian a7e404d08e Merge branch 'feature/sae_pk_transition_disable_v5.0' into 'release/v5.0'
feat(esp_wifi): Add support for OWE and WPA3 Enterprise transition disable (Backport v5.0)

See merge request espressif/esp-idf!31379
2024-07-03 19:34:17 +08:00
Rahul Tank 7d5cbec4bd Merge branch 'bugfix/low_buf_count_print_v5.0' into 'release/v5.0'
fix(nimble): Added debug print to check for skipped adv report (v5.0)

See merge request espressif/esp-idf!31835
2024-07-03 16:43:10 +08:00
Sarvesh Bodakhe b3fb47908c feat(wifi): Add support for WPA3 transition disable and more updates
1. Add support for SAE-PK and WPA3-Enterprise transition disable
2. Add support to handle OWE transition disable indication from AP
3. refactor: Backport common changes in scan/connect path from 90cc6158
   - 90cc6158 adds support for Network Introduction Protocol in DPP
4. Fix issue of supplicant using wrong parameters to configure bss
  - Ensure that wpa_supplicant's state machine registers the requirement for rsnxe
    before deciding to add rsnxe to a assoc request.

Co-authored-by: jgujarathi <jash.gujarathi@espressif.com>
2024-07-03 12:46:58 +05:30
Jiang Jiang Jian d0ff5e6236 Merge branch 'bugfix/fix_some_wifi_bugs_240702_v5.0' into 'release/v5.0'
Bugfix/fix some wifi bugs 240702 v5.0(Backport v5.0)

See merge request espressif/esp-idf!31876
2024-07-03 14:18:59 +08:00
Krzysztof Budzynski cb4a8ed85b Merge branch 'docs/migrate_esp32c3_devkitc_02_devkitm_1_user_guide_v5.0' into 'release/v5.0'
docs: Migrate user guides of ESP32-C3-DevKitM and ESP32-C3-DevKitC to esp-dev-kits (v5.0)

See merge request espressif/esp-idf!31826
2024-07-03 14:09:47 +08:00
Zhang Xiao Yan 60e90cdc75 docs: Migrate user guides of ESP32-C3-DevKitM and ESP32-C3-DevKitC to esp-dev-kits (v5.0) 2024-07-03 14:09:47 +08:00
Jiang Jiang Jian 4db9de0271 Merge branch 'bugfix/fix_phy_cal_data_v5.0' into 'release/v5.0'
fix(phy): add phy calibration data check when mode is not none calibration v5.0

See merge request espressif/esp-idf!31825
2024-07-03 14:08:39 +08:00
Jiang Jiang Jian 026f3ed97d Merge branch 'docs/format_ap_basic_configuration_tables_v5.0' into 'release/v5.0'
docs: format AP basic configuration tables in wifi.rst (v5.0)

See merge request espressif/esp-idf!31857
2024-07-03 13:54:46 +08:00
muhaidong fbc9fe582c fix(wifi): fix configure gcmp failure issue 2024-07-03 10:57:33 +08:00
muhaidong d121b69262 fix(wifi): fixed disable gcmp choose pairwise cipher wrong issue 2024-07-02 21:40:48 +08:00
muhaidong ba8ace2e98 fix(wifi): annotate a rom function 2024-07-02 21:35:24 +08:00
Jiang Jiang Jian 4c6b043d5b Merge branch 'bugfix/wps_mode_change_v5.0' into 'release/v5.0'
fix(esp_wifi): Fix for issue in changing opmode when wps is enabled(v5.0)

See merge request espressif/esp-idf!30778
2024-07-02 20:54:27 +08:00
zwl 422c244fa6 fix(ble): fixed some ble controller issues on ESP32-C2 2024-07-02 15:44:55 +08:00
Linda a29b71d96a docs: format AP basic configuration tables in wifi.rst 2024-07-02 15:13:10 +08:00
aditi_lonkar 440b786834 fix(esp_wifi): Fix for issue in changing opmode when wps is enabled 2024-07-02 12:29:44 +05:30
Jiang Jiang Jian f378e76962 Merge branch 'lwip/if_indextoname_compolation_fix_v5.0' into 'release/v5.0'
fix(lwip): Fixed compilation error referencing undefined POSIX interface API (v5.0)

See merge request espressif/esp-idf!31408
2024-07-02 13:52:22 +08:00
Jiang Jiang Jian aec6f19bd8 Merge branch 'docs/add_ethernet_update_to_migration_4.4_to_5.0_v5.0' into 'release/v5.0'
docs: add Ethernet driver update to migration from 4.4 to 5.0 (v5.0)

See merge request espressif/esp-idf!31848
2024-07-02 13:44:43 +08:00
Linda f4506c95ee docs: add Ethernet driver update to migration from 4.4 to 5.0 2024-07-02 11:13:06 +08:00
Rahul Tank 69ad6bb5d1 fix(nimble): Added debug print to check for skipped adv report 2024-07-01 15:34:05 +05:30
Alexey Lapshin 6412a6fa48 feat(newlib): Add sbom manifest file 2024-07-01 17:03:21 +07:00
jack 4956c6cfbe fix(phy): add phy calibration data check when mode is not none calibration 2024-07-01 16:11:31 +08:00
Jiang Jiang Jian a6e89b466f Merge branch 'bugfix/mgmt_gcmp_issue_v5.0' into 'release/v5.0'
fix(wifi): Fix GCMP encryption for mgmt packets and other bugfixes (Backport v5.0)

See merge request espressif/esp-idf!31068
2024-07-01 14:29:21 +08:00
Jiang Jiang Jian 3db81d8d27 Merge branch 'docs/delete_userguide_esp32_s2_devkitc_1_v5.0' into 'release/v5.0'
docs: Delete user guide esp32-s2-devkitc-1 (v5.0)

See merge request espressif/esp-idf!31622
2024-07-01 14:24:27 +08:00
Jiang Jiang Jian 9a0c562b94 Merge branch 'bugfix/fix_ble_connect_fail_report_time_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fixed BLE report event when connection fails (v5.0)

See merge request espressif/esp-idf!31784
2024-07-01 14:19:55 +08:00
Sarvesh Bodakhe af72ce1f75 fix(esp_wifi): Fix some wifi bugs
1. Fix issues related to mgmt packets encryption in GCMP
2. Fix issue of wrong decryption of mgmt packets when PMF is enabled
3. Fix frame subtype in send_mgmt_frame
4. Fix issue of wrong Rx control information of espnow packets for esp32 and esp32s2
5. Fix send mgmt err when eapol process
2024-07-01 11:06:13 +05:30
Sarvesh Bodakhe 7fd73ede7f fix(wifi): Add bugfix to avoid RSNXE and KDE mismatch during 4-way-handshake 2024-07-01 11:05:25 +05:30
zhangshuxian e969de7fcb docs: Delete user guide esp32-s2-devkitc-1 2024-07-01 10:42:02 +08:00
Jiang Jiang Jian 6f72d019ec Merge branch 'backport/shortened_uart_read_bytes_blocking_50' into 'release/v5.0'
fix(uart): remove unnecessary wait when sending message to ring buffer(backport5.0)

See merge request espressif/esp-idf!31384
2024-07-01 10:29:06 +08:00
Omar Chebib ca8a14c838 fix(i2c): fix issues related to timeout and alive interval tick
Fixes https://github.com/espressif/esp-idf/issues/4999

Former usage of I2C_CMD_ALIVE_INTERVAL_TICK macro overrode the ticks_to_wait
parameter when the latter was too big
2024-07-01 10:16:35 +08:00
Jiang Jiang Jian 0d58e01665 Merge branch 'docs/delete_user_guide_esp32_s2_devkitm_1_v5.0' into 'release/v5.0'
docs: Delete user guide esp32-s2-devkitm-1 (v5.0)

See merge request espressif/esp-idf!31610
2024-07-01 10:14:17 +08:00
Jiang Jiang Jian 7243bf3f3b Merge branch 'fix/docs_wifi_get_sta_list_v5.0' into 'release/v5.0'
fix(docs): tcpip_adapter: Document replacement of tcpip_adapter_get_sta_list (v5.0)

See merge request espressif/esp-idf!31173
2024-07-01 10:13:27 +08:00
Jiang Jiang Jian 16521f6cba Merge branch 'docs/add_missing_usb_functions_to_esp32-c3_devkit_user_guides_v5.0' into 'release/v5.0'
Docs: Added missing USB functions to ESP32-C3 DevKit User Guides (v5.0)

See merge request espressif/esp-idf!30866
2024-07-01 10:12:47 +08:00
Jiang Jiang Jian 340b519b57 Merge branch 'docs/update_esp_vfs_notes_v5.0' into 'release/v5.0'
docs(vfs): update esp_vfs_register_fd api description (v5.0)

See merge request espressif/esp-idf!30428
2024-07-01 10:12:26 +08:00
Jiang Jiang Jian cb870bcd6e Merge branch 'fix/bump_esp_littlefs_to_v5.0' into 'release/v5.0'
fix(storage/littlefs): Bump version to v1.14.4 (core v2.9.1) (v5.0)

See merge request espressif/esp-idf!30359
2024-07-01 10:12:02 +08:00
Rahul Tank dc13544d53 Merge branch 'bugfix/set_correct_cb_arg_v5.0' into 'release/v5.0'
fix(nimble): Pass the correct cb arg during reconnection attempt (v5.0)

See merge request espressif/esp-idf!31720
2024-06-28 20:58:41 +08:00
Jiang Jiang Jian 55ca8a8b4a Merge branch 'bugfix/fix_esp32_cant_tx_after_tx_timeout_v5.0' into 'release/v5.0'
fix(wifi): fix esp32 unrecoverable m f issue

See merge request espressif/esp-idf!31790
2024-06-28 19:14:38 +08:00
liuning dd4b56defc fix(wifi): fix esp32 unrecoverable m f issue 2024-06-28 15:24:24 +08:00
zhanghaipeng eec3f541f0 fix(ble/bluedroid): Fixed BLE report event when connection fails 2024-06-28 12:00:51 +08:00
Jiang Jiang Jian 7c91b6e254 Merge branch 'bugfix/ft_scanning_failure_v50' into 'release/v5.0'
Fix scanning and connecting to FT APs(v5.0)

See merge request espressif/esp-idf!31194
2024-06-28 10:54:46 +08:00
jgujarathi 5b74fd5c43 fix(esp_wifi): Fix scanning and connecting to FT APs
- Ensure that scanning and connecting to FT capable APs in FT mode works
  as expected.
2024-06-27 16:06:54 +05:30
Island ef922dd380 Merge branch 'bugfix/fix_some_ble_bugs_cjh_v5.0' into 'release/v5.0'
Fixed some BLE bugs 240620 (backport v5.0)

See merge request espressif/esp-idf!31648
2024-06-26 20:33:09 +08:00
Jiang Jiang Jian f864a09ca6 Merge branch 'bugfix/l2cap_use_wrong_handle_v5.0' into 'release/v5.0'
fix(bt/bluedroid):  Fixed the issue of using the wrong handle to handle the BTA_JV_L2CAP_READ_EVT event(v5.0)

See merge request espressif/esp-idf!31281
2024-06-26 10:36:50 +08:00
Jiang Jiang Jian b2fb9e3f5d Merge branch 'bugfix/station_ic_pmf_state_v5.0' into 'release/v5.0'
fix(wifi): Disable IC_PMF variable properly when station disconnects and always clear keys in tx_cb (Backport v5.0)

See merge request espressif/esp-idf!31637
2024-06-26 10:33:30 +08:00
Sarvesh Bodakhe 3e70b760d2 fix(wifi): Fix station PMF issue
Fix issue of station PMF not getting reset when disconnecing from PMF connection
2024-06-25 14:24:19 +05:30
zhangshuxian 42fe805d63 docs: Delete user guide esp32-s2-devkitm-1 2024-06-25 16:07:11 +08:00
Aditya Patwardhan bf87512dea Merge branch 'fix/incorrect_console_input_decoding_wifi_prov_mgr_v5.0' into 'release/v5.0'
fix(tools/esp_prov): Fix incorrect input decoding when using console transport (v5.0)

See merge request espressif/esp-idf!31692
2024-06-25 14:50:04 +08:00
Island 04c4ec4ac3 Merge branch 'feat/optimize_bt_porting_layer_0619_v5.0' into 'release/v5.0'
Feat/optimize bt porting layer 0619 (v5.0)

See merge request espressif/esp-idf!31675
2024-06-25 14:18:53 +08:00
morris 7a81ba24e1 Merge branch 'fix/lcd_build_error_in_cpp_v5.0' into 'release/v5.0'
fix(lcd): build errors with deprecated lcd types in cpp (v5.0)

See merge request espressif/esp-idf!31680
2024-06-25 11:45:35 +08:00
Jiang Jiang Jian 22b0169be8 Merge branch 'fix/trigger_system_reset_in_brownout_isr_v5.0' into 'release/v5.0'
change(esp_system): trigger digital system reset in brownout isr (v5.0)

See merge request espressif/esp-idf!31687
2024-06-25 11:24:41 +08:00
Jiang Jiang Jian fdc230e18c Merge branch 'fix/add_integrity_check_when_select_temporary_key_v5.0' into 'release/v5.0'
fix(bt): add integrity check when temporary link key selected(backport v5.0)

See merge request espressif/esp-idf!31701
2024-06-25 11:24:17 +08:00
Rahul Tank 4f0a43e039 fix(nimble): Pass the correct cb arg during reconnection attempt 2024-06-25 08:35:34 +05:30
Michael (XIAO Xufeng) fbc4dfb392 Merge branch 'doc/auto_suspend_disabled_by_default_v5.0' into 'release/v5.0'
doc(flash): fix auto suspend enabled by default issue (v5.0)

See merge request espressif/esp-idf!30255
2024-06-24 23:59:37 +08:00
chenjianhua ef3c6da507 feat(bt/bluedroid): Add definition for the reason of BLE authentication failure 2024-06-24 19:48:36 +08:00
chenjianhua b9fb0b8907 fix(bt/bluedroid): Fixed BLE security vulnerability when using fixed IRK 2024-06-24 19:48:36 +08:00
linruihao e575fa7b3e fix(bt): Overwrite a function in esp32c3 eco7 rom 2024-06-24 19:48:36 +08:00
chenjianhua 1b65330ac5 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(0738a61)
- Fixed BT BB interrupt allocation
- Refactor the prefix of assert print
- Fixed HCI LE set privacy mode command handle
2024-06-24 19:48:36 +08:00
chenjianhua 35e79a6437 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(eca46a0)
- Fixed adv data buffer free after restart adv
- Fixed BLE interrupt allocation using esp API
2024-06-24 19:48:36 +08:00
wuzhenghui 39e7503f8e change(esp_system): trigger digital system reset in brownout isr 2024-06-24 19:12:49 +08:00
gongyantao 0745e7d884 fix(bt): add integrity check when temporary link key selected 2024-06-24 17:51:43 +08:00
Xiao Xufeng 01560b9ca5 doc(flash): fix auto suspend enabled by default issue 2024-06-24 17:35:30 +08:00
zwl a76076fe14 feat(bluetooth/controller): adjust bt/porting code structure and delete redundant code 2024-06-24 16:03:18 +08:00
harshal.patil bcad36eb5a fix(tools/esp_prov): Fix incorrect input decoding when using console transport
- Closes https://github.com/espressif/esp-idf/issues/14013
2024-06-24 12:29:14 +05:30
Jiang Jiang Jian 509015cfab Merge branch 'bugfix/wpa3_sta_mem_leak_v5.0' into 'release/v5.0'
Fix a memory leak that occurs when SAE connection is interrupted (Backport v5.0)

See merge request espressif/esp-idf!31664
2024-06-24 14:09:51 +08:00
morris 38ebd9c079 fix(lcd): build errors with deprecated lcd types in cpp
Closes https://github.com/espressif/esp-idf/issues/14029
2024-06-24 14:07:00 +08:00
Marius Vikhammer 52fa8406f8 Merge branch 'contrib/github_pr_14010_v5.0' into 'release/v5.0'
fix(ulp): Write pin's output mode to the correct register (GitHub PR) (v5.0)

See merge request espressif/esp-idf!31598
2024-06-24 12:16:45 +08:00
Rahul Tank 0877ec2a48 Merge branch 'bugfix/free_memory_before_reattempt_v5.0' into 'release/v5.0'
fix(nimble): Clear resource before re-starting advertising (v5.0)

See merge request espressif/esp-idf!31628
2024-06-24 10:44:39 +08:00
Shyamal Khachane ff6db87429 fix(esp_wifi): Fix a memory leak that occurs when SAE connection is interrupted
1. Free temporary data used by SAE before memsetting the same
2. Drop any received auth response that uses a different algorithm than the one currently in use
2024-06-21 16:38:27 +05:30
Rahul Tank a0824ba73c fix(nimble): Clear resource before re-starting advertising 2024-06-20 11:04:42 +05:30
Island b7382c60f9 Merge branch 'feat/put_bt_interface_code_to_rom_v5.0' into 'release/v5.0'
Feat/put bt interface code to rom (v5.0)

See merge request espressif/esp-idf!31552
2024-06-20 10:38:08 +08:00
LonerDan 1d0442bf99 fix(ulp-risc-v): Set RTC GPIO output mode in the correct register for ULP RISC-V
According to the ESP32-S2/S3 TRM, the output pin's mode is set in the RTC_GPIO_PINn_REG
by programming the RTC_GPIO_PINn_PAD_DRIVER bit. The current ULP RISC-V RTCIO driver
however, incorrectly programs the RTC_IO_TOUCH_PADn_REG register field RTC_IO_TOUCH_PADn_DRV.
This commit fixes the bug.
2024-06-19 09:02:37 +02:00
xiongweichao 6ff142be7e fix(bt/bluedroid): Fixed deadlock caused by not unlocking 2024-06-17 19:02:51 +08:00
xiongweichao 4633d09ff1 fix(bt/bluedroid): Fixed L2CAP using wrong handle
- Fixed the issue of using the wrong handle to handle the BTA_JV_L2CAP_READ_EVT event.
- Closes https://github.com/espressif/esp-idf/issues/13847
2024-06-17 19:02:51 +08:00
zwl 1c2d0d20c0 feat(bluetooth/controller): update controller api name on ESP32-C2 2024-06-17 16:44:32 +08:00
Rahul Tank f262a271ed Merge branch 'bugfix/fix_no_mem_coex_issue_v5.0' into 'release/v5.0'
fix(nimble): Added change to handle extra memory for ext adv reattempt (v5.0)

See merge request espressif/esp-idf!31470
2024-06-14 19:06:34 +08:00
Rahul Tank 1ab61d2d33 fix(nimble): Added change to handle extra memory for ext adv reattempt 2024-06-14 12:08:02 +05:30
Abhik Roy ed9f17e2bc fix(lwip): Fixed compilation error referencing undefined POSIX interface API
Closes https://github.com/espressif/esp-idf/issues/13577
2024-06-14 13:03:16 +10:00
Island d156502b21 Merge branch 'bugfix/fix_ble_evt_time_v5.0' into 'release/v5.0'
fix(ble/controller): Update esp32 bt-lib (1e63e23) (v5.0)

See merge request espressif/esp-idf!31484
2024-06-14 10:43:20 +08:00
zwx 5db6aed3f4 fix(uart): remove unnecessary wait when sending message to ring buffer 2024-06-13 20:05:22 +08:00
linruihao 67eb7a79bf fix(bt/controller): Fixed assert issue caused by DPORT access 2024-06-13 17:35:22 +08:00
zhanghaipeng 3883a4e250 fix(ble/controller): Update esp32 bt-lib (1e63e23)
- Optimized GATT write and notify throughput on ESP32
- Fixed BLE connect timeout after using DTM on ESP32
- Added ke memory debug tools on ESP32
- Fixed memory leak issue when BLE SCAN and other event coexist on ESP32
2024-06-13 16:39:57 +08:00
Jiang Jiang Jian 9cceca593a Merge branch 'bugfix/fix_null_data_issue_in_mesh_v5.0' into 'release/v5.0'
fix(wifi): do not send null data when scan start/done for mesh (v5.0)

See merge request espressif/esp-idf!31376
2024-06-13 11:25:54 +08:00
Island 9e49bf80b3 Merge branch 'bugfix/fix_ble_pktlen_change_v5.0' into 'release/v5.0'
Bugfix/fix ble pktlen change (v5.0)

See merge request espressif/esp-idf!31252
2024-06-13 11:03:31 +08:00
Roland Dobai cbb90deefe Merge branch 'refactor/avoid_using_git_v5.0' into 'release/v5.0'
fix(tools): Avoiding crashing when Git is not present in system when acquiring IDF version (v5.0)

See merge request espressif/esp-idf!31435
2024-06-12 20:04:24 +08:00
Jakub Kocka 23c9181071 fix(tools): Avoid crashing when Git is used to acquire IDF version
Closes https://github.com/espressif/esp-idf/issues/13345
2024-06-12 13:33:33 +02:00
zhangyanjiao 2f53cfd166 fix(wifi): do not send null data when scan start/done for mesh
Closes https://github.com/espressif/esp-idf/issues/13786
2024-06-12 10:06:18 +08:00
Jiang Jiang Jian 2381f35409 Merge branch 'bugfix/directed_bssid_probe_req_v50' into 'release/v5.0'
Send unicast probe requests if bssid is known during scan(v5.0)

See merge request espressif/esp-idf!30299
2024-06-07 20:28:20 +08:00
Roland Dobai 5bdcac048e Merge branch 'ci/fix_macos_runner_v5.0' into 'release/v5.0'
ci: select correct python version for mac runners (v5.0)

See merge request espressif/esp-idf!31355
2024-06-06 21:10:24 +08:00
Rahul Tank dfe5f62c1b Merge branch 'bugfix/ble_gap_unpair_error_code_v5.0' into 'release/v5.0'
fix(nimble): Added return code in ble_gap_unpair error logs (v5.0)

See merge request espressif/esp-idf!31310
2024-06-06 14:57:47 +08:00
Abhinav Kudnar b9205a00af fix(nimble): Added return code in ble_gap_unpair error logs 2024-06-06 10:15:38 +05:30
Jiang Jiang Jian bc93b77f84 Merge branch 'fix/assert_in_bt_controller_v5.0' into 'release/v5.0'
fix(bt): fix some issues in bluetooth controller(backport v5.0)

See merge request espressif/esp-idf!31324
2024-06-06 11:22:45 +08:00
Fu Hanxi 135b75dd53 ci: ensure macos selected the correct python installed by pyenv 2024-06-05 16:01:58 +02:00
gongyantao 5c6c256630 fix(bt): fix some issues in bluetooth controller
1: fix return incorrect link key with hci command rd_stored_link_key
2: fix the assert triggered during APB TX
3: fix role switch LMP collision bug
2024-06-05 09:13:18 +08:00
jgujarathi 0db25e4f99 fix(esp_wifi): Send unicast probe requests if bssid is known during scan 2024-06-04 17:08:47 +05:30
Rahul Tank c46dc8c6da Merge branch 'bugfix/explict_free_adv_data_v5.0' into 'release/v5.0'
fix(nimble): Explicitly NULL assign adv data (v5.0)

See merge request espressif/esp-idf!31291
2024-06-04 18:47:26 +08:00
Rahul Tank 73fb760c8a fix(nimble): Explicitly NULL assign adv data 2024-06-04 12:17:42 +05:30
Island add3c94c02 Merge branch 'feat/add_hci_log_record_for_nimble_v5.0' into 'release/v5.0'
feat(bt/nimble): support hci log for nimble (backport v5.0)

See merge request espressif/esp-idf!31216
2024-06-04 14:18:56 +08:00
Jiang Jiang Jian 76d2ac0330 Merge branch 'bugfix/fix_dhcp_pool_issue_on_dhcp_server_v5.0' into 'release/v5.0'
fix(lwip): fixed the dhcp pool error on dhcp server (v5.0)

See merge request espressif/esp-idf!31265
2024-06-04 11:46:17 +08:00
Island b6f8340101 Merge branch 'bugfix/esp32c2_fixed_some_ble_issues_master_v5.0' into 'release/v5.0'
Bugfix/esp32c2 fixed some ble issues master (v5.0)

See merge request espressif/esp-idf!31235
2024-06-04 10:22:00 +08:00
zhangyanjiao c9e081ce00 fix(lwip): fixed the dhcp pool error on dhcp server 2024-06-03 11:34:55 +08:00
Jiang Jiang Jian 85fdb69ee7 Merge branch 'bugfix/fix_some_wifi_bugs_v5.0' into 'release/v5.0'
fix(wifi): fixed sniffer and espnow issue (v5.0)

See merge request espressif/esp-idf!31221
2024-06-03 11:03:59 +08:00
Island 432f1ff7eb Merge branch 'fix/ble_mesh_gatts_bugfix_v5.0' into 'release/v5.0'
BLE Mesh Gatts bugfix (v5.0)

See merge request espressif/esp-idf!30875
2024-06-03 10:27:10 +08:00
zhiweijian 1c834a6e6e feat(bt/nimble): support hci log for nimble 2024-06-03 09:53:15 +08:00
zhanghaipeng 846273356a fix(ble/bluedroid): Optimize BLE stack connect callback name 2024-06-02 19:26:38 +08:00
zhanghaipeng 1d8f0aec81 fix(ble/bluedroid): Fixed BLE no data length change event 2024-06-02 19:26:27 +08:00
Rahul Tank 9b7a80a5c4 Merge branch 'bugfix/copy_ext_adv_data_reattempt_v5.0' into 'release/v5.0'
fix(nimble): Use appendfrom to duplicate adv data (v5.0)

See merge request espressif/esp-idf!31227
2024-06-02 11:54:32 +08:00
Rahul Tank f6c564115b fix(nimble): Use appendfrom to duplicate adv data 2024-06-01 20:32:18 +05:30
zwl 1f97c76d0c ble: fixed ble some issues on esp32c2 2024-05-31 17:14:43 +08:00
Island 1505232737 Merge branch 'bugfix/bleqabr24-549_v5.0' into 'release/v5.0'
fix(ble_mesh): fix issues in mesh deinit_v5.0

See merge request espressif/esp-idf!30543
2024-05-31 15:18:28 +08:00
zhangyanjiao 4b19d69596 docs(wifi): update the docmentation for mesh API 2024-05-31 14:17:14 +08:00
zhangyanjiao 2e216f6e2e fix(wifi): fixed sniffer and espnow issue
1. fix(wifi): fixed sniffer dump fcs error packets fail

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

2. fix(wifi): fixed the espnow priv parameter get error

Closes https://github.com/espressif/esp-idf/issues/13693
2024-05-31 14:13:50 +08:00
luoxu cafc47cf07 fix(ble_mesh): Create service after service register success 2024-05-31 12:11:26 +08:00
luoxu 1121ffa55d fix(ble_mesh): fix issues in mesh deinit 2024-05-30 20:42:06 +08:00
Jiang Jiang Jian 289e886da0 Merge branch 'bugfix/ftm_fix_wrong_compensation_v5.0' into 'release/v5.0'
Fix issues in calibration and selecting FTM compensation with external AP (Backport v5.0)

See merge request espressif/esp-idf!30885
2024-05-30 20:02:35 +08:00
Jiang Jiang Jian 50ce5e9405 Merge branch 'bugfix/stop_tg_wdt_in_xpd_xtal_lightsleep_v5.0' into 'release/v5.0'
fix(esp_hw_support): stop tg wdt in xpd xtal lightsleep (v5.0)

See merge request espressif/esp-idf!31138
2024-05-30 20:01:13 +08:00
Rahul Tank 7a4adba797 Merge branch 'bugfix/restart_advertising_if_slave_23e_v5.0' into 'release/v5.0'
fix(nimble): start advertising if disconnect due to 0x3E in slave (v5.0)

See merge request espressif/esp-idf!31035
2024-05-29 21:56:19 +08:00
David Cermak 5f0a92e2e6 fix(docs): tcpip_adapter: Document replacement of tcpip_adapter_get_sta_list 2024-05-29 13:46:08 +02:00
Nachiket Kukade 2208e0dfc2 fix(esp_wifi): Fix issue in selecting FTM compensation with external AP
Additionally update FTM Compensation values with calibration
2024-05-29 16:09:45 +05:30
Rahul Tank e049357001 fix(nimble): start advertising if disconnect due to 0x3E in slave 2024-05-29 15:40:52 +05:30
Kapil Gupta 06021b83e9 Merge branch 'bugfix/wps_scan_log_flood_v5.0' into 'release/v5.0'
fix(wpa_supplicant): Suppress RSN IE print to Verbose level (Backport v5.0)

See merge request espressif/esp-idf!31154
2024-05-29 15:43:29 +08:00
Rahul Tank c5515d72d0 Merge branch 'feature/ble_resolve_adv_data_v5.0' into 'release/v5.0'
feat(nimble): Added API to get resolve ADV data (v5.0)

See merge request espressif/esp-idf!30953
2024-05-29 14:00:16 +08:00
Nachiket Kukade c2123313b4 fix(wpa_supplicant): Suppress RSN IE print to Verbose level 2024-05-29 11:06:57 +05:30
Jiang Jiang Jian 5f71b65fa8 Merge branch 'bugfix/libphy_esp32s2_ant_cfg_20240523_v5.0' into 'release/v5.0'
fix(phy): update esp32s2 libphy support ant api(Backport v5.0)

See merge request espressif/esp-idf!31042
2024-05-29 10:25:31 +08:00
wuzhenghui 69bbaec19d fix(esp_hw_support/sleep): stop TG0/TG1 watchdog if XTAL not power down in lightsleep 2024-05-28 18:09:21 +08:00
wuzhenghui 941193fc03 change(esp_hw_support/sleep): improve esp32c3 systimer stall bug workaround 2024-05-28 18:08:27 +08:00
Abhinav Kudnar b819382db2 feat(nimble): Added API to get resolve ADV data 2024-05-28 18:04:07 +08:00
muhaidong 9b7711e3fb fix(phy): update esp32s2 libphy support ant api 2024-05-28 17:37:01 +08:00
Jiang Jiang Jian cb4d647d0c Merge branch 'bugfix/add_authmode_wpa_wpa2_wpa3_psk_v5.0' into 'release/v5.0'
esp_wifi: Handle case when AP advertises WPA, WPA2 and WPA3 securities simultaneously and other bugfixes (Backport v5.0)

See merge request espressif/esp-idf!29678
2024-05-28 17:34:18 +08:00
Alexey Lapshin ef4a5fda2d fix(bt): fix gcc 13.1.0 warnings 2024-05-28 15:57:46 +08:00
Li Shuai 57be8d2457 fix(example): fixed app partition is too small for binary size 2024-05-28 15:57:46 +08:00
Sarvesh Bodakhe 184555d70b fix(esp_wifi): Improvements in scan and connect path
* Improvements in scan and connect path as per specifications along with
  minor bugfixes
* When AP advertises all PSK modes (WPA, WPA2 and WPA3), make sure that
  station treats it as WPA2_WPA3_PSK mixed mode.
2024-05-28 15:57:46 +08:00
Jiang Jiang Jian 2c4f0cd4f2 Merge branch 'bugfix/mldv6_report_memory_leak_v5.0' into 'release/v5.0'
fix(esp_netif): Fix mldv6 report memory leak in esp_netif(v5.0)

See merge request espressif/esp-idf!31061
2024-05-28 15:56:15 +08:00
WanqQixiang e3a2ba8b07 fix(esp_netif): Fix mldv6 report memory leak in esp_netif 2024-05-27 17:31:33 +08:00
Island 6d288efe7c Merge branch 'feat/add_api_to_set_privacy_mode_v5.0' into 'release/v5.0'
feat(bt/bluedroid): support BLE set privacy mode (v5.0)

See merge request espressif/esp-idf!30907
2024-05-27 14:56:10 +08:00
Mahavir Jain d962b76743 Merge branch 'feature/update_cjson_version_to_1.7.18_v5.0' into 'release/v5.0'
feat(cjson): update submodule to v1.7.18 (v5.0)

See merge request espressif/esp-idf!31017
2024-05-23 15:09:52 +08:00
Jiang Jiang Jian bb71e79288 Merge branch 'bugfix/loadprohibited_after_bt_deinit_v5.0' into 'release/v5.0'
Fixed some coexist issues

See merge request espressif/esp-idf!31006
2024-05-23 11:02:55 +08:00
nilesh.kale d28e807e2d feat(cjson): update submodule to v1.7.18
Changelog: https://github.com/DaveGamble/cJSON/releases/tag/v1.7.18
2024-05-22 13:35:09 +05:30
Jiang Jiang Jian 1f8b9b0433 Merge branch 'bugfix/libphy_chips_20240430_v5.0' into 'release/v5.0'
update c3 s3 libphy, fix coex bug

See merge request espressif/esp-idf!30971
2024-05-22 14:01:53 +08:00
baohongde 1d9f0a6259 fix(coex): Fixed some coexist issues
- Fixed crash issue in coexist callback
- Fixed coexist scheme status update issue
2024-05-22 11:49:59 +08:00
chenjianhua f205edb6e9 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(a771b7c)
- Fixed assert when starting advertising due to preemption
- Fixed RPA generation after each reboot
- Fixed RPA renew timer start and stop
2024-05-22 11:49:59 +08:00
Jiang Jiang Jian 394a3f590f Merge branch 'bugfix/sae_memleak_v5.0' into 'release/v5.0'
fix(wpa_supplicant):Fix memory leak in wpa3-sae

See merge request espressif/esp-idf!30988
2024-05-22 11:46:21 +08:00
chenjianhua 8991f6912a feat(bt/bluedroid): support BLE set privacy mode 2024-05-22 10:46:33 +08:00
aditi_lonkar 6c4c3d6ef8 fix(wpa_supplicant):Fix memory leak in wpa3-sae
Closes https://github.com/espressif/esp-idf/issues/11381
2024-05-21 19:06:26 +05:30
Sergei Silnov 92af1f22c5 Merge branch 'ci/use_github_on_macos_runners_v5.0' into 'release/v5.0'
ci: use github repo for mac runners (v5.0)

See merge request espressif/esp-idf!30974
2024-05-21 18:49:13 +08:00
Aditya Patwardhan 3043a8368f Merge branch 'bugfix/fix_resetting_redirect_counter_v5.0' into 'release/v5.0'
fix: reset redirect counter for using same handler (v5.0)

See merge request espressif/esp-idf!30938
2024-05-21 17:23:01 +08:00
Fu Hanxi 048042df08 ci: make fast_template_app optional 2024-05-21 05:55:36 +02:00
Fu Hanxi 7bbe28ccc5 ci: use github repo for mac runners 2024-05-21 05:48:55 +02:00
Jiang Jiang Jian eaef5261bf Merge branch 'bugfix/supplicant_disconnect_process_v5.0' into 'release/v5.0'
esp_wifi: Fix bug in esp_wifi_deauthenticate_internal() & wpa_supplicant: Add parameter to configure reason code of deauth frame (Backport v5.0)

See merge request espressif/esp-idf!29624
2024-05-21 11:37:51 +08:00
liuning 4ae201d0a8 update c3 s3 libphy, fix coex bug 2024-05-21 11:28:50 +08:00
Sarvesh Bodakhe 9efdcd52cc fix(wifi): fix bug in 'esp_wifi_deauthenticate_internal' and other improvements 2024-05-20 14:44:36 +05:30
Sarvesh Bodakhe 61a91afa3a fix(wpa_supplicant): Add some bugfixes in wpa_supplicant
1) Add parameter to configure reason code of deauth frame
2) Add logs to indicate MIC failure 4-Way-Handshake
3) Process RSNXE capabilities only if AP advertises them
2024-05-20 14:44:16 +05:30
Jiang Jiang Jian b0173a1018 Merge branch 'bugfix/fix_some_wifi_bugs_240517_v5.0' into 'release/v5.0'
fix(wifi): fix some wifi issues(Backport v5.0)

See merge request espressif/esp-idf!30917
2024-05-20 13:31:03 +08:00
Harshit Malpani 52ca696335 fix: Add warning to enable LWIP_NETIF_LOOPBACK to use control socket API
Closes https://github.com/espressif/esp-idf/issues/13659
2024-05-20 10:48:41 +05:30
Harshit Malpani 54ee9bf5d6 fix: reset redirect counter for using same handler
Closes https://github.com/espressif/esp-idf/issues/13633
2024-05-20 10:47:07 +05:30
muhaidong 4ae21b7f82 fix(wifi): fixed some wifi bugs 240517
1. fix esp_wifi_set_mode() return error issue
2. fix qos encapsulated eapol issue
3. eapol arp and dhcp add flag PP_F_PER_PKT_RATE
4. fix lmac_stop_hw_txq issue
5. fix typo
6. limite number of amsdu  block in eb
7. fix recycle cache sub amsdu eb issue
8. update ba session store and restore rx ba num
9. fix multicast address qos frame by reset rx ba
10. fix lmacStopTransmit issue
11. sync multi antenna gpio register from IDF
12. clear eb to fix tx single AMPDU to some AP not reply BA when ampdu_entry single bit was set
13. fix internal set log level check fail issue
14. update esp_wifi_connect doc
15. update api esp_wifi_sta_get_rssi docs
16. add interupt lock during hardware reload of Rx link
2024-05-20 10:26:25 +08:00
muhaidong bc6d79c84a fix(doc): update api esp_wifi_sta_get_rssic docs
Closes https://github.com/espressif/esp-idf/issues/12685
2024-05-20 10:11:48 +08:00
muhaidong 33c5194008 fix(wifi): fixed scan get ap number issue 2024-05-20 10:11:48 +08:00
muhaidong 705afe5162 fix(wifi): fixed task watchdog got triggered by esp_wifi_stop issue 2024-05-20 10:11:48 +08:00
muhaidong a91a74d12a fix(wifi): fix multicast address qos frames issue 2024-05-20 10:11:48 +08:00
muhaidong cd242a6684 fix(wifi): fix lmac_stop_hw_txq issue 2024-05-20 10:11:48 +08:00
muhaidong 155fe73757 fix(wifi): fix some wifi issues
1. fix qos encapsulated eapol issue
2. fixed dhcp offer and dhcp ack data rates
2024-05-20 10:11:24 +08:00
Rahul Tank e746d29f39 Merge branch 'feature/get_local_used_addr_v5.0' into 'release/v5.0'
feat(nimble): Added API to get local used address (v5.0)

See merge request espressif/esp-idf!30759
2024-05-16 17:43:25 +08:00
Jiang Jiang Jian d4f35fcb98 Merge branch 'fix/assert_1024_in_rwbt_isr_v5.0' into 'release/v5.0'
fix(bt/ble): fix some issues in bluetooth controller(backport v5.0)

See merge request espressif/esp-idf!30816
2024-05-16 16:44:56 +08:00
Abhinav Kudnar 63b02c9273 feat(nimble): Added API to get local used address 2024-05-16 09:47:48 +05:30
Rahul Tank 4e5e8aa10f Merge branch 'bugix/avoid_reset_extract_cb_v5.0' into 'release/v5.0'
fix(nimble): Avoid slave instance reset inside extract_cb (v5.0)

See merge request espressif/esp-idf!30490
2024-05-16 12:02:32 +08:00
wangning d3e239e1fe docs(esp32c3): Added missing USB functions to esp32-c3 devkit user guides 2024-05-16 11:32:54 +08:00
Aditya Patwardhan 8a25d14e84 Merge branch 'feature/update_mbedtls_to_3.6.0_v5.0' into 'release/v5.0'
feat(mbedtls): updated mbedtls version from 3.5.2 to 3.6.0 (v5.0)

See merge request espressif/esp-idf!30671
2024-05-15 20:18:11 +08:00
nilesh.kale ef7a749367 feat(mbedtls): updated mbedtls version from 3.5.2 to 3.6.0
This MR updated MbedTLS version to latest version 3.6.0.
2024-05-15 11:43:54 +05:30
Rahul Tank 377a24d319 fix(nimble): Create separate API to only extract cb info 2024-05-15 11:03:31 +05:30
Jin Cheng 2c45c9dcd2 fix(bt/controller): Parse out the correct packet types from Host parameters
- For HCI command HCI_Enhanced_Setup_Synchronous_Connection
2024-05-14 11:55:04 +08:00
gongyantao fc17843294 fix(bt/ble): fix some issues in bluetooth controller
1: fix assert 1024 issue when bt tx and wifi coexist on esp32
2: fix ble scan backoff
3: parse out the correct packet types from host parameters for
   hci command hci_enhanced_setup_synchronous_connection
2024-05-14 10:06:57 +08:00
Roland Dobai ae1195f04e Merge branch 'set_gdb_remotetimeout_v5.0' into 'release/v5.0'
tools(gdbinit): set remote timeout for the gdb connection (v5.0)

See merge request espressif/esp-idf!30807
2024-05-13 23:07:41 +08:00
Jiang Jiang Jian 8b6811ef45 Merge branch 'bugfix/fix_mesh_packet_tx_issue_v5.0' into 'release/v5.0'
fix(wifi): fix the tx issue when mesh packet lifetime remain equal to zero (v5.0)

See merge request espressif/esp-idf!30802
2024-05-13 22:30:52 +08:00
David Čermák 9751ab5122 Merge branch 'contrib/github_pr_13560_v5.0' into 'release/v5.0'
esp_eth: DP83848: correct link detection to use BMSR (GitHub PR) (v5.0)

See merge request espressif/esp-idf!30453
2024-05-13 21:55:13 +08:00
Erhan Kurubas 1ce2c81ea9 change(gdbinit): set remote timeout for the gdb connection 2024-05-13 13:54:53 +02:00
zhangyanjiao 43dce54bb4 fix(wifi): fix the tx issue when mesh packet lifetime remain equal to zero 2024-05-13 17:16:50 +08:00
Jiang Jiang Jian c893fb1b2c Merge branch 'doc/update_bt_sleep_process_v5.0' into 'release/v5.0'
docs: Update the process of Bluetooth entering sleep in the sleep_modes.rst(v5.0)

See merge request espressif/esp-idf!30763
2024-05-13 11:03:46 +08:00
Jiang Jiang Jian 6a17b9c1c7 Merge branch 'bugfix/bt_bss_in_extram_v5.0' into 'release/v5.0'
fix(bt): Fix missing linker symbol when ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY enabled(backport v5.0)

See merge request espressif/esp-idf!30377
2024-05-13 11:03:07 +08:00
Island 8e81b118e2 Merge branch 'fix/idfgh-12762_v5.0' into 'release/v5.0'
fix(ble_mesh):Fixed a compatibility issue with the provisioner (v5.0)

See merge request espressif/esp-idf!30732
2024-05-10 17:14:20 +08:00
Island ed6f245a5b Merge branch 'bugfix/BLEQABR23-798_v5.0' into 'release/v5.0'
bugfix(ble_mesh): Close BLEQABR23-798 (v5.0)

See merge request espressif/esp-idf!30647
2024-05-10 17:14:02 +08:00
Wang Meng Yang 7649270896 Merge branch 'optimize/bt_make_alarm_num_configurable_v5.0' into 'release/v5.0'
optimize(ble_mesh): Make alarm number configurable (v5.0)

See merge request espressif/esp-idf!30508
2024-05-10 15:05:48 +08:00
Wang Meng Yang e8641f62e4 Merge branch 'bugfix/fix_hid_connection_failed_bug_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fix HID connection bugs[backport 5.0]

See merge request espressif/esp-idf!30591
2024-05-10 12:18:50 +08:00
xiongweichao 1f4a2c9222 docs: Update the process of Bluetooth entering sleep in the sleep_modes.rst 2024-05-10 10:31:03 +08:00
Rahul Tank dca1678547 Merge branch 'bugfix/free_controlle_memory_in_init_fail_v5.0' into 'release/v5.0'
fix(nimble): Free controller memory if init fails (v5.0)

See merge request espressif/esp-idf!30752
2024-05-09 23:36:56 +08:00
Rahul Tank c211aaeeaa fix(nimble): Free controller memory if init fails 2024-05-09 12:26:04 +05:30
luoxu aa830471f4 fix(ble_mesh):Fixed a compatibility issue with the provisioner
Closes https://github.com/espressif/esp-idf/issues/13741
2024-05-09 10:57:39 +08:00
liqigan eb99868b56 fix(bt/bluedroid): Fix HID Device connection failed bug
Closes https://github.com/espressif/esp-idf/issues/13671
2024-05-09 09:24:16 +08:00
liqigan a91bee2b4c fix(bt/bluedroid): Fix HID Host connection bugs
1. Fix is_orig value inconsistency for HIDH open event
2. Fix the error state for repeat connection of the same device
2024-05-09 09:24:16 +08:00
Aditya Patwardhan 1bec4902b2 Merge branch 'backport/support_tls1_3_v5.0' into 'release/v5.0'
https_mbedtls: update example to support TLS 1.3 connection

See merge request espressif/esp-idf!30607
2024-05-07 16:38:14 +08:00
Rahul Tank c603b0126a Merge branch 'bugfix/disable_mbedtls_options_v5.0' into 'release/v5.0'
fix(nimble): Deselect MBEDTLS_ECP_RESTARTABLE when mbedTLS is used (v5.0)

See merge request espressif/esp-idf!30621
2024-05-07 12:37:53 +08:00
luoxu d9186f52c3 bugfix(ble_mesh): Close BLEQABR23-798 2024-05-07 09:49:13 +08:00
Rahul Tank 54f171ec5c fix(nimble): Deselect MBEDTLS_ECP_RESTARTABLE when mbedTLS is used 2024-05-06 15:22:39 +05:30
Wang Mengyang 76486bbfcb change(bt): Rename linker script file names and symbol names
1. rename linker files
2. support memory release in case that ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY is enabled
3. improve the implementation of memory release
2024-05-06 17:14:58 +08:00
Wang Mengyang eca6545ffe fix(bt): Fix missing linker symbol when ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY enabled
1. Closes https://github.com/espressif/esp-idf/issues/10427
2. add two linker script to unify linker script symbols for BT libraries
3. The memory release functions have also been simplified

fix(bt): remove unused file linker.lf
2024-05-06 17:14:55 +08:00
Jiang Jiang Jian 3b448491d3 Merge branch 'fix/increase_26mhz_esp32c2_slow_clock_calibration_wdt_threshold_v5.0' into 'release/v5.0'
fix(esp_system): increase 26Mhz esp32c2 slow clock calibration timeout watchdog threshold (v5.0)

See merge request espressif/esp-idf!30572
2024-05-06 14:06:39 +08:00
Mahavir Jain 089197ff8a Merge branch 'bugfix/nvs_enc_test_v5.0' into 'release/v5.0'
fix(tests): correct the flash write length for NVS encrypted test (v5.0)

See merge request espressif/esp-idf!30605
2024-05-06 13:32:28 +08:00
Harshit Malpani 5f18e58722 fix: Update https_mbedtls example to fix TLS v1.2 connection 2024-05-02 17:15:19 +05:30
Harshit Malpani 90d0689331 fix(esp-tls): Use TLS 1.2 and TLS 1.3 simultaneously
This commit fixes the issue with TLS 1.2 connection when TLS 1.3 is
enabled in config.
2024-05-02 17:15:08 +05:30
Harshit Malpani 1c3c89eb43 fix(esp-tls): Retry reads if using session tickets with TLS 1.3
Fixed the error that occurred while performing OTA upgrades over
TLS 1.3 connection. After handshake is completed, post-handshake message
is received and internal state is changed. While performing mbedtls_ssl_read(),
it checks handshake state and if it is not MBEDTLS_SSL_HANDSHAKE_OVER,
mbedtls_ssl_handshake is called again.
2024-05-02 17:11:50 +05:30
Mahavir Jain 1d530cc23c https_mbedtls: update example to support TLS 1.3 connection
- make server verification mandatory (previously it was optional)
- add PSA crypto init API and handling for session ticket event
- coding style fixes
2024-05-02 17:11:07 +05:30
Mahavir Jain 0b7bb679bb esp_tls: add initial support for TLS 1.3 connection 2024-05-02 17:11:01 +05:30
Mahavir Jain c8dbdc6aa6 fix(tests): correct the flash write length for NVS encrypted test
Write only till the embedded file size in the NVS partition. Earlier
the length was kept as the whole partition size and it could result
in accessing embedded rodata beyond the MMU mapped range.
2024-05-02 16:54:56 +05:30
Wang Meng Yang e1dfcbc567 Merge branch 'bugfix/hf_local_param_null_v5.0' into 'release/v5.0'
fix(bt/bluedroid): allocate memory for control block of HFP Audio Gateway (v5.0)

See merge request espressif/esp-idf!30442
2024-04-30 17:25:26 +08:00
wangjialiang 7d0cfb74bb feat(ble_mesh): Make alarm number configurable 2024-04-30 16:09:47 +08:00
Karl Palsson 0eef7d1934 fix(esp_eth): dp83848: correct link detection to use BMSR
Reading the link state via PHYSTS was incorrect, as it only reflects the
link state bit from BMSR.  BMSR latches link down events, and are not
cleared without being read.  (See 802.3-2008 section 2, section 22.2.4.2.13)
This leads to the original DP828xx code only supporting link up, then a
single link down event.

Switch to reading the link state via BMSR, but continuing to read the
negotiation results via PHYSTS and ANLPAR.  This is inline with
LAN8720x, RTL8201, KSZ80xx phy drivers, and other opensource drivers for
the DP838xx family of devices.

Tested on a private board with a DP83825i PHY.  No publically available
boards using the original DP83848 are known of for testing.

Signed-off-by: Karl Palsson <karl.palsson@marel.com>
2024-04-30 16:08:25 +08:00
wuzhenghui 820cc387d9 fix(esp_system): increase 26Mhz esp32c2 slow clock calibration timeout watchdog threshold 2024-04-30 11:45:20 +08:00
Island 961ca4f975 Merge branch 'bugfix/fix_ble_coex_assert_v5.0' into 'release/v5.0'
Update esp32 bt-lib (4012cfb)(backport v5.0)

See merge request espressif/esp-idf!30519
2024-04-28 10:48:07 +08:00
Island 2233d54812 Merge branch 'bugfix/fix_ble_max_attribute_value_v5.0' into 'release/v5.0'
Bugfix/fix ble max attribute value v5.0

See merge request espressif/esp-idf!30414
2024-04-28 10:37:12 +08:00
zhanghaipeng f449df139c feat(ble/bluedroid): Support BLE command status debug log 2024-04-26 17:14:44 +08:00
zhanghaipeng 2efc1c3c7c fix(ble/controller): Update esp32 bt-lib (4012cfb)
- Fixed BLE coex assert
- Fixed BLE DTM status and tx count
2024-04-26 16:51:43 +08:00
morris 3087b28012 Merge branch 'bugfix/uart_bitrate_max_value_c2_v5.0' into 'release/v5.0'
fix(uart): correct C2 UART_BITRATE_MAX value (v5.0)

See merge request espressif/esp-idf!30461
2024-04-26 10:43:49 +08:00
morris 6371dcbcb0 Merge branch 'bugfix/gpio_drive_cap_v5.0' into 'release/v5.0'
fix(gpio): add workaround to ensure correct IO drive strength for C3 and S3 (v5.0)

See merge request espressif/esp-idf!30468
2024-04-26 10:43:29 +08:00
morris cf4825be6f Merge branch 'fix/uart_wakeup_threshold_v5.0' into 'release/v5.0'
fix(uart): Fix mismatch wakeup rising edges required with the threshold configured (v5.0)

See merge request espressif/esp-idf!30465
2024-04-26 10:42:33 +08:00
zhanghaipeng 614b2bbd3f feat(ble/bluedroid): Support create BLE static random address and NRPA 2024-04-25 15:58:19 +08:00
zhanghaipeng 2ddb174b4e fix(ble/bluedroid): Optimized BLE SPP example for improved compatibility 2024-04-25 15:58:19 +08:00
zhanghaipeng f0450152f2 feat(ble/bluedroid): Support BLE add device to resolving list 2024-04-25 15:58:19 +08:00
zhanghaipeng ebf929b5f8 feat(ble/bluedroid): Support set resolvable provate address timeout by api 2024-04-25 15:58:19 +08:00
zhanghaipeng 182cbb85f8 fix(ble/bluedroid): Fixed BLE GATT max length of an attribute value 2024-04-25 15:58:19 +08:00
zhanghaipeng 1eebe9f680 fix(ble/bluedroid): Optimize BLE documentation comments to comply with Doxygen syntax 2024-04-25 15:58:19 +08:00
zhanghaipeng 327a9126c8 fix(ble/bluedroid): Optimize the BLE documentation 2024-04-25 15:58:19 +08:00
Song Ruo Jing 02d819b69b fix(uart): Fix mismatch wakeup rising edges required with the threshold configured
Closes https://github.com/espressif/esp-idf/issues/12586
2024-04-24 17:27:27 +08:00
Song Ruo Jing 94070c8651 fix(gpio): add workaround to ensure correct IO drive strength for C3 and S3 2024-04-24 17:00:06 +08:00
Song Ruo Jing 4727357067 fix(uart): correct C2 UART_BITRATE_MAX value 2024-04-24 16:20:44 +08:00
Rahul Tank 0ed5284eb9 Merge branch 'bugfix/rpa_timeout_api_v5.0' into 'release/v5.0'
fix(nimble): Expose API to set RPA Timeout (v5.0)

See merge request espressif/esp-idf!30410
2024-04-24 10:31:33 +08:00
Jin Cheng 7fa711346a fix(bt/bluedroid): allocate memory for control block of HFP Audio Gateway in its initialization when dynamic memory is wnabled 2024-04-24 08:28:45 +08:00
sonika.rathi 06ba157133 docs(vfs): update esp_vfs_register_fd api description
Closes https://github.com/espressif/esp-idf/issues/11586
2024-04-23 15:25:27 +02:00
Rahul Tank 6bdd4be339 fix(nimble): Expose API to set RPA Timeout 2024-04-23 11:58:43 +05:30
Island fb12a68017 Merge branch 'feat/optimzie_ble_ctrl_memory_v5.0' into 'release/v5.0'
ble: support only legacy adv and slave function on esp32c2 (v5.0)

See merge request espressif/esp-idf!30336
2024-04-22 22:51:02 +08:00
zwl 423b5683d4 ble: update sdkconfig.defaults.esp32c2 file for blufi example 2024-04-22 11:47:12 +08:00
Jiang Jiang Jian 7c9bacb624 Merge branch 'bugfix/crash_after_bluedroid_deinit_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed controller using null pointer after bluedroid deinit(v5.0)

See merge request espressif/esp-idf!30329
2024-04-22 11:13:42 +08:00
Jiang Jiang Jian dd61b7ed37 Merge branch 'bugfix/fix_some_ble_bugs_cjh_v5.0' into 'release/v5.0'
Fixed some BT and BLE bugs 2404 (backport v5.0)

See merge request espressif/esp-idf!30259
2024-04-22 10:48:04 +08:00
Jiang Jiang Jian 26af71d0f9 Merge branch 'doc/update_espnow_example_v5.0' into 'release/v5.0'
docs(wifi): change the magic varible from int to uint32_t on the receiving side (v5.0)

See merge request espressif/esp-idf!30309
2024-04-22 10:47:30 +08:00
Jiang Jiang Jian 3b6ee156c9 Merge branch 'feat/set_get_lpclk_src_v5.0' into 'release/v5.0'
feat(ble): Added API to get low power clock source(v5.0)

See merge request espressif/esp-idf!30109
2024-04-22 10:25:55 +08:00
Adam Múdry 09d21e3d78 fix(storage/littlefs): Bump version to v1.14.4 (core v2.9.1)
Fixes a bug which causes DivideByZero exception when the filesystem is full
2024-04-19 12:55:12 +02:00
chenjianhua c9255fc852 feat(bt): Update bt lib for ESP32-C3 and ESP32-S3(c23ab4c)
- Support QA test vendor HCI command and event
2024-04-18 14:43:13 +08:00
baohongde 043ea1cb60 fix(ble/controller): Fixed LoadProhibited after bluetooth deinit 2024-04-18 14:43:07 +08:00
chenjianhua 49f11c53bd fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(5274796)
- Fixed extended uncoded and coded scan scheduling
- Add config for channel assessment and ping procedure
- Clear random address for extended advertising
- Add periodic advertising list check
- Fixed periodic advertising data setting with zero length
2024-04-18 14:43:00 +08:00
baohongde 0a86dd2eb3 feat(ble/controller): Add coexist schm for BLE 2024-04-18 14:31:53 +08:00
chenjianhua fdd4f3d17c feat(bt): Update bt lib for ESP32(e314148)
- Support QA test vendor HCI command and event
2024-04-18 14:09:09 +08:00
zhanghaipeng c9c946811c fix(bt/controller): Update bt lib for ESP32(5838b68)
- Fixed BLE scan assert
 - Fixed assert(10,0) in lld_pdu
 - Add BLE scan backoff in menuconfig
2024-04-18 14:09:09 +08:00
Jin Cheng 51c26053a4 fix(bt/controller): Use embedded assembly to get access to DPORT registers 2024-04-18 14:09:09 +08:00
zwl 0e058edb9f ble: support only legacy adv and slave function on esp32c2 2024-04-18 12:15:56 +08:00
Mahavir Jain 78af5840a1 Merge branch 'fix/incorrect_connection_closure_parttool_test_v5.0' into 'release/v5.0'
ci(otatool): fix test failure caused due to closing connection incorrectly (v5.0)

See merge request espressif/esp-idf!30293
2024-04-18 11:55:54 +08:00
Island 38aef776b6 Merge branch 'bugfix/fixed_coex_asset_on_esp32c2_v5.0' into 'release/v5.0'
Bugfix/fixed coex asset on esp32c2 v5.0

See merge request espressif/esp-idf!30303
2024-04-18 10:54:25 +08:00
xiongweichao 631aa85bdc fix(bt/bluedroid): Fixed crash after bluedroid deinit
hci_host_env.downstream_data_ready is set to NULL during bluedroid deinit,
causing the controller to use a null pointer when calling callback.
2024-04-18 10:53:11 +08:00
Island 4ae73b7fa7 Merge branch 'bugfix/fix_ble_appearance_v5.0' into 'release/v5.0'
Fixed BLE appearance category ranges (v5.0)

See merge request espressif/esp-idf!30287
2024-04-18 10:44:08 +08:00
Jiang Jiang Jian d435059751 Merge branch 'bugfix/sdp_remove_record_no_evt_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed the crash caused by using illegal pointers during SDP deinit(v5.0)

See merge request espressif/esp-idf!29944
2024-04-18 10:24:58 +08:00
xiongweichao 3fd0dba1a3 feat(ble): Added API to get low power clock source 2024-04-18 10:07:39 +08:00
zhanghaipeng e45d91c36d fix(ble/bluedroid): Fixed set BLE appearance value 2024-04-17 20:40:09 +08:00
KonstantinKondrashov 955341db98 fix(spi_flash): Fix stuck during flash operation
When a task was not pinned to a certain CPU.
2024-04-17 12:04:05 +03:00
KonstantinKondrashov a41e037f0e feat(ipc): Adds a new no blocking IPC call 2024-04-17 12:04:05 +03:00
zhangyanjiao b1c0260dfd docs(wifi): update the docmentation for sniffer API
Closes https://github.com/espressif/esp-idf/issues/10740
2024-04-17 16:19:54 +08:00
zhangyanjiao 7cd2be2e54 docs(wifi): change the magic varible from int to uint32_t on the receiving side
Closes https://github.com/espressif/esp-idf/issues/10912
2024-04-17 16:19:49 +08:00
zwl c6d8d19b81 ble: fixed an occasional assertion issue in coexistence scenarios on ESP32C2 2024-04-17 15:04:51 +08:00
zwl d10b60aab3 ble: fixed the bt cmakelist error when use nimble host only 2024-04-17 15:04:39 +08:00
harshal.patil b62b36ffbb ci(otatool): fix test failure caused due to closing connection incorrectly 2024-04-17 10:17:07 +05:30
Jiang Jiang Jian 98d17f23ef Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20240318_v5.0' into 'release/v5.0'
feat(tools): update openocd version to v0.12.0-esp32-20240318 (v5.0)

See merge request espressif/esp-idf!30047
2024-04-17 10:44:44 +08:00
Wang Meng Yang 6d63daac84 Merge branch 'feature/add_api_to_send_vendor_hci_cmd_v5.0' into 'release/v5.0'
Feature/add api to send vendor hci cmd v5.0 (backport v5.0)

See merge request espressif/esp-idf!30227
2024-04-16 17:49:01 +08:00
Aditya Patwardhan b99e3345a8 Merge branch 'bugfix/howsmyssl_cert_update_v5.0' into 'release/v5.0'
fix(examples): update root certificate for howsmyssl endpoint (v5.0)

See merge request espressif/esp-idf!30205
2024-04-16 11:36:41 +08:00
Jiang Jiang Jian 3fdc794f5d Merge branch 'bugfix/spp_crash_after_deint_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed SPP crash due to the connection not being disconnected before esp_spp_deinit was called(v5.0)

See merge request espressif/esp-idf!30083
2024-04-15 11:55:09 +08:00
Jiang Jiang Jian 14e344463a Merge branch 'bugfix/fix_coded_phy_s8_tx_issue_v5.0' into 'release/v5.0'
fix(esp_phy): fixed BLE coded phy s8 tx issue in coexistence scenarios (backport v5.0)

See merge request espressif/esp-idf!30191
2024-04-15 10:57:35 +08:00
zhiweijian 70f84cfca9 fix(ble/bluedroid): Fixed adv not restart due to disconnection reason 0x3e 2024-04-13 15:53:20 +08:00
zhiweijian c755433922 feat(bt/common): Add bluerooth hci layer data stream record 2024-04-13 15:44:27 +08:00
zhiweijian 57665f7246 feat(bt/bluedroid): add api to setnd vendor hci command 2024-04-13 14:13:43 +08:00
zhiweijian 304be189d8 fix(ble/bluedroid): fixed bluedroid host DTM API 2024-04-13 14:13:26 +08:00
zhiweijian 1e72b8b803 feat(ble/bluedroid): Add APIs for BLE direct test mode on bluedroid host 2024-04-13 14:13:04 +08:00
Rahul Tank 94b7b50906 Merge branch 'bugfix/fix_cccd_compilation_warning_v5.0' into 'release/v5.0'
fix(nimble): Fix compilation issues when CCCD is set to 0 (v5.0)

See merge request espressif/esp-idf!30213
2024-04-12 20:15:50 +08:00
Rahul Tank debefe9c70 fix(nimble): Fix compilation issues when CCCD is set to 0 2024-04-12 12:36:14 +05:30
Rahul Tank a1097119d3 Merge branch 'bugfix/fix_cve_2024_24746_v5.0' into 'release/v5.0'
fix(nimble): Fix for Vulnerability CVE_2024_24746 (v5.0)

See merge request espressif/esp-idf!30201
2024-04-12 13:27:41 +08:00
Mahavir Jain ff3ec291bb fix(examples): update root certificate for howsmyssl endpoint
This fixes CI failure seen because of cert migration of howsmyssl
endpoint from previous "DST Root CA X3" (cross-signed) to "ISRG Root X1".
2024-04-12 11:12:27 +08:00
xiongweichao eab0acdb3c fix(bt/bluedorid): Fixed crash caused by using illegal pointer 2024-04-12 09:13:43 +08:00
xiongweichao da2a32fbad fix(bt/bluedorid): Fixed no event when removing an invalid SDP record 2024-04-12 09:13:43 +08:00
Rahul Tank 6a10821296 fix(nimble): Fix for Vulnerability CVE_2024_24746 2024-04-11 20:02:49 +05:30
Rahul Tank 79b48fe84c Merge branch 'feat/add_data_len_chg_evt_v5.0' into 'release/v5.0'
fix(nimble): Add support for data length change evt (v5.0)

See merge request espressif/esp-idf!30184
2024-04-11 21:21:25 +08:00
linruihao 96d40b1c82 fix(esp_phy): update phylib for C3, S3 and C2
- fixed BLE coded phy s8 tx issue in coexistence scenarios
- fixed ESP32-C3 and ESP32-S3 BLE RX issue
- optimized ESP32-C3 and ESP32-S3 light sleep current
2024-04-11 17:42:39 +08:00
Rahul Tank c34f7a95be fix(nimble): Add support for data length change evt 2024-04-11 12:34:05 +05:30
Rahul Tank 5b861dff3d Merge branch 'bugfix/fix_dtm_num_pkt_size_v5.0' into 'release/v5.0'
fix(nimble): Fix the size of num_packets in dtm event (v5.0)

See merge request espressif/esp-idf!30146
2024-04-11 13:38:14 +08:00
morris e03ab4e178 Merge branch 'bugfix/fix_rtc_cntl_v5.0' into 'release/v5.0'
[S3]fix(rtc_cntl_reg.h): fix RTC_CNTL_SLAVE_PD_M

See merge request espressif/esp-idf!30169
2024-04-11 11:40:02 +08:00
xiongweichao 350a248a7f fix(bt/bluedroid): Fix SPP crash after deinit
- The disconnection event comes up after spp disable is completed, so a null pointer is used.
2024-04-10 20:11:27 +08:00
zlq d9bf45a998 [S3]fix(rtc_cntl_reg.h): fix RTC_CNTL_SLAVE_PD_M 2024-04-10 19:47:29 +08:00
morris 370a2e8883 Merge branch 'bugfix/gptimer_alarm_config_in_sram_v5.0' into 'release/v5.0'
feat(gptimer): check the alarm config is not in flash (v5.0)

See merge request espressif/esp-idf!30136
2024-04-10 14:17:45 +08:00
Rahul Tank 5b5777f40c fix(nimble): Fix the size of num_packets in dtm event 2024-04-09 19:02:48 +05:30
morris 6ea1f92a20 feat(gptimer): check the alarm config is not in flash
related to https://github.com/espressif/esp-idf/issues/13543
2024-04-09 17:33:35 +08:00
Island bc4c4fe06a Merge branch 'bugfix/ble_mesh_heartbeat_filter_add_v5.0' into 'release/v5.0'
Fix(ble_mesh):fix error condition for heartbeat filter adding node address (v5.0)

See merge request espressif/esp-idf!29988
2024-04-09 16:11:50 +08:00
morris 5faf0a6c71 Merge branch 'bugfix/unsupport_partial_receive_on_esp32_v5.0' into 'release/v5.0'
fix(rmt): Fix the RMT RX filter not working correctly on esp32/s2 (v5.0)

See merge request espressif/esp-idf!30079
2024-04-09 14:29:18 +08:00
Marius Vikhammer 19304c5769 Merge branch 'fix/heap-calloc-fail-wrong-size_v5.0' into 'release/v5.0'
fix(heap): Wrong size propagated in alloc fail callback of heap_caps_calloc() (backport v5.0)

See merge request espressif/esp-idf!30092
2024-04-09 12:05:15 +08:00
Rahul Tank 0ef284ebb3 Merge branch 'bugfix/set_correct_addr_type_v5.0' into 'release/v5.0'
fix(nimble): Set correct peer_addr during reattempt connection (v5.0)

See merge request espressif/esp-idf!30057
2024-04-08 21:15:38 +08:00
Guillaume Souchere cdf5414302 fix(heap): Wrong size propagated in alloc fail callback
Propagate `n * size` as the size of the failed allocation
instead of just `size` when heap_caps_calloc() fails since
`n * size` is the actual number of bytes that the heap
component tried to allocate.
2024-04-08 08:45:18 +02:00
luoxu 7927e444b2 fix(ble_mesh): fix error condition for heartbeat filter adding node address 2024-04-08 14:28:21 +08:00
morris b27d69dcad fix(rmt): fix the counting clock used by rx filter on esp32/s2
is always APB, independent to the channel clock selection

Closes https://github.com/espressif/esp-idf/issues/13510
2024-04-08 11:51:02 +08:00
Jiang Jiang Jian ff4dba8e8c Merge branch 'feat/set_cpu_freq_after_pm_config_changed_v5.0' into 'release/v5.0'
fix(esp_pm): update CPU frequency immediately after updating pm_config (v5.0)

See merge request espressif/esp-idf!30070
2024-04-08 10:29:53 +08:00
Alexey Gerenkov 57bd998cda feat(tools): update openocd version to v0.12.0-esp32-20240318 2024-04-08 03:34:24 +08:00
Jiang Jiang Jian 9feaecf3f3 Merge branch 'bugfix/variable_length_rsnxe_v50' into 'release/v5.0'
Expands maximum size of RSNXE IE to 255(v5.0)

See merge request espressif/esp-idf!30054
2024-04-07 15:50:03 +08:00
wuzhenghui c6186be010 fix(esp_pm): update CPU frequency immediately after updating pm_config
Closes https://github.com/espressif/esp-idf/issues/13492
2024-04-07 14:50:25 +08:00
Jiang Jiang Jian 397c1d9903 Merge branch 'bugfix/wps_crash_issue_v5.0' into 'release/v5.0'
fix(wpa_supplicant): Avoid dereferencing a dangling function pointer in WPS (Backport v5.0)

See merge request espressif/esp-idf!29736
2024-04-07 10:11:34 +08:00
Rahul Tank ff8f433583 fix(nimble): Remove extra code in reattempt connection 2024-04-05 22:03:14 +05:30
jgujarathi 598e99fd4d fix(rsnxe): Expands maximum size of RSNXE IE to 255
- Allows for RSNXE IE to be processed as a variable length upto
255 bytes, changing the earlier max of 20.
2024-04-05 11:36:34 +05:30
Jiang Jiang Jian 947479155d Merge branch 'feature/refactor_ftm_code_v5.0' into 'release/v5.0'
Refactor and improve FTM code (Backport v5.0)

See merge request espressif/esp-idf!29856
2024-04-03 20:50:18 +08:00
Jiang Jiang Jian 55fc8e6ae4 Merge branch 'bugfix/aud-5252_v5.0' into 'release/v5.0'
backport v5.0: fix the issue of modem hang caused by incorrect configuration of power and isolate signals

See merge request espressif/esp-idf!30009
2024-04-03 18:56:45 +08:00
Jiang Jiang Jian 2fcd97dd25 Merge branch 'bugfix/dpp_auth_deinit_crash_v50' into 'release/v5.0'
Ensure dpp auth structure is deinited in dpp task context(v5.0)

See merge request espressif/esp-idf!29837
2024-04-03 17:29:40 +08:00
Marius Vikhammer c73e7c6c7d Merge branch 'bugfix/log_wrap_around_cache_generation_counter_v5.0' into 'release/v5.0'
fix(log): Fix wrap-around of cache generation counter (v5.0)

See merge request espressif/esp-idf!29940
2024-04-03 16:31:48 +08:00
Rahul Tank d859008ae5 Merge branch 'feat/add_vs_hci_cmd_evt_v5.0' into 'release/v5.0'
feat(nimble): Add APIs to handle vs HCI commands and events (v5.0)

See merge request espressif/esp-idf!29997
2024-04-03 14:41:32 +08:00
Nachiket Kukade 252c6d5ca7 feat(esp_wifi): Refactor and improve FTM code
Update wifi libs with below -

1. Break FTM State Machine code into separate functions
2. Use dynamic allocation for FTM session to save memory
3. Add API to get FTM report instead of event based mechanism
4. Add FTM Request retry and comeback support
2024-04-03 11:25:49 +05:30
Island 2796f0162f Merge branch 'bugfix/ble_bugfix_for_esp32c2' into 'release/v5.0'
ble: update esp32c2 lib to 7a428d35

See merge request espressif/esp-idf!29991
2024-04-03 12:39:55 +08:00
Sarvesh Bodakhe 3847822531 fix(wpa_supplicant): Improve execution flow for WPS registrar public APIs
Make sure that WPS registrar public APIs do not modify supplicant
data in application task context. Execute API functionlity in eloop
context to prevent protential race conditions.
2024-04-03 11:33:54 +08:00
Sarvesh Bodakhe c24b840ce7 fix(wifi): Avoid dereferencing a dangling function pointer in WPS supplicant
Avoid dereferencing a dangling function pointer in 'eap_server_sm_deinit()'.
This issue arises when hostap unregisteres EAP methods before it removes
the server state machine for station.
2024-04-03 11:33:54 +08:00
Li Shuai 3b4d27669d fix(esp_hw_support): fixed modem hang caused by incorrect configuration of power and isolate signals 2024-04-03 10:53:13 +08:00
Jiang Jiang Jian 3cf0a49d52 Merge branch 'fix/rd_stored_link_key_error_v5.0' into 'release/v5.0'
fix(bt): fix some issues in bt controller(backport v5.0)

See merge request espressif/esp-idf!29976
2024-04-03 10:22:57 +08:00
jgujarathi 969605c7c2 fix(wpa_supplicant): Cancel offchannel listen operations before sending dpp fail
- Ensure that offchannel listening operations are cancelled before sending dpp
  fail events
2024-04-03 10:20:54 +08:00
jgujarathi 0f1c0d27c8 fix(wpa_supplicant): Ensure dpp auth structure is deinited in dpp task context
- Ensure that the dpp auth data gets deinited only in DPP task context to ensure
  that there are no concurrency issues in usage of DPP auth data.
2024-04-03 10:20:54 +08:00
Rahul Tank 94bc0df521 feat(nimble): Add APIs to handle vs HCI commands and events 2024-04-02 15:22:57 +05:30
Rahul Tank 6da2547588 Merge branch 'bugfix/revamp_reconn_scheme_v5.0' into 'release/v5.0'
fix(nimble): Cleanup code in connection reconnection implementation (v5.0)

See merge request espressif/esp-idf!29966
2024-04-02 15:07:47 +08:00
cjin 4d648f6330 feat(ble): add cca related config in c6, h2 and c2 2024-04-02 12:12:24 +08:00
cjin 4c05613b33 change(ble): support ble light sleep using ext 32k xtal on C2 2024-04-02 12:11:16 +08:00
zwl 909393befc ble: update esp32c2 lib to 7a428d35 2024-04-02 12:04:43 +08:00
gongyantao f3133d1590 fix(bt): fix some issues in bt controller
1: fixed the incorrect timeing in reporting HCI_Link_Key_Type_Changed.
2: fixed the incorrect iv value during resuming encryption.
3: fixed the incorrect return with hci command rd_stored_link_key.
2024-04-02 09:39:32 +08:00
Rahul Tank 9ac19fbad6 fix(nimble): Change reconnection scheme 2024-04-01 17:23:29 +05:30
Jiang Jiang Jian 9d1abd72e5 Merge branch 'bugfix/fix_call_to_header_event_callback_v5.0' into 'release/v5.0'
fix: Fix call to event_handler on on_header state of HTTP Client (v5.0)

See merge request espressif/esp-idf!29956
2024-04-01 19:50:09 +08:00
Harshit Malpani 9c092a3b78 Revert "fix(esp_http_client): Call event_handler after header value is received"
This reverts commit 04ac8e43db.

Fixes https://github.com/espressif/esp-idf/issues/13497
Fixes https://github.com/espressif/esp-idf/issues/13097
2024-04-01 13:21:00 +05:30
Omar Chebib 157f7b438b change(espcoredump): save RAM space by placing constants in flash
All the log messages of espcoredump component used to be in DRAM, which would
lower the available RAM space for the user application. Since the cache is always
enabled after an exception, constants can be put in flash.
2024-04-01 15:30:45 +08:00
Jiang Jiang Jian 2486b6b39b Merge branch 'bugfix/bootloader_custom_rtc_data_crc_v5.0' into 'release/v5.0'
fix(bootloader): add legacy retained memory CRC calculation (backport v5.0)

See merge request espressif/esp-idf!28938
2024-04-01 14:59:01 +08:00
Jiang Jiang Jian 987752fcff Merge branch 'bugfix/fix_some_wifi_coexist_issue_v5.0' into 'release/v5.0'
bugfix/fix some wifi coexist issue v5.0

See merge request espressif/esp-idf!29911
2024-04-01 14:31:56 +08:00
Jiang Jiang Jian ad8111253a Merge branch 'change/add_convt_from_hci_state_to_esp_state_v5.0' into 'release/v5.0'
change(bt/bluedroid): Use BTC util to convert HCI status to ESP status (v5.0)

See merge request espressif/esp-idf!29923
2024-04-01 14:19:44 +08:00
Konstantin Kondrashov 1e7830e57b fix(log): Fix wrap-around of cache generation counter
Closes https://github.com/espressif/esp-idf/issues/6516
2024-03-29 17:32:21 +03:00
Rahul Tank 46976bdcb7 Merge branch 'bugfix/handle_missing_free_v5.0' into 'release/v5.0'
fix(nimble): Handle missing free in application (v5.0)

See merge request espressif/esp-idf!29889
2024-03-29 21:02:43 +08:00
liuning 3a0cf2c03a feat(coex): support to scan long time on channel, fix coexist sync issue 2024-03-28 21:09:28 +08:00
liuning 8be1213da6 example: add custom partition table for mesh manual networking 2024-03-28 20:43:16 +08:00
liuning e428e1a9ce feat(coex): improve Wi-Fi connecting compatibility at coexistence 2024-03-28 20:43:12 +08:00
liuning 12d2d95b94 fix(clk): clear all lpclk source at clk init 2024-03-28 20:41:58 +08:00
Rahul Tank ceac0c1487 fix(nimble): Handle missing free in application 2024-03-28 08:51:43 +05:30
Jin Cheng 54d0912307 change(bt/bluedroid): Use BTC util to convert HCI status to ESP status 2024-03-28 11:05:22 +08:00
Island a463942e14 Merge branch 'bugfix/fix_ble_power_save_ci_v5.0' into 'release/v5.0'
fix(ble): fix conn error of ble power save ci test(v5.0)

See merge request espressif/esp-idf!29824
2024-03-27 10:31:17 +08:00
Martin Vychodil 0b71bfa1c0 Merge branch 'bugfix/sdspi_acmd41_arg_v5.0' into 'release/v5.0'
fix(sdmmc): fixes for card initialization (ACMD41) (v5.0)

See merge request espressif/esp-idf!29378
2024-03-27 04:48:03 +08:00
Ivan Grokhotkov b1b1d5473a fix(sdmmc): extend the maximum number of retries of ACMD41
According to the application note in SD Card Physical Specification:

> The host shall set ACMD41 timeout more than 1 second to abort repeat
of issuing ACMD41 when the card does not indicate ready. The timeout
count starts from the first ACMD41 which is set voltage window
in the argument.

Previously, the timeout was exactly one second, and this caused
certain larger-capacity cards to "time out", because they couldn't
finish initialization process in time.
2024-03-26 11:41:34 +01:00
Ivan Grokhotkov 383048b19f fix(sdmmc): use correct argument for ACMD41 in SPI mode
ACMD41 argument is different between SD mode and SPI mode.
In SPI mode, the only non-zero bit may be the HCS bit. Unlike the SD
mode, the bits reflecting the host's OCR should be zero.
Previously, we used to set these bits the same way as for the SD mode.
This has caused certain cards to fail initializing, apparently their
controllers have checked the ACMD41 argument more strictly and refused
to finish initialization, resulting in an error such as

    sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107

(Note that this error may have other causes than the one fixed in
this commit. For example, if the card doesn't have a sufficient and
stable power supply, it may also fail to complete the internal
initialization process, and will never clear the busy flag in R1
response.)

Closes https://github.com/espressif/esp-idf/issues/6686
Closes https://github.com/espressif/esp-idf/issues/10542
2024-03-26 11:41:34 +01:00
Aditya Patwardhan 4a7eab3d13 Merge branch 'fix/support_gcm_soft_fallback_for_non_aes_ciphers_v5.0' into 'release/v5.0'
fix(mbedtls/gcm): Add support for software fallback for non-AES ciphers in a GCM operation (v5.0)

See merge request espressif/esp-idf!29257
2024-03-26 17:20:27 +08:00
Marius Vikhammer de5efa53c0 Merge branch 'fix/log_buffer_v5.0' into 'release/v5.0'
fix(log): Fixed incorrect argument type in hexdump log functions (v5.0)

See merge request espressif/esp-idf!29778
2024-03-26 12:05:10 +08:00
cjin 4ad40cc9d5 fix(ble): fix ci ble powe save test addresss error 2024-03-25 15:59:38 +08:00
Island 4171186f8e Merge branch 'bugfix/BT-3491_v5.0' into 'release/v5.0'
bugfix(ble_mesh): Avoid provisioner handling messages from nodes that have...(v5.0)

See merge request espressif/esp-idf!28051
2024-03-25 12:11:31 +08:00
Jakob Hasse 9c82da9a27 fix(log): Fixed incorrect argument type in hexdump log functions
Closes https://github.com/espressif/esp-idf/issues/13347
Thanks @matthew-8925
2024-03-21 15:11:29 +08:00
Rahul Tank 300d4bfef1 Merge branch 'bugfix/bonding_across_reboot_v5.0' into 'release/v5.0'
fix(nimble): Added support for deleting the oldest bonded device across reboot (v5.0)

See merge request espressif/esp-idf!29764
2024-03-21 13:38:18 +08:00
wangjialiang 92aebb963a update invalid links in the ble mesh example documentation 2024-03-21 11:13:14 +08:00
luoxu 2abccdb3d3 bugfix(ble_mesh): Avoid provisioner handling messages from nodes that have already left the network. 2024-03-21 11:13:14 +08:00
Roland Dobai 2c0efb84ed Merge branch 'refactor/idf_tools_version_v5.0' into 'release/v5.0'
refactor(idf_tools): IDF version is acquired only from version or header file (backport v5.0)

See merge request espressif/esp-idf!29744
2024-03-20 20:24:14 +08:00
Darshan Dobariya fd1c60b9f9 fix(nimble): Added support for deleting the oldest bonded device across reboot (v5.0) 2024-03-20 15:14:04 +05:30
Jakub Kocka c8f8185561 refactor(idf_tools): IDF version is acquired only from version or header file
Closes https://github.com/espressif/esp-idf/issues/13385
2024-03-20 07:59:58 +01:00
Martin Vychodil 9daa8eff45 Merge branch 'fix/wl_fatfsgen_safe_mode_v5.0' into 'release/v5.0'
fix(storage/fatfs): make wl_fatfsgen.py safe mode aware (v5.0)

See merge request espressif/esp-idf!29730
2024-03-20 14:37:40 +08:00
Marius Vikhammer 170cfde551 Merge branch 'bugfix/ringbuf_getsize_v5.0' into 'release/v5.0'
fix(esp_ringbuf): fix flash function prvGetFreeSize called from IRAM ISR

See merge request espressif/esp-idf!29699
2024-03-20 11:51:33 +08:00
morris 1cb07eb253 Merge branch 'bugfix/fix_adc_reset_issue_on_legacy_v5.0' into 'release/v5.0'
fix(adc): fix adc continuous get less results beacuse do not reset apb clk(legacy) (v5.0)

See merge request espressif/esp-idf!28334
2024-03-20 10:05:17 +08:00
Tomáš Rohlínek 3404830524 fix(storage/fatfs): make wl_fatfsgen.py safe mode aware 2024-03-19 13:59:33 +01:00
Jiang Jiang Jian f2d351d75b Merge branch 'fix/fatfs_sdmmc_triming_v5.0' into 'release/v5.0'
fix(storage/fatfs): check whether sdcard supports trimming (v5.0)

See merge request espressif/esp-idf!28337
2024-03-19 14:20:57 +08:00
Jiang Jiang Jian 55adcbf919 Merge branch 'bugfix/struct_init_order_blemesh_v5.0' into 'release/v5.0'
ble_mesh: example: fix the structure init order to meet C++ requirements(backport v5.0)

See merge request espressif/esp-idf!28930
2024-03-19 14:20:22 +08:00
Jiang Jiang Jian a82f02ae47 Merge branch 'feat/move_ag_cb_malloc_to_btc_v5.0' into 'release/v5.0'
feat(bt/bluedroid): Moved the memory allocation of HF AG control blocks to BTC module (v5.0)

See merge request espressif/esp-idf!29633
2024-03-19 14:19:52 +08:00
Jiang Jiang Jian 3b1ec55e7b Merge branch 'doc/update_espnow_doc_v5.0' into 'release/v5.0'
docs(wifi): Updated the LMK description in ESP-NOW (v5.0)

See merge request espressif/esp-idf!29671
2024-03-19 14:19:25 +08:00
Jiang Jiang Jian 94d2ac6a2d Merge branch 'bugfix/cve-2023-52160_v5.0' into 'release/v5.0'
fix(wpa_supplicant): (PEAP client) Update Phase 2 auth requirements (v5.0)

See merge request espressif/esp-idf!29677
2024-03-19 14:19:04 +08:00
Jiang Jiang Jian 75873b4a21 Merge branch 'bugfix/make_coexist_callback_safe_v5.0' into 'release/v5.0'
fix(bt/controller): Fixed some bugs in esp32 bt controller (v5.0)

See merge request espressif/esp-idf!29684
2024-03-19 14:18:13 +08:00
Omar Chebib 4a22a5b764 fix(esp_ringbuf): fix flash function prvGetFreeSize called from IRAM ISR
* Closes https://github.com/espressif/esp-idf/issues/13378
2024-03-18 13:39:39 +08:00
linruihao 9277a80293 fix(bt/controller): Fixed some bugs in esp32 bt controller
1. fixed crash issue in coexist callback
2. fixed wrong LMP message send when expect peer device increase tx power to max
2024-03-15 19:08:58 +08:00
Roland Dobai 914d893c5c Merge branch 'fix/fix_curses_py312_v5.0' into 'release/v5.0'
Fix Access Violation Error on Windows with Python 3.12 (v5.0)

See merge request espressif/esp-idf!29511
2024-03-15 16:19:57 +08:00
Kapil Gupta 34121bdeac fix(wpa_supplicant): (PEAP client) Update Phase 2 auth requirements
The previous PEAP client behavior allowed the server to skip Phase 2
authentication with the expectation that the server was authenticated
during Phase 1 through TLS server certificate validation. Various PEAP
specifications are not exactly clear on what the behavior on this front
is supposed to be and as such, this ended up being more flexible than
the TTLS/FAST/TEAP cases. However, this is not really ideal when
unfortunately common misconfiguration of PEAP is used in deployed
devices where the server trust root (ca_cert) is not configured or the
user has an easy option for allowing this validation step to be skipped.

Change the default PEAP client behavior to be to require Phase 2
authentication to be successfully completed for cases where TLS session
resumption is not used and the client certificate has not been
configured. Those two exceptions are the main cases where a deployed
authentication server might skip Phase 2 and as such, where a more
strict default behavior could result in undesired interoperability
issues. Requiring Phase 2 authentication will end up disabling TLS
session resumption automatically to avoid interoperability issues.

Allow Phase 2 authentication behavior to be configured with a new phase1
configuration parameter option:
'phase2_auth' option can be used to control Phase 2 (i.e., within TLS
tunnel) behavior for PEAP:
 * 0 = do not require Phase 2 authentication
 * 1 = require Phase 2 authentication when client certificate
   (private_key/client_cert) is no used and TLS session resumption was
   not used (default)
 * 2 = require Phase 2 authentication in all cases
2024-03-15 13:22:22 +05:30
zhangyanjiao 693ceaba3c docs(wifi): Updated the LMK description in ESP-NOW
Closes https://github.com/espressif/esp-idf/issues/12976
2024-03-15 15:14:11 +08:00
Jiang Jiang Jian 1bd6dffbef Merge branch 'bugfix/fix_maximum_value_of_config_rtc_clk_cal_cycles_bug_v5.0' into 'release/v5.0'
ESP All Chip: fixed the maximum value of config RTC_CLK_CAL_SYCLES bug (v5.0)

See merge request espressif/esp-idf!29650
2024-03-15 11:19:14 +08:00
Jiang Jiang Jian 343560e1c5 Merge branch 'bugfix/fix_s3_bbpll_cali_fail_bug_v5.0' into 'release/v5.0'
fix: fix s3 bbpll calibration fail bug (v5.0)

See merge request espressif/esp-idf!29646
2024-03-15 11:18:45 +08:00
Jiang Jiang Jian 155eb11672 Merge branch 'bugfix/fix_fastmem_slowmem_lost_data_bug_v5.0' into 'release/v5.0'
[C3/S3]Fix sleep fast_mem & slow_mem may lost bug (v5.0)

See merge request espressif/esp-idf!29642
2024-03-15 11:18:14 +08:00
hongshuqing 44815d75eb fix: fix_maximum_value_of_config_rtc_clk_cal_cycle_bug 2024-03-14 16:22:39 +08:00
InfiniteYuan 5f11da04b0 ble_mesh: example: fix the structure init order to meet C++ requirements
Closes https://github.com/espressif/esp-idf/issues/8110
2024-03-14 16:20:36 +08:00
InfiniteYuan d5f11597e6 ble_mesh: stack: fix the structure init order to meet C++ requirements 2024-03-14 16:20:36 +08:00
hongshuqing 64a99ef412 fix: fix s3 bbpll cali fail bug 2024-03-14 15:45:43 +08:00
chaijie@espressif.com 9a3a74463a fix: fix sleep fast_mem & slow_mem may lost bug 2024-03-14 15:18:57 +08:00
Jin Cheng baf45b004e feat(bt/bluedroid): Moved the memory allocation of HF AG control blocks to BTC module 2024-03-14 10:53:48 +08:00
Rahul Tank 2769144e64 Merge branch 'contrib/github_pr_13034_v5.0' into 'release/v5.0'
docs(nimble): Fixed typo in examples/bluetooth/nimble/blehr/README (GitHub PR) (v5.0)

See merge request espressif/esp-idf!29617
2024-03-14 03:03:06 +08:00
Martin Vychodil 05a45e9c96 Merge branch 'bugfix/nvs_lock_initi_and_multipage_blob_v5.0' into 'release/v5.0'
Bugfix/nvs Improved handling of BLOB during unreliable power environment and concurrent data access scenarios (v5.0)

See merge request espressif/esp-idf!29322
2024-03-13 23:06:23 +08:00
morris 09d7bb4ffb Merge branch 'bugfix/fix_flash_encryption_rom_c3_v5.0' into 'release/v5.0'
fix(spi_flash): Fix issue that flash encryption failed while rom_impl config is enabled (backport v5.0)

See merge request espressif/esp-idf!29352
2024-03-13 21:32:12 +08:00
Alex Verschoot c9c10b14d8 Update README.md
Fix typo
2024-03-13 17:09:41 +05:30
Aditya Patwardhan 822399516c Merge branch 'bugfix/update_disabling_hmac_jtag_method_v5.0' into 'release/v5.0'
fix(esp_hw_support): update hmac toggle method due to discrepency in ROM code (v5.0)

See merge request espressif/esp-idf!29532
2024-03-13 19:25:09 +08:00
Rahul Tank 20792606de Merge branch 'bugfix/reconnect_host_based_v5.0' into 'release/v5.0'
fix(nimble): Added ble_host_rpa_enabled flag for address resoultion for esp32 (v5.0)

See merge request espressif/esp-idf!29572
2024-03-13 12:26:24 +08:00
radek.tandler 27f432eb05 fix(nvs): Adopted CMakeLists for nvs_host_test of IDF v5.0 2024-03-12 13:28:02 +01:00
harshal.patil c84dca6e7d fix(tcp_transport): Fix coverity report regarding tcp_transport 2024-03-12 13:48:06 +05:30
harshal.patil f7b3cd6cbd ci(mbedtls/gcm): Added test to verify software fallback for non-AES cipher GCM operations 2024-03-12 13:47:50 +05:30
harshal.patil c367de40ba fix(mbedtls/gcm): Add support for software fallback for non-AES ciphers in a GCM operation
- Even if the config MBEDTLS_HARDWARE_AES is enabled, we now support fallback
to software implementation of GCM operations when non-AES ciphers are used.
2024-03-12 13:47:25 +05:30
Roland Dobai e334aa0cfa Merge branch 'feature/export_bat_exit_codes_v5.0' into 'release/v5.0'
feat(tools): produce correct err code in install/export .bat scripts (v5.0)

See merge request espressif/esp-idf!29546
2024-03-12 15:12:38 +08:00
nilesh.kale 14d7caa921 fix(esp_hw_support): update hmac toggle method due to discrepency in ROM code
Need to update the HMAC enable/disable method due to discrepancy in ROM code
across different targets for the esp_hmac_disable() API.
2024-03-12 12:24:51 +05:30
Darshan Dobariya a00e268c70 fix(nimble): Added ble_host_rpa_enabled flag for address resoultion for esp32 (v5.0) 2024-03-12 12:20:05 +05:30
Rahul Tank d39db5ede8 Merge branch 'feat/ble_gap_dev_auth_v5.0' into 'release/v5.0'
feat(nimble): Authorize or deauthorize a BLE device for a connection (v5.0)

See merge request espressif/esp-idf!29241
2024-03-12 12:51:29 +08:00
Jiang Jiang Jian d388c85fd2 Merge branch 'bugfix/fix_some_ble_bugs_cjh_v5.0' into 'release/v5.0'
Fixed some BLE bugs 2403 (backport v5.0)

See merge request espressif/esp-idf!29467
2024-03-12 11:01:32 +08:00
Jiang Jiang Jian ffdd5dc2fa Merge branch 'bugfix/fix_some_ble_bugs_240310_v5.0' into 'release/v5.0'
Bugfix/fix some ble bugs 240310 v5.0(backport v5.0)

See merge request espressif/esp-idf!29519
2024-03-12 11:01:14 +08:00
Jiang Jiang Jian edaff79b9a Merge branch 'bugfix/fix_smart_config_bssid_set_issue_v5.0' into 'release/v5.0'
fix(wifi): fix smart config bssid set issue(Backport v5.0)

See merge request espressif/esp-idf!29528
2024-03-12 10:59:53 +08:00
Marek Fiala 929ad0ef91 feat(tools): produce correct err code in export/install .bat scripts
Plus unify labels to begin with underscore
2024-03-11 10:03:27 +01:00
Darshan Dobariya 5a0a8a2c82 feat(nimble): Authorize or deauthorize a BLE device for a connection (v5.0) 2024-03-11 10:24:01 +05:30
Rahul Tank 9aaa048dfc Merge branch 'bugfix/handle_callout_free_in_deinit_v5.0' into 'release/v5.0'
fix(nimble): Handle memory leak in callout deinit (v5.0)

See merge request espressif/esp-idf!29461
2024-03-11 12:52:59 +08:00
muhaidong b2d49b6d00 fix(wifi): fix smart config bssid set issue 2024-03-11 11:40:15 +08:00
Jiang Jiang Jian c286a416ba Merge branch 'bugfix/fix_esp_wifi_scan_start_memory_leakage_issue_v5.0' into 'release/v5.0'
fix(wifi): fix esp_wifi_scan_start memory leakage issue(Backport v5.0)

See merge request espressif/esp-idf!29477
2024-03-11 11:19:31 +08:00
Omar Chebib 1e8b9f8b9c fix(bootloader): add legacy retained memory CRC calculation
* Closes https://github.com/espressif/esp-idf/issues/12849

In former versions of ESP-IDF, the user custom memory data in the retained memory
was taken into account during the CRC calculation. This was changed in a later
commit, the custom memory was ignored, therefore this can seen as a breaking change.
This commit gives the possibility to choose between the former (legacy) or
new way of calculating the CRC.
2024-03-11 11:03:06 +08:00
zhanghaipeng af28f8cfb5 fix(ble/bluedroid): Fixed BLE BLE periodic advertising parameter check 2024-03-10 20:04:44 +08:00
zhanghaipeng 3221583d2f fix(ble/bluedroid): Fixed BLE crash when repeatedly initialize and deinitialize host 2024-03-10 20:04:44 +08:00
Rahul Tank 9f47994989 fix(nimble): Handle memory leak in callout deinit 2024-03-08 20:31:46 +05:30
Rahul Tank 2365dd1635 Merge branch 'bugfix/gap_connect_failed_with_0x0d_v5.0' into 'release/v5.0'
fix(nimble): Revise the help section for the Kconfig macro BLE_RPA_TIMEOUT (v5.0)

See merge request espressif/esp-idf!29494
2024-03-08 22:44:07 +08:00
Jan Beran 5b9a0a3379 fix(menuconfig): Prevent Access violation on Windows with Python 3.12
Closes https://github.com/espressif/esp-idf/issues/13232
2024-03-08 14:25:49 +01:00
radek.tandler 5ae6eade3d fix(nvs): Fixed Page::findItem performance degradation caused by wrong condition before hash map use
The condition enabling use of hash map when page is searched for Item was modified
to correct the bug introduced by commit addressing delete of any BLOB_INDEX Items.
This correction returns the performance of findItem to the state before previous change.
2024-03-08 13:05:48 +01:00
Martin Vychodil 8c7a8283a9 Merge branch 'update/littlefs_demo_example_v5.0_v2' into 'release/v5.0'
LittleFS demo example added & Update/littlefs demo example (v5.0) v2

See merge request espressif/esp-idf!29451
2024-03-08 19:47:40 +08:00
Abhinav Kudnar ff4004f977 fix(nimble): Revise the help section for the Kconfig macro BLE_RPA_TIMEOUT 2024-03-08 11:33:39 +05:30
chenjianhua 727e351b35 feat(bt/bluedroid): Add ext adv and privacy status check 2024-03-08 09:29:55 +08:00
thekurtovic 221d33cee0 fix(bt/bluedroid): Fixed "reprot" typo in esp_ble_gap_ext_adv_reprot_t 2024-03-08 09:29:55 +08:00
Raghu Saxena 1c2adf4201 fix(bt/example): Use correct struct type 2024-03-08 09:29:55 +08:00
Joshua c3aa6c6700 fix(bt/blufi): Fixed BluFi module link error(C++ hybrid compilation) 2024-03-08 09:29:55 +08:00
chenjianhua 380679a387 fix(bt/bluedroid): Fixed crash when calculating GATTS database hash 2024-03-08 09:29:55 +08:00
chenjianhua 12d7e0467f fix(bt): Update bt lib for ESP32(5ea2fca)
- Fixed HCI command status event sending for disconnect command
- Fixed LE transmitter test command param check
2024-03-08 09:29:55 +08:00
Jin Cheng b4cb3e5744 fix(bt/controller): Fixed 3 esp32 bt controller bugs
update esp32 bt-lib (952debf4)

1. Increased the length of queue for coexist requestions
2. fix(bt/controller): Cleared BT SNIFF when no connections exists
3. fix(bt/controller): Corrected a typo in coex module
2024-03-08 09:29:55 +08:00
chenjianhua 02544b8386 fix(bt): Update bt lib for ESP32(2de69f3)
- Fixed HCI command status event send when LLCP busy
2024-03-08 09:29:55 +08:00
Rahul Tank 39a07ff440 Merge branch 'bugfix/add_esp_timer_get_expiry_time_v5.0' into 'release/v5.0'
fix(nimble): Add support for esp_timer_get_expiry_time to nimble porting layer (v5.0)

See merge request espressif/esp-idf!29464
2024-03-07 21:49:33 +08:00
muhaidong 0f3286aa92 fix(wifi): fix esp_wifi_scan_start memory leakage issue
Closes https://github.com/espressif/esp-idf/issues/10693
2024-03-07 17:43:57 +08:00
Rahul Tank 8fcba94795 fix(nimble): Add support for esp_timer_get_expiry_time to nimble porting layer 2024-03-07 11:24:21 +05:30
Rahul Tank b6b820fdc9 Merge branch 'bugfix/addr_resol_for_esp32_v5.0' into 'release/v5.0'
fix(nimble): Added the check to prevent address resolution in case of identity addr for esp32 ( v5.0)

See merge request espressif/esp-idf!29345
2024-03-07 12:05:53 +08:00
Adam Múdry e45760ad72 feat: LittleFS bump version to 1.14.2 2024-03-07 01:29:42 +01:00
Adam Múdry f44f6378ed feat: LittleFS bump version to 1.13.0 2024-03-07 01:19:33 +01:00
sonika.rathi e67d8b5fe8 feat(example/storage/littlefs): add LittleFS demo example 2024-03-07 01:19:24 +01:00
Martin Vychodil 1909ac5e7a Merge branch 'revert-2809d47a' into 'release/v5.0'
Revert "Merge branch 'update/littlefs_demo_example_v5.0' into 'release/v5.0'"

See merge request espressif/esp-idf!29444
2024-03-07 04:30:00 +08:00
Martin Vychodil f68a7bc76b Revert "Merge branch 'update/littlefs_demo_example_v5.0' into 'release/v5.0'"
This reverts merge request !28453
2024-03-06 18:41:31 +01:00
Marius Vikhammer e6c0672e4f Merge branch 'docs/usb_host_stack_config_v5.0' into 'release/v5.0'
USB host: host stack configiuration docs backport to v5.0

See merge request espressif/esp-idf!28774
2024-03-06 15:36:47 +08:00
Island 54517f039e Merge branch 'feature/ble_mesh_example_light_driver_v5.0' into 'release/v5.0'
feat: replace lightdriver, and support more chips in ble mesh examples(backport v5.0)

See merge request espressif/esp-idf!28921
2024-03-06 14:10:03 +08:00
Abhinav Kudnar a3d5d1155b fix(nimble): Added the check to prevent address resolution in case of identity addr for esp32 2024-03-05 14:50:20 +05:30
Michael (XIAO Xufeng) 0ce1c1b494 Merge branch 'feature/add_new_pkg_and_flash_psram_efuses_v5.0' into 'release/v5.0'
feat(efuse): Add flash&psram efuses for S3 (v5.0)

See merge request espressif/esp-idf!29144
2024-03-05 10:47:08 +08:00
Jiang Jiang Jian f934022760 Merge branch 'contrib/github_pr_13294_v5.0' into 'release/v5.0'
Flush rgb lcd PSRAM framebuffers after allocation (GitHub PR) (v5.0)

See merge request espressif/esp-idf!29395
2024-03-05 10:45:06 +08:00
Jiang Jiang Jian 5ff53bf799 Merge branch 'bugfix/esp_intr_free_v5.0' into 'release/v5.0'
fix(esp_hw_support): Fix esp_intr_free when task has no core affinity (v5.0)

See merge request espressif/esp-idf!29195
2024-03-05 10:42:45 +08:00
Rahul Tank 17de25948c Merge branch 'bugfix/increase_reattempt_conn_count_v5.0' into 'release/v5.0'
fix(nimble): Increase range of reattempt connection count (v5.0)

See merge request espressif/esp-idf!29342
2024-03-04 19:44:44 +08:00
Martin Vychodil 2809d47a80 Merge branch 'update/littlefs_demo_example_v5.0' into 'release/v5.0'
LittleFS demo example added (v5.0)

See merge request espressif/esp-idf!28453
2024-03-04 19:35:52 +08:00
Markus Ebner 0252c793d2 fix(esp_lcd): Flush rgb lcd PSRAM framebuffers after allocation
Flush PSRAM framebuffers after allocation to avoid visual corruption.

Merges https://github.com/espressif/esp-idf/pull/13294
Closes https://github.com/espressif/esp-idf/issues/13293
2024-03-04 17:41:30 +08:00
Cao Sen Miao d8f505751e fix(spi_flash): Fix issue that flash encryption failed while rom_impl config is enabled
The issue is `esp_flash_write_encryped` function in ROM on ESP32C3, ESP32S3
calls legacy implementation, which uses old configuration. And this causes
write fails.
The solution in this commit is to compile and link this function(and related)
in IRAM instead of the ROM one.
The IRAM cost increases around 1.2KB after the fix
2024-03-04 11:55:50 +08:00
morris 76ea0115c2 Merge branch 'bugfix/usb_host_usbh_callback_misses_action_v5.0' into 'release/v5.0'
fix(usb): Fix bug where usbh_process() misses an event (v5.0)

See merge request espressif/esp-idf!29366
2024-03-04 11:38:04 +08:00
Jiang Jiang Jian d409df4bfb Merge branch 'contrib/github_pr_12867_v5.0' into 'release/v5.0'
fix(esp32): Removed rogue semicolon in #define in esp_smartconfig.h (GitHub PR) (v5.0)

See merge request espressif/esp-idf!29113
2024-03-04 10:44:28 +08:00
Jiang Jiang Jian 597a7d107c Merge branch 'bugfix/fix_ble_max_reconnect_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Update maximum BLE reconnection attempts configuration(backport v5.0)

See merge request espressif/esp-idf!29222
2024-03-04 10:43:39 +08:00
Michael (XIAO Xufeng) 50fc2bf6ad Merge branch 'bugfix/hpm_dc_default_disabled_v5.0' into 'release/v5.0'
spi_flash: fixed issue that enabling HPM-DC by default may cause app unable to restart (v5.0)

See merge request espressif/esp-idf!28113
2024-03-04 10:25:43 +08:00
Xiao Xufeng 31201cc947 doc(spi_flash): hide unsupported optional features 2024-03-03 23:11:43 +08:00
Xiao Xufeng c32a56fe3b spi_flash: fixed issue that enabling HPM-DC by default may cause app unable to restart 2024-03-03 23:11:43 +08:00
Rahul Tank ae0beef801 Merge branch 'bugfix/add_adv_itvl_range_check_v5.0' into 'release/v5.0'
fix(nimble): Add adv interval min/max range check (v5.0)

See merge request espressif/esp-idf!28853
2024-03-01 18:18:07 +08:00
Marius Vikhammer f00e5a042f Merge branch 'ci/new-known_failure_cases_workflow(v5.0)' into 'release/v5.0'
ci: change known_failure_cases workflow(v5.0)

See merge request espressif/esp-idf!27964
2024-03-01 15:04:04 +08:00
Darian Leung 8277243522 fix(usb): Fix bug where usbh_process() misses an event
This commit fixes a bug where if multiple concurrent USBH API calls trigger
multiple events on the same device, some events will be lost. As a result,
those lost events don't get processed by the subsequent usbh_process() call.
2024-03-01 14:24:39 +08:00
David Čermák 1a4825955d Merge branch 'feature/mmd_access_v5.0' into 'release/v5.0'
esp_eth: Add functions to access PHY using MDIO (v5.0)

See merge request espressif/esp-idf!28841
2024-02-29 22:30:49 +08:00
David Čermák 13959f258b Merge branch 'bugfix/ip101_reset_timing_v5.0' into 'release/v5.0'
fix(esp_eth): ip101-specific reset_hw to match reset timings from datasheet (v5.0)

See merge request espressif/esp-idf!29013
2024-02-29 21:24:12 +08:00
David Čermák f74639952e Merge branch 'bugfix/eth_link_reset_v5.0' into 'release/v5.0'
fix(esp_eth): Fixed Ethernet link reset when Ethernet is stopped (v5.0)

See merge request espressif/esp-idf!29330
2024-02-29 19:32:32 +08:00
David Čermák 539f326fd2 Merge branch 'ci/enable_ip101_jobs_v5.0' into 'release/v5.0'
ci(esp_eth): enabled Ethernet ip101 jobs (v5.0)

See merge request espressif/esp-idf!28606
2024-02-29 19:28:18 +08:00
Rahul Tank 41a50ca5ce fix(nimble): Increase range of reattempt connection count 2024-02-29 15:58:07 +05:30
Simon H 515f085f70 fix(esp_wifi): Remove semicolon from SMARTCONFIG_START_CONFIG_DEFAULT
Removed rogue semicolon from SMARTCONFIG_START_CONFIG_DEFAULT() macro. This
fixes build issues when this macro is used via C++ brace initialization.

Closes https://github.com/espressif/esp-idf/pull/12867

[Darian Leung: Updated commit message]
Signed-off-by: Darian Leung <darian@espressif.com>
2024-02-29 17:59:51 +08:00
Rahul Tank effd2ededb fix(nimble): Add adv interval min/max range check (v5.0) 2024-02-29 11:02:41 +05:30
Jiang Jiang Jian 702853c00e Merge branch 'bugfix/esp32c2_eap_auth_v5.0' into 'release/v5.0'
fix(wifi): Added low heap usage Kconfig option for eap enterprise (v5.0)

See merge request espressif/esp-idf!28826
2024-02-29 11:24:50 +08:00
Jiang Jiang Jian 1e8aa6c8b6 Merge branch 'bugfix/mbo_api_flag_v5.0' into 'release/v5.0'
fix(wpa_supplicant):Add MBO config flag for mbo apis(v5.0)

See merge request espressif/esp-idf!28696
2024-02-29 11:24:31 +08:00
Ondrej Kosta 3d90c7755f fix(esp_eth): Fixed Ethernet link reset when Ethernet is stopped 2024-02-28 15:50:30 +01:00
radek.tandler 56cb47be79 fix(nvs): Improved lockig mechanism for initialization phase 2024-02-28 12:43:51 +01:00
radek.tandler 12d8abde53 fix(nvs): eraseMultiPageBlob to robustly delete all related BLOB_DATA records and respect VER_ANY 2024-02-28 12:43:51 +01:00
radek.tandler 6cd48e0e91 fix(nvs): corrected findItem to return BLOB_DATA when chunkIndex = CHUNK_ANY 2024-02-28 12:43:51 +01:00
radek.tandler 4b16c95883 fix(nvs): added check and erase of mismatched BLOB_DATA on init 2024-02-28 12:43:51 +01:00
Ivan Grokhotkov 2321decd98 fix(nvs): prevent out of bounds write if blob data is inconsistent 2024-02-28 12:43:50 +01:00
Island b1992f1b84 Merge branch 'bugfix/ble_update_lib_20240223_v5.0' into 'release/v5.0'
update lib on release/v5.0

See merge request espressif/esp-idf!29208
2024-02-28 16:54:25 +08:00
Jiang Jiang Jian a1dad7ef57 Merge branch 'bugfix/fix_issues_in_wifi_and_lwip_v5.0' into 'release/v5.0'
fix(wifi): fixed issues in wifi and lwip (v5.0)

See merge request espressif/esp-idf!29201
2024-02-28 16:35:17 +08:00
Jiang Jiang Jian d80aa9f5b2 Merge branch 'bugfix/encrypted_flash_write_safe_addr_v5.0' into 'release/v5.0'
fix(spi_flash): check for safe write address in encrypted flash API (v5.0)

See merge request espressif/esp-idf!29206
2024-02-28 11:06:48 +08:00
Jiang Jiang Jian 022e57e255 Merge branch 'docs/rf_coexistence_api_guides_support_esp32c2_v5.0' into 'release/v5.0'
Docs: RF coexistence api guides support esp32c2 (v5.0)

See merge request espressif/esp-idf!29216
2024-02-28 11:06:18 +08:00
Jiang Jiang Jian 5952e6ccaf Merge branch 'bugfix/spi_eth_recv_alloc_v5.0' into 'release/v5.0'
fix(esp_eth): improved SPI Ethernet _alloc_recv_buf error handling (v5.0)

See merge request espressif/esp-idf!29084
2024-02-28 11:04:19 +08:00
xuxiao f12a5394cc feat(example): modify iperf sdkconfig to imporve iperf performance 2024-02-28 10:59:21 +08:00
Abhik Roy 0e9f7aac87 fix(lwip): Fixed debug format, added ci test config
Detailed description of the changes:
  - lwip_debug: Fixed string format error in ip6 and napt (espressif/esp-lwip@f5c43549)
  - dns: fix init with only ipv4 enabled (espressif/esp-lwip@5aab73d7)
2024-02-28 10:59:21 +08:00
zhangyanjiao 99093b8743 feat(lwip): add fall back dns config in menuconfig 2024-02-28 10:59:21 +08:00
zhangyanjiao ce93d231e9 fix(wifi): fixed scan and mesh deinit issues
1. update scan ap number when clear scan ap records
2. wait for child disconnect when mesh deinit
2024-02-28 10:59:21 +08:00
aditi_lonkar 7c65911c18 fix(wpa_supplicant):Add MBO config flag for mbo apis 2024-02-28 10:37:57 +08:00
Kapil Gupta c62022b312 fix(wifi): add low memory options for eap enterprise 2024-02-28 10:37:40 +08:00
Jiang Jiang Jian 462dfaf45c Merge branch 'change/reduce_usage_of_iram_when_bt_in_single_mode_v5.0' into 'release/v5.0'
change(bt/bluedroid): Redirect app functions in controller based on the bluetooth mode(backport v5.0)

See merge request espressif/esp-idf!29226
2024-02-28 10:35:38 +08:00
Rahul Tank ee8edad531 Merge branch 'bugfix/move_count_v5.0' into 'release/v5.0'
fix(nimble): Fix compilation issue in nimble for -O2 flag (v5.0)

See merge request espressif/esp-idf!29074
2024-02-28 09:10:59 +08:00
Roland Dobai cdae7acb1f Merge branch 'feat/bump_up_pre_commit_hook_v5.0' into 'release/v5.0'
fix: Bump up pre-commit hooks version (v5.0)

See merge request espressif/esp-idf!29254
2024-02-27 17:43:28 +08:00
Darshan Dobariya 9e34b224b1 fix(nimble): Fix compilation issue in nimble for -O2 flag 2024-02-27 13:54:50 +05:30
Rahul Tank 0e56e20eeb Merge branch 'bugfix/fix_out_of_order_messages_causing_dos_v5.0' into 'release/v5.0'
fix(nimble): Out of order messages during SMP causing DOS vulnerability (v5.0)

See merge request espressif/esp-idf!28939
2024-02-27 16:15:46 +08:00
Sumeet Singh a125c073a0 fix(nimble): Out of order messages during SMP causing DOS vulerability (v5.0) 2024-02-27 10:56:40 +05:30
Rahul Tank f60c9f1659 Merge branch 'bugfix/nimble_host_clean_up_api_v5.0' into 'release/v5.0'
fix(nimble): Added API to get current stack operation status (v5.0)

See merge request espressif/esp-idf!28858
2024-02-27 13:23:22 +08:00
zwl 3389b68ba9 bugfix(ble) : fixed some ble issues on ESP32-C2 2024-02-27 09:12:29 +08:00
zwl 69b6af9ea9 ble(update):
Update c2 lib to 79be7ec9
2024-02-27 09:12:29 +08:00
zhanghaipeng b354d97795 fix(ble/bluedroid): Update maximum BLE reconnection attempts configuration 2024-02-27 09:12:12 +08:00
KonstantinKondrashov f6925f12a0 fix(esp_hw_support): Fix esp_intr_free when taks has no core affinity
Closes https://github.com/espressif/esp-idf/issues/12608
2024-02-26 12:08:46 +02:00
Jan Beran 706b1f555f fix: Bump up pre-commit hooks version 2024-02-26 10:35:06 +01:00
Rahul Tank 3211fa200e fix(nimble): Added API to get current stack operation status (v5.0) 2024-02-26 12:08:18 +05:30
morris 1ddc3564b8 Merge branch 'feature/rmt_encoder_memory_allocator_v5.0' into 'release/v5.0'
feat(rmt): added a help function for allocating encoder memory (v5.0)

See merge request espressif/esp-idf!28792
2024-02-26 13:58:47 +08:00
gongyantao 9b605ab112 change(bt/bluedroid): Redirect app functions in controller based on the bluetooth mode 2024-02-23 19:07:12 +08:00
linruihao c57f0f45da docs: update rf coexistenct api guides
1. support esp32c2
2. fix inconsistency between CN and EN docs of rf coexistence
3. adjust the visibility of some contents based on soc_caps
2024-02-23 17:01:14 +08:00
linruihao 99237104ba fix(esp_coex): add support_coexistence soc_caps for esp32c2 2024-02-23 16:41:52 +08:00
Jiang Jiang Jian 2ed1e79d9a Merge branch 'bugfix/fix_coex_lib_circular_dependency_v5.0' into 'release/v5.0'
fix(esp_coex): fix circular dependency issue on esp32 (v5.0)

See merge request espressif/esp-idf!29174
2024-02-23 15:04:17 +08:00
Mahavir Jain f01e9be6d5 Merge branch 'fix/build_failure_when_hardware_gcm_is_disabled_v5.0' into 'release/v5.0'
fix(mbedtls/gcm): Fix build failure when config `MBEDTLS_HARDWARE_GCM` is disabled (v5.0)

See merge request espressif/esp-idf!29069
2024-02-23 14:47:49 +08:00
Rahul Tank 6977aa0583 Merge branch 'feat/add_dtm_function_support_v5.0' into 'release/v5.0'
feat(nimble): Add APIs to support BLE DTM functions (v5.0)

See merge request espressif/esp-idf!27144
2024-02-23 12:48:29 +08:00
Mahavir Jain 5ac48e7468 fix(spi_flash): check for safe write address in encrypted flash API 2024-02-23 12:42:46 +08:00
harshal.patil 74eb2add93 fix(mbedtls/gcm): Avoid using GCM hardware when config MBEDTLS_HARDWARE_GCM is disabled 2024-02-23 11:26:21 +08:00
harshal.patil 9f461c010b fix(mbedtls/gcm): Fix build failure when config MBEDTLS_HARDWARE_GCM is disabled 2024-02-23 11:26:21 +08:00
Jiang Jiang Jian 66d71efb87 Merge branch 'bugfix/update_spp_doc_v5.0' into 'release/v5.0'
docs(bt/bluedroid): update API documents of SPP (v5.0)

See merge request espressif/esp-idf!29172
2024-02-23 11:15:03 +08:00
Jiang Jiang Jian 7a649e80c1 Merge branch 'feat/support_get_bluedroid_status_v5.0' into 'release/v5.0'
Support get status of bluedroid host (backport v5.0)

See merge request espressif/esp-idf!28883
2024-02-23 10:55:14 +08:00
Jiang Jiang Jian f6be88415f Merge branch 'bugfix/fix_double_free_coc_v5.0' into 'release/v5.0'
fix(nimble): Removed double free of packet (v5.0)

See merge request espressif/esp-idf!29033
2024-02-23 10:50:56 +08:00
Jiang Jiang Jian 6992b536e4 Merge branch 'bugfix/fix_blufi_deinit_v5.0' into 'release/v5.0'
Blufi : Corrected blufi host deinit API (v5.0)

See merge request espressif/esp-idf!29001
2024-02-23 10:50:31 +08:00
Jiang Jiang Jian 646658a564 Merge branch 'bugfix/fix_dangling_pointer_in_remove_bond_list_section_v5.0' into 'release/v5.0'
fix(bt/bluedroid): fix dangling pointer issue when logging removed section (backport v5.0)

See merge request espressif/esp-idf!28963
2024-02-23 10:49:27 +08:00
Jiang Jiang Jian 48570f5466 Merge branch 'bugfix/ble_mesh_deinit_reinit_v5.0' into 'release/v5.0'
feat: ble mesh: improve ble mesh deinit when nimble enable(backport v5.0)

See merge request espressif/esp-idf!28924
2024-02-23 10:49:03 +08:00
Jiang Jiang Jian 1cc35f0bdc Merge branch 'bugfix/ble_mesh_ble_advtype_v5.0' into 'release/v5.0'
ble_mesh: update ble mesh ble adv type(backport v5.0)

See merge request espressif/esp-idf!28915
2024-02-23 10:47:45 +08:00
Jiang Jiang Jian d253654f0f Merge branch 'bugfix/ble_bug_backport_20240205_v5.0' into 'release/v5.0'
Bugfix/ble bug backport 20240205 (backport v5.0)

See merge request espressif/esp-idf!28898
2024-02-23 10:47:06 +08:00
Jiang Jiang Jian 0c555c9fbc Merge branch 'bugfix/fix_dtm_tx_count_v5.0' into 'release/v5.0'
Update bt lib for ESP32-C3 and ESP32-S3(30b57c45)(backport v5.0)

See merge request espressif/esp-idf!28878
2024-02-23 10:45:16 +08:00
Jiang Jiang Jian 6d5f4bcda6 Merge branch 'feat/use_esp_debug_backend_pkg' into 'release/v5.0'
Replace 'debug_backend' with 'esp-debug-backend' from PyPi

See merge request espressif/esp-idf!28820
2024-02-23 10:42:38 +08:00
Jiang Jiang Jian 91ed63ef02 Merge branch 'feature/supplicant_bss_extmem_v5.0' into 'release/v5.0'
WiFi: Add support to move supplicant BSS to external memory (v5.0)

See merge request espressif/esp-idf!28745
2024-02-23 10:41:41 +08:00
Jiang Jiang Jian 153b81b546 Merge branch 'bugfix/spp_disc_connect_btqabr2023_156_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fixed SPP connection failure(v5.0)

See merge request espressif/esp-idf!28543
2024-02-23 10:40:41 +08:00
morris 7c88240e38 feat(rmt): added a help function for allocating encoder memory
The encoder memory location should respect the RMT_MEM_ALLOC_CAPS,
which is affected by some Kconfig options, like ISR_IRAM_SAFE

Closes https://github.com/espressif/esp-idf/issues/13032
2024-02-23 10:29:31 +08:00
morris b721f9cd09 Merge branch 'bugfix/fix_incorrect_regbase_name_of_i2s_v5.0' into 'release/v5.0'
fix(i2s): fixed incorrect reg base name on C3 (v5.0)

See merge request espressif/esp-idf!28632
2024-02-23 10:28:41 +08:00
morris e6d25871f1 Merge branch 'contrib/github_pr_12963_v5.0' into 'release/v5.0'
fix misformatted link (GitHub PR) (v5.0)

See merge request espressif/esp-idf!28756
2024-02-23 10:27:46 +08:00
morris e9fa7a9f06 Merge branch 'bugfix/mcpwm_reset_generator_gpio_v5.0' into 'release/v5.0'
fix(mcpwm): reset GPIO used by generator after delete (v5.0)

See merge request espressif/esp-idf!28833
2024-02-23 10:27:10 +08:00
morris 7146c557e9 Merge branch 'feature/bytes_encoder_config_update_v5.0' into 'release/v5.0'
feat(rmt): support update bytes encoder configurations at runtime (v5.0)

See merge request espressif/esp-idf!28383
2024-02-23 10:26:01 +08:00
morris fcc7bcbfc7 Merge branch 'contrib/github_pr_13020_v5.0' into 'release/v5.0'
fix (esp_lcd): Don't assume panels are 16bit in VSYNC restart logic (GitHub PR) (v5.0)

See merge request espressif/esp-idf!28813
2024-02-23 10:25:42 +08:00
Roland Dobai 21abe3eda6 Merge branch 'fix/py_dep_check_v5.0' into 'release/v5.0'
fix(tools): catch more general errors in python dependency checker (v5.0)

See merge request espressif/esp-idf!29165
2024-02-23 01:10:08 +08:00
Fu Hanxi c40c612cf5 Merge branch 'ci/limit_idf_build_apps_to_1.x_5.0' into 'release/v5.0'
ci: limit idf-build-apps version to 1.x in pre-commit config file (5.0)

See merge request espressif/esp-idf!28829
2024-02-22 20:55:05 +08:00
Konstantin Kondrashov 4c2eec029f feat(efuse): Adds support for alternative efuse names 2024-02-22 13:31:28 +02:00
Peter Dragun 575e924d61 fix(tools): catch more general errors in python dependency checker 2024-02-22 11:33:52 +01:00
KonstantinKondrashov a66baa1984 feat(efuse): Add flash&psram efuses for S3 2024-02-22 11:40:33 +02:00
Roland Dobai cd36f43f09 Merge branch 'feature/python-reorder-imports-instead-isort_v5.0' into 'release/v5.0'
feat: Use python-reorder-imports instead of isort (v5.0)

See merge request espressif/esp-idf!28733
2024-02-22 17:32:47 +08:00
Marius Vikhammer 2caab9344e Merge branch 'docs/add_cannonical_url_v5.0' into 'release/v5.0'
docs(build): add cannonical stable url to all docs (v5.0)

See merge request espressif/esp-idf!28849
2024-02-22 17:32:34 +08:00
Marius Vikhammer 422bb72993 Merge branch 'bugfix/linenoise_calculates_negative_prompt_len_v5.0' into 'release/v5.0'
fix(console): Fixed linenoise prompt length calculation (v5.0)

See merge request espressif/esp-idf!28528
2024-02-22 17:32:01 +08:00
Roland Dobai 760587ab0d Merge branch 'feature/python-reorder-imports-instead-isort_v5.0' into 'release/v5.0'
feat: Use python-reorder-imports instead of isort (v5.0)

See merge request espressif/esp-idf!28733
2024-02-22 17:30:59 +08:00
Mahavir Jain 68c450df47 Merge branch 'feature/conservative_key_revocation_in_secure_boot_v5.0' into 'release/v5.0'
feat: Add API to verify the bootloader and application image before revoking... (v5.0)

See merge request espressif/esp-idf!28490
2024-02-22 17:15:24 +08:00
Mahavir Jain 5af8e8890d Merge branch 'bugfix/fix_http_auth_without_qop_v5.0' into 'release/v5.0'
fix(esp_http_client): Fix http digest auth without qop (v5.0)

See merge request espressif/esp-idf!28759
2024-02-22 17:15:15 +08:00
Mahavir Jain 534e3ad1fa Merge branch 'bugfix/ota_anti_rollback_checks_2_v5.0' into 'release/v5.0'
feat(bootloader_support): Read secure_version under sha256 protection (v5.0)

See merge request espressif/esp-idf!29061
2024-02-22 17:13:17 +08:00
Mahavir Jain 96e3e4c589 Merge branch 'feature/update_mbedtls_v5.0' into 'release/v5.0'
feat(mbedtls): updated mbedtls version from 3.5.0 to 3.5.2 (v5.0)

See merge request espressif/esp-idf!28894
2024-02-22 17:12:39 +08:00
Aditya Patwardhan 14ddc194bd Merge branch 'feat/flash_enc_encrypt_app_image_of_size_image_length_v5.0' into 'release/v5.0'
feat(bootloader_support): Encrypt only the app image instead of the whole partition (v5.0)

See merge request espressif/esp-idf!28267
2024-02-22 17:06:42 +08:00
linruihao bc5addf826 fix(esp_coex): fix circular dependency issue on esp32
Closes https://github.com/espressif/esp-idf/issues/13113
2024-02-22 16:52:37 +08:00
Jin Cheng 7e4995d92c docs(bt/bluedroid): update API documents of SPP 2024-02-22 09:57:47 +08:00
Aditya Patwardhan 7ef4d6b769 Merge branch 'update/version_5_0_6' into 'release/v5.0'
Update version to 5.0.6

See merge request espressif/esp-idf!29118
2024-02-21 16:41:56 +08:00
Mahavir Jain 1620858985 fix(bootloader_support): check the secure version only for app image
Secure version in the image header is only available for the application
image. However, for certain security workflows, bootloader verifies
itself (own image) and hence the secure version check during that must be
avoided.

Regression introduced in recent commit-id: 3305cb4d

Tested that both secure boot and flash-enc workflows work correctly
with the anti-rollback scenario.
2024-02-20 11:18:28 +02:00
Aditya Patwardhan bcca689866 change(version): Update version to 5.0.6 2024-02-20 10:03:13 +05:30
Ondrej Kosta 62a2b27082 fix(esp_eth): improved SPI Ethernet _alloc_recv_buf error handling 2024-02-16 14:43:53 +01:00
Mahavir Jain f2743707b8 fix(ota): additional checks for secure version in anti-rollback case
Some additional checks related to secure version of the application in
anti-rollback case have been added to avoid any attempts to boot lower
security version but valid application (e.g., passive partition image).

- Read secure_version under sha256 protection

- First check has been added in the bootloader to ensure correct secure
  version after application verification and loading stage. This check
  happens before setting up the flash cache mapping and handling over
  the final control to application. This check ensures that application
  was not swapped (e.g., to lower security version but valid image) just
  before the load stage in bootloader.

- Second check has been added in the application startup code to ensure
  that currently booting app has higher security version than the one
  programmed in the eFuse for anti-rollback scenario. This will ensure
  that only the legit application boots-up on the device for
  anti-rollback case.
2024-02-15 15:14:51 +02:00
Bogdan Kolendovskyy e703fad818 esp_eth: Add functions to access PHY using MDIO
Specifically:
  - Set/get address
  - Read/write data at address with specified MDIO access function
  - Read/write both address and data with a single call
2024-02-13 12:46:36 +01:00
Rahul Tank 146cf22f76 fix(nimble): Removed double free of packet 2024-02-13 14:42:42 +05:30
Bogdan Kolendovskyy 749191016b fix(esp_eth): ip101-specific reset_hw to match reset timings from datasheet
IP101 requires 10ms reset assertion time and 10ms post-reset delay to properly initialize.
2024-02-09 15:01:03 +01:00
Roshan Bangar 93176970d9 Blufi : fix blufi deinit 2024-02-08 17:14:12 +05:30
Rahul Tank b2778ec38d feat(nimble): Add APIs to support BLE DTM functions 2024-02-07 15:20:51 +05:30
gongyantao 817ae554ca fix(bt/bluedroid): fix dangling pointer issue when logging remove section 2024-02-07 14:58:17 +08:00
MinZai97 6641a692b7 feat: replace lightdriver, and support more chips in ble mesh examples 2024-02-07 13:28:52 +08:00
YuanMingFu ed2ea01b76 ble_mesh: update ble mesh ble adv type 2024-02-07 13:09:32 +08:00
InfiniteYuan dae30350dd feat: ble mesh: improve ble mesh deinit when nimble enable 2024-02-06 14:44:58 +08:00
morris 8ac48a138e fix(rgb_lcd): relax the check for the data line GPIO
There are a bunch of cases you might want some pins not exposed.

Eg.

  * Reading say 8 bit data and outputting the top 5 bits, discarding the rest by not mapping those data pins to output pins

 * Not using hsync/vsync because sync data is embedded within the data bits for more timing flexibility (eg. interlacing).

 * Using the LCD module as a high speed parallel data output bus, with no need for sync/control pins.

Removing this validation makes these cases work.

Merges https://github.com/espressif/esp-idf/pull/13103
2024-02-06 10:37:20 +08:00
zhiweijian 4a413b9d27 feat(ble/controller): Add API to get BLE controller status on ESP32 2024-02-05 16:11:26 +08:00
zhiweijian fb94d9175f Fixed xQueueSemaphoreTask assert when deinit host during scan 2024-02-05 16:11:08 +08:00
nilesh.kale 4f63e93118 feat(mbedtls): updated mbedtls version from 3.5.0 to 3.5.2
This updates the submodule mbedtls to its latest version 3.5.2.
2024-02-05 12:50:59 +05:30
chenjianhua 479ec4af2a feat(bt/bluedroid): Support get status of bluedroid host 2024-02-04 16:52:12 +08:00
chenjianhua 51db5c76b7 fix(bt/example): Fixed UART HCI when flow control is off on ESP32C3 2024-02-04 16:52:04 +08:00
chenjianhua 1e5296008a feat(bt/bluedroid): Make the max number of bond device to be configurable 2024-02-04 16:51:55 +08:00
zhanghaipeng 50ef8650ac fix(ble/controller): Fixed tx count in direct test mode on ESP32-C3 and ESP32-S3
- Fixed tx count in direct test mode on ESP32-C3 and ESP32-S3
- fixed modem sleep enter failed sometimes
2024-02-04 14:28:28 +08:00
chenjianhua 1363cbe1ca fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(91980c2)
- Fixed scheduling when modem sleep wakeup delayed
- Fixed IRQ FIFO overflow when enter critical
- Fixed clock sync timeout for modem sleep
- Fixed directed adv with RPA when privacy disabled
- Fixed instant passed for connection update and PHY update
2024-02-04 14:28:12 +08:00
Marius Vikhammer 474ebfc3ee docs(build): add cannonical stable url to all docs 2024-02-02 10:36:44 +08:00
morris 1ce7be11fa fix(mcpwm): reset GPIO used by generator after delete
Closes https://github.com/espressif/esp-idf/issues/12980
2024-02-01 17:49:53 +08:00
Fu Hanxi e94615eade ci: limit idf-build-apps version to 1.x in pre-commit config file 2024-02-01 09:58:23 +01:00
Jiang Jiang Jian 899bc1d6b2 Merge branch 'bugfix/no_wakeup_sleep_v5.0' into 'release/v5.0'
fix(ble): Fixed Bluetooth not waking up due to clock drift(v5.0)

See merge request espressif/esp-idf!28723
2024-02-01 00:02:09 +08:00
Alexey Gerenkov 164be1cd52 tests: Replace 'debug_backend' with 'esp-debug-backend' from PyPi 2024-01-31 18:49:21 +03:00
Brian Whitman d44dc57f8a fix(rgb_lcd): don't assume 16 bit width on panels for restart logic
Merges https://github.com/espressif/esp-idf/pull/13020
2024-01-31 18:56:49 +08:00
Island 58b52c1230 Merge branch 'ble_dev/added_ble_power_save_pytest_v5.0' into 'release/v5.0'
Added pytest case for BLE power save example v5.0

See merge request espressif/esp-idf!28594
2024-01-31 18:33:14 +08:00
Island 1d83a2125a Merge branch 'feat/ble_mesh_miscellaneous_update_v5.0' into 'release/v5.0'
feat(ble_mesh): Miscellaneous updates for mesh kconfig, relay related(v5.0)

See merge request espressif/esp-idf!28034
2024-01-31 18:29:34 +08:00
Island 68a90a1f05 Merge branch 'bugfix/fix_sm_inject_io_return_val_v5.0' into 'release/v5.0'
fix(nimble): Added change to ensure that API execution returns success (v5.0)

See merge request espressif/esp-idf!28651
2024-01-31 17:34:02 +08:00
Jan Beran 632620fa60 feat: Use python-reorder-imports instead of isort 2024-01-31 09:31:47 +01:00
Jiang Jiang Jian decb0c21c5 Merge branch 'bugfix/fix_systick_lost_in_esp32_dfs_v5.0' into 'release/v5.0'
fix(esp_pm): safely check ccompare validity in DFS update_ccompare (v5.0)

See merge request espressif/esp-idf!28563
2024-01-31 10:42:18 +08:00
Darshan Dobariya c5c3b5bfe8 fix(nimble): Added change to ensure that API execution returns success (v5.0) 2024-01-30 14:48:53 +05:30
Island cb4aa11362 Merge branch 'bugfix/add_minor_fixes_debug_v5.0' into 'release/v5.0'
fix(nimble): Add minor debug fixes (v5.0)

See merge request espressif/esp-idf!28534
2024-01-30 17:00:50 +08:00
wuzhenghui 6a63a5b69c fix(esp_pm): safely check ccompare validity in DFS update_ccompare 2024-01-30 16:03:40 +08:00
xiongweichao 332b293215 fix(ble): Fixed macro definition error for 136K clock drift 2024-01-30 15:36:22 +08:00
xiongweichao 08061d3414 fix(ble): Fixed Bluetooth not waking up due to clock drift 2024-01-30 15:36:22 +08:00
Jiang Jiang Jian 090dd4047c Merge branch 'bugfix/fix_ble_tx_2m_problem_causing_by_phy_wifi_enable_set_v5.0' into 'release/v5.0'
fix(esp_phy): Fixed BLE TX 2M problem causing by phy_wifi_enable_set() (backport v5.0)

See merge request espressif/esp-idf!28768
2024-01-30 14:44:06 +08:00
igor.udot 8003214fd5 ci: change known_failure_cases workflow 2024-01-30 14:27:42 +08:00
Rahul Tank 18caeb919a fix(nimble): Add minor debug fixes 2024-01-30 08:11:37 +05:30
mofeifei 8cf35aa27b docs: update cn trans usb_host.rst 2024-01-29 10:26:14 +01:00
Roman Leonov 470ecb3033 feat(docs): added USB Host Stack Configuration description 2024-01-29 10:22:26 +01:00
zhiweijian e988463ea4 fix(esp_phy): Fixed BLE TX 2M problem causing by phy_wifi_enable_set()
1. Fixed BLE 2M phy TX problem causing by phy_wifi_enable_set() on ESP32-C3 and ESP32-S3
2. Fixed BLE CCA bug on ESP32-C2
3. Fixed BLE and WIFI could not receive packets after entering light sleep for a long time on ESP32-C3, ESP32-S3 and ESP32-C2
2024-01-29 16:36:35 +08:00
Harshit Malpani 484de5ee1c fix(esp_http_client): Fix http digest auth without qop
Closes https://github.com/espressif/esp-idf/issues/12962
2024-01-29 11:22:40 +05:30
Gabor Kiss-Vamosi d43bf5dc51 fix misformatted link 2024-01-29 13:16:29 +08:00
Jiang Jiang Jian f16621c429 Merge branch 'bugfix/fix_pmk_invalid_wpa_or_wpa2_connect_fail_issue_v5.0' into 'release/v5.0'
fix(wifi): fix pmk invalid lead same ssid wpa and wpa2 connect fail issue(Backport v5.0)

See merge request espressif/esp-idf!28674
2024-01-29 10:44:38 +08:00
cjin 5e44ecb938 fix(ble): delete unused example ci test script 2024-01-29 10:25:36 +08:00
cjin 227ad67a09 feat(ble): added pytest for ble power save example 2024-01-29 10:25:36 +08:00
xiongweichao 9c50e0c809 fix(ble): Fixed the issue of being unable to enter light sleep
- Fixed the issue where light sleep cannot be entered when external 32k XTAL does not exist
2024-01-29 10:25:36 +08:00
Kapil Gupta 443842fd9d fix(wifi): Add support to move supplicant BSS to external memory 2024-01-27 11:15:10 +05:30
Island 1da4afc70a Merge branch 'bugfix/address_resolution_v5.0' into 'release/v5.0'
fix(nimble): Added support for address resolution during inquiry (v5.0)

See merge request espressif/esp-idf!28520
2024-01-25 14:07:04 +08:00
Island acf8c3e9e3 Merge branch 'bugfix/fix_some_ble_issue_v5.0' into 'release/v5.0'
Bugfix/fix some ble issue v5.0(backport v5.0)

See merge request espressif/esp-idf!28615
2024-01-25 12:19:24 +08:00
Island 7324e55dc0 Merge branch 'bugfix/ble_check_adv_data_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fix ble adv data check to avoid memory overflow(backport v5.0)

See merge request espressif/esp-idf!28407
2024-01-25 12:19:11 +08:00
Island bcc7d4e427 Merge branch 'bugfix/fix_ble_memory_leak_v5.0' into 'release/v5.0'
fix(ble/bluedroid): Fix ble memory leak when gattc config off(backport v5.0)

See merge request espressif/esp-idf!28497
2024-01-25 12:18:59 +08:00
muhaidong 48b9fde3e3 fix(wifi): fix pmk invalid lead same ssid wpa and wpa2 connect fail issue 2024-01-24 16:38:43 +08:00
Mahavir Jain 4b13be6cf0 Merge branch 'bugfix/update_jtag_disabling_api_v5.0' into 'release/v5.0'
fix(esp_hw_support): fix API esp_hmac_disable_jtag() to disable JTAG (v5.0)

See merge request espressif/esp-idf!28502
2024-01-24 15:07:27 +08:00
Mahavir Jain 44593bf3ef Merge branch 'feat/update_cjson_v1_7_17_v5.0' into 'release/v5.0'
feat(cJSON): update submodule to v1.7.17 (v5.0)

See merge request espressif/esp-idf!28350
2024-01-24 15:06:59 +08:00
Jiang Jiang Jian 9be6e00f1e Merge branch 'bugfix/fix_scan_request_ifs_error_v5.0' into 'release/v5.0'
Fixed BLE scan request ifs time error in coexistence scenarios(backport v5.0)

See merge request espressif/esp-idf!28576
2024-01-24 14:00:49 +08:00
laokaiyao 12714a6fda fix(i2s): fixed incorrect reg base name on C3
Closes https://github.com/espressif/esp-idf/issues/12643
2024-01-23 12:07:50 +08:00
zhanghaipeng ca056b198f feat(bt/bluedroid): Support ext adv aux option 2024-01-22 20:54:04 +08:00
zhanghaipeng e37dcaa92f fix(bt/bluedroid): Fix BLE malloc internal wrapper fail 2024-01-22 20:53:53 +08:00
Zeke Gustafson 570cc22bdc feat(ble/bluedroid): Add getter for BLE GAP callback 2024-01-22 20:53:44 +08:00
Zeke Gustafson 46253edd6a feat(ble/bluedroid): Add getter for BLE GATTS callback 2024-01-22 20:53:36 +08:00
zhanghaipeng b9caeb4559 feat(ble/bluedroid): Add getter for BLE GATTC calllback 2024-01-22 20:53:28 +08:00
zhanghaipeng a3759a122e docs(ble/bluedroid): Optimize documentation for BLE duplicate scan 2024-01-22 20:53:20 +08:00
zhanghaipeng b447216f8a fix(ble/bluedroid): Fix dangling pointer issue in deletion of bonded devices 2024-01-22 20:53:08 +08:00
zhanghaipeng 00b839ca66 fix(ble/bluedroid): Fix BLE background connection log level 2024-01-22 20:53:00 +08:00
Adam Múdry 43d0b27053 feat: LittleFS bump version to 1.13.0 2024-01-22 20:21:21 +08:00
sonika.rathi 4ffa46428e feat(example/storage/littlefs): add LittleFS demo example 2024-01-22 20:21:21 +08:00
Ondrej Kosta 8c305d182b ci(esp_eth): enabled Ethernet ip101 jobs 2024-01-22 12:48:41 +01:00
Jiang Jiang Jian ad2c1809ce Merge branch 'bugfix/ble_update_lib_20231229_v5.0' into 'release/v5.0'
update lib on release/v5.0

See merge request espressif/esp-idf!28187
2024-01-22 11:15:01 +08:00
linruihao 698c736c06 fix(esp_coex): Fixed potential BLE scan request ifs timer error bug 2024-01-19 19:42:32 +08:00
luoxu 90ee8c4cb8 bugfix(ble_mesh): add duplicate scan config for esp32s3 2024-01-19 16:57:59 +08:00
luoxu e138aae301 feat(ble_mesh): Miscellaneous updates for mesh kconfig, relay related 2024-01-19 16:57:59 +08:00
Harshit Malpani a2ed654c6d feat(cjson): update submodule to v1.7.17
Changelog: https://github.com/DaveGamble/cJSON/releases/tag/v1.7.17
2024-01-19 14:08:06 +05:30
zhiweijian 8aa3f66084 Fixed BLE scan request ifs timer error in coexistence scenarios 2024-01-19 14:53:40 +08:00
Jiang Jiang Jian d6933bd3c7 Merge branch 'bugfix/fix_crash_issue_when_mesh_deinit_v5.0' into 'release/v5.0'
fix(wifi): fix the crash and malloc fail issue (v5.0)

See merge request espressif/esp-idf!28557
2024-01-19 11:10:38 +08:00
Jiang Jiang Jian 463514a3ba Merge branch 'bugfix/fix_mac_bb_pd_iwdt_timeout_v5.0' into 'release/v5.0'
fix(ble): fixed interrupt timeout in MAC_BB_PD callback (v5.0)

See merge request espressif/esp-idf!28466
2024-01-18 19:42:56 +08:00
zhangyanjiao 8e8c240f84 fix(wifi): fix the crash and malloc fail issue
1. fix(wifi/mesh): fix the crash issue when mesh deinit
2. fix(wifi):fix when ap recv auth in sa query porcess will memset psq issue
2024-01-18 11:27:22 +08:00
Jiang Jiang Jian 2398c20ce9 Merge branch 'bugfix/fix_wpa3_connect_fail_issue_v5.0' into 'release/v5.0'
fix(wifi): fix wpa3 connect fail issue

See merge request espressif/esp-idf!28436
2024-01-18 11:19:10 +08:00
Michael (XIAO Xufeng) 5a3a5b47a7 Merge branch 'bugfix/recalib_bbpll_before_tuning_v5.0' into 'release/v5.0'
fix(bbpll): fix bbpll may not lock or not stable bug for stop early (ESP32C2/S3/C6/H2) (v5.0)

See merge request espressif/esp-idf!28286
2024-01-17 21:22:30 +08:00
xiongweichao 6674d0f0e5 fix(bt/bluedroid): Fixed SPP connection failure
The connection failure is caused by the BTU and application layer status being out of sync.
2024-01-17 19:40:38 +08:00
cjin dd7bd8ab34 Revert "change(ble): added ble cca en and thresh option"
This reverts commit f6760db77d.
2024-01-17 18:01:06 +08:00
Sudeep Mohanty a5ad77accf fix(console): Fixed linenoise prompt length calculation
This commit fixes a potential issue where in the prompt length used
for the linenoise based console could be calculated as a negative
integer, leading to a console hang.

Closes https://github.com/espressif/esp-idf/issues/4924
2024-01-17 09:42:41 +01:00
harshal.patil 8176a0341e feat(bootloader_support): Encrypt only the app image instead of the whole partition
Currently, when flash encryption is enabled, the whole partition gets encrypted.
This can be optimised by encrypting only the app image instead of encrypting the whole partition.

Closes https://github.com/espressif/esp-idf/issues/12576
2024-01-17 14:06:49 +05:30
harshal.patil c3facf79da fix(bootloader_support): Fix image_length calculation when secure boot v1 is enabled
Fixed the value of the image_length field of the image metadata populated by esp_image_verfiy()
to include the size of the signature sector when Secure Boot V1 is enabled.
2024-01-17 14:06:48 +05:30
luomanruo 6cc8d4e697 ble(update):
Update c2 lib to e5789394
2024-01-17 15:41:51 +08:00
luomanruo 46bbb6cb48 ble: npl count is zero if nimble host is not used 2024-01-17 15:41:51 +08:00
luomanruo edcb550e85 ble(update):
Update c2 lib to e5789394
2024-01-17 15:41:51 +08:00
Darshan Dobariya c35c5adfb2 fix(nimble): Added support for address resolution during inquiry (v5.0) 2024-01-17 11:30:48 +05:30
nilesh.kale 1cd2bb4b22 fix(esp_hw_support): fix API esp_hmac_disable_jtag() to disable JTAG
After ets_hmac_disable(), invalidating JTAG register process is ineffective.
So, added call to enable hmac begore invalidating JTAG REG.
And similarly disabled it after invalidation.
2024-01-16 14:40:09 +05:30
zhanghaipeng 587a797f7b fix(ble/bluedroid): Fix ble memory leak when gattc config off 2024-01-16 15:44:54 +08:00
schottj 75f1a51f3e fix(app_update): fixed undeclared variable 'ret' in esp_ota_ops.c 2024-01-16 12:10:17 +05:30
Harshit Malpani e713b3cbb5 feat: Add API to verify the bootloader and app image
Added an API to verify the bootloader and app image before revoking the key in Secure Boot V2.
This will help in preventing the device to be bricked if the bootloader/application cannot be
verified by any other keys in efuse
2024-01-16 11:57:06 +05:30
Roland Dobai 02c6d5033f Merge branch 'fix/kconcheck_checks_v5.0' into 'release/v5.0'
fix(kconfcheck): Fixed false-positive indent errors and extended limits (backport v5.0)

See merge request espressif/esp-idf!28469
2024-01-16 00:06:59 +08:00
linruihao 50ef9e3533 fix(ble): fixed interrupt timeout in MAC_BB_PD callback 2024-01-15 16:17:06 +08:00
Jakub Kocka cb6de0af4e fix(kconfcheck): Fixed false-positive indent errors and extended limits 2024-01-15 09:15:58 +01:00
Xiao Xufeng 376be14e1c fix(rtc): fixed bbpll not calibrated from bootloader issue 2024-01-14 02:38:49 +08:00
muhaidong ef3830b4d8 fix(wifi): fix wpa3 connect fail issue 2024-01-12 16:35:13 +08:00
Jiang Jiang Jian 6e4eb1a6cc Merge branch 'bugfix/fix_some_wifi_bugs_240111_v5.0' into 'release/v5.0'
fix(wifi): fix some wifi bugs (Backport v5.0)

See merge request espressif/esp-idf!28410
2024-01-11 22:44:15 +08:00
Jiang Jiang Jian 2b16bd7eac Merge branch 'bugfix/change_default_value_for_ip_ttl_5.0' into 'release/v5.0'
Fix(lwip):bugfix for change default value for ip ttl 5.0

See merge request espressif/esp-idf!28399
2024-01-11 21:20:32 +08:00
muhaidong be1be3c64a fix(wifi): fix some wifi bugs
1. support dump ACK frame for CSI
2. fix psram enabled but initialized fail issue
2024-01-11 17:51:00 +08:00
Jiang Jiang Jian d4693f85d8 Merge branch 'bugfix/fix_http_client_error_v5.0' into 'release/v5.0'
esp_http_client: Fix reset errno to 0 before call esp_transport_read(backport v5.0)

See merge request espressif/esp-idf!28327
2024-01-11 16:52:14 +08:00
alanmaxwell 93d1c3125e feat(wifi): support dump 802.11 ACK frame for CSI 2024-01-11 16:41:55 +08:00
zhanghaipeng 8476ff2fa3 fix(bt/bluedroid): Fix ble adv data check to avoid memory overflow 2024-01-11 16:34:59 +08:00
xueyunfei 8926466b4d Fix(lwip):bugfix for change default value for ip ttl 2024-01-11 14:30:23 +08:00
morris c940cf08c4 feat(rmt): support update bytes encoder configurations at runtime
Closes https://github.com/espressif/esp-idf/issues/12775
2024-01-11 13:47:04 +08:00
Jiang Jiang Jian 50de63e280 Merge branch 'bugfix/coex_ble_scan_rate_v5.0' into 'release/v5.0'
fix(coex): Fix esp32 ble scan not restart when wifi start stop

See merge request espressif/esp-idf!27601
2024-01-11 13:42:06 +08:00
Mahavir Jain 3af1b71f0b Merge branch 'bugfix/fix_dynamic_mbedtls_crash_v5.0' into 'release/v5.0'
mbedtls: Fix enable dynamic mbedtls will occur heap corruption when server support TLS renegotiation(backport v5.0)

See merge request espressif/esp-idf!28324
2024-01-11 12:40:06 +08:00
liuning 11f4f925bd fix(coex): Fix esp32 ble scan not restart when wifi start stop, fix(wifi): Fix no sleep null after data sent 2024-01-11 11:42:12 +08:00
liuning 7a8230ef35 esp_wifi: support connectionless manually pwr mgmt 2024-01-11 11:42:12 +08:00
Jiang Jiang Jian 545b251d91 Merge branch 'ci/temp_disable_jobs_v5.0' into 'release/v5.0'
ci: remove ip101 jobs and twai_std jobs (v5.0)

See merge request espressif/esp-idf!28379
2024-01-11 11:38:21 +08:00
Fu Hanxi 96c9c43c5e ci: remove ip101 jobs and twai_std jobs 2024-01-10 10:33:18 +01:00
Jiang Jiang Jian e313438eb0 Merge branch 'bugfix/dpp_listen_bugs_v5.0' into 'release/v5.0'
fix(wpa_supplicant): Fix few bugs in dpp(v5.0)

See merge request espressif/esp-idf!26794
2024-01-10 11:27:19 +08:00
Roland Dobai 907638ea66 Merge branch 'fix/gdbgui_py311_v5.0' into 'release/v5.0'
Tools: Fix support of gdbgui on Unix with Python 3.11 (v5.0)

See merge request espressif/esp-idf!28315
2024-01-09 23:42:55 +08:00
Marius Vikhammer 01dabff7c3 Merge branch 'bugfix/fix_wrong_dcache_0_size_issue_on_s2_v5.0' into 'release/v5.0'
fix(cache): fix wrong dcache size 0 configuration issue on s2 (v5.0)

See merge request espressif/esp-idf!28291
2024-01-09 14:16:11 +08:00
David Čermák 25b8c3d573 Merge branch 'feature/lan8720_to_new_runner_v5.0' into 'release/v5.0'
ci(esp_eth): moved LAN8720 test to a new runner

See merge request espressif/esp-idf!28258
2024-01-08 23:52:08 +08:00
Rahul Tank 37ccf9b6c5 Merge branch 'bugfix/reattempt_conn_feat_extended_v5.0' into 'release/v5.0'
fix(nimble): Support for reattempt connection in ext connect (v5.0)

See merge request espressif/esp-idf!28307
2024-01-08 20:36:50 +08:00
Island 7158b6fa8c Merge branch 'bugfix/increase_btu_task_stack_size_v5.0' into 'release/v5.0'
fix(bt/bludroid): Increase BTU task stack size(backport v5.0)

See merge request espressif/esp-idf!28321
2024-01-08 19:47:22 +08:00
jgujarathi 6cb42e4304 fix(wpa_supplicant): Add support for a dpp authentication timeout
- Adds support for a 1 second dpp authentication timeout.
2024-01-08 15:57:50 +05:30
jgujarathi d982e66c21 fix(wpa_supplicant): Restructuring DPP init method to ensure cleanup
- Restructuring DPP init function to ensure cleanup of variables in case of
  init failure
2024-01-08 15:57:50 +05:30
jgujarathi 339efe8cae fix(wpa_supplicant): Fix location of clearing up dpp global variables
- Fix location of cleaing up dpp global variables to ensure that there are
  no concurrency issues.
2024-01-08 15:57:50 +05:30
jgujarathi ed4582c9e0 fix(wpa_supplicant): Fix a memory leak in dpp deinit path
- Ensures that the auth information of dpp gets freed when there is
  dpp gets deinited.
2024-01-08 15:57:50 +05:30
jgujarathi 8009cdae1d fix(wpa_supplicant): Move concurrent wps and dpp check to before creating task
- Move the check for checking concurrent wps and dpp check to before creating
  task rather than after.
2024-01-08 15:57:50 +05:30
jgujarathi 290b30e56e fix(wpa_supplicant): Fix a crash in esp_wifi_wps_disable
- Fixes a crash observed in esp_wifi_wps_disable when wps process
  is ongoing, caused due to concurrency issues in cancelling timers.
2024-01-08 15:57:50 +05:30
aditi_lonkar 5fbe36db0f fix(esp_wifi):Fix WDT when esp_supp_dpp_start_listen called multiple times 2024-01-08 15:57:49 +05:30
Tomáš Rohlínek cf3ebb9012 fix(storage/fatfs): check whether sdcard supports triming
Closes https://github.com/espressif/esp-idf/issues/12912
2024-01-08 09:35:24 +01:00
gaoxu 8c2e1a69f5 fix(adc): fix adc continuous get less results beacuse do not reset apb clk(legacy) 2024-01-08 16:12:22 +08:00
Harshit Malpani 5a4fda230a fix(esp_http_client): Add test case in esp_http_client example
Add a test case in esp_http_client example to test HTTP_METHOD_HEAD
with async mode
2024-01-08 15:31:55 +08:00
jim 56e5190f33 esp_http_client: Fix reset errno to 0 before call esp_transport_read
Closes https://github.com/espressif/esp-idf/issues/9020
2024-01-08 15:31:21 +08:00
jim dfe28ce029 mbedtls: Fix enable dynamic mbedtls will occur heap corruption when server support TLS renegotiation 2024-01-08 14:37:41 +08:00
linruihao 82a7b0160a fix(bt/bludroid): Increase BTU task stack size 2024-01-08 11:36:53 +08:00
Roland Dobai abad298532 fix(gdbgui): Fix support of gdbgui on Unix with Python 3.11
Closes https://github.com/espressif/esp-idf/issues/12764
2024-01-05 18:52:37 +01:00
Rahul Tank f1fe837b23 fix(nimble): Support for reattempt connection in ext connect 2024-01-05 16:43:32 +05:30
Mahavir Jain 209a0361c0 Merge branch 'feat/add_ble_support_in_local_ctrl_example_v5.0' into 'release/v5.0'
feat(examples): Fix encoding issue in esp_local_ctrl's proto script (v5.0)

See merge request espressif/esp-idf!28129
2024-01-05 14:19:47 +08:00
Island 97bfd92534 Merge branch 'bugfix/fix_ble_robost_cashing_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fix BLE robost cashing config(backport v5.0)

See merge request espressif/esp-idf!28199
2024-01-05 12:44:59 +08:00
Armando d9f7b7fe4a fix(cache): fix wrong dcache size 0 configuration issue on s2
Closes https://github.com/espressif/esp-idf/issues/12711
2024-01-05 10:40:04 +08:00
chaijie@espressif.com d91c6d0da8 fix(bbpll): fix bbpll calibration may stop early bug(ESP32C2/S3) 2024-01-05 03:36:48 +08:00
Ondrej Kosta 44252caf3f ci(esp_eth): moved LAN8720 test to a new runner 2024-01-04 13:19:36 +01:00
morris 69f1349dd6 Merge branch 'contrib/github_pr_12908_v5.0' into 'release/v5.0'
spi_lcd: add flag to control the DC level in cmd/param/data phase separately (GitHub PR) (v5.0)

See merge request espressif/esp-idf!28242
2024-01-04 10:25:43 +08:00
Roland Dobai d778f085be Merge branch 'ci/pre_commit_sbom_validation_v5.0' into 'release/v5.0'
ci: add sbom validation using pre-commit's post-commit stage (v5.0)

See merge request espressif/esp-idf!28230
2024-01-03 18:37:26 +08:00
morris 471db88884 Merge branch 'refactor/uart_read_bytes_from_ringbuf_v5.0' into 'release/v5.0'
change(uart): improved the internal logic of uart_read_bytes (v5.0)

See merge request espressif/esp-idf!28224
2024-01-03 17:29:15 +08:00
Kit Sczudlo d7602bf30e feat(spi_lcd): control DC level for cmd, param, color phase separately
Closes https://github.com/espressif/esp-idf/issues/10635
Merges https://github.com/espressif/esp-idf/pull/12908
2024-01-03 17:25:17 +08:00
Mahavir Jain 471ca6a6bf Merge branch 'contrib/github_pr_12177_v5.0' into 'release/v5.0'
mbedtls: define MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY for CID padding (GitHub PR) (v5.0)

See merge request espressif/esp-idf!28210
2024-01-03 16:52:10 +08:00
Jiang Jiang Jian dfdbf4aba4 Merge branch 'bugfix/add_header_files_for_wifi_os_adapter_5.0' into 'release/v5.0'
Fix(esp_wifi): Add the missing header file to the wifi header files 5.0

See merge request espressif/esp-idf!28211
2024-01-03 16:41:07 +08:00
xueyunfei e0cdfe3590 Fix(esp_wifi): Add the missing header file to the wifi header files 2024-01-03 10:38:31 +08:00
Frantisek Hrbata 54f5ade84e ci: add sbom validation using pre-commit's post-commit stage
With 09ba070b7e ("fix: allow to use older pre-commit hook version")
and b93cc581a5 ("fix: set default pre-commit hook stages to pre-commit..")
we set the default pre-commit hook stage to commit/pre-commit, which avoids
running the pre-commit plugins/hooks multiple times for different stages.
Unfortunately this also affects "pre-commit run" used in CI and
now it runs only plugins which are by default using the
commit/pre-commit stage. Meaning the sbom validation, which uses
post-commit, is not run at all. This adds an explicit pre-commit command
for validate-sbom-manifest plugin, which needs to be started in
post-commit stage.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-01-02 16:30:34 +01:00
Song Ruo Jing e2ee4d03c3 change(uart): improved the internal logic of uart_read_bytes
Ringbuffer usage becomes more efficient with the use of xRingbufferReceiveUpTo

Closes https://github.com/espressif/esp-idf/issues/12386
2024-01-02 20:19:21 +08:00
Jiang Jiang Jian 600991b43c Merge branch 'bugfix/timer_index_out_of_bound_v5.0' into 'release/v5.0'
Fix timer index out of bound issue (Backport v5.0)

See merge request espressif/esp-idf!27445
2024-01-02 17:44:34 +08:00
Jiang Jiang Jian 15fa0a88d4 Merge branch 'bigfix/BLEQABR23-503_v50' into 'release/v5.0'
fix(ble_mesh): reject node-reseting when provision link is active (V5.0)

See merge request espressif/esp-idf!25847
2024-01-02 15:38:38 +08:00
Wu Meng Shi b278566acc fix(ble_mesh): reject node-reseting when provision link is active (V5.0) 2024-01-02 15:38:37 +08:00
Daniel Mangum 3ef1cf7edb mbedtls: define MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY for CID padding
Updates config to define the new MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY
option, which replaced the previously used
MBEDTLS_SSL_CID_PADDING_GRANULARITY. The old option is continuing to be
used as the new one exceeds the maximum length for an option name in
esp-idf.

See https://github.com/Mbed-TLS/mbedtls/pull/4490 for more information.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-01-02 11:22:38 +05:30
zhanghaipeng d303ef3ba0 fix(bt/bluedroid): Update ble gattc gatts coex example 2024-01-02 13:30:30 +08:00
zhanghaipeng 7a0268ab66 fix(bt/bluedroid): Optimize ble remove all bonded devices function 2024-01-02 13:28:05 +08:00
zhanghaipeng e76135fedf fix(bt/bluedroid): Update ble ibeacon example document 2024-01-02 13:28:05 +08:00
zhanghaipeng e8a7e1f600 fix(bt/bluedroid): Fix BLE robost cashing config 2024-01-02 13:28:05 +08:00
Shyamal Khachane bc866f36df fix(esp_wifi): Fix timer index out of bound issue causing execution of timer function to fail 2024-01-02 11:26:13 +08:00
Jiang Jiang Jian 35556a6a85 Merge branch 'backport/fix_ble_prepare_write_v5.0' into 'release/v5.0'
Backport/fix ble prepare write v5.0

See merge request espressif/esp-idf!27908
2023-12-31 14:25:28 +08:00
Jiang Jiang Jian 1a9fe8e426 Merge branch 'bugfix/fix_ble_app_unregister_no_event_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Fix ble app unregister no event(backport v5.0)

See merge request espressif/esp-idf!28174
2023-12-31 14:23:32 +08:00
Rahul Tank 91e1bf2e01 Merge branch 'bugfix/fix_gatts_stop_race_condition_v5.0' into 'release/v5.0'
fix(nimble): Handled race condition for conn variables being set to NULL (v5.0)

See merge request espressif/esp-idf!28170
2023-12-29 21:03:07 +08:00
Jiang Jiang Jian 8094c0ff4a Merge branch 'bugfix/fix_ble_phy_tx_ifs_v5.0' into 'release/v5.0'
Bugfix/fix ble phy tx ifs v5.0(backport v5.0)

See merge request espressif/esp-idf!28164
2023-12-29 15:29:42 +08:00
zhanghaipeng 558cc16710 fix(bt/bluedroid): Fix ble app unregister no event 2023-12-28 19:13:21 +08:00
Rahul Tank 61a772e5c0 fix(nimble): Handled race condition for conn variables being set to NULL(v5.0) 2023-12-28 15:20:15 +05:30
zhanghaipeng 36c57c023a fix(phy): Fix ble tx ifs time for ESP32 2023-12-28 14:57:45 +08:00
Jiang Jiang Jian 3ce7f472bf Merge branch 'bugfix/fix_ble_recorrect_enable_bug_v5.0' into 'release/v5.0'
fix(ble/controller): Fixed BLE recorrect enable bug and fixed BLE bb isr enable by default (backport v5.0)

See merge request espressif/esp-idf!28109
2023-12-27 20:11:16 +08:00
Jiang Jiang Jian bdfbb2fe73 Merge branch 'bugfix/crash_in_btc_hf_init_v5.0' into 'release/v5.0'
fix(bt/bluedroid): Avoided crash of LoadProhibited during HFP AG deinitialization (v5.0)

See merge request espressif/esp-idf!28118
2023-12-27 19:42:30 +08:00
Jiang Jiang Jian d6a7ff5aa7 Merge branch 'bugfix/fix_establish_two_sco_fail_v5.0' into 'release/v5.0'
fix(bt/controller): Fixed establish two sco connections failed (Backport v5.0)

See merge request espressif/esp-idf!28103
2023-12-27 19:38:48 +08:00
harshal.patil ca584ef4d7 fix(examples): Fix encoding issue in esp_local_ctrl's proto script 2023-12-26 14:06:48 +05:30
Jin Cheng 2a82608282 fix(bt/bluedroid): Disabled Sniff Subrating temporarily as it did not work well 2023-12-26 11:52:13 +08:00
Jin Cheng 75c54798dc fix(bt/bluedroid): Changed the default air mode to invalid value 2023-12-26 11:52:13 +08:00
Jin Cheng 0dc2e89604 fix(bt/bluedroid): Removed redundant operation of SCO clean up 2023-12-26 11:52:13 +08:00
Jin Cheng eb2cdbdc91 fix(bt/bluedroid): Corrected the definitions of HF Client callback events 2023-12-26 11:52:13 +08:00
Jin Cheng cfb6bf4c6b fix(bt/bluedroid): Avoided crash of LoadProhibited during HFP AG deinitialization
Move the release of the control blocks from the start
of deinitialization to the profile disabled event.
2023-12-26 11:52:13 +08:00
Jin Cheng 886a0cfe84 fix(bt/bluedroid): Added dynamic memory allocation for HFP control blocks 2023-12-26 11:52:13 +08:00
zhiweijian d09adbc8fc fix(ble/controller): Fixed BLE recorrect enable bug and fixed BLE bb isr enable by default 2023-12-25 16:16:53 +08:00
linruihao 42bdbcc946 fix(bt/controller): Fixed establish two sco connections failed 2023-12-25 15:48:39 +08:00
Jiang Jiang Jian 86f06e0560 Merge branch 'bugfix/fix_memory_leak_in_c3_s3_controller_v5.0' into 'release/v5.0'
Fixed memory leak in ESP32C3 and ESP32S3 controller (Backport v5.0)

See merge request espressif/esp-idf!27893
2023-12-25 14:28:16 +08:00
Jiang Jiang Jian f41f731c56 Merge branch 'fix/build_error_in_compiler_performance_mode_v5.0' into 'release/v5.0'
fix(bt/bluedroid): fixed build error when compiler in performace mode (backport v5.0)

See merge request espressif/esp-idf!27865
2023-12-25 14:07:18 +08:00
Jiang Jiang Jian 31194d3646 Merge branch 'bugfix/fix_some_ble_bugs_v5.0' into 'release/v5.0'
Fixed some BLE bugs (backport v5.0)

See merge request espressif/esp-idf!27697
2023-12-25 14:06:39 +08:00
Jiang Jiang Jian 2988dbe3a6 Merge branch 'fix/esp_hw_support_remove_unused_include_dirs_v5.0' into 'release/v5.0'
fix(esp_hw_support): Removed nonexistent include directories from cmake (v5.0)

See merge request espressif/esp-idf!27609
2023-12-25 14:06:18 +08:00
Jiang Jiang Jian 437703f121 Merge branch 'fix/ble_mesh_example_relay_enable_v5.0' into 'release/v5.0'
fix(ble_mesh): Enable relay by default for the specific dev role (v5.0)

See merge request espressif/esp-idf!27511
2023-12-25 14:05:38 +08:00
Jiang Jiang Jian 042fe83a61 Merge branch 'bugfix/BLEQABR23-35_v5.0' into 'release/v5.0'
fix(ble_mesh): avoid ble_mesh packet collision by using random adv interval(v5.0)

See merge request espressif/esp-idf!27489
2023-12-25 14:05:25 +08:00
Jiang Jiang Jian b9ee54988f Merge branch 'fix/esp_netif_lock_v5.0' into 'release/v5.0'
fix(esp_netif): Lock netif list with TCPIP context (v5.0)

See merge request espressif/esp-idf!26712
2023-12-25 14:02:57 +08:00
Jiang Jiang Jian bb2f5aed5b Merge branch 'fix/btc_config_lock_error_v5.0' into 'release/v5.0'
fix(bt/bluedroid): fixed btc_config_lock error (backport v5.0)

See merge request espressif/esp-idf!28071
2023-12-25 14:01:09 +08:00
morris 0b38d37bdc Merge branch 'bugfix/boot_flash_build_v5.0' into 'release/v5.0'
bugfix(spi_flash): Fix build error when octal flash is enabled (backport v5.0)

See merge request espressif/esp-idf!28088
2023-12-25 10:30:26 +08:00
zhanghaipeng 73da8018c5 fix(bt/bluedroid): Fix prepare write for BLE example 2023-12-23 20:19:29 +08:00
zhanghaipeng 412ea9d23e fix(bt/bluedroid): Fix BLE prepare write 2023-12-23 20:19:29 +08:00
morris 2e482b8c80 Merge branch 'bugfix/fix_adc_continuous_pytest_error' into 'release/v5.0'
ADC: fix adc continuous pytest error that only get first digit

See merge request espressif/esp-idf!28031
2023-12-22 19:20:00 +08:00
Cao Sen Miao 99ed0a2dcd bugfix(spi_flash): Fix build error when octal flash is enabled,
Closes https://github.com/espressif/esp-idf/issues/12850
2023-12-22 19:10:04 +08:00
morris b823435d78 Merge branch 'fix/usb_host_soc_caps_backport_v5.0' into 'release/v5.0'
USB host soc caps (backport v5.0)

See merge request espressif/esp-idf!27400
2023-12-22 17:15:50 +08:00
Island d7149ac4fc Merge branch 'bugfix/ble_update_lib_20231219_v5.0' into 'release/v5.0'
update lib on release/v5.0

See merge request espressif/esp-idf!27998
2023-12-22 14:57:26 +08:00
gongyantao e38db79729 fix(bt/bluedroid): fixed btc_config_lock error 2023-12-22 11:30:57 +08:00
David Čermák 616b881b91 Merge branch 'bugfix/lwip_dns_docs_v5.0' into 'release/v5.0'
fix(lwip): Document DNS limitation in lwIP (v5.0)

See merge request espressif/esp-idf!27563
2023-12-22 04:43:37 +08:00
Island 561300bfd3 Merge branch 'bugfix/BLEQABR23-811_v5.0' into 'release/v5.0'
bugfix(ble_mesh): Enable CONFIG_BT_NIMBLE_VS_SUPPORT when using the duplicate...(v5.0)

See merge request espressif/esp-idf!27569
2023-12-21 20:22:13 +08:00
gaoxu a87bc7f31c fix(adc): fix adc continuous pytest get result error 2023-12-21 16:58:29 +08:00
Jiang Jiang Jian 8991849b74 Merge branch 'bufix/Backport_some_lwip_bugs_for_5.0_1215' into 'release/v5.0'
Bufix/backport some lwip bugs for 5.0 1215

See merge request espressif/esp-idf!27941
2023-12-21 11:13:12 +08:00
Jiang Jiang Jian c74c15a92f Merge branch 'docs/Separate_low-power_documents_v5.0' into 'release/v5.0'
docs:separate low power documents (backport v5.0)

See merge request espressif/esp-idf!28020
2023-12-21 11:11:51 +08:00
Island 85a2945adb Merge branch 'bugfix/ble_stack_disable_v5.0' into 'release/v5.0'
Bugfix/ble stack disable v5.0(backport v5.0)

See merge request espressif/esp-idf!27649
2023-12-20 21:45:52 +08:00
David Čermák d45d83dfd2 Merge branch 'feature/eth_loopback_v5.0' into 'release/v5.0'
Ethernet driver fixes backport to v5.0

See merge request espressif/esp-idf!26808
2023-12-20 21:15:50 +08:00
Mahavir Jain 4272b44315 Merge branch 'bugfix/fix-clean-up-in-error-condition-in-http-example_v5.0' into 'release/v5.0'
fix(example/http): Fixed potential memory leak/crash in when handling error condition (v5.0)

See merge request espressif/esp-idf!27876
2023-12-20 16:42:25 +08:00
luoxu 9c9af32f7a bugfix(ble_mesh): Supplementary configuration options that should be enabled. 2023-12-20 11:18:55 +08:00
Liu Linyan 9e193a03f1 fix(ble_mesh): Support using random adv interval for mesh packets 2023-12-20 11:18:55 +08:00
luoxu 6e3ab36441 bugfix(ble_mesh): Enable CONFIG_BT_NIMBLE_VS_SUPPORT when using the duplicate scan feature on the NimBLE host. 2023-12-20 11:18:03 +08:00
Krzysztof Budzynski d0a89f848e Apply 2 suggestion(s) to 2 file(s) 2023-12-20 10:57:07 +08:00
wangtao@espressif.com a5db7c63ea docs:Separate low-power documents 2023-12-20 10:56:51 +08:00
morris a20d0b234c Merge branch 'bugfix/u32_reg_tsens_v5.0' into 'release/v5.0'
fix(tempertuer_sensor): Fix regs on temperature sensor is not volatile due to GCC bug(backport v5.0)

See merge request espressif/esp-idf!27949
2023-12-20 10:43:20 +08:00
Roland Dobai 97acb47d2f Merge branch 'feat/manifest_check_v5.0' into 'release/v5.0'
feat: use esp-idf-sbom pre-commit plugin (v5.0)

See merge request espressif/esp-idf!27750
2023-12-20 00:10:38 +08:00
Frantisek Hrbata b20cd8ccfa feat: use esp-idf-sbom pre-commit plugin
Currently sbom manifest is checked only in .gitmodules and
this check is done in pre-commit and also in CI. Meaning it's running
three times(pre-commit before push if user has it enabled, in CI
as there is the pre-commit run again and again with test in CI). Since
esp-idf-sbom contains a full manifest validation support and pre-commit
plugin for it, let's use it. This removes all the current sbom testing
and replaces it with a signle pre-commit plugin which validates all
manifests files(sbom.yml, idf_component.yml, .gitmodules and also
referenced manifests) in repository. Note that this checks all
manifests, not only ones which were modified. The check is reasonably
fast though, so it should not cause any problem. The reason for
validating all manifest files is that we want to make sure that the sbom
information in .gitmodules is updated too and that the hash
recorded in .gitmodules is up-to-date. Meaning submodule update
would not trigger this plugin, because no manifest was changed.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-19 12:55:35 +01:00
Roland Dobai 4c5ba485cc Merge branch 'tools/use_recommended_tool_priority' into 'release/v5.0'
fix (idf_tools): Opt for the recommended tool in tools.json rather than the supported one (v5.0)

See merge request espressif/esp-idf!27794
2023-12-19 19:37:00 +08:00
Roland Dobai ed375f22e0 Merge branch 'contrib/github_pr_12683_v5.0' into 'release/v5.0'
fix(tools): fix path delimiter in gdbinit for Windows (v5.0)

See merge request espressif/esp-idf!27576
2023-12-19 19:35:30 +08:00
Roland Dobai 585c252527 Merge branch 'feature/docker_git_safe_dirs_v5.0' into 'release/v5.0'
feat(docker): allow to add dirs into git's safe.directory (v5.0)

See merge request espressif/esp-idf!27561
2023-12-19 19:34:36 +08:00
morris acf76e323a Merge branch 'bugfix/fix_adc_continuous_do_not_rst_apb_clk_v5.0' into 'release/v5.0'
fix(adc): fix adc continuous get less results beacuse do not reset apb clk (v5.0)

See merge request espressif/esp-idf!27605
2023-12-19 16:53:51 +08:00
morris e73aec3cbc Merge branch 'fix/spi_lcd_example_fix_border_pixel_display_v5.0' into 'release/v5.0'
fix(spi_master): fixed lcd example block border pixel issue (v5.0)

See merge request espressif/esp-idf!27921
2023-12-19 16:51:14 +08:00
morris 6dc42296d7 Merge branch 'contrib/github_pr_12559_v5.0' into 'release/v5.0'
fix(spi): Correct REG_SPI_BASE(i) macro for all targets (GitHub PR) (v5.0)

See merge request espressif/esp-idf!27716
2023-12-19 16:50:14 +08:00
morris e4a487da22 Merge branch 'bugfix/i80_lcd_tx_param_check_enhancement_v5.0' into 'release/v5.0'
fix(i80_lcd): enhance the check of a valid data phase (v5.0)

See merge request espressif/esp-idf!27429
2023-12-19 16:48:45 +08:00
Roland Dobai 792e27d7b1 Merge branch 'feature/add_fatfs_sbom_v5.0' into 'release/v5.0'
feat(storage/fatfs): add sbom file manifest for FatFs (v5.0)

See merge request espressif/esp-idf!27481
2023-12-19 16:47:01 +08:00
Tomas Rohlinek ec8b402046 feat(storage/fatfs): add sbom file manifest for FatFs (v5.0) 2023-12-19 16:47:01 +08:00
cjin f6760db77d change(ble): added ble cca en and thresh option 2023-12-19 14:42:48 +08:00
luomanruo 8b513228e3 ble: support for selecting CSA#2 by menuconfig
ble(fix): fixed event receiving on host side without returning event buffer to pool
2023-12-19 14:32:18 +08:00
luomanruo 9af84f4ff7 ble(update):
Update c2 lib to 7c6c9d53
2023-12-19 12:25:17 +08:00
Island f2221c055a Merge branch 'bugfix/ble_update_lib_20231201_v5.0' into 'release/v5.0'
update lib on release/v5.0

See merge request espressif/esp-idf!27586
2023-12-19 12:06:46 +08:00
Island 7c5cb1054c Merge branch 'backport/fix_ble_menuconfig_v5.0' into 'release/v5.0'
Backport/fix ble menuconfig v5.0(backport v5.0)

See merge request espressif/esp-idf!27496
2023-12-19 11:59:19 +08:00
Martin Vychodil ead2652c33 Merge branch 'fix/fatfsgen_construct_v5.0' into 'release/v5.0'
fix(tools): Fix fatfsgen construct dependency (v5.0)

See merge request espressif/esp-idf!27656
2023-12-18 21:20:23 +08:00
Anton Maklakov 93c25851c1 Merge branch 'feature/update-gdb-to-12.1_20231023_v5.0' into 'release/v5.0'
feat(tools): update gdb version to 12.1_20231023 (v5.0)

See merge request espressif/esp-idf!27378
2023-12-18 18:13:30 +08:00
zhanghaipeng 55603c9a3d fix(bt/bluedroid): Fix ble gattc deregister 2023-12-18 17:55:24 +08:00
zhanghaipeng c06869b2e7 fix(bt/bluedroid): Fix ble adv and scan status when deinit bluedroid 2023-12-18 17:55:24 +08:00
Cao Sen Miao c7b7f1568d fix(tempertuer_sensor): Fix regs on temperature sensor is not volatile due to GCC bug 2023-12-18 14:59:41 +08:00
Jiang Jiang Jian a1339e949c Merge branch 'bugfix/fix_issuse_in_scan_and_mesh_v5.0' into 'release/v5.0'
fix(wifi): fix issues in scan and wifi mesh (backport v5.0)

See merge request espressif/esp-idf!27839
2023-12-18 10:23:09 +08:00
Mahavir Jain 52f8747e8e Merge branch 'fix/cleanup_deleted_menuconfig_option_entries_v5.0' into 'release/v5.0'
fix(mbedtls): Fix menuconfig option entries (v5.0)

See merge request espressif/esp-idf!27465
2023-12-17 16:28:14 +08:00
Rahul Tank df12bdbad2 Merge branch 'bugfix/authcomplete_failure_v5.0' into 'release/v5.0'
fix(nimble): Fixed authcomplete failure caused by a mismatch in the c1 value (v5.0)

See merge request espressif/esp-idf!27634
2023-12-16 19:47:53 +08:00
Darshan Dobariya 4d0c8e8a35 fix(nimble): Fixed authcomplete failure caused by a mismatch in the c1 value (v5.0) 2023-12-16 15:31:45 +05:30
Rahul Tank dce8a538f5 Merge branch 'bugfix/add_peer_null_check_v5.0' into 'release/v5.0'
fix(nimble): Added NULL peer addr check (v5.0)

See merge request espressif/esp-idf!27940
2023-12-16 17:53:03 +08:00
Rahul Tank 83ebd694fa fix(nimble): Added NULL peer addr check 2023-12-16 13:22:59 +05:30
Rahul Tank 6161d7732f Merge branch 'bugfix/fix_duplicate_exception_vsc_v5.0' into 'release/v5.0'
fix(nimble): Fix the parameters in duplicate exception list vsc command(v5.0)

See merge request espressif/esp-idf!27559
2023-12-16 15:47:16 +08:00
Jiang Jiang Jian 871247de22 Merge branch 'test/ctrl_acl_u_pkt_type_v5.0' into 'release/v5.0'
feat(bt/bluedroid): Added an API to specify data types for ACL-U traffic

See merge request espressif/esp-idf!27599
2023-12-15 19:34:55 +08:00
Jiang Jiang Jian 5e319c6760 Merge branch 'bugfix/fix_onebyte_watchpoint_setting_v5.0' into 'release/v5.0'
fix(riscv): supports 1 byte and larger than 64byte range watchpoint setting (v5.0 )

See merge request espressif/esp-idf!27216
2023-12-15 19:29:57 +08:00
Jiang Jiang Jian 2808077645 Merge branch 'fix/twai_tag_not_defined_in_configure_gpio' into 'release/v5.0'
fix(twai): fix build error TWAI_TAG used but not defined (v5.0)

See merge request espressif/esp-idf!27811
2023-12-15 19:29:27 +08:00
Rahul Tank 259006a8c3 fix(nimble): Fix the parameters in duplicate exception list vsc command 2023-12-15 15:56:19 +05:30
Rahul Tank 9b28d121f0 Merge branch 'bugfix/add_legacy_adv_clear_vsc_v5.0' into 'release/v5.0'
fix(nimble): Add support for VSC to clear legacy adv memory (v5.0)

See merge request espressif/esp-idf!27473
2023-12-15 18:02:34 +08:00
Aditya Patwardhan 5a14730f75 fix(mbedtls): Removed redundant menuconfig entry 2023-12-15 09:50:22 +00:00
Mahavir Jain d198439225 Merge branch 'fix/aes_mpi_interrupt_allocation_workflow_v5.0' into 'release/v5.0'
fix(mbedtls): move interrupt allocation during initialization phase (v5.0)

See merge request espressif/esp-idf!27442
2023-12-15 17:49:12 +08:00
Mahavir Jain bd3cd0cc0c Merge branch 'bugfix/preencrypted_ota_failed_with_partial_download_v5.0' into 'release/v5.0'
fix(esp_https_ota): fix preencrypted ota failed with pytest server and partial http enabled (v5.0)

See merge request espressif/esp-idf!27355
2023-12-15 17:47:52 +08:00
Mahavir Jain 60c62958ca Merge branch 'bugfix/wrong_ota_upgrade_size_log_v5.0' into 'release/v5.0'
fix(esp_https_ota): Fix wrong debug print for ota upgrade size (v5.0)

See merge request espressif/esp-idf!27353
2023-12-15 17:47:37 +08:00
Mahavir Jain 0e19d1ff9c Merge branch 'bugfix/fix_http_client_async_mode_v5.0' into 'release/v5.0'
fix(esp_http_client): Fix esp_http_client async mode (v5.0)

See merge request espressif/esp-idf!27515
2023-12-15 17:47:21 +08:00
Mahavir Jain 330fbdda57 Merge branch 'fix/esp32s3_soc_drom_high_addr_v5.0' into 'release/v5.0'
fix(soc): esp32s3/Fix the DROM_HIGH_ADDR (v5.0)

See merge request espressif/esp-idf!27823
2023-12-15 17:46:55 +08:00
Mahavir Jain 0797e1cb96 Merge branch 'contrib/github_pr_12460_v5.0' into 'release/v5.0'
fixing OTA write up to SPI_FLASH_SEC_SIZE margins (GitHub PR) (v5.0)

See merge request espressif/esp-idf!27645
2023-12-15 17:46:14 +08:00
Mahavir Jain 104580865d Merge branch 'fix/wrong_order_of_includes_in_esp_tls_v5.0' into 'release/v5.0'
fix(esp-tls): Fix missing header files in esp_tls_errors.h header file (v5.0)

See merge request espressif/esp-idf!27705
2023-12-15 17:45:26 +08:00
Xue yun fei a60e0adb66 optimize(lwip):when psram is enable the number of ooseq is not limited 2023-12-15 15:29:44 +08:00
xueyunfei ec63da0753 Backport some lwip bugs for 5.0
* Update submodule: git log --oneline 6bf7044c0368d587f70f7083e39e0a619b4d5788..542ba2997f6cc14fe9c3d781bf9b0d890cd70bb1
Detailed description of the changes:
- fix router forwarding flag set (esp-lwip@542ba299)
- optimize add TCP ooseq buf timeout configuration (esp-lwip@4a8286ab)
2023-12-15 15:28:53 +08:00
Rahul Tank d31cb0d0cd fix(nimble): Add support for VSC to clear legacy adv memory
Legacy adv does not have an API for clear adv memory in controller.
 Added VSC for same.
2023-12-14 17:41:19 +05:30
wanlei 4e8de2c105 fix(spi_master): fixed lcd example block border pixel issue 2023-12-14 17:18:00 +08:00
Aditya Patwardhan be58e27f58 Merge branch 'update/version_5_0_5' into 'release/v5.0'
change(version): Update version to 5.0.5

See merge request espressif/esp-idf!27884
2023-12-14 14:23:40 +08:00
linruihao 9a4c4b11d3 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(9129dec) 2023-12-13 20:06:55 +08:00
GuyBrush 40263563fd fix(tools): fix path delimiter in gdbinit for Windows
Merges https://github.com/espressif/esp-idf/pull/12683

Signed-off-by: Alexey Lapshin <alexey.lapshin@espressif.com>
2023-12-13 09:27:44 +00:00
Zim Kalinowski 2e9999d7b1 fix(example/http): Fixed potential memory leak/crash in when handling error condition 2023-12-13 10:10:43 +05:30
gongyantao 264a743a7b fix(bt/bluedroid): fixed build error when compiler in performace mode
Closes https://github.com/espressif/esp-idf/issues/12751
2023-12-12 19:04:36 +08:00
Aleksei Apaseev d17433623d fix(idf_tools): Opt for the recommended tool in tools.json rather than the supported one (v5.0) 2023-12-12 14:19:39 +08:00
zhangyanjiao 82f409107c feat(wifi): add new api to get one scan ap record 2023-12-11 18:09:13 +08:00
zhangyanjiao 192f9025fb fix(wifi): fix issues in scan and wifi mesh
1. fix(wifi): fix the crash issue when clear scan ap list
2. fix the bug that station can't found AP when the authmode is WPA
2. fix wifi mode error when mesh start after station has connected to router
2023-12-11 18:05:55 +08:00
Aditya Patwardhan d9aab654c4 fix(soc): esp32s3/Fix the DROM_DROM_HIGH limit
Previously the DROM_HIGH_ADDR for esp32s3 was 0x3D000000, which
    convers only 16 MB of address range. But esp32s3 supports 32 MB
    external memory. So this address should be 0x3E000000
2023-12-11 12:22:48 +05:30
wanlei 62efb02ecf fix(twai): fix build error TWAI_TAG used but not defined
bug introduced from efef8401
closes https://github.com/espressif/esp-idf/issues/12760
2023-12-11 14:19:37 +08:00
wanlei 64ac8f0874 fix(spi): correct some signals and dummy bits docs 2023-12-06 16:28:51 +08:00
TD-er a27b43a6db fix(spi): Correct REG_SPI_BASE(i) macro for all targets
The existing formula can never match these registers.

Closes https://github.com/espressif/esp-idf/pull/12559
Closes https://github.com/espressif/esp-idf/pull/12562
2023-12-06 16:27:06 +08:00
luomanruo 38f9aa04f8 ble(fix): Fixed crash issue when reset event queue 2023-12-06 14:16:33 +08:00
Harshit Malpani 0728e4cdf4 fix(esp-tls): Add headers in esp_tls_errors.h header file
Closes https://github.com/espressif/esp-idf/issues/12541
2023-12-06 10:20:07 +05:30
chenjianhua 51ba771176 fix(bt): Update bt lib for ESP32(fa43201)
- Fixed assert for instant passed workaround
- Fixed scan evt timeout
- Fixed random address setting when scanning
2023-12-06 10:51:38 +08:00
shangke 2c3b392b0e fix(bt/controller): Fixed some HCI commands parameter 2023-12-06 10:51:31 +08:00
luomanruo 8e48c4756e ble: update ble log on ESP32C2
ble(fix): clear event queue when init event queue
2023-12-05 16:11:15 +08:00
Roland Dobai 53bebcade5 fix(tools): Fix fatfsgen construct exception type and dependency
construct=2.10.70 fixed an issue
(https://github.com/construct/construct/commit/c3866e949216112e8bdbeb23349ee3e958f9f461)
and StringError is raised instead of UnicodeDecodeError.
2023-12-04 17:24:46 +01:00
kohait00 7a4cec1edb fix(app_update): avoid erasing an extra sector than the actual required size
OTA update used to fail if `firmware_size == partition_size`, because the code was trying to
erase one additional sector beyond the space reserved for the firmware partition.

This commit fixes the problem and OTA update can work if the firmware
size exactly matches the allocated partition size.

Closes https://github.com/espressif/esp-idf/pull/12460
2023-12-04 18:48:30 +05:30
zhanghaipeng 1355f58180 feat(bt/bluedroid): Support ble create sync report disable and filter duplicate 2023-12-04 14:38:51 +08:00
gaoxu 38d0be39a8 fix(adc): fix adc continuous get less results beacuse do not reset apb clk 2023-12-04 14:29:57 +08:00
Jakob Hasse 900ee4e7a6 fix(esp_hw_support): Removed unused include directories from cmake
* Closes https://github.com/espressif/esp-idf/issues/12700
2023-12-04 14:12:18 +08:00
Jin Cheng e7a52632f0 feat(bt/bluedroid): Added an API to specify data types for ACL-U traffic 2023-12-04 10:28:05 +08:00
luomanruo 63c78087ed ble(update):
Update c2 lib to 47a787f0
2023-12-01 19:30:43 +08:00
harshal.patil 206af07ad4 fix(mbedtls/aes): fix AES interrupt allocation for AES-GCM operations 2023-12-01 16:49:47 +05:30
harshal.patil b72804340c fix(mbedtls): move interrupt allocation during initialization phase 2023-12-01 16:49:47 +05:30
zhanghaipeng 7129df2ad5 fix(bt/bluedroid): Fix BLE SMP register log level 2023-12-01 17:01:26 +08:00
David Cermak ee02d4d51b fix(lwip): Document DNS limitation in lwIP
* Add a note that DNS server config is global in lwIP
* Add a section about defining LWIP config macros from CMake
* Mention the DNS limitation in ESP-IDF additions to lwIP
* Update CN for lwIP DNS limitation

Co-Authored-By: Wang Ziyan <wangziyan@espressif.com>
2023-12-01 08:47:16 +01:00
Frantisek Hrbata 13e4c1a9e7 feat(docker): allow to add paths into git's safe.directory
With 8959555cee7e[1] ("setup_git_directory(): add an owner check for the top..")
git added an ownership check of the git directory and refuses to
run any git commands, even parsing the config file, if the git directory
is not owned by the current user. The "fatal: detected dubious ownership in repository"
is reported.

This fixes CVE-2022-24765[2], which allows to compromise user account. On a
multi-user system or e.g. on a shared file system, one user may create a "rogue"
git repository with e.g. core.fsmonitor set to an arbitrary command. Other user
may unwillingly execute this command by running e.g. git-diff or
git-status within the "rogue" git repository, which may be in one of the parent
directories. If e.g. PS1 is set to display information about a git
repository in CWD, as suggested in Git in Bash[3], the user do not need to run
any git command to trigger this, just entering some subdirectory under
this "rogue" git repository is enough, because the git command will be
started transparently through the script used in PS1. The core.fsmonitor
can be set to arbitrary command. It's purpose is to help git to identify changed files
and speed up the scanning for changed files.

rogue
├── .git     # owned by user1
└── dir1     # owned by user2
    ├── dir2 # owned by user2
    └── .git # owned by user2

user1 sets core.fsmonitor for git repository in rogue directory
$ git config --add core.fsmonitor "bash -c 'rm -rf \$HOME'"

user2 enters dir1 and runs e.g. git diff and triggers the core.fsmonitor command.

The ownership check may cause problems when running git commands in
ESP-IDF Docker container. For example user may run the container as
root, but the mounted project may be owned by a particular user.

In this case git will refuse to execute any git command within the
"/project" directory, because it's not owned by root. To overcome this,
git allows to set safe.directories, for which the ownership check is
skipped. The security check may be completely disabled by setting
safe.directories to "*". This solution was proposed in PR 12636[4], but
it would allow make it possible to exploit this vulnerability again.

This fix allows user to specify git's safe.directory in IDF_GIT_SAFE_DIR
environmental variable, which may be set during container startup.

The IDF_GIT_SAFE_DIR has same format as PATH and multiple directories can be
specified by using a ":" separator. To entirely disable this git security check
within the container, user may set IDF_GIT_SAFE_DIR='*'. This might be
heplfull in CI.

Closes https://github.com/espressif/esp-idf/pull/12636

[1] - https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9
[2] - https://nvd.nist.gov/vuln/detail/cve-2022-24765
[3] - https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash
[4] - https://github.com/espressif/esp-idf/pull/12636

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-01 08:31:06 +01:00
Harshit Malpani c2f66b5d89 fix(esp_http_client): Fix esp_http_client async mode
Closes https://github.com/espressif/esp-idf/issues/12358
2023-11-30 12:11:43 +05:30
Liu Linyan 4de66ad588 fix(ble_mesh): Enable relay by default for the specific dev role 2023-11-30 12:28:32 +08:00
zhanghaipeng 9ab954096a fix(bt/bluedroid): Fix bluedroid menuconfig 2023-11-30 10:39:06 +08:00
zhanghaipeng 92080994fd docs(bt/bluedroid): Update ble example document 2023-11-30 10:38:43 +08:00
morris f73a701e3c fix(i80_lcd): enhance the check of a valid data phase
in case the user passes a (uint8_t){0x00} parameter with the perameter size
set to zero
2023-11-28 09:57:21 +08:00
David Cermak 41cd40e7f3 fix(esp_netif): Make esp_netif_next_unsafe() public and update usage
Updates usage of esp_netif_next() in examples and tests
* Uses netif_find_if() in IPv6 examples
* Fixes esp_netif_next() usage in L2TAP
2023-11-27 08:22:55 +01:00
David Cermak b3954c198d feat(esp_netif): Added new API to search in netif list 2023-11-27 08:22:55 +01:00
David Cermak 104a1eeb16 fix(esp_netif): Fix races in netif object locking 2023-11-27 08:22:51 +01:00
Roman Leonov e50593662f fix(usb/host): remove bInterval verification during pipe opening for INTR and ISOC EPs 2023-11-24 16:26:08 +01:00
Tomas Rezucha 9cdd6ac5f1 fix(usb/host): Do not abort on string descriptor overflow
Some devices return full LANGID table, even if short LANGID table was requested.
No memory overflow occurs, because we have allocated enough memory for transfers to the
default pipe. So we can ignore the error and continue with string desc fetching.
2023-11-24 16:25:54 +01:00
Darian Leung ce351790a8 refactor(hal/usb_dwc): Add DWC OTG configuration values
This commit adds a subset of the DWC OTG configuration values to the
'usb_dwc_ll.h' file. Only relevant configuration values have been added.

Some DWC OTG releated constants have also been moved from 'usb_dwc_hal.h'
to 'usb_dwc_ll.h' and renamed.
2023-11-24 16:25:02 +01:00
Darian Leung ec2ba71f97 refactor(soc): SOC_USB_PERIPH_NUM option
This commit refactors SOC_USB_PERIPH_NUM as follows:

- Renamed to SOC_USB_OTG_PERIPH_NUM to avoid confusion with USB Serial JTAG
- Updated to unsigned integer "1U"
- Updated some build rules to depend on SOC_USB_OTG_SUPPORTED instead
2023-11-24 16:21:07 +01:00
Alexey Lapshin f7a6ca13e9 feat(tools): update gdb version to 12.1_20231023 2023-11-24 11:17:52 +04:00
Ondrej Kosta 3c8b6d328c feat(esp_eth): added ioctl option to read/write PHY registers
LAN87xx: Added extra delay after setting PHY speed
2023-11-23 15:34:34 +01:00
Ondrej Kosta 4da9358402 fix(esp_eth): various Ethernet driver fixes
ksz8851snl: enabled reception of multicast frames

Internal EMAC: fixed APLL CLK deinitialization

DM9051 and KSZ80xx: fixed speed configuration when not in loopback mode

phy_802_3: added multiple attempts when autodetecting PHY address
2023-11-23 13:14:31 +00:00
Bogdan Kolendovskyy 64ee5098b2 esp_eth: fixed chip drivers to reflect chip specific loopback behaviour
In esp_eth_phy_802_3.h:
Make 802.3 API public.

In esp_eth_phy_802_3.c:
Add loopback check in eth_phy_802_3_set_duplex(). Now ESP_ERR_INVALID_STATE is invoked on attempt to set duplex to half
when loopback is enabled.
Remove static property from esp_eth_phy_802_3_autonego_ctrl and esp_eth_phy_802_3_loopback.

In esp_eth_phy_dm9051.c:
Add dm9051_loopback() because DM9051 requires setting additional bit to enable auto-negotiation loopback for data to be
received. Add dm9051_set_speed() which invokes ESP_ERR_INVALID_STATE on attempt to set speed to 10 Mbps when loopback is
enabled because such speed configuration is unsupported.

In esp_eth_phy_ksz80xx.c:
Add ksz80xx_set_speed() which invokes ESP_ERR_INVALID_STATE on attempt to set speed to 10 Mbps when loopback is enabled
because such speed configuration is unsupported.

In esp_eth_phy_ksz8851snl.c:
Change phy_ksz8851_set_duplex() to invoke ESP_ERR_INVALID_STATE on attempt to set duplex to half when loopback is enabled.

In  esp_eth_phy_dp83848.c, esp_eth_phy_rtl8201.c:
Add autonego_ctrl implementation which prevents enabling autonegotiation when loopback is enabled.
Add loopback implementation which disables autonegotiation prior to enabling loopback.

In esp_eth_phy_lan87xx.c:
Add autonego_ctrl implementation which prevents enabling autonegotiation when loopback is enabled.
Add loopback implementation which disables autonegotiation prior to enabling loopback.
Fix link indicating being down when loopback is enabled by force setting link up.
2023-11-23 13:14:31 +00:00
nilesh.kale 54bf1e708b fix: fix preencrypted ota failed with pytest server and partial http enabled 2023-11-23 12:48:28 +05:30
nilesh.kale 47fe2499ca fix(component-esp_https_ota): Fix wrong debug print for ota upgrade size 2023-11-23 12:28:50 +05:30
wuzhenghui 8c34ab0e67 fix(riscv): supports 1 byte and larger than 64byte range watchpoint setting 2023-11-22 03:12:06 +00:00
wuzhenghui 0a17593a7f change(soc): rename SOC_CPU_WATCHPOINT_SIZE to SOC_CPU_WATCHPOINT_MAX_REGION_SIZE 2023-11-22 03:12:06 +00:00
Alexey Lapshin 686789de89 riscv: remove outdated macros 2023-11-22 03:12:06 +00:00
Alexey Lapshin dacb36b422 riscv: fix trigger add from trap handlers 2023-11-22 03:12:06 +00:00
Alexey Lapshin d3da497c74 riscv: fix & refactor triggers add/delete 2023-11-22 03:12:06 +00:00
1757 changed files with 124075 additions and 301565 deletions
+9 -6
View File
@@ -54,10 +54,6 @@ variables:
BATCH_BUILD: "1"
V: "0"
CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
PYTHON_VER: 3.7.10
CLANG_TIDY_RUNNER_PROJ: 2107 # idf/clang-tidy-runner
IDF_BUILD_APPS_PROJ: 2818 # espressif/idf-build-apps
# Docker images
BOT_DOCKER_IMAGE_TAG: ":latest"
@@ -96,6 +92,9 @@ variables:
# This is used only if CI_PYTHON_TOOL_REPO is not empty.
CI_PYTHON_TOOL_BRANCH: ""
# Set this variable to specify the file name for the known failure cases.
KNOWN_FAILURE_CASES_FILE_NAME: "5.0.txt"
IDF_CI_BUILD: 1
cache:
@@ -129,8 +128,8 @@ cache:
export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/esp_app_trace:$IDF_PATH/components/partition_table:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH"
.setup_tools_and_idf_python_venv: &setup_tools_and_idf_python_venv |
# must use after setup_tools_except_target_test
# otherwise the export.sh won't work properly
# Since the version 3.21 CMake passes source files and include dirs to ninja using absolute paths.
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
# download constraint file for dev
if [[ -n "$CI_PYTHON_CONSTRAINT_BRANCH" ]]; then
@@ -191,6 +190,10 @@ before_script:
.before_script_macos:
before_script:
# macos is running shell executor, which means it would use
# the system installed /usr/local/bin/python3 by default.
# Ensure pyenv and PYENV_VERSION installed
- eval "$(pyenv init -)"
- *common-before_scripts
# On macOS, these tools need to be installed
- export IDF_TOOLS_PATH="${HOME}/.espressif_runner_${CI_RUNNER_ID}_${CI_CONCURRENT_ID}"
+14 -8
View File
@@ -434,14 +434,6 @@ build_examples_cmake_esp32c3:
IDF_TARGET: esp32c3
TEST_DIR: examples
build_examples_cmake_esp32h2:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32h2
variables:
IDF_TARGET: esp32h2
TEST_DIR: examples
build_test_apps_esp32:
extends:
- .build_cmake_template
@@ -494,6 +486,7 @@ build_test_apps_esp32c2:
needs:
- job: fast_template_app
artifacts: false
optional: true
script:
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
- rm -rf test_build_system
@@ -515,6 +508,19 @@ test_build_system_cmake_macos:
- macos_shell
variables:
SHELL_TEST_SCRIPT: test_build_system_cmake.sh
PYENV_VERSION: "3.7"
script:
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
- rm -rf test_build_system
- mkdir test_build_system
- cd test_build_system
# copy-paste the script from .test_build_system_template
# since `ESP_IDF_TEMPLATE_GIT` is a group variable and has higher precedence than job variable
# export here to override the group variable
#
# Clone the template app from github for macos runners
- export ESP_IDF_TEMPLATE_GIT="https://github.com/espressif/esp-idf-template.git"
- ${IDF_PATH}/tools/ci/${SHELL_TEST_SCRIPT}
test_build_system_spaces:
extends: .test_build_system_template
-8
View File
@@ -303,14 +303,6 @@ test_mkuf2:
- cd ${IDF_PATH}/tools/test_mkuf2
- ./test_mkuf2.py
test_sbom:
extends:
- .host_test_template
- .rules:patterns:sbom
script:
- cd ${IDF_PATH}/tools/test_sbom
- pytest
test_autocomplete:
extends:
- .host_test_template
+3
View File
@@ -17,6 +17,7 @@ check_pre_commit_master_release:
- .rules:protected
script:
- git diff-tree --no-commit-id --name-only -r $PIPELINE_COMMIT_SHA | xargs pre-commit run --files
- pre-commit run --hook-stage post-commit validate-sbom-manifest
check_pre_commit_MR:
extends:
@@ -24,6 +25,7 @@ check_pre_commit_MR:
- .rules:mr
script:
- python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py files ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} | xargs pre-commit run --files
- pre-commit run --hook-stage post-commit validate-sbom-manifest
check_version:
# Don't run this for feature/bugfix branches, so that it is possible to modify
@@ -68,6 +70,7 @@ check_blobs:
- IDF_TARGET=esp32s2 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32s3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32c3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32c2 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
# Check if Wi-Fi, PHY, BT blobs contain references to specific symbols
- bash $IDF_PATH/tools/ci/check_blobs.sh
+2 -20
View File
@@ -50,9 +50,6 @@
- "tools/ci/test_build_system*.py"
- "tools/ci/ci_build_apps.py"
.patterns-sbom: &patterns-sbom
- "tools/test_sbom/*"
.patterns-custom_test: &patterns-custom_test
- "tools/ci/python_packages/gitlab_api.py"
- "tools/ci/python_packages/tiny_test_fw/**/*"
@@ -141,6 +138,8 @@
- "tools/split_paths_by_spaces.py"
- "tools/check_python_dependencies.py"
.patterns-windows: &patterns-windows
- "tools/windows/**/*"
@@ -340,23 +339,6 @@
- <<: *if-dev-push
changes: *patterns-python-files
.rules:patterns:static-code-analysis-preview:
rules:
- <<: *if-dev-push
changes: *patterns-c-files
- <<: *if-dev-push
changes: *patterns-python-files
- <<: *if-dev-push
changes: *patterns-sonarqube-files
.rules:patterns:sbom:
rules:
- <<: *if-protected
- <<: *if-dev-push
changes: *patterns-sbom
- <<: *if-dev-push
changes: *patterns-submodule
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# DO NOT place comments or maintain any code from this line
#
+5 -94
View File
@@ -6,20 +6,15 @@ clang_tidy_check:
image: ${CLANG_STATIC_ANALYSIS_IMAGE}
artifacts:
paths:
- $OUTPUT_DIR
- clang_tidy_reports/
when: always
expire_in: 1 day
variables:
CLANG_TIDY_DIRS_TXT: ${CI_PROJECT_DIR}/tools/ci/clang_tidy_dirs.txt
RULES_FILE: ${CI_PROJECT_DIR}/tools/ci/static-analysis-rules.yml
OUTPUT_DIR: ${CI_PROJECT_DIR}/clang_tidy_reports
IDF_TOOLCHAIN: clang
script:
- internal_pip_install $CLANG_TIDY_RUNNER_PROJ pyclang
- export PATH=$PATH:$(python -c "import sys; print(sys.executable.rsplit('/', 1)[0])")
- dirs=$(cat ${CLANG_TIDY_DIRS_TXT} | while read line; do echo ${CI_PROJECT_DIR}/${line}; done | xargs)
- run_cmd idf_clang ${dirs}
--output-path ${OUTPUT_DIR}
--limit-file ${RULES_FILE}
- run_cmd idf_clang_tidy $(cat tools/ci/clang_tidy_dirs.txt | xargs)
--output-path clang_tidy_reports
--limit-file tools/ci/static-analysis-rules.yml
--xtensa-include-dir
--run-clang-tidy-py ${RUN_CLANG_TIDY_PY}
@@ -43,87 +38,3 @@ check_pylint:
export files=$(find . -iname "*.py" -print);
fi
- pylint --rcfile=.pylintrc $files -r n --output-format=parseable > pylint-report.txt || exit 0
# build stage
# Sonarqube related jobs put here for this reason:
# Here we have two jobs. code_quality_check and code_quality_report.
#
# code_quality_check will analyze the code changes between your MR and
# code repo stored in sonarqube server. The analysis result is only shown in
# the comments under this MR and won't be transferred to the server.
#
# code_quality_report will analyze and transfer both of the newly added code
# and the analysis result to the server.
#
# Put in the front to ensure that the newly merged code can be stored in
# sonarqube server ASAP, in order to avoid reporting unrelated code issues
.sonar_scan_template:
stage: build
image:
name: $SONARQUBE_SCANNER_IMAGE
before_script:
- source tools/ci/utils.sh
- export PYTHONPATH="$CI_PROJECT_DIR/tools:$CI_PROJECT_DIR/tools/ci/python_packages:$PYTHONPATH"
- fetch_submodules
# Exclude the submodules, all paths ends with /**
- submodules=$(get_all_submodules)
# get all exclude paths specified in tools/ci/sonar_exclude_list.txt | ignore lines start with # | xargs | replace all <space> to <comma>
- custom_excludes=$(cat $CI_PROJECT_DIR/tools/ci/sonar_exclude_list.txt | grep -v '^#' | xargs | sed -e 's/ /,/g')
# Exclude the report dir as well
- export EXCLUSIONS="$custom_excludes,$submodules"
- export SONAR_SCANNER_OPTS="-Xmx2048m"
variables:
GIT_DEPTH: 0
REPORT_PATTERN: clang_tidy_reports/*.txt
artifacts:
when: always
paths:
- $REPORT_PATTERN
expire_in: 1 week
tags:
- host_test
dependencies: # Here is not a hard dependency relationship, could be skipped when only python files changed. so we do not use "needs" here.
- clang_tidy_check
- check_pylint
code_quality_check:
extends:
- .sonar_scan_template
- .rules:patterns:static-code-analysis-preview
allow_failure: true # since now it's using exit code to indicate the code analysis result,
# we don't want to block ci when critical issues founded
script:
- export CI_MERGE_REQUEST_COMMITS=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py commits ${CI_COMMIT_REF_NAME} | tr '\n' ',')
# test if this branch have merge request, if not, exit 0
- test -n "$CI_MERGE_REQUEST_IID" || exit 0
- test -n "$CI_MERGE_REQUEST_COMMITS" || exit 0
- sonar-scanner
-Dsonar.analysis.mode=preview
-Dsonar.branch.name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
-Dsonar.cxx.clangtidy.reportPath=$REPORT_PATTERN
-Dsonar.exclusions=$EXCLUSIONS
-Dsonar.gitlab.ci_merge_request_iid=$CI_MERGE_REQUEST_IID
-Dsonar.gitlab.commit_sha=$CI_MERGE_REQUEST_COMMITS
-Dsonar.gitlab.merge_request_discussion=true
-Dsonar.gitlab.ref_name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
-Dsonar.host.url=$SONAR_HOST_URL
-Dsonar.login=$SONAR_LOGIN
-Dsonar.python.pylint.reportPath=pylint-report.txt
code_quality_report:
extends:
- .sonar_scan_template
- .rules:protected
allow_failure: true # since now it's using exit code to indicate the code analysis result,
# we don't want to block ci when critical issues founded
script:
- sonar-scanner
-Dsonar.branch.name=$CI_COMMIT_REF_NAME
-Dsonar.cxx.clangtidy.reportPath=$REPORT_PATTERN
-Dsonar.exclusions=$EXCLUSIONS
-Dsonar.gitlab.commit_sha=$PIPELINE_COMMIT_SHA
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
-Dsonar.host.url=$SONAR_HOST_URL
-Dsonar.login=$SONAR_LOGIN
-Dsonar.python.pylint.reportPath=pylint-report.txt
+24 -14
View File
@@ -24,7 +24,7 @@
junit: XUNIT_RESULT.xml
expire_in: 1 week
script:
- retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
- python tools/ci/get_known_failure_cases_file.py
# get runner env config file
- retry_failed git clone $TEST_ENV_CONFIG_REPO
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
@@ -32,7 +32,7 @@
# Runner tags are comma separated, replace the comma with " and " for markers
- job_tags=$(python tools/ci/python_packages/gitlab_api.py get_job_tags $CI_PROJECT_ID --job_id $CI_JOB_ID)
- markers=$(echo $job_tags | sed -e "s/,/ and /g")
- run_cmd pytest $TEST_DIR -m \"${markers}\" --junitxml=XUNIT_RESULT.xml --known-failure-cases-file known_failure_cases/known_failure_cases.txt
- run_cmd pytest $TEST_DIR -m \"${markers}\" --junitxml=XUNIT_RESULT.xml --known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
.pytest_examples_dir_template:
extends: .pytest_template
@@ -181,7 +181,7 @@ example_test_pytest_esp32_ethernet_ip101:
- .rules:test:example_test-esp32
needs:
- build_pytest_examples_esp32
tags: [ esp32, ip101 ]
tags: [ esp32, eth_ip101 ]
example_test_pytest_esp32_flash_encryption:
extends:
@@ -199,6 +199,22 @@ example_test_pytest_esp32_wifi_two_dut:
- build_pytest_examples_esp32
tags: [ esp32, wifi_two_dut ]
example_test_pytest_esp32c3eco7_wifi_two_dut:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32c3-wifi
needs:
- build_pytest_examples_esp32c3
tags: [ esp32c3eco7, wifi_two_dut ]
example_test_pytest_esp32c2eco4_wifi_two_dut:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32c2-wifi
needs:
- build_pytest_examples_esp32c2
tags: [ esp32c2eco4, wifi_two_dut, xtal_26mhz]
example_test_pytest_esp32c3_flash_encryption:
extends:
- .pytest_examples_dir_template
@@ -314,7 +330,7 @@ component_ut_pytest_esp32_ip101:
- .rules:test:component_ut-esp32
needs:
- build_pytest_components_esp32
tags: [ esp32, ip101 ]
tags: [ esp32, eth_ip101 ]
component_ut_pytest_esp32_lan8720:
extends:
@@ -322,7 +338,7 @@ component_ut_pytest_esp32_lan8720:
- .rules:labels-protected:lan8720 # FIXME: IDFCI-1176
needs:
- build_pytest_components_esp32
tags: [ esp32, lan8720 ]
tags: [ esp32, eth_lan8720 ]
component_ut_pytest_esp32_flash_encryption:
extends:
@@ -550,10 +566,10 @@ test_app_test_pytest_esp32s3_mspi_f4r4:
- retry_failed git clone $TEST_ENV_CONFIG_REPO
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
# git clone the known failure cases repo, run test
- retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
- python tools/ci/get_known_failure_cases_file.py
# run test
- cd tools/ci/python_packages/tiny_test_fw/bin
- run_cmd python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE --known_failure_cases_file $CI_PROJECT_DIR/known_failure_cases/known_failure_cases.txt
- run_cmd python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE --known_failure_cases_file $CI_PROJECT_DIR/${KNOWN_FAILURE_CASES_FILE_NAME}
.example_test_template:
extends: .target_test_job_template
@@ -890,12 +906,6 @@ UT_014:
- UT_T2_RS485
- psram
UT_017:
extends: .unit_test_esp32_template
tags:
- ESP32_IDF
- EMMC
UT_018:
extends: .unit_test_esp32_template
parallel: 2
@@ -1018,7 +1028,7 @@ UT_S2_SDSPI:
UT_C2:
extends: .unit_test_esp32c2_template
parallel: 23
parallel: 24
tags:
- ESP32C2_IDF
- UT_T1_1
+3 -2
View File
@@ -49,12 +49,13 @@
[submodule "components/json/cJSON"]
path = components/json/cJSON
url = ../../DaveGamble/cJSON.git
sbom-version = 1.7.16
sbom-version = 1.7.18
sbom-cpe = cpe:2.3:a:cjson_project:cjson:{}:*:*:*:*:*:*:*
sbom-supplier = Person: Dave Gamble
sbom-url = https://github.com/DaveGamble/cJSON
sbom-description = Ultralightweight JSON parser in ANSI C
sbom-hash = cb8693b058ba302f4829ec6d03f609ac6f848546
sbom-hash = acc76239bee01d8e9c858ae2cab296704e52d916
sbom-cve-exclude-list = CVE-2024-31755 Resolved in v1.7.18
[submodule "components/mbedtls/mbedtls"]
path = components/mbedtls/mbedtls
+14 -6
View File
@@ -1,9 +1,11 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.5.0
hooks:
- id: trailing-whitespace
# note: whitespace exclusions use multiline regex, see https://pre-commit.com/#regular-expressions
@@ -35,11 +37,12 @@ repos:
hooks:
- id: flake8
args: ['--config=.flake8', '--tee', '--benchmark']
- repo: https://github.com/pycqa/isort
rev: 5.11.5 # python 3.7 compatible
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: isort
name: isort (python)
- id: reorder-python-imports
name: Reorder Python imports
args: [--py37-plus]
exclude: >
(?x)^(
.*_pb2.py
@@ -144,7 +147,7 @@ repos:
require_serial: true
files: 'tools/test_apps/.+|examples/.+|components/.+'
additional_dependencies:
- idf_build_apps
- idf_build_apps~=1.0
- id: sort-build-test-rules-ymls
name: sort .build-test-rules.yml files
entry: tools/ci/check_build_test_rules.py sort-yaml
@@ -162,3 +165,8 @@ repos:
hooks:
- id: check-copyright
args: ['--ignore', 'tools/ci/check_copyright_ignore.txt', '--config', 'tools/ci/check_copyright_config.yaml']
- repo: https://github.com/espressif/esp-idf-sbom.git
rev: v0.13.0
hooks:
- id: validate-sbom-manifest
stages: [post-commit]
+28 -1
View File
@@ -183,8 +183,35 @@ endif()
list(APPEND link_options "-fno-lto")
if(CONFIG_IDF_TARGET_LINUX AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
# Not all versions of the MacOS linker support the -warn_commons flag.
# ld version 1053.12 (and above) have been tested to support it.
# Hence, we extract the version string from the linker output
# before including the flag.
# Get the ld version, capturing both stdout and stderr
execute_process(
COMMAND ${CMAKE_LINKER} -v
OUTPUT_VARIABLE LD_VERSION_OUTPUT
ERROR_VARIABLE LD_VERSION_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
)
# Combine stdout and stderr
set(LD_VERSION_OUTPUT "${LD_VERSION_OUTPUT}\n${LD_VERSION_ERROR}")
# Extract the version string
string(REGEX MATCH "PROJECT:(ld|dyld)-([0-9]+)\\.([0-9]+)" LD_VERSION_MATCH "${LD_VERSION_OUTPUT}")
set(LD_VERSION_MAJOR_MINOR "${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
message(STATUS "Linker Version: ${LD_VERSION_MAJOR_MINOR}")
# Compare the version with 1053.12
if(LD_VERSION_MAJOR_MINOR VERSION_GREATER_EQUAL "1053.12")
list(APPEND link_options "-Wl,-warn_commons")
endif()
list(APPEND link_options "-Wl,-dead_strip")
list(APPEND link_options "-Wl,-warn_commons")
else()
list(APPEND link_options "-Wl,--gc-sections")
list(APPEND link_options "-Wl,--warn-common")
+4 -3
View File
@@ -15,7 +15,8 @@
#include "esp_app_trace.h"
#include "esp_freertos_hooks.h"
#include "esp_private/dbg_stubs.h"
#include "esp_ipc.h"
#include "esp_private/esp_ipc.h"
#include "esp_attr.h"
#include "hal/wdt_hal.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/libc_stubs.h"
@@ -80,11 +81,11 @@ void gcov_create_task(void *arg)
(void *)&s_gcov_task_running, configMAX_PRIORITIES - 1, NULL, 0);
}
static IRAM_ATTR
void gcov_create_task_tick_hook(void)
{
extern esp_err_t esp_ipc_start_gcov_from_isr(uint32_t cpu_id, esp_ipc_func_t func, void* arg);
if (s_create_gcov_task) {
if (esp_ipc_start_gcov_from_isr(xPortGetCoreID(), &gcov_create_task, NULL) == ESP_OK) {
if (esp_ipc_call_nonblocking(xPortGetCoreID(), &gcov_create_task, NULL) == ESP_OK) {
s_create_gcov_task = false;
}
}
@@ -21,7 +21,7 @@ const static char *TAG = "sysview_heap_trace";
#endif
static SEGGER_SYSVIEW_MODULE s_esp_sysview_heap_module = {
.sModule = "ESP32 SystemView Heap Tracing Module",
.sModule = "M=ESP32 SystemView Heap Tracing Module",
.NumEvents = 2,
};
+65 -52
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -193,13 +193,18 @@ esp_err_t esp_ota_write(esp_ota_handle_t handle, const void *data, size_t size)
return ESP_ERR_INVALID_ARG;
}
if (size == 0) {
ESP_LOGD(TAG, "write data size is 0");
return ESP_OK;
}
// find ota handle in linked list
for (it = LIST_FIRST(&s_ota_ops_entries_head); it != NULL; it = LIST_NEXT(it, entries)) {
if (it->handle == handle) {
if (it->need_erase) {
// must erase the partition before writing to it
uint32_t first_sector = it->wrote_size / SPI_FLASH_SEC_SIZE;
uint32_t last_sector = (it->wrote_size + size) / SPI_FLASH_SEC_SIZE;
uint32_t first_sector = it->wrote_size / SPI_FLASH_SEC_SIZE; // first affected sector
uint32_t last_sector = (it->wrote_size + size - 1) / SPI_FLASH_SEC_SIZE; // last affected sector
ret = ESP_OK;
if ((it->wrote_size % SPI_FLASH_SEC_SIZE) == 0) {
@@ -894,9 +899,27 @@ esp_err_t esp_ota_erase_last_boot_app_partition(void)
return ESP_OK;
}
#if SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS > 1 && CONFIG_SECURE_BOOT_V2_ENABLED
esp_err_t esp_ota_revoke_secure_boot_public_key(esp_ota_secure_boot_public_key_index_t index) {
#if SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
// Validates the image at "app_pos" with the secure boot digests other than "revoked_key_index"
static bool validate_img(esp_ota_secure_boot_public_key_index_t revoked_key_index, esp_partition_pos_t *app_pos)
{
bool verified = false;
for (int i = 0; i < SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS; i++) {
if (i == revoked_key_index) {
continue;
}
if (esp_secure_boot_verify_with_efuse_digest_index(i, app_pos) == ESP_OK) {
verified = true;
ESP_LOGI(TAG, "Application successfully verified with public key digest %d", i);
break;
}
}
return verified;
}
esp_err_t esp_ota_revoke_secure_boot_public_key(esp_ota_secure_boot_public_key_index_t index)
{
if (!esp_secure_boot_enabled()) {
ESP_LOGE(TAG, "Secure boot v2 has not been enabled.");
return ESP_FAIL;
@@ -909,14 +932,21 @@ esp_err_t esp_ota_revoke_secure_boot_public_key(esp_ota_secure_boot_public_key_i
return ESP_ERR_INVALID_ARG;
}
esp_image_sig_public_key_digests_t app_digests = { 0 };
esp_err_t err = esp_secure_boot_get_signature_blocks_for_running_app(true, &app_digests);
if (err != ESP_OK || app_digests.num_digests == 0) {
ESP_LOGE(TAG, "This app is not signed, but check signature on update is enabled in config. It won't be possible to verify any update.");
const esp_partition_t *running_app_part = esp_ota_get_running_partition();
esp_err_t ret = ESP_FAIL;
#ifdef CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
esp_ota_img_states_t running_app_state;
ret = esp_ota_get_state_partition(running_app_part, &running_app_state);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "esp_ota_get_state_partition returned: %s", esp_err_to_name(ret));
return ESP_FAIL;
}
if (running_app_state != ESP_OTA_IMG_VALID) {
ESP_LOGE(TAG, "The current running application is not marked as a valid image. Aborting..");
return ESP_FAIL;
}
#endif
esp_err_t ret;
esp_secure_boot_key_digests_t trusted_keys;
ret = esp_secure_boot_read_key_digests(&trusted_keys);
if (ret != ESP_OK) {
@@ -925,55 +955,38 @@ esp_err_t esp_ota_revoke_secure_boot_public_key(esp_ota_secure_boot_public_key_i
}
if (trusted_keys.key_digests[index] == NULL) {
ESP_LOGI(TAG, "Trusted Key block(%d) already revoked.", index);
ESP_LOGI(TAG, "Given public key digest(%d) is already revoked.", index);
return ESP_OK;
}
esp_image_sig_public_key_digests_t trusted_digests = { 0 };
for (unsigned i = 0; i < SECURE_BOOT_NUM_BLOCKS; i++) {
if (i == index) {
continue; // omitting - to find if there is a valid key after revoking this digest
}
/* Check if the application can be verified with a key other than the one being revoked */
esp_partition_pos_t running_app_pos = {
.offset = running_app_part->address,
.size = running_app_part->size,
};
if (trusted_keys.key_digests[i] != NULL) {
bool all_zeroes = true;
for (unsigned j = 0; j < ESP_SECURE_BOOT_DIGEST_LEN; j++) {
all_zeroes = all_zeroes && (*(uint8_t *)(trusted_keys.key_digests[i] + j) == 0);
}
if (!all_zeroes) {
memcpy(trusted_digests.key_digests[trusted_digests.num_digests++], (uint8_t *)trusted_keys.key_digests[i], ESP_SECURE_BOOT_DIGEST_LEN);
} else {
ESP_LOGD(TAG, "Empty trusted key block (%d).", i);
}
}
}
bool match = false;
for (unsigned i = 0; i < trusted_digests.num_digests; i++) {
if (match == true) {
break;
}
for (unsigned j = 0; j < app_digests.num_digests; j++) {
if (memcmp(trusted_digests.key_digests[i], app_digests.key_digests[j], ESP_SECURE_BOOT_DIGEST_LEN) == 0) {
ESP_LOGI(TAG, "App key block(%d) matches Trusted key block(%d)[%d -> Next active trusted key block].", j, i, i);
esp_err_t err = esp_efuse_set_digest_revoke(index);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to revoke digest (0x%x).", err);
return ESP_FAIL;
}
ESP_LOGI(TAG, "Revoked signature block %d.", index);
match = true;
break;
}
}
}
if (match == false) {
ESP_LOGE(TAG, "Running app doesn't have another valid secure boot key. Cannot revoke current key(%d).", index);
if (!validate_img(index, &running_app_pos)) {
ESP_LOGE(TAG, "Application cannot be verified with any key other than the one being revoked");
return ESP_FAIL;
}
/* Check if bootloder can be verified with any key other than the one being revoked */
esp_partition_pos_t bootloader_pos = {
.offset = ESP_BOOTLOADER_OFFSET,
.size = (ESP_PARTITION_TABLE_OFFSET - ESP_BOOTLOADER_OFFSET),
};
if (!validate_img(index, &bootloader_pos)) {
ESP_LOGE(TAG, "Bootloader cannot be verified with any key other than the one being revoked");
return ESP_FAIL;
}
esp_err_t err = esp_efuse_set_digest_revoke(index);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to revoke digest (0x%x).", err);
return ESP_FAIL;
}
ESP_LOGI(TAG, "Revoked signature block %d.", index);
return ESP_OK;
}
#endif
+5 -5
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -110,7 +110,7 @@ esp_err_t esp_ota_begin(const esp_partition_t* partition, size_t image_size, esp
* @param size Size of data buffer in bytes.
*
* @return
* - ESP_OK: Data was written to flash successfully.
* - ESP_OK: Data was written to flash successfully, or size = 0
* - ESP_ERR_INVALID_ARG: handle is invalid.
* - ESP_ERR_OTA_VALIDATE_FAILED: First byte of image contains invalid app image magic byte.
* - ESP_ERR_FLASH_OP_TIMEOUT or ESP_ERR_FLASH_OP_FAIL: Flash write failed.
@@ -332,10 +332,10 @@ typedef enum {
} esp_ota_secure_boot_public_key_index_t;
/**
* @brief Revokes the old signature digest. To be called in the application after the rollback logic.
* @brief Revokes the signature digest denoted by the given index. This should be called in the application only after the rollback logic otherwise the device may end up in unrecoverable state.
*
* Relevant for Secure boot v2 on ESP32-S2, ESP32-S3, ESP32-C3, ESP32-H2 where upto 3 key digests can be stored (Key \#N-1, Key \#N, Key \#N+1).
* When key \#N-1 used to sign an app is invalidated, an OTA update is to be sent with an app signed with key \#N-1 & Key \#N.
* Relevant for Secure boot v2 on ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-H2 where up to 3 key digests can be stored (Key \#N-1, Key \#N, Key \#N+1).
* When a key used to sign an app is invalidated, an OTA update is to be sent with an app signed with at least one of the other two keys which has not been revoked already.
* After successfully booting the OTA app should call this function to revoke Key \#N-1.
*
* @param index - The index of the signature block to be revoked
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "esp_log.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <freertos/semphr.h>
@@ -113,3 +114,11 @@ TEST_CASE("esp_ota_get_partition_description", "[ota]")
};
TEST_ESP_ERR(ESP_ERR_NOT_FOUND, bootloader_common_get_partition_description(&not_app_pos, &app_desc1));
}
TEST_CASE("esp_ota_get_running_partition points to correct address", "[spi_flash]")
{
const esp_partition_t *factory = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_ANY, "factory");
const esp_partition_t* part = esp_ota_get_running_partition();
ESP_LOGI("running bin", "0x%p", (void*)part->address);
TEST_ASSERT_EQUAL_HEX32(factory->address, part->address);
}
+87 -32
View File
@@ -62,34 +62,66 @@ menu "Bootloader config"
default 4 if BOOTLOADER_LOG_LEVEL_DEBUG
default 5 if BOOTLOADER_LOG_LEVEL_VERBOSE
config BOOTLOADER_SPI_CUSTOM_WP_PIN
bool "Use custom SPI Flash WP Pin when flash pins set in eFuse (read help)"
depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT)
default y if BOOTLOADER_SPI_WP_PIN != 7 # backwards compatibility, can remove in IDF 5
default n
help
This setting is only used if the SPI flash pins have been overridden by setting the eFuses
SPI_PAD_CONFIG_xxx, and the SPI flash mode is QIO or QOUT.
menu "Serial Flash Configurations"
config BOOTLOADER_SPI_CUSTOM_WP_PIN
bool "Use custom SPI Flash WP Pin when flash pins set in eFuse (read help)"
depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT)
default y if BOOTLOADER_SPI_WP_PIN != 7 # backwards compatibility, can remove in IDF 5
default n
help
This setting is only used if the SPI flash pins have been overridden by setting the eFuses
SPI_PAD_CONFIG_xxx, and the SPI flash mode is QIO or QOUT.
When this is the case, the eFuse config only defines 3 of the 4 Quad I/O data pins. The WP pin (aka
ESP32 pin "SD_DATA_3" or SPI flash pin "IO2") is not specified in eFuse. The same pin is also used
for external SPIRAM if it is enabled.
When this is the case, the eFuse config only defines 3 of the 4 Quad I/O data pins. The WP pin (aka
ESP32 pin "SD_DATA_3" or SPI flash pin "IO2") is not specified in eFuse. The same pin is also used
for external SPIRAM if it is enabled.
If this config item is set to N (default), the correct WP pin will be automatically used for any
Espressif chip or module with integrated flash. If a custom setting is needed, set this config item to
Y and specify the GPIO number connected to the WP.
If this config item is set to N (default), the correct WP pin will be automatically used for any
Espressif chip or module with integrated flash. If a custom setting is needed, set this config item to
Y and specify the GPIO number connected to the WP.
config BOOTLOADER_SPI_WP_PIN
int "Custom SPI Flash WP Pin"
range 0 33
default 7
depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT)
#depends on BOOTLOADER_SPI_CUSTOM_WP_PIN # backwards compatibility, can uncomment in IDF 5
help
The option "Use custom SPI Flash WP Pin" must be set or this value is ignored
config BOOTLOADER_SPI_WP_PIN
int "Custom SPI Flash WP Pin"
range 0 33
default 7
depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT)
#depends on BOOTLOADER_SPI_CUSTOM_WP_PIN # backwards compatibility, can uncomment in IDF 5
help
The option "Use custom SPI Flash WP Pin" must be set or this value is ignored
If burning a customized set of SPI flash pins in eFuse and using QIO or QOUT mode for flash, set this
value to the GPIO number of the SPI flash WP pin.
If burning a customized set of SPI flash pins in eFuse and using QIO or QOUT mode for flash, set this
value to the GPIO number of the SPI flash WP pin.
config BOOTLOADER_FLASH_DC_AWARE
bool "Allow app adjust Dummy Cycle bits in SPI Flash for higher frequency (READ HELP FIRST)"
help
This will force 2nd bootloader to be loaded by DOUT mode, and will restore Dummy Cycle setting by
resetting the Flash
config BOOTLOADER_FLASH_XMC_SUPPORT
bool "Enable the support for flash chips of XMC (READ DOCS FIRST)"
default y
help
Perform the startup flow recommended by XMC. Please consult XMC for the details of this flow.
XMC chips will be forbidden to be used, when this option is disabled.
DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.
comment "Features below require specific hardware (READ DOCS FIRST!)"
config BOOTLOADER_FLASH_32BIT_ADDR
bool
default y if ESPTOOLPY_FLASHSIZE_32MB || ESPTOOLPY_FLASHSIZE_64MB || ESPTOOLPY_FLASHSIZE_128MB
default n
help
This is a helper config for 32bits address flash. Invisible for users.
config BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
bool
default y if ESPTOOLPY_OCT_FLASH && BOOTLOADER_FLASH_32BIT_ADDR
default n
endmenu
choice BOOTLOADER_VDDSDIO_BOOST
bool "VDDSDIO LDO voltage"
@@ -401,6 +433,21 @@ menu "Bootloader config"
(The application and bootoloader must be compiled with the same option).
The RTC FAST memory has access only through PRO_CPU.
config BOOTLOADER_CUSTOM_RESERVE_RTC_IN_CRC
bool "Include custom memory in the CRC calculation"
depends on BOOTLOADER_CUSTOM_RESERVE_RTC
default n
help
This option allows the customer to use the legacy bootloader behavior when the
RTC FAST memory CRC calculation takes place. When this option is enabled, the
allocated user custom data will be taken into account in the CRC calculcation.
This means that any change to the custom data would need a CRC update to prevent
the bootloader from marking this data as corrupted.
If this option is disabled, the custom data will not be taken into account when
calculating the RTC FAST memory CRC. The user custom data can be changed freely,
without the need to update the CRC.
THIS OPTION MUST BE THE SAME FOR BOTH THE BOOTLOADER AND THE APPLICATION BUILDS.
config BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE
hex "Size in bytes for custom purposes"
default 0
@@ -411,14 +458,6 @@ menu "Bootloader config"
in this area of memory, you can increase it. It must be a multiple of 4 bytes.
This area (rtc_retain_mem_t) is reserved and has access from the bootloader and an application.
config BOOTLOADER_FLASH_XMC_SUPPORT
bool "Enable the support for flash chips of XMC (READ HELP FIRST)"
default y
help
Perform the startup flow recommended by XMC. Please consult XMC for the details of this flow.
XMC chips will be forbidden to be used, when this option is disabled.
DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.
endmenu # Bootloader
@@ -948,6 +987,22 @@ menu "Security features"
endmenu # Potentially Insecure
config SECURE_FLASH_ENCRYPT_ONLY_IMAGE_LEN_IN_APP_PART
bool "Encrypt only the app image that is present in the partition of type app"
depends on SECURE_FLASH_ENC_ENABLED && !SECURE_FLASH_REQUIRE_ALREADY_ENABLED
default n
help
If set, optimise encryption time for the partition of type APP,
by only encrypting the app image that is present in the partition,
instead of the whole partition.
The image length used for encryption is derived from the image metadata, which
includes the size of the app image, checksum, hash and also the signature sector
when secure boot is enabled.
If not set (default), the whole partition of type APP would be encrypted,
which increases the encryption time but might be useful if there
is any custom data appended to the firmware image.
config SECURE_FLASH_CHECK_ENC_EN_IN_APP
bool "Check Flash Encryption enabled on app startup"
depends on SECURE_FLASH_ENC_ENABLED
+2
View File
@@ -23,3 +23,5 @@ CONFIG_FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_CACHE CONFIG_SECURE_FLASH_
# Secure Boot Scheme
CONFIG_SECURE_BOOT_ENABLED CONFIG_SECURE_BOOT_V1_ENABLED
CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -57,6 +57,13 @@ esp_err_t __attribute__((weak)) bootloader_flash_unlock(void);
*/
esp_err_t bootloader_flash_reset_chip(void);
/**
* @brief Get the spi flash working mode.
*
* @return The mode of flash working mode, see `esp_rom_spiflash_read_mode_t`
*/
esp_rom_spiflash_read_mode_t bootloader_flash_get_spi_mode(void);
#ifdef __cplusplus
}
#endif
@@ -109,7 +109,7 @@ extern const bootloader_qio_info_t __attribute__((weak)) bootloader_flash_qe_sup
*/
esp_err_t __attribute__((weak)) bootloader_flash_unlock(void);
#if CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE
#if CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
/**
* @brief Enable 32bits address flash(larger than 16MB) can map to cache.
*
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -122,6 +122,9 @@ esp_err_t bootloader_flash_erase_range(uint32_t start_addr, uint32_t size)
#include "hal/mmu_hal.h"
#include "hal/mmu_ll.h"
#include "hal/cache_hal.h"
#if CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/opi_flash.h"
#endif
static const char *TAG = "bootloader_flash";
#if CONFIG_IDF_TARGET_ESP32
@@ -412,7 +415,7 @@ esp_err_t bootloader_flash_erase_range(uint32_t start_addr, uint32_t size)
return spi_to_esp_err(rc);
}
#if CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE
#if CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
void bootloader_flash_32bits_address_map_enable(esp_rom_spiflash_read_mode_t flash_mode)
{
esp_rom_opiflash_spi0rd_t cache_rd = {};
@@ -433,9 +436,9 @@ void bootloader_flash_32bits_address_map_enable(esp_rom_spiflash_read_mode_t fla
assert(false);
break;
}
cache_hal_disable(CACHE_LL_LEVEL_EXT_MEM, CACHE_TYPE_ALL);
cache_hal_disable(CACHE_TYPE_ALL);
esp_rom_opiflash_cache_mode_config(flash_mode, &cache_rd);
cache_hal_enable(CACHE_LL_LEVEL_EXT_MEM, CACHE_TYPE_ALL);
cache_hal_enable(CACHE_TYPE_ALL);
}
#endif
@@ -674,7 +677,7 @@ esp_err_t bootloader_flash_wrap_set(spi_flash_wrap_mode_t mode)
******************************************************************************/
#define XMC_SUPPORT CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT
#define XMC_VENDOR_ID 0x20
#define XMC_VENDOR_ID_1 0x20
#if BOOTLOADER_BUILD
#define BOOTLOADER_FLASH_LOG(level, ...) ESP_LOG##level(TAG, ##__VA_ARGS__)
@@ -691,7 +694,7 @@ static IRAM_ATTR bool is_xmc_chip_strict(uint32_t rdid)
uint32_t mfid = BYTESHIFT(rdid, 1);
uint32_t cpid = BYTESHIFT(rdid, 0);
if (vendor_id != XMC_VENDOR_ID) {
if (vendor_id != XMC_VENDOR_ID_1) {
return false;
}
@@ -724,7 +727,7 @@ esp_err_t IRAM_ATTR bootloader_flash_xmc_startup(void)
// Check the Manufacturer ID in SFDP registers (JEDEC standard). If not XMC chip, no need to run the flow
const int sfdp_mfid_addr = 0x10;
uint8_t mf_id = (bootloader_flash_read_sfdp(sfdp_mfid_addr, 1) & 0xff);
if (mf_id != XMC_VENDOR_ID) {
if (mf_id != XMC_VENDOR_ID_1) {
BOOTLOADER_FLASH_LOG(D, "non-XMC chip detected by SFDP Read (%02X), skip.", mf_id);
return ESP_OK;
}
@@ -756,7 +759,7 @@ esp_err_t IRAM_ATTR bootloader_flash_xmc_startup(void)
static IRAM_ATTR bool is_xmc_chip(uint32_t rdid)
{
uint32_t vendor_id = (rdid >> 16) & 0xFF;
return (vendor_id == XMC_VENDOR_ID);
return (vendor_id == XMC_VENDOR_ID_1);
}
esp_err_t IRAM_ATTR bootloader_flash_xmc_startup(void)
@@ -810,3 +813,40 @@ esp_err_t IRAM_ATTR bootloader_flash_reset_chip(void)
return ESP_OK;
}
esp_rom_spiflash_read_mode_t bootloader_flash_get_spi_mode(void)
{
esp_rom_spiflash_read_mode_t spi_mode = ESP_ROM_SPIFLASH_FASTRD_MODE;
#if CONFIG_IDF_TARGET_ESP32
uint32_t spi_ctrl = REG_READ(SPI_CTRL_REG(0));
if (spi_ctrl & SPI_FREAD_QIO) {
spi_mode = ESP_ROM_SPIFLASH_QIO_MODE;
} else if (spi_ctrl & SPI_FREAD_QUAD) {
spi_mode = ESP_ROM_SPIFLASH_QOUT_MODE;
} else if (spi_ctrl & SPI_FREAD_DIO) {
spi_mode = ESP_ROM_SPIFLASH_DIO_MODE;
} else if (spi_ctrl & SPI_FREAD_DUAL) {
spi_mode = ESP_ROM_SPIFLASH_DOUT_MODE;
} else if (spi_ctrl & SPI_FASTRD_MODE) {
spi_mode = ESP_ROM_SPIFLASH_FASTRD_MODE;
} else {
spi_mode = ESP_ROM_SPIFLASH_SLOWRD_MODE;
}
#else
uint32_t spi_ctrl = REG_READ(SPI_MEM_CTRL_REG(0));
if (spi_ctrl & SPI_MEM_FREAD_QIO) {
spi_mode = ESP_ROM_SPIFLASH_QIO_MODE;
} else if (spi_ctrl & SPI_MEM_FREAD_QUAD) {
spi_mode = ESP_ROM_SPIFLASH_QOUT_MODE;
} else if (spi_ctrl & SPI_MEM_FREAD_DIO) {
spi_mode = ESP_ROM_SPIFLASH_DIO_MODE;
} else if (spi_ctrl & SPI_MEM_FREAD_DUAL) {
spi_mode = ESP_ROM_SPIFLASH_DOUT_MODE;
} else if (spi_ctrl & SPI_MEM_FASTRD_MODE) {
spi_mode = ESP_ROM_SPIFLASH_FASTRD_MODE;
} else {
spi_mode = ESP_ROM_SPIFLASH_SLOWRD_MODE;
}
#endif
return spi_mode;
}
@@ -33,6 +33,7 @@ typedef struct {
uint32_t segment_data[ESP_IMAGE_MAX_SEGMENTS]; /* Data offsets for each segment */
uint32_t image_len; /* Length of image on flash, in bytes */
uint8_t image_digest[32]; /* appended SHA-256 digest */
uint32_t secure_version; /* secure version for anti-rollback, it is covered by sha256 (set if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK=y) */
} esp_image_metadata_t;
typedef enum {
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -282,6 +282,23 @@ esp_err_t esp_secure_boot_enable_secure_features(void);
*/
bool esp_secure_boot_cfg_verify_release_mode(void);
#if !defined(BOOTLOADER_BUILD) && SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
/** @brief Returns the verification status of the image pointed by the part_pos argument against the public key digest present at index `efuse_digest_index`
*
* @param index[in] Index of public key digest present in efuse against which the image is to be verified
* @param part_pos[in] It is a pointer to the bootloader/app partition.
*
* @return
* - ESP_OK - if the image can be verified by the key at efuse_index.
* - ESP_FAIL - if the image cannot be verified by the key at efuse_index.
* - ESP_ERR_INVALID_ARG: Error in the passed arguments.
*/
esp_err_t esp_secure_boot_verify_with_efuse_digest_index(int efuse_digest_index, esp_partition_pos_t *part_pos);
#endif // !defined(BOOTLOADER_BUILD) && SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
#ifdef __cplusplus
}
#endif
@@ -122,7 +122,7 @@ int bootloader_common_select_otadata(const esp_ota_select_entry_t *two_otadata,
#if defined( CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP ) || defined( CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC )
static uint32_t rtc_retain_mem_size(void) {
#ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
#if CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC && !CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_IN_CRC
/* A custom memory has been reserved by the user, do not consider this memory into CRC calculation as it may change without
* the have the user updating the CRC. Return the offset of the custom field, which is equivalent to size of the structure
* minus the size of everything after (including) `custom` */
@@ -129,7 +129,7 @@ static esp_err_t bootloader_check_rated_cpu_clock(void)
{
int rated_freq = bootloader_clock_get_rated_freq_mhz();
if (rated_freq < CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ) {
ESP_LOGE(TAG, "Chip CPU frequency rated for %dMHz, configured for %dMHz. Modify CPU frequency in menuconfig",
ESP_LOGE(TAG, "Chip CPU freq rated for %dMHz, configured for %dMHz. Modify CPU freq in menuconfig",
rated_freq, CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ);
return ESP_FAIL;
}
@@ -210,7 +210,7 @@ static esp_err_t bootloader_init_spi_flash(void)
}
#endif
#if CONFIG_SPI_FLASH_HPM_ENABLE
#if CONFIG_BOOTLOADER_FLASH_DC_AWARE
// Reset flash, clear volatile bits DC[0:1]. Make it work under default mode to boot.
bootloader_spi_flash_reset();
#endif
@@ -220,7 +220,7 @@ static esp_err_t bootloader_init_spi_flash(void)
#if CONFIG_ESPTOOLPY_FLASHMODE_QIO || CONFIG_ESPTOOLPY_FLASHMODE_QOUT
bootloader_enable_qio_mode();
#endif
#if CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE
#if CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
bootloader_flash_32bits_address_map_enable(bootloader_flash_get_spi_mode());
#endif
print_flash_info(&bootloader_image_hdr);
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -19,6 +19,8 @@
#include "bootloader_util.h"
#include "bootloader_common.h"
#include "esp_rom_sys.h"
#include "esp_efuse.h"
#include "esp_app_desc.h"
#include "bootloader_memory_utils.h"
#include "soc/soc_caps.h"
#if CONFIG_IDF_TARGET_ESP32
@@ -81,10 +83,10 @@ static bool should_map(uint32_t load_addr);
static esp_err_t process_segments(esp_image_metadata_t *data, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum);
/* Load or verify a segment */
static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segment_header_t *header, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum);
static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segment_header_t *header, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata);
/* split segment and verify if data_len is too long */
static esp_err_t process_segment_data(intptr_t load_addr, uint32_t data_addr, uint32_t data_len, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum);
static esp_err_t process_segment_data(int segment, intptr_t load_addr, uint32_t data_addr, uint32_t data_len, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata);
/* Verify the main image header */
static esp_err_t verify_image_header(uint32_t src_addr, const esp_image_header_t *image, bool silent);
@@ -229,6 +231,21 @@ static esp_err_t image_load(esp_image_load_mode_t mode, const esp_partition_pos_
}
}
}
#if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
/* For anti-rollback case, reconfirm security version of the application to prevent FI attacks */
bool sec_ver = false;
if (do_load) {
sec_ver = esp_efuse_check_secure_version(data->secure_version);
if (!sec_ver) {
err = ESP_FAIL;
goto err;
}
}
/* Ensure that the security version check passes for image loading scenario */
ESP_FAULT_ASSERT(!do_load || sec_ver == true);
#endif // CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
#endif // BOOTLOADER_BUILD
// Success!
@@ -504,8 +521,8 @@ static esp_err_t process_segments(esp_image_metadata_t *data, bool silent, bool
uint32_t next_addr = start_segments;
for (int i = 0; i < data->image.segment_count; i++) {
esp_image_segment_header_t *header = &data->segments[i];
ESP_LOGV(TAG, "loading segment header %d at offset 0x%x", i, next_addr);
CHECK_ERR(process_segment(i, next_addr, header, silent, do_load, sha_handle, checksum));
ESP_LOGV(TAG, "loading segment header %d at offset 0x%"PRIx32, i, next_addr);
CHECK_ERR(process_segment(i, next_addr, header, silent, do_load, sha_handle, checksum, data));
next_addr += sizeof(esp_image_segment_header_t);
data->segment_data[i] = next_addr;
next_addr += header->data_len;
@@ -526,7 +543,7 @@ err:
return err;
}
static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segment_header_t *header, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum)
static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segment_header_t *header, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata)
{
esp_err_t err;
@@ -584,7 +601,7 @@ static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segme
uint32_t offset_page = ((data_addr & MMAP_ALIGNED_MASK) != 0) ? 1 : 0;
/* Data we could map in case we are not aligned to PAGE boundary is one page size lesser. */
data_len = MIN(data_len_remain, ((free_page_count - offset_page) * SPI_FLASH_MMU_PAGE_SIZE));
CHECK_ERR(process_segment_data(load_addr, data_addr, data_len, do_load, sha_handle, checksum));
CHECK_ERR(process_segment_data(index, load_addr, data_addr, data_len, do_load, sha_handle, checksum, metadata));
data_addr += data_len;
data_len_remain -= data_len;
}
@@ -599,7 +616,42 @@ err:
return err;
}
static esp_err_t process_segment_data(intptr_t load_addr, uint32_t data_addr, uint32_t data_len, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum)
#if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
/* The __attribute__((optimize("O0"))) is used to disable optimizations for this function,
* preventing the compiler from potentially optimizing data_buffer and reading data directly from src.
* This is crucial as we want to read from Flash only once, ensuring the integrity of the data.
*/
__attribute__((optimize("O0")))
static size_t process_esp_app_desc_data(const uint32_t *src, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata)
{
/* Using data_buffer here helps to securely read secure_version
* (for anti-rollback) from esp_app_desc_t, preventing FI attack.
* We read data from Flash into this buffer, which is covered by sha256.
* Therefore, if the flash is under attackers control and contents are modified
* the sha256 comparison will fail.
*
* The esp_app_desc_t structure is located in DROM and is always in segment #0.
*
* esp_app_desc_t is always at #0 segment (index==0).
* secure_version field of esp_app_desc_t is located at #2 word (w_i==1).
*/
uint32_t data_buffer[2];
memcpy(data_buffer, src, sizeof(data_buffer));
assert(data_buffer[0] == ESP_APP_DESC_MAGIC_WORD);
metadata->secure_version = data_buffer[1];
if (checksum != NULL) {
*checksum ^= data_buffer[0] ^ data_buffer[1];
}
if (sha_handle != NULL) {
bootloader_sha256_data(sha_handle, data_buffer, sizeof(data_buffer));
}
ESP_FAULT_ASSERT(memcmp(data_buffer, src, sizeof(data_buffer)) == 0);
ESP_FAULT_ASSERT(memcmp(&metadata->secure_version, &src[1], sizeof(uint32_t)) == 0);
return sizeof(data_buffer);
}
#endif // CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
static esp_err_t process_segment_data(int segment, intptr_t load_addr, uint32_t data_addr, uint32_t data_len, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata)
{
// If we are not loading, and the checksum is empty, skip processing this
// segment for data
@@ -632,10 +684,24 @@ static esp_err_t process_segment_data(intptr_t load_addr, uint32_t data_addr, ui
#endif
}
uint32_t *dest = (uint32_t *)load_addr;
#endif
#endif // BOOTLOADER_BUILD
const uint32_t *src = data;
#if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
// Case I: Bootloader verifying application
// Case II: Bootloader verifying bootloader
// Anti-rollback check should handle only Case I from above.
if (segment == 0 && metadata->start_addr != ESP_BOOTLOADER_OFFSET) {
ESP_LOGD(TAG, "additional anti-rollback check 0x%"PRIx32, data_addr);
// The esp_app_desc_t structure is located in DROM and is always in segment #0.
size_t len = process_esp_app_desc_data(src, sha_handle, checksum, metadata);
data_len -= len;
src += len / 4;
// In BOOTLOADER_BUILD, for DROM (segment #0) we do not load it into dest (only map it), do_load = false.
}
#endif // CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
for (size_t i = 0; i < data_len; i += 4) {
int w_i = i / 4; // Word index
uint32_t w = src[w_i];
@@ -910,9 +976,13 @@ static esp_err_t verify_secure_boot_signature(bootloader_sha256_handle_t sha_han
return ESP_ERR_IMAGE_INVALID;
}
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
// Adjust image length result to include the appended signature
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
data->image_len = end - data->start_addr + sizeof(ets_secure_boot_signature_t);
#elif defined(CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME)
if (data->start_addr != ESP_BOOTLOADER_OFFSET) {
data->image_len = end - data->start_addr + sizeof(esp_secure_boot_sig_block_t);
}
#endif
#endif // SECURE_BOOT_CHECK_SIGNATURE
@@ -389,14 +389,21 @@ static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partit
{
esp_err_t err;
bool should_encrypt = (partition->flags & PART_FLAG_ENCRYPTED);
uint32_t size = partition->pos.size;
if (partition->type == PART_TYPE_APP) {
/* check if the partition holds a valid unencrypted app */
esp_image_metadata_t data_ignored;
esp_image_metadata_t image_data = {};
err = esp_image_verify(ESP_IMAGE_VERIFY,
&partition->pos,
&data_ignored);
&image_data);
should_encrypt = (err == ESP_OK);
#ifdef CONFIG_SECURE_FLASH_ENCRYPT_ONLY_IMAGE_LEN_IN_APP_PART
if (should_encrypt) {
// Encrypt only the app image instead of encrypting the whole partition
size = image_data.image_len;
}
#endif
} else if ((partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_OTA)
|| (partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_NVS_KEYS)) {
/* check if we have ota data partition and the partition should be encrypted unconditionally */
@@ -407,9 +414,9 @@ static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partit
return ESP_OK;
} else {
/* should_encrypt */
ESP_LOGI(TAG, "Encrypting partition %d at offset 0x%x (length 0x%x)...", index, partition->pos.offset, partition->pos.size);
ESP_LOGI(TAG, "Encrypting partition %d at offset 0x%x (length 0x%x)...", index, partition->pos.offset, size);
err = esp_flash_encrypt_region(partition->pos.offset, partition->pos.size);
err = esp_flash_encrypt_region(partition->pos.offset, size);
ESP_LOGI(TAG, "Done encrypting");
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to encrypt partition %d", index);
@@ -22,6 +22,7 @@
#include "esp_secure_boot.h"
#include "esp_ota_ops.h"
#include "esp_efuse.h"
#include "esp_efuse_chip.h"
#include "secure_boot_signature_priv.h"
@@ -46,31 +47,32 @@ static esp_err_t validate_signature_block(const ets_secure_boot_sig_block_t *blo
return ESP_OK;
}
esp_err_t esp_secure_boot_get_signature_blocks_for_running_app(bool digest_public_keys, esp_image_sig_public_key_digests_t *public_key_digests)
static esp_err_t calculate_image_public_key_digests(bool verify_image_digest, bool digest_public_keys, esp_image_sig_public_key_digests_t *public_key_digests, esp_partition_pos_t *part_pos)
{
esp_image_metadata_t metadata;
const esp_partition_t* running_app_part = esp_ota_get_running_partition();
if (running_app_part == NULL) {
ESP_LOGE(TAG, "Cannot get running partition");
return ESP_FAIL;
}
const esp_partition_pos_t part_pos = {
.offset = running_app_part->address,
.size = running_app_part->size,
};
esp_err_t err = esp_image_get_metadata(&part_pos, &metadata);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Error reading metadata from running app (err=0x%x)", err);
esp_image_metadata_t img_metadata = {0};
esp_err_t ret = esp_image_get_metadata(part_pos, &img_metadata);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Error reading metadata from running app (err=0x%x)", ret);
return ESP_FAIL;
}
memset(public_key_digests, 0, sizeof(esp_image_sig_public_key_digests_t));
uint8_t image_digest[ESP_SECURE_BOOT_DIGEST_LEN] = {0};
uint8_t __attribute__((aligned(4))) key_digest[ESP_SECURE_BOOT_DIGEST_LEN] = {0};
size_t sig_block_addr = img_metadata.start_addr + ALIGN_UP(img_metadata.image_len, FLASH_SECTOR_SIZE);
// Generating the SHA of the public key components in the signature block
ESP_LOGD(TAG, "calculating public key digests for sig blocks of image offset 0x%"PRIu32" (sig block offset 0x%u)", img_metadata.start_addr, sig_block_addr);
// metadata.image_len doesn't include any padding to start of the signature sector, so pad it here
size_t sig_block_addr = metadata.start_addr + ALIGN_UP(metadata.image_len, FLASH_SECTOR_SIZE);
ESP_LOGD(TAG, "reading signatures for app address 0x%x sig block address 0x%x", part_pos.offset, sig_block_addr);
bzero(public_key_digests, sizeof(esp_image_sig_public_key_digests_t));
if (verify_image_digest) {
ret = bootloader_sha256_flash_contents(img_metadata.start_addr, sig_block_addr - img_metadata.start_addr, image_digest);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "error generating image digest, %d", ret);
return ret;
}
}
ESP_LOGD(TAG, "reading signature(s)");
for (unsigned i = 0; i < SECURE_BOOT_NUM_BLOCKS; i++) {
ets_secure_boot_sig_block_t block;
size_t addr = sig_block_addr + sizeof(ets_secure_boot_sig_block_t) * i;
@@ -84,20 +86,59 @@ esp_err_t esp_secure_boot_get_signature_blocks_for_running_app(bool digest_publi
#elif CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
bootloader_sha256_data(sig_block_sha, &block.ecdsa.key, sizeof(block.ecdsa.key));
#endif
bootloader_sha256_finish(sig_block_sha, public_key_digests->key_digests[i]);
bootloader_sha256_finish(sig_block_sha, key_digest);
if (verify_image_digest) {
// Check we can verify the image using this signature and this key
uint8_t temp_verified_digest[ESP_SECURE_BOOT_DIGEST_LEN];
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME
bool verified = ets_rsa_pss_verify(&block.key, block.signature, image_digest, temp_verified_digest);
#elif CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
bool verified = ets_ecdsa_verify(&block.ecdsa.key.point[0], block.ecdsa.signature, block.ecdsa.key.curve_id, image_digest, temp_verified_digest);
#endif
if (!verified) {
ESP_LOGE(TAG, "Secure boot key (%d) verification failed.", i);
continue;
}
ESP_LOGD(TAG, "Signature block (%d) is verified", i);
}
/* Copy the key digest to the buffer provided by the caller */
memcpy((void *)public_key_digests->key_digests[public_key_digests->num_digests], key_digest, ESP_SECURE_BOOT_DIGEST_LEN);
}
public_key_digests->num_digests++;
}
} else {
ESP_LOGE(TAG, "Secure boot sign blocks cannot be read from a running app (err=0x%x)", err);
ESP_LOGE(TAG, "Secure boot sign blocks cannot be read from image at %lx (err=0x%x)", part_pos->offset, err);
return ESP_FAIL;
}
}
if (public_key_digests->num_digests > 0) {
return ESP_OK;
if (ret == ESP_OK && public_key_digests->num_digests > 0) {
ESP_LOGD(TAG, "Digests successfully calculated, %d valid signatures (image offset 0x%"PRIu32")",
public_key_digests->num_digests, img_metadata.start_addr);
}
ESP_LOGE(TAG, "No signatures were found for the running app");
return ESP_ERR_NOT_FOUND;
if (public_key_digests->num_digests == 0) {
return ESP_ERR_NOT_FOUND;
}
return ret;
}
esp_err_t esp_secure_boot_get_signature_blocks_for_running_app(bool digest_public_keys, esp_image_sig_public_key_digests_t *public_key_digests)
{
esp_partition_pos_t part_pos;
const esp_partition_t* running_app_part = esp_ota_get_running_partition();
if (running_app_part == NULL) {
ESP_LOGE(TAG, "Cannot get running partition");
return ESP_FAIL;
}
part_pos.offset = running_app_part->address;
part_pos.size = running_app_part->size;
esp_err_t err = calculate_image_public_key_digests(false, digest_public_keys, public_key_digests, &part_pos);
if (public_key_digests->num_digests == 0) {
ESP_LOGE(TAG, "No signatures were found for the running app");
}
return err;
}
static esp_err_t get_secure_boot_key_digests(esp_image_sig_public_key_digests_t *public_key_digests)
@@ -236,3 +277,33 @@ esp_err_t esp_secure_boot_verify_rsa_signature_block(const ets_secure_boot_signa
#endif
#endif // CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME || CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
#if SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
esp_err_t esp_secure_boot_verify_with_efuse_digest_index(int efuse_digest_index, esp_partition_pos_t *part_pos)
{
if (!part_pos || (efuse_digest_index < 0 || efuse_digest_index >= SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS)) {
return ESP_ERR_INVALID_ARG;
}
esp_image_sig_public_key_digests_t img_key_digests = {0};
esp_err_t ret = calculate_image_public_key_digests(true, true, &img_key_digests, part_pos);
if (ret != ESP_OK) {
return ESP_FAIL;
}
if (esp_efuse_get_digest_revoke(efuse_digest_index)) {
return ESP_FAIL;
}
// Read key digests from efuse
esp_secure_boot_key_digests_t efuse_key_digests;
memset(&efuse_key_digests, 0, sizeof(esp_secure_boot_key_digests_t));
esp_secure_boot_read_key_digests(&efuse_key_digests);
for (int i = 0; i < img_key_digests.num_digests; i++) {
if (!memcmp(img_key_digests.key_digests[i], efuse_key_digests.key_digests[efuse_digest_index], ESP_SECURE_BOOT_KEY_DIGEST_LEN)) {
return ESP_OK;
}
}
return ESP_FAIL;
}
#endif // SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
+82 -33
View File
@@ -2,30 +2,39 @@ if(CONFIG_BT_ENABLED)
set(srcs "")
set(include_dirs "")
set(ldfragments "linker.lf")
set(ldscripts "linker_common.lf")
if(CONFIG_IDF_TARGET_ESP32)
list(APPEND srcs "controller/esp32/bt.c"
"controller/esp32/hli_api.c"
"controller/esp32/hli_vectors.S")
list(APPEND include_dirs include/esp32/include)
list(APPEND ldscripts "linker_rw_bt_controller.lf")
elseif(CONFIG_IDF_TARGET_ESP32C3)
list(APPEND srcs "controller/esp32c3/bt.c")
list(APPEND include_dirs include/esp32c3/include)
list(APPEND ldscripts "linker_rw_bt_controller.lf")
elseif(CONFIG_IDF_TARGET_ESP32S3)
list(APPEND srcs "controller/esp32c3/bt.c")
list(APPEND include_dirs include/esp32c3/include)
list(APPEND ldscripts "linker_rw_bt_controller.lf")
elseif(CONFIG_IDF_TARGET_ESP32H2)
list(APPEND srcs "controller/esp32h2/bt.c")
list(APPEND include_dirs include/esp32h2/include)
list(APPEND ldscripts "linker_esp_ble_controller.lf")
elseif(CONFIG_IDF_TARGET_ESP32C2)
set(ldfragments "linker.lf.esp32c2")
list(APPEND srcs "controller/esp32c2/bt.c")
list(APPEND srcs "controller/esp32c2/bt.c"
"controller/esp32c2/ble.c")
list(APPEND include_dirs include/esp32c2/include)
set(ldscripts "linker_esp32c2.lf")
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
list(APPEND srcs "controller/esp32c2/dummy.c")
endif()
endif()
@@ -41,11 +50,14 @@ if(CONFIG_BT_ENABLED)
common/api/include/api
common/btc/profile/esp/blufi/include
common/btc/profile/esp/include
common/hci_log/include
common/ble_log/include
)
list(APPEND srcs "common/btc/core/btc_alarm.c"
"common/api/esp_blufi_api.c"
"common/hci_log/bt_hci_log.c"
"common/btc/core/btc_manage.c"
"common/btc/core/btc_task.c"
"common/btc/profile/esp/blufi/blufi_prf.c"
@@ -66,6 +78,7 @@ if(CONFIG_BT_ENABLED)
"common/osi/osi.c"
"common/osi/semaphore.c"
"porting/mem/bt_osi_mem.c"
"common/ble_log/ble_log_spi_out.c"
)
# Host Bluedroid
@@ -476,19 +489,27 @@ if(CONFIG_BT_ENABLED)
if(CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT)
list(APPEND srcs
"porting/npl/freertos/src/npl_os_freertos.c"
"porting/nimble/src/os_msys_init.c"
"porting/mem/os_msys_init.c"
"porting/transport/src/hci_transport.c"
)
list(APPEND include_dirs
porting/include
porting/nimble/include
porting/npl/freertos/include
porting/transport/include
)
if(CONFIG_BT_LE_HCI_INTERFACE_USE_UART)
if(CONFIG_BT_LE_HCI_INTERFACE_USE_RAM)
list(APPEND srcs
"porting/transport/uart/hci_uart.c"
"porting/transport/driver/vhci/hci_driver_standard.c"
)
elseif(CONFIG_BT_LE_HCI_INTERFACE_USE_UART)
list(APPEND srcs
"porting/transport/driver/common/hci_driver_util.c"
"porting/transport/driver/common/hci_driver_h4.c"
"porting/transport/driver/common/hci_driver_mem.c"
"porting/transport/driver/uart/hci_driver_uart_config.c"
"porting/transport/driver/uart/hci_driver_uart.c"
)
endif()
endif()
@@ -496,23 +517,25 @@ if(CONFIG_BT_ENABLED)
if(NOT (CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS OR CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS))
list(APPEND include_dirs
porting/ext/tinycrypt/include
common/tinycrypt/include
common/tinycrypt/port
)
list(APPEND srcs "porting/ext/tinycrypt/src/utils.c"
"porting/ext/tinycrypt/src/sha256.c"
"porting/ext/tinycrypt/src/ecc.c"
"porting/ext/tinycrypt/src/ctr_prng.c"
"porting/ext/tinycrypt/src/ctr_mode.c"
"porting/ext/tinycrypt/src/aes_decrypt.c"
"porting/ext/tinycrypt/src/aes_encrypt.c"
"porting/ext/tinycrypt/src/ccm_mode.c"
"porting/ext/tinycrypt/src/ecc_dsa.c"
"porting/ext/tinycrypt/src/cmac_mode.c"
"porting/ext/tinycrypt/src/ecc_dh.c"
"porting/ext/tinycrypt/src/hmac_prng.c"
"porting/ext/tinycrypt/src/ecc_platform_specific.c"
"porting/ext/tinycrypt/src/hmac.c"
"porting/ext/tinycrypt/src/cbc_mode.c")
list(APPEND srcs "common/tinycrypt/src/utils.c"
"common/tinycrypt/src/sha256.c"
"common/tinycrypt/src/ecc.c"
"common/tinycrypt/src/ctr_prng.c"
"common/tinycrypt/src/ctr_mode.c"
"common/tinycrypt/src/aes_decrypt.c"
"common/tinycrypt/src/aes_encrypt.c"
"common/tinycrypt/src/ccm_mode.c"
"common/tinycrypt/src/ecc_dsa.c"
"common/tinycrypt/src/cmac_mode.c"
"common/tinycrypt/src/ecc_dh.c"
"common/tinycrypt/src/hmac_prng.c"
"common/tinycrypt/src/ecc_platform_specific.c"
"common/tinycrypt/src/hmac.c"
"common/tinycrypt/src/cbc_mode.c"
"common/tinycrypt/port/esp_tinycrypt_port.c")
endif()
if(CONFIG_BT_NIMBLE_ENABLED)
@@ -520,6 +543,7 @@ if(CONFIG_BT_ENABLED)
list(APPEND include_dirs
host/nimble/nimble/nimble/host/include
host/nimble/nimble/nimble/include
host/nimble/nimble/nimble/host/services/ans/include
host/nimble/nimble/nimble/host/services/bas/include
host/nimble/nimble/nimble/host/services/dis/include
@@ -530,6 +554,8 @@ if(CONFIG_BT_ENABLED)
host/nimble/nimble/nimble/host/services/ipss/include
host/nimble/nimble/nimble/host/services/lls/include
host/nimble/nimble/nimble/host/services/tps/include
host/nimble/nimble/nimble/host/services/hid/include
host/nimble/nimble/nimble/host/services/sps/include
host/nimble/nimble/nimble/host/util/include
host/nimble/nimble/nimble/host/store/ram/include
host/nimble/nimble/nimble/host/store/config/include
@@ -546,6 +572,8 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/nimble/host/services/bas/src/ble_svc_bas.c"
"host/nimble/nimble/nimble/host/services/dis/src/ble_svc_dis.c"
"host/nimble/nimble/nimble/host/services/lls/src/ble_svc_lls.c"
"host/nimble/nimble/nimble/host/services/hid/src/ble_svc_hid.c"
"host/nimble/nimble/nimble/host/services/sps/src/ble_svc_sps.c"
"host/nimble/nimble/nimble/host/src/ble_hs_conn.c"
"host/nimble/nimble/nimble/host/src/ble_store_util.c"
"host/nimble/nimble/nimble/host/src/ble_sm.c"
@@ -564,6 +592,8 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/nimble/host/src/ble_hs_mqueue.c"
"host/nimble/nimble/nimble/host/src/ble_hs_periodic_sync.c"
"host/nimble/nimble/nimble/host/src/ble_att.c"
"host/nimble/nimble/nimble/host/src/ble_ead.c"
"host/nimble/nimble/nimble/host/src/ble_aes_ccm.c"
"host/nimble/nimble/nimble/host/src/ble_gattc.c"
"host/nimble/nimble/nimble/host/src/ble_store.c"
"host/nimble/nimble/nimble/host/src/ble_sm_lgcy.c"
@@ -593,14 +623,17 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/nimble/host/store/ram/src/ble_store_ram.c"
"host/nimble/nimble/nimble/host/store/config/src/ble_store_config.c"
"host/nimble/nimble/nimble/host/store/config/src/ble_store_nvs.c"
"host/nimble/nimble/nimble/host/src/ble_gattc_cache.c"
"host/nimble/nimble/nimble/host/src/ble_gattc_cache_conn.c"
"host/nimble/nimble/nimble/host/src/ble_eatt.c"
)
list(APPEND srcs
"host/nimble/nimble/porting/nimble/src/nimble_port.c"
"host/nimble/nimble/porting/npl/freertos/src/nimble_port_freertos.c"
"host/nimble/port/src/nvs_port.c"
)
list(APPEND include_dirs
porting/include
host/nimble/nimble/porting/nimble/include
host/nimble/port/include
)
@@ -615,9 +648,8 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/porting/npl/freertos/src/npl_os_freertos.c"
)
list(APPEND include_dirs
porting/include
host/nimble/nimble/porting/npl/freertos/include
host/nimble/nimble/porting/nimble/include
host/nimble/nimble/nimble/include
)
endif()
@@ -686,7 +718,7 @@ idf_component_register(SRCS "${srcs}"
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
REQUIRES esp_timer esp_wifi
PRIV_REQUIRES nvs_flash soc esp_pm esp_phy mbedtls driver vfs
LDFRAGMENTS "${ldfragments}")
LDFRAGMENTS "${ldscripts}")
if(CONFIG_BT_ENABLED)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-implicit-fallthrough -Wno-unused-const-variable)
@@ -698,20 +730,37 @@ if(CONFIG_BT_ENABLED)
elseif(CONFIG_IDF_TARGET_ESP32C3)
target_link_libraries(${COMPONENT_LIB} INTERFACE
"-L${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32c3")
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app_flash)
else()
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
endif()
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
elseif(CONFIG_IDF_TARGET_ESP32S3)
target_link_libraries(${COMPONENT_LIB} INTERFACE
"-L${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32s3")
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
elseif(CONFIG_IDF_TARGET_ESP32H2)
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app_flash)
else()
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
endif()
elseif(CONFIG_IDF_TARGET_ESP32H2 AND CONFIG_BT_CONTROLLER_ENABLED)
if(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_1)
add_prebuilt_library(nimblelib "controller/lib_esp32h2/esp32h2-bt-lib/beta1/libble_app.a")
add_prebuilt_library(nimblelib "controller/lib_esp32h2/esp32h2-bt-lib/beta1/libble_app.a"
REQUIRES esp_phy)
elseif(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2)
add_prebuilt_library(nimblelib "controller/lib_esp32h2/esp32h2-bt-lib/beta2/libble_app.a")
add_prebuilt_library(nimblelib "controller/lib_esp32h2/esp32h2-bt-lib/beta2/libble_app.a"
REQUIRES esp_phy)
endif()
target_link_libraries(${COMPONENT_LIB} PRIVATE nimblelib)
elseif(CONFIG_IDF_TARGET_ESP32C2)
add_prebuilt_library(nimblelib "controller/lib_esp32c2/esp32c2-bt-lib/libble_app.a")
elseif(CONFIG_IDF_TARGET_ESP32C2 AND CONFIG_BT_CONTROLLER_ENABLED)
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
add_prebuilt_library(nimblelib "controller/lib_esp32c2/esp32c2-bt-lib/libble_app_flash.a"
REQUIRES esp_phy)
else()
add_prebuilt_library(nimblelib "controller/lib_esp32c2/esp32c2-bt-lib/libble_app.a"
REQUIRES esp_phy)
endif()
target_link_libraries(${COMPONENT_LIB} PRIVATE nimblelib)
endif()
+31
View File
@@ -79,6 +79,37 @@ menu "Bluetooth"
We cannot split the memory into 3 different regions (IRAM, BLE-IRAM, DRAM).
So this option will disable the PMP (ESP_SYSTEM_PMP_IDRAM_SPLIT)
config BT_HCI_LOG_DEBUG_EN
depends on BT_BLUEDROID_ENABLED || BT_NIMBLE_ENABLED
bool "Enable Bluetooth HCI debug mode"
default n
help
This option is used to enable bluetooth debug mode, which saves the hci layer data stream.
config BT_HCI_LOG_DATA_BUFFER_SIZE
depends on BT_HCI_LOG_DEBUG_EN
int "Size of the cache used for HCI data in Bluetooth HCI debug mode (N*1024 bytes)"
range 1 100
default 5
help
This option is to configure the buffer size of the hci data steam cache in hci debug mode.
This is a ring buffer, the new data will overwrite the oldest data if the buffer is full.
config BT_HCI_LOG_ADV_BUFFER_SIZE
depends on BT_HCI_LOG_DEBUG_EN
int "Size of the cache used for adv report in Bluetooth HCI debug mode (N*1024 bytes)"
range 1 100
default 8
help
This option is to configure the buffer size of the hci adv report cache in hci debug mode.
This is a ring buffer, the new data will overwrite the oldest data if the buffer is full.
menu "Common Options"
visible if (BT_BLUEDROID_ENABLED || BT_NIMBLE_ENABLED)
source "$IDF_PATH/components/bt/common/Kconfig.in"
endmenu
endmenu
menuconfig BLE_MESH
+109
View File
@@ -0,0 +1,109 @@
config BT_ALARM_MAX_NUM
int "Maximum number of Bluetooth alarms"
default 50
help
This option decides the maximum number of alarms which
could be used by Bluetooth host.
config BT_BLE_LOG_SPI_OUT_ENABLED
bool "Output ble logs to SPI bus (Experimental)"
default n
help
Output ble logs to SPI bus
config BT_BLE_LOG_SPI_OUT_UL_TASK_BUF_SIZE
int "SPI transaction buffer size for upper layer task logs"
depends on BT_BLE_LOG_SPI_OUT_ENABLED
default 512
help
SPI transaction buffer size for upper layer task logs.
There will be 2 SPI DMA buffers with the same size.
config BT_BLE_LOG_SPI_OUT_HCI_ENABLED
bool "Enable HCI log output to SPI"
depends on BT_BLE_LOG_SPI_OUT_ENABLED
default n
help
Enable logging of HCI packets to the SPI bus when BLE SPI log output is enabled.
config BT_BLE_LOG_SPI_OUT_HOST_ENABLED
bool "Enable Host log output to SPI"
depends on BT_BLE_LOG_SPI_OUT_ENABLED
default n
help
This configuration applies to the logs of both Bluedroid Host and NimBLE Host.
When BLE SPI log output is enabled, this option allows host logs to be transmitted via SPI.
config BT_BLE_LOG_SPI_OUT_LL_ENABLED
bool "Enable Controller log output to SPI"
depends on BT_BLE_LOG_SPI_OUT_ENABLED
depends on BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
default n
help
Enable controller log output to SPI bus.
config BT_BLE_LOG_SPI_OUT_LL_TASK_BUF_SIZE
int "SPI transaction buffer size for lower layer task logs"
depends on BT_BLE_LOG_SPI_OUT_LL_ENABLED
default 1024
help
SPI transaction buffer size for upper layer task logs.
There will be 2 SPI DMA buffers with the same size.
config BT_BLE_LOG_SPI_OUT_LL_ISR_BUF_SIZE
int "SPI transaction buffer size for lower layer ISR logs"
depends on BT_BLE_LOG_SPI_OUT_LL_ENABLED
default 512
help
SPI transaction buffer size for upper layer ISR logs.
There will be 2 SPI DMA buffers with the same size.
config BT_BLE_LOG_SPI_OUT_MOSI_IO_NUM
int "GPIO number of SPI MOSI"
depends on BT_BLE_LOG_SPI_OUT_ENABLED
default 0
help
GPIO number of SPI MOSI
config BT_BLE_LOG_SPI_OUT_SCLK_IO_NUM
int "GPIO number of SPI SCLK"
depends on BT_BLE_LOG_SPI_OUT_ENABLED
default 1
help
GPIO number of SPI SCLK
config BT_BLE_LOG_SPI_OUT_CS_IO_NUM
int "GPIO number of SPI CS"
depends on BT_BLE_LOG_SPI_OUT_ENABLED
default 2
help
GPIO number of SPI CS
config BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
bool "Enable ble log & logic analyzer log time sync"
depends on BT_BLE_LOG_SPI_OUT_ENABLED
default y
help
Enable ble log & logic analyzer log time sync
config BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM
int "GPIO number of SYNC IO"
depends on BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
default 3
help
GPIO number of SYNC IO
config BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
bool "Enable periodic buffer flush out"
depends on BT_BLE_LOG_SPI_OUT_ENABLED
default n
help
Enable periodic buffer flush out
Not recommended when SPI receiver is unavailable
config BT_BLE_LOG_SPI_OUT_FLUSH_TIMEOUT
int "Buffer flush out period in unit of ms"
depends on BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
default 1000
help
Buffer flush out period in unit of ms
@@ -0,0 +1,983 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "ble_log/ble_log_spi_out.h"
#if CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
// Private defines
#define BLE_LOG_TAG "BLE_LOG"
#define SPI_OUT_BUS SPI2_HOST
#define SPI_OUT_MAX_TRANSFER_SIZE 10240
#define SPI_OUT_FRAME_HEAD_LEN 4
#define SPI_OUT_FRAME_TAIL_LEN 4
#define SPI_OUT_FRAME_OVERHEAD (SPI_OUT_FRAME_HEAD_LEN + SPI_OUT_FRAME_TAIL_LEN)
#define SPI_OUT_RECYCLE_TIMEOUT_MS 10
#define SPI_OUT_TRANS_CB_FLAG_AVAILABLE 0
#define SPI_OUT_TRANS_CB_FLAG_NEED_QUEUE 1
#define SPI_OUT_TRANS_CB_FLAG_IN_QUEUE 2
#define SPI_OUT_FLUSHOUT_TIMEOUT (CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMEOUT * 1000)
#define SPI_OUT_PACKET_LOSS_UL 0
#define SPI_OUT_PACKET_LOSS_LL_TASK 1
#define SPI_OUT_PACKET_LOSS_LL_ISR 2
#define SPI_OUT_PACKET_LOSS_FRAME_SIZE 6
#define SPI_OUT_INTERFACE_FLAG_IN_ISR (1 << 3)
#define SPI_OUT_TRANS_ITVL_MIN_US 30
#define SPI_OUT_SPI_MASTER_QUEUE_SIZE 6
#if CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
#define SPI_OUT_TS_SYNC_TIMEOUT (1000 * 1000)
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
// Private typedefs
typedef struct {
// CRITICAL: 0 for available, 1 for need queue (ISR), 2 for in queue
// This flag is for multithreading, must be a word, do not modify
volatile uint32_t flag;
uint16_t buf_size;
uint16_t length;
spi_transaction_t trans;
} spi_out_trans_cb_t;
typedef struct {
spi_out_trans_cb_t *trans_cb[2];
uint8_t trans_cb_idx;
uint8_t frame_cnt;
uint32_t bytes_loss_cnt;
uint8_t trans_loss_cnt;
} spi_out_log_cb_t;
// Private variables
static bool spi_out_inited = false;
static spi_device_handle_t spi_handle = NULL;
static uint32_t last_tx_done_ts = 0;
static bool ul_log_inited = false;
static SemaphoreHandle_t ul_log_mutex = NULL;
static spi_out_log_cb_t *ul_log_cb = NULL;
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
static esp_timer_handle_t ul_log_flushout_timer = NULL;
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
static bool ll_log_inited = false;
static spi_out_log_cb_t *ll_task_log_cb = NULL;
static spi_out_log_cb_t *ll_isr_log_cb = NULL;
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
static esp_timer_handle_t ll_log_flushout_timer = NULL;
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
static bool ts_sync_inited = false;
static bool sync_io_level = false;
static esp_timer_handle_t ts_sync_timer = NULL;
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
// Extern function declarations
extern void esp_panic_handler_feed_wdts(void);
// Private function declarations
static int spi_out_init_trans(spi_out_trans_cb_t **trans_cb, uint16_t buf_size);
static void spi_out_deinit_trans(spi_out_trans_cb_t **trans_cb);
static void spi_out_tx_done_cb(spi_transaction_t *ret_trans);
static inline int spi_out_append_trans(spi_out_trans_cb_t *trans_cb);
static int spi_out_log_cb_init(spi_out_log_cb_t **log_cb, uint16_t buf_size);
static void spi_out_log_cb_deinit(spi_out_log_cb_t **log_cb);
static inline int spi_out_log_cb_check_trans(spi_out_log_cb_t *log_cb, uint16_t len);
static inline void spi_out_log_cb_append_trans(spi_out_log_cb_t *log_cb);
static inline void spi_out_log_cb_flush_trans(spi_out_log_cb_t *log_cb);
static void spi_out_log_cb_write(spi_out_log_cb_t *log_cb, const uint8_t *addr, uint16_t len, \
const uint8_t *addr_append, uint16_t len_append, uint8_t source);
static void spi_out_log_cb_write_packet_loss(spi_out_log_cb_t *log_cb, uint8_t flag);
static void spi_out_log_cb_dump(spi_out_log_cb_t *log_cb);
static int spi_out_ul_log_init(void);
static void spi_out_ul_log_deinit(void);
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
static void esp_timer_cb_ul_log_flushout(void);
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
static int spi_out_ll_log_init(void);
static void spi_out_ll_log_deinit(void);
static void spi_out_ll_log_ev_proc(void);
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
static void esp_timer_cb_ll_log_flushout(void);
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
#if defined(CONFIG_IDF_TARGET_ESP32H2) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32C5) ||\
defined(CONFIG_IDF_TARGET_ESP32C61) || defined(CONFIG_IDF_TARGET_ESP32H21)
extern void r_ble_log_simple_put_ev(void);
#define BLE_LOG_LL_PUT_EV r_ble_log_simple_put_ev()
#elif defined(CONFIG_IDF_TARGET_ESP32C2)
extern void ble_log_simple_put_ev(void);
#define BLE_LOG_LL_PUT_EV ble_log_simple_put_ev()
#else
#define BLE_LOG_LL_PUT_EV
#endif
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
static int spi_out_ts_sync_init(void);
static void spi_out_ts_sync_deinit(void);
static void esp_timer_cb_ts_sync(void);
#if defined(CONFIG_IDF_TARGET_ESP32H2) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32C5) ||\
defined(CONFIG_IDF_TARGET_ESP32C61) || defined(CONFIG_IDF_TARGET_ESP32H21)
extern uint32_t r_ble_lll_timer_current_tick_get(void);
#define SPI_OUT_GET_LC_TIME r_ble_lll_timer_current_tick_get()
#elif defined(CONFIG_IDF_TARGET_ESP32C2)
extern uint32_t r_os_cputime_get32(void);
#define SPI_OUT_GET_LC_TIME r_os_cputime_get32()
#else
#define SPI_OUT_GET_LC_TIME 0
#endif
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
// Private functions
static int spi_out_init_trans(spi_out_trans_cb_t **trans_cb, uint16_t buf_size)
{
// Memory allocations
*trans_cb = (spi_out_trans_cb_t *)malloc(sizeof(spi_out_trans_cb_t));
if (!(*trans_cb)) {
return -1;
}
memset(*trans_cb, 0, sizeof(spi_out_trans_cb_t));
uint8_t *buf = (uint8_t *)heap_caps_malloc(buf_size, MALLOC_CAP_DMA);
if (!buf) {
free(*trans_cb);
*trans_cb = NULL;
return -1;
}
// Initialization
(*trans_cb)->buf_size = buf_size;
(*trans_cb)->trans.tx_buffer = buf;
return 0;
}
static void spi_out_deinit_trans(spi_out_trans_cb_t **trans_cb)
{
if (!(*trans_cb)) {
return;
}
if ((*trans_cb)->trans.tx_buffer) {
free((uint8_t *)(*trans_cb)->trans.tx_buffer);
(*trans_cb)->trans.tx_buffer = NULL;
}
free(*trans_cb);
*trans_cb = NULL;
return;
}
IRAM_ATTR static void spi_out_tx_done_cb(spi_transaction_t *ret_trans)
{
last_tx_done_ts = esp_timer_get_time();
spi_out_trans_cb_t *trans_cb = __containerof(ret_trans, spi_out_trans_cb_t, trans);
trans_cb->length = 0;
trans_cb->flag = SPI_OUT_TRANS_CB_FLAG_AVAILABLE;
}
IRAM_ATTR static void spi_out_pre_tx_cb(spi_transaction_t *ret_trans)
{
// SPI slave continuous transaction workaround
while (esp_timer_get_time() - last_tx_done_ts < SPI_OUT_TRANS_ITVL_MIN_US) {}
}
IRAM_ATTR static inline int spi_out_append_trans(spi_out_trans_cb_t *trans_cb)
{
if (trans_cb->flag != SPI_OUT_TRANS_CB_FLAG_NEED_QUEUE || !trans_cb->length) {
return -1;
}
// CRITICAL: Length unit conversion from bytes to bits
trans_cb->trans.length = trans_cb->length * 8;
trans_cb->trans.rxlength = 0;
if (spi_device_queue_trans(spi_handle, &(trans_cb->trans), 0) == ESP_OK) {
trans_cb->flag = SPI_OUT_TRANS_CB_FLAG_IN_QUEUE;
return 0;
} else {
trans_cb->length = 0;
trans_cb->flag = SPI_OUT_TRANS_CB_FLAG_AVAILABLE;
return -1;
}
}
static int spi_out_log_cb_init(spi_out_log_cb_t **log_cb, uint16_t buf_size)
{
// Initialize log control block
*log_cb = (spi_out_log_cb_t *)malloc(sizeof(spi_out_log_cb_t));
if (!(*log_cb)) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize log control block!");
return -1;
}
memset(*log_cb, 0, sizeof(spi_out_log_cb_t));
// Initialize transactions
int ret = 0;
for (uint8_t i = 0; i < 2; i++) {
ret |= spi_out_init_trans(&((*log_cb)->trans_cb[i]), buf_size);
}
if (ret != 0) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize SPI transactions!");
spi_out_log_cb_deinit(log_cb);
return -1;
}
return 0;
}
static void spi_out_log_cb_deinit(spi_out_log_cb_t **log_cb)
{
if (!(*log_cb)) {
return;
}
for (uint8_t i = 0; i < 2; i++) {
if ((*log_cb)->trans_cb[i]) {
spi_out_deinit_trans(&((*log_cb)->trans_cb[i]));
}
}
free(*log_cb);
*log_cb = NULL;
return;
}
IRAM_ATTR static inline int spi_out_log_cb_check_trans(spi_out_log_cb_t *log_cb, uint16_t len)
{
spi_out_trans_cb_t *trans_cb;
uint16_t frame_len = len + SPI_OUT_FRAME_OVERHEAD;
for (uint8_t i = 0; i < 2; i++) {
trans_cb = log_cb->trans_cb[log_cb->trans_cb_idx];
if (frame_len > trans_cb->buf_size) {
goto failed;
}
if (trans_cb->flag == SPI_OUT_TRANS_CB_FLAG_AVAILABLE) {
if ((trans_cb->buf_size - trans_cb->length) >= (len + SPI_OUT_FRAME_OVERHEAD)) {
return 0;
} else {
trans_cb->flag = SPI_OUT_TRANS_CB_FLAG_NEED_QUEUE;
}
}
log_cb->trans_cb_idx = !(log_cb->trans_cb_idx);
}
failed:
log_cb->bytes_loss_cnt += len + SPI_OUT_FRAME_OVERHEAD;
log_cb->frame_cnt++;
return -1;
}
// CRITICAL: Shall not be called from ISR!
IRAM_ATTR static inline void spi_out_log_cb_append_trans(spi_out_log_cb_t *log_cb)
{
spi_out_trans_cb_t *trans_cb;
uint8_t idx = !log_cb->trans_cb_idx;
for (uint8_t i = 0; i < 2; i++) {
trans_cb = log_cb->trans_cb[idx];
if (trans_cb->flag == SPI_OUT_TRANS_CB_FLAG_NEED_QUEUE) {
if (spi_out_append_trans(trans_cb) != 0) {
log_cb->trans_loss_cnt++;
}
}
idx = !idx;
}
}
IRAM_ATTR static inline void spi_out_log_cb_flush_trans(spi_out_log_cb_t *log_cb)
{
spi_out_trans_cb_t *trans_cb = log_cb->trans_cb[log_cb->trans_cb_idx];
if (trans_cb->length && (trans_cb->flag == SPI_OUT_TRANS_CB_FLAG_AVAILABLE)) {
trans_cb->flag = SPI_OUT_TRANS_CB_FLAG_NEED_QUEUE;
}
}
IRAM_ATTR static void spi_out_log_cb_write(spi_out_log_cb_t *log_cb, const uint8_t *addr, uint16_t len, \
const uint8_t *addr_append, uint16_t len_append, uint8_t source)
{
spi_out_trans_cb_t *trans_cb = log_cb->trans_cb[log_cb->trans_cb_idx];
uint8_t *buf = (uint8_t *)trans_cb->trans.tx_buffer + trans_cb->length;
uint16_t total_length = len + len_append;
const uint8_t head[4] = {total_length & 0xFF, (total_length >> 8) & 0xFF, source, log_cb->frame_cnt};
uint32_t checksum = 0;
for (int i = 0; i < len; i++) {
checksum += addr[i];
}
for (int i = 0; i < len_append; i++) {
checksum += addr_append[i];
}
memcpy(buf, head, SPI_OUT_FRAME_HEAD_LEN);
memcpy(buf + SPI_OUT_FRAME_HEAD_LEN, addr, len);
if (len_append) {
memcpy(buf + SPI_OUT_FRAME_HEAD_LEN + len, addr_append, len_append);
}
memcpy(buf + SPI_OUT_FRAME_HEAD_LEN + total_length, &checksum, SPI_OUT_FRAME_TAIL_LEN);
trans_cb->length += total_length + SPI_OUT_FRAME_OVERHEAD;
log_cb->frame_cnt++;
if ((trans_cb->buf_size - trans_cb->length) <= SPI_OUT_FRAME_OVERHEAD) {
trans_cb->flag = SPI_OUT_TRANS_CB_FLAG_NEED_QUEUE;
}
return;
}
IRAM_ATTR static void spi_out_log_cb_write_packet_loss(spi_out_log_cb_t *log_cb, uint8_t flag)
{
if (!log_cb->bytes_loss_cnt && !log_cb->trans_loss_cnt) {
return;
}
if (spi_out_log_cb_check_trans(log_cb, SPI_OUT_PACKET_LOSS_FRAME_SIZE) == 0) {
uint8_t packet_loss_frame[SPI_OUT_PACKET_LOSS_FRAME_SIZE];
packet_loss_frame[0] = flag;
memcpy(packet_loss_frame + 1, (uint8_t *)&log_cb->bytes_loss_cnt, 4);
packet_loss_frame[5] = log_cb->trans_loss_cnt;
spi_out_log_cb_write(log_cb, packet_loss_frame, SPI_OUT_PACKET_LOSS_FRAME_SIZE, NULL, 0, BLE_LOG_SPI_OUT_SOURCE_LOSS);
log_cb->bytes_loss_cnt = 0;
log_cb->trans_loss_cnt = 0;
}
}
static void spi_out_log_cb_dump(spi_out_log_cb_t *log_cb)
{
spi_out_trans_cb_t *trans_cb;
uint8_t *buf;
for (uint8_t i = 0; i < 2; i++) {
// Dump the last transaction before dumping the current transaction
log_cb->trans_cb_idx = !(log_cb->trans_cb_idx);
trans_cb = log_cb->trans_cb[log_cb->trans_cb_idx];
buf = (uint8_t *)trans_cb->trans.tx_buffer;
for (uint16_t j = 0; j < trans_cb->buf_size; j++) {
esp_rom_printf("%02x ", buf[j]);
// Feed watchdogs periodically to avoid wdts timeout
if ((j % 100) == 0) {
esp_panic_handler_feed_wdts();
}
}
}
}
static int spi_out_ul_log_init(void)
{
if (ul_log_inited) {
return 0;
}
// Initialize mutex
ul_log_mutex = xSemaphoreCreateMutex();
if (!ul_log_mutex) {
ESP_LOGE(BLE_LOG_TAG, "Failed to create mutex for upper layer task log!");
goto mutex_init_failed;
}
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
// Initialize flushout timer
esp_timer_create_args_t timer_args = {
.callback = (esp_timer_cb_t)esp_timer_cb_ul_log_flushout,
.dispatch_method = ESP_TIMER_TASK
};
if (esp_timer_create(&timer_args, &ul_log_flushout_timer) != ESP_OK) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize flushout timer upper layer task log!");
goto timer_init_failed;
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
// Initialize log control block
if (spi_out_log_cb_init(&ul_log_cb, CONFIG_BT_BLE_LOG_SPI_OUT_UL_TASK_BUF_SIZE) != 0) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize log control blocks for upper layer task log!");
goto log_cb_init_failed;
}
// Initialization done
ESP_LOGI(BLE_LOG_TAG, "Succeeded to initialize upper layer task log!");
ul_log_inited = true;
return 0;
log_cb_init_failed:
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
esp_timer_delete(ul_log_flushout_timer);
timer_init_failed:
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
vSemaphoreDelete(ul_log_mutex);
mutex_init_failed:
return -1;
}
static void spi_out_ul_log_deinit(void)
{
if (!ul_log_inited) {
return;
}
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
esp_timer_stop(ul_log_flushout_timer);
esp_timer_delete(ul_log_flushout_timer);
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
xSemaphoreTake(ul_log_mutex, portMAX_DELAY);
spi_out_log_cb_deinit(&ul_log_cb);
xSemaphoreGive(ul_log_mutex);
vSemaphoreDelete(ul_log_mutex);
ul_log_mutex = NULL;
ESP_LOGI(BLE_LOG_TAG, "Succeeded to deinitialize upper layer log!");
ul_log_inited = false;
return;
}
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
IRAM_ATTR static void esp_timer_cb_ul_log_flushout(void)
{
xSemaphoreTake(ul_log_mutex, portMAX_DELAY);
spi_out_log_cb_flush_trans(ul_log_cb);
spi_out_log_cb_append_trans(ul_log_cb);
xSemaphoreGive(ul_log_mutex);
esp_timer_start_once(ul_log_flushout_timer, SPI_OUT_FLUSHOUT_TIMEOUT);
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
static int spi_out_ll_log_init(void)
{
if (ll_log_inited) {
return 0;
}
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
// Initialize flushout timer
esp_timer_create_args_t timer_args = {
.callback = (esp_timer_cb_t)esp_timer_cb_ll_log_flushout,
.dispatch_method = ESP_TIMER_TASK
};
if (esp_timer_create(&timer_args, &ll_log_flushout_timer) != ESP_OK) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize flushout timer for controller log!");
goto timer_init_failed;
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
// Initialize log control blocks for controller task & ISR logs
if (spi_out_log_cb_init(&ll_task_log_cb, CONFIG_BT_BLE_LOG_SPI_OUT_LL_TASK_BUF_SIZE) != 0) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize log control blocks for controller task!");
goto task_log_cb_init_failed;
}
if (spi_out_log_cb_init(&ll_isr_log_cb, CONFIG_BT_BLE_LOG_SPI_OUT_LL_ISR_BUF_SIZE) != 0) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize log control blocks for controller ISR!");
goto isr_log_cb_init_failed;
}
// Initialization done
ESP_LOGI(BLE_LOG_TAG, "Succeeded to initialize log control blocks for controller task & ISR!");
ll_log_inited = true;
return 0;
isr_log_cb_init_failed:
spi_out_log_cb_deinit(&ll_task_log_cb);
task_log_cb_init_failed:
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
esp_timer_delete(ll_log_flushout_timer);
timer_init_failed:
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
return -1;
}
static void spi_out_ll_log_deinit(void)
{
if (!ll_log_inited) {
return;
}
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
esp_timer_stop(ll_log_flushout_timer);
esp_timer_delete(ll_log_flushout_timer);
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
spi_out_log_cb_deinit(&ll_isr_log_cb);
spi_out_log_cb_deinit(&ll_task_log_cb);
// Deinitialization done
ESP_LOGI(BLE_LOG_TAG, "Succeeded to deinitialize controller log!");
ll_log_inited = false;
return;
}
IRAM_ATTR static void spi_out_ll_log_ev_proc(void)
{
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
// Request from flushout timer
spi_out_log_cb_flush_trans(ll_isr_log_cb);
spi_out_log_cb_append_trans(ll_isr_log_cb);
spi_out_log_cb_flush_trans(ll_task_log_cb);
spi_out_log_cb_append_trans(ll_task_log_cb);
esp_timer_start_once(ll_log_flushout_timer, SPI_OUT_FLUSHOUT_TIMEOUT);
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
return;
}
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
IRAM_ATTR static void esp_timer_cb_ll_log_flushout(void)
{
BLE_LOG_LL_PUT_EV;
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
static int spi_out_ts_sync_init(void)
{
if (ts_sync_inited) {
return 0;
}
// Initialize sync timer
esp_timer_create_args_t timer_args = {
.callback = (esp_timer_cb_t)esp_timer_cb_ts_sync,
.dispatch_method = ESP_TIMER_TASK
};
if (esp_timer_create(&timer_args, &ts_sync_timer) != ESP_OK) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize timestamp synchronizer timer!");
goto timer_init_failed;
}
// Initialize sync IO
gpio_config_t io_conf = {
.intr_type = GPIO_INTR_DISABLE,
.mode = GPIO_MODE_OUTPUT,
.pin_bit_mask = (1UL << CONFIG_BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM),
.pull_down_en = 0,
.pull_up_en = 0
};
if (gpio_config(&io_conf) != ESP_OK) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize timestamp synchronizer IO!");
goto gpio_init_failed;
}
// Initialization done
ESP_LOGI(BLE_LOG_TAG, "Succeeded to initialize timestamp synchronizer!");
sync_io_level = false;
gpio_set_level(CONFIG_BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM, sync_io_level);
ts_sync_inited = true;
return 0;
gpio_init_failed:
esp_timer_delete(ts_sync_timer);
timer_init_failed:
return -1;
}
static void spi_out_ts_sync_deinit(void)
{
if (!ts_sync_inited) {
return;
}
// Deinitialize timestamp synchronizer
esp_timer_stop(ts_sync_timer);
esp_timer_delete(ts_sync_timer);
// Deinitialize sync IO
sync_io_level = false;
gpio_set_level(CONFIG_BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM, sync_io_level);
gpio_reset_pin(CONFIG_BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM);
// Deinitialization done
ESP_LOGI(BLE_LOG_TAG, "Succeeded to deinitialize timestamp synchronizer!");
ts_sync_inited = false;
return;
}
// CRITICAL: This function is called in ESP Timer task
static void esp_timer_cb_ts_sync(void)
{
// Initialize variables
uint32_t lc_ts = 0;
uint32_t esp_ts = 0;
// Toggle sync IO
sync_io_level = !sync_io_level;
// Enter critical
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
portENTER_CRITICAL(&spinlock);
// Get LC timestamp
lc_ts = SPI_OUT_GET_LC_TIME;
// Set sync IO level
gpio_set_level(CONFIG_BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM, (uint32_t)sync_io_level);
// Get ESP timestamp
esp_ts = esp_timer_get_time();
portEXIT_CRITICAL(&spinlock);
// Exit critical
// Write timestamp sync log
uint8_t sync_frame[9];
sync_frame[0] = ((uint8_t)sync_io_level & 0xFF);
memcpy(sync_frame + 1, &lc_ts, sizeof(lc_ts));
memcpy(sync_frame + 5, &esp_ts, sizeof(esp_ts));
ble_log_spi_out_write(BLE_LOG_SPI_OUT_SOURCE_SYNC, sync_frame, 9);
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
// Public functions
int ble_log_spi_out_init(void)
{
// Avoid double init
if (spi_out_inited) {
return 0;
}
// Initialize SPI
spi_bus_config_t bus_config = {
.miso_io_num = -1,
.mosi_io_num = CONFIG_BT_BLE_LOG_SPI_OUT_MOSI_IO_NUM,
.sclk_io_num = CONFIG_BT_BLE_LOG_SPI_OUT_SCLK_IO_NUM,
.quadwp_io_num = -1,
.quadhd_io_num = -1,
.max_transfer_sz = SPI_OUT_MAX_TRANSFER_SIZE,
#if CONFIG_SPI_MASTER_ISR_IN_IRAM
.intr_flags = ESP_INTR_FLAG_IRAM
#endif // CONFIG_SPI_MASTER_ISR_IN_IRAM
};
spi_device_interface_config_t dev_config = {
.clock_speed_hz = SPI_MASTER_FREQ_20M,
.mode = 0,
.spics_io_num = CONFIG_BT_BLE_LOG_SPI_OUT_CS_IO_NUM,
.queue_size = SPI_OUT_SPI_MASTER_QUEUE_SIZE,
.post_cb = spi_out_tx_done_cb,
.pre_cb = spi_out_pre_tx_cb
};
if (spi_bus_initialize(SPI_OUT_BUS, &bus_config, SPI_DMA_CH_AUTO) != ESP_OK) {
ESP_LOGE(BLE_LOG_TAG, "Failed to initialize SPI bus!");
goto spi_bus_init_failed;
}
if (spi_bus_add_device(SPI_OUT_BUS, &dev_config, &spi_handle) != ESP_OK) {
ESP_LOGE(BLE_LOG_TAG, "Failed to add device to SPI bus!");
goto spi_device_add_failed;
}
if (spi_out_ul_log_init() != 0) {
goto ul_log_init_failed;
}
#if CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
if (spi_out_ll_log_init() != 0) {
goto ll_log_init_failed;
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
if (spi_out_ts_sync_init() != 0) {
goto ts_sync_init_failed;
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
// Initialization done
ESP_LOGI(BLE_LOG_TAG, "Succeeded to initialize BLE log SPI output interface!");
spi_out_inited = true;
#if CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
// Start flushout timer
esp_timer_start_once(ul_log_flushout_timer, SPI_OUT_FLUSHOUT_TIMEOUT);
#if CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
esp_timer_start_once(ll_log_flushout_timer, SPI_OUT_FLUSHOUT_TIMEOUT);
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
return 0;
#if CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
ts_sync_init_failed:
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
spi_out_ll_log_deinit();
ll_log_init_failed:
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
spi_out_ul_log_deinit();
ul_log_init_failed:
spi_bus_remove_device(spi_handle);
spi_handle = NULL;
spi_device_add_failed:
spi_bus_free(SPI_OUT_BUS);
spi_bus_init_failed:
return -1;
}
void ble_log_spi_out_deinit(void)
{
// Avoid double deinit
if (!spi_out_inited) {
return;
}
// Drain all queued transactions
assert(spi_device_acquire_bus(spi_handle, portMAX_DELAY) == ESP_OK);
spi_device_release_bus(spi_handle);
// Remove SPI master
spi_bus_remove_device(spi_handle);
spi_handle = NULL;
spi_bus_free(SPI_OUT_BUS);
#if CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
spi_out_ts_sync_deinit();
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
spi_out_ll_log_deinit();
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
spi_out_ul_log_deinit();
// Reset init flag
spi_out_inited = false;
}
#if CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
void ble_log_spi_out_ts_sync_start(void)
{
// Check if SPI out is initialized
if (!spi_out_inited) {
return;
}
// Start timestamp sync timer
if (ts_sync_timer) {
if (!esp_timer_is_active(ts_sync_timer)) {
esp_timer_start_periodic(ts_sync_timer, SPI_OUT_TS_SYNC_TIMEOUT);
}
}
}
void ble_log_spi_out_ts_sync_stop(void)
{
// Check if SPI out is initialized
if (!spi_out_inited) {
return;
}
// Stop timestamp sync timer
if (ts_sync_timer) {
if (esp_timer_is_active(ts_sync_timer)) {
esp_timer_stop(ts_sync_timer);
}
// Set sync IO to low level
sync_io_level = 0;
gpio_set_level(CONFIG_BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM, (uint32_t)sync_io_level);
}
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
#if CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
// Only LL task has access to this API
IRAM_ATTR void ble_log_spi_out_ll_write(uint32_t len, const uint8_t *addr, uint32_t len_append,\
const uint8_t *addr_append, uint32_t flag)
{
if (!ll_log_inited) {
return;
}
bool in_isr = (bool)(flag & SPI_OUT_INTERFACE_FLAG_IN_ISR);
uint8_t source = in_isr ? BLE_LOG_SPI_OUT_SOURCE_ESP_ISR : BLE_LOG_SPI_OUT_SOURCE_ESP;
spi_out_log_cb_t *log_cb = in_isr ? ll_isr_log_cb : ll_task_log_cb;
uint16_t total_length = (uint16_t)(len + len_append);
if (spi_out_log_cb_check_trans(log_cb, total_length) == 0) {
spi_out_log_cb_write(log_cb, addr, (uint16_t)len, addr_append, (uint16_t)len_append, source);
if (in_isr) {
spi_out_log_cb_write_packet_loss(log_cb, SPI_OUT_PACKET_LOSS_LL_ISR);
} else {
spi_out_log_cb_append_trans(ll_isr_log_cb);
spi_out_log_cb_append_trans(ll_task_log_cb);
spi_out_log_cb_write_packet_loss(log_cb, SPI_OUT_PACKET_LOSS_LL_TASK);
}
}
return;
}
IRAM_ATTR void ble_log_spi_out_ll_log_ev_proc(void)
{
if (!ll_log_inited) {
return;
}
return spi_out_ll_log_ev_proc();
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
int ble_log_spi_out_write(uint8_t source, const uint8_t *addr, uint16_t len)
{
if (!ul_log_inited) {
return -1;
}
xSemaphoreTake(ul_log_mutex, portMAX_DELAY);
if (spi_out_log_cb_check_trans(ul_log_cb, len) == 0) {
spi_out_log_cb_write(ul_log_cb, addr, len, NULL, 0, source);
spi_out_log_cb_append_trans(ul_log_cb);
spi_out_log_cb_write_packet_loss(ul_log_cb, SPI_OUT_PACKET_LOSS_UL);
}
xSemaphoreGive(ul_log_mutex);
return 0;
}
int ble_log_spi_out_printf(uint8_t source, const char *format, ...)
{
if (!ul_log_inited) {
return -1;
}
// Get arguments
va_list args;
va_start(args, format);
// Get len as ref to allocate heap memory
va_list args_copy;
va_copy(args_copy, args);
int len = vsnprintf(NULL, 0, format, args_copy);
va_end(args_copy);
// Length validation
if ((len < 0) || (len > 0xFFFF)) {
va_end(args);
return -1;
}
// Allocate memory
uint8_t *buffer = malloc(len + 1);
if (!buffer) {
va_end(args);
return -1;
}
// Generate string
vsnprintf((char *)buffer, len + 1, format, args);
va_end(args);
uint32_t esp_ts = esp_timer_get_time();
xSemaphoreTake(ul_log_mutex, portMAX_DELAY);
if (spi_out_log_cb_check_trans(ul_log_cb, sizeof(uint32_t) + len) == 0) {
spi_out_log_cb_write(ul_log_cb, (const uint8_t *)&esp_ts, sizeof(uint32_t), (const uint8_t *)buffer, len, source);
spi_out_log_cb_append_trans(ul_log_cb);
spi_out_log_cb_write_packet_loss(ul_log_cb, SPI_OUT_PACKET_LOSS_UL);
}
xSemaphoreGive(ul_log_mutex);
// Release
free(buffer);
return 0;
}
int ble_log_spi_out_printf_enh(uint8_t source, uint8_t level, const char *tag, const char *format, ...)
{
if (!ul_log_inited) {
return -1;
}
// Create log prefix in the format: "[level][tag] "
char prefix[32];
int prefix_len = snprintf(prefix, sizeof(prefix), "[%d][%s] ", level, tag ? tag : "NULL");
// Compute the length of the formatted log message
va_list args;
va_start(args, format);
va_list args_copy;
va_copy(args_copy, args);
int log_len = vsnprintf(NULL, 0, format, args_copy);
va_end(args_copy);
// Validate length
if (log_len < 0 || log_len > 0xFFFF) {
va_end(args);
return -1;
}
// Compute total log length (prefix + formatted message)
int total_len = prefix_len + log_len;
// Allocate memory for the complete log message
uint8_t *buffer = malloc(total_len + 1);
if (!buffer) {
va_end(args);
return -1;
}
// Construct the final log message
memcpy(buffer, prefix, prefix_len); // Copy the prefix
vsnprintf((char *)(buffer + prefix_len), log_len + 1, format, args);
va_end(args);
uint32_t esp_ts = esp_timer_get_time();
xSemaphoreTake(ul_log_mutex, portMAX_DELAY);
if (spi_out_log_cb_check_trans(ul_log_cb, sizeof(uint32_t) + total_len) == 0) {
spi_out_log_cb_write(ul_log_cb, (const uint8_t *)&esp_ts, sizeof(uint32_t), (const uint8_t *)buffer, total_len, source);
spi_out_log_cb_append_trans(ul_log_cb);
spi_out_log_cb_write_packet_loss(ul_log_cb, SPI_OUT_PACKET_LOSS_UL);
}
xSemaphoreGive(ul_log_mutex);
free(buffer);
return 0;
}
int ble_log_spi_out_write_with_ts(uint8_t source, const uint8_t *addr, uint16_t len)
{
if (!ul_log_inited) {
return -1;
}
uint32_t esp_ts = esp_timer_get_time();
xSemaphoreTake(ul_log_mutex, portMAX_DELAY);
if (spi_out_log_cb_check_trans(ul_log_cb, sizeof(uint32_t) + len) == 0) {
spi_out_log_cb_write(ul_log_cb, (const uint8_t *)&esp_ts, sizeof(uint32_t), addr, len, source);
spi_out_log_cb_append_trans(ul_log_cb);
spi_out_log_cb_write_packet_loss(ul_log_cb, SPI_OUT_PACKET_LOSS_UL);
}
xSemaphoreGive(ul_log_mutex);
return 0;
}
void ble_log_spi_out_dump_all(void)
{
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
portENTER_CRITICAL_SAFE(&spinlock);
#if CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
if (ll_log_inited) {
// Dump lower layer log buffer
esp_rom_printf("[LL_ISR_LOG_DUMP_START:\n");
spi_out_log_cb_dump(ll_isr_log_cb);
esp_rom_printf("\n:LL_ISR_LOG_DUMP_END]\n\n");
esp_rom_printf("[LL_TASK_LOG_DUMP_START:\n");
spi_out_log_cb_dump(ll_task_log_cb);
esp_rom_printf("\n:LL_TASK_LOG_DUMP_END]\n\n");
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_LL_ENABLED
if (ul_log_inited) {
// Dump upper layer log buffer
esp_rom_printf("[UL_LOG_DUMP_START:\n");
spi_out_log_cb_dump(ul_log_cb);
esp_rom_printf("\n:UL_LOG_DUMP_END]\n\n");
}
portEXIT_CRITICAL_SAFE(&spinlock);
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
@@ -0,0 +1,54 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __BT_SPI_OUT_H__
#define __BT_SPI_OUT_H__
#include <stdarg.h>
#include <string.h>
#include "driver/spi_master.h"
#include "driver/gpio.h"
#include "esp_timer.h"
#include "esp_log.h"
#include "freertos/semphr.h"
// Public typedefs
#define BLE_LOG_SPI_OUT_SOURCE_ESP 0
#define BLE_LOG_SPI_OUT_SOURCE_ESP_LEGACY 1
#define BLE_LOG_SPI_OUT_SOURCE_BLUEDROID 2
#define BLE_LOG_SPI_OUT_SOURCE_NIMBLE 3
#define BLE_LOG_SPI_OUT_SOURCE_HCI_UPSTREAM 4
#define BLE_LOG_SPI_OUT_SOURCE_HCI_DOWNSTREAM 5
#define BLE_LOG_SPI_OUT_SOURCE_ESP_ISR 6
#define BLE_LOG_SPI_OUT_SOURCE_ESP_LEGACY_ISR 7
#define BLE_LOG_SPI_OUT_SOURCE_USER 0x10
#define BLE_LOG_SPI_OUT_SOURCE_SYNC 0xFE
#define BLE_LOG_SPI_OUT_SOURCE_LOSS 0xFF
// SPI Log Level Definitions
#define BLE_LOG_SPI_OUT_LEVEL_NONE 0 /*!< No log output */
#define BLE_LOG_SPI_OUT_LEVEL_ERROR 1 /*!< Critical errors that SPI driver cannot recover from */
#define BLE_LOG_SPI_OUT_LEVEL_WARN 2 /*!< Recoverable error conditions in SPI communication */
#define BLE_LOG_SPI_OUT_LEVEL_INFO 3 /*!< Informational messages about SPI transactions */
#define BLE_LOG_SPI_OUT_LEVEL_DEBUG 4 /*!< Detailed debug information, such as SPI register values */
#define BLE_LOG_SPI_OUT_LEVEL_VERBOSE 5 /*!< Very detailed debugging logs, potentially flooding output */
#define BLE_LOG_SPI_OUT_LEVEL_MAX 6 /*!< Number of SPI log levels supported */
// Public functions
int ble_log_spi_out_init(void);
void ble_log_spi_out_deinit(void);
void ble_log_spi_out_timer_control(bool enable);
int ble_log_spi_out_write(uint8_t source, const uint8_t *addr, uint16_t len);
void ble_log_spi_out_ll_write(uint32_t len, const uint8_t *addr, uint32_t len_append,\
const uint8_t *addr_append, uint32_t flag);
void ble_log_spi_out_ll_log_ev_proc(void);
void ble_log_spi_out_ts_sync_start(void);
void ble_log_spi_out_ts_sync_stop(void);
int ble_log_spi_out_printf(uint8_t source, const char *format, ...);
int ble_log_spi_out_printf_enh(uint8_t source, uint8_t level, const char *tag, const char *format, ...);
int ble_log_spi_out_write_with_ts(uint8_t source, const uint8_t *addr, uint16_t len);
void ble_log_spi_out_dump_all(void);
#endif // __BT_SPI_OUT_H__
+19 -1
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -16,6 +16,12 @@ void **btc_profile_cb_tab;
void esp_profile_cb_reset(void)
{
#if BTC_DYNAMIC_MEMORY == TRUE
if (btc_profile_cb_tab == NULL) {
return;
}
#endif
int i;
for (i = 0; i < BTC_PID_NUM; i++) {
@@ -25,6 +31,12 @@ void esp_profile_cb_reset(void)
int btc_profile_cb_set(btc_pid_t profile_id, void *cb)
{
#if BTC_DYNAMIC_MEMORY == TRUE
if (btc_profile_cb_tab == NULL) {
return -1;
}
#endif
if (profile_id < 0 || profile_id >= BTC_PID_NUM) {
return -1;
}
@@ -36,6 +48,12 @@ int btc_profile_cb_set(btc_pid_t profile_id, void *cb)
void *btc_profile_cb_get(btc_pid_t profile_id)
{
#if BTC_DYNAMIC_MEMORY == TRUE
if (btc_profile_cb_tab == NULL) {
return NULL;
}
#endif
if (profile_id < 0 || profile_id >= BTC_PID_NUM) {
return NULL;
}
+24 -8
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -225,8 +225,8 @@ static bt_status_t btc_task_post(btc_msg_t *msg, uint32_t timeout)
/**
* transfer an message to another module in the different task.
* @param msg message
* @param arg paramter
* @param arg_len length of paramter
* @param arg parameter
* @param arg_len length of parameter
* @param copy_func deep copy function
* @param free_func deep free function
* @return BT_STATUS_SUCCESS: success
@@ -272,7 +272,7 @@ bt_status_t btc_transfer_context(btc_msg_t *msg, void *arg, int arg_len, btc_arg
}
/**
* transfer an message to another module in tha same task.
* transfer an message to another module in the same task.
* @param msg message
* @return BT_STATUS_SUCCESS: success
* others: fail
@@ -310,7 +310,7 @@ static void btc_deinit_mem(void) {
btc_profile_cb_tab = NULL;
}
#if (BLE_INCLUDED == TRUE)
#if (BLE_42_FEATURE_SUPPORT == TRUE)
if (gl_bta_adv_data_ptr) {
osi_free(gl_bta_adv_data_ptr);
gl_bta_adv_data_ptr = NULL;
@@ -320,7 +320,7 @@ static void btc_deinit_mem(void) {
osi_free(gl_bta_scan_rsp_data_ptr);
gl_bta_scan_rsp_data_ptr = NULL;
}
#endif ///BLE_INCLUDED == TRUE
#endif // BLE_42_FEATURE_SUPPORT
#if GATTS_INCLUDED == TRUE && GATT_DYNAMIC_MEMORY == TRUE
if (btc_creat_tab_env_ptr) {
@@ -335,6 +335,13 @@ static void btc_deinit_mem(void) {
#endif
#endif
#if BTC_HF_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE
if (hf_local_param_ptr) {
osi_free(hf_local_param_ptr);
hf_local_param_ptr = NULL;
}
#endif
#if BTC_HF_CLIENT_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE
if (hf_client_local_param_ptr) {
osi_free(hf_client_local_param_ptr);
@@ -365,7 +372,8 @@ static bt_status_t btc_init_mem(void) {
}
memset((void *)btc_profile_cb_tab, 0, sizeof(void *) * BTC_PID_NUM);
#if (BLE_INCLUDED == TRUE)
#if BTC_DYNAMIC_MEMORY == TRUE
#if (BLE_42_FEATURE_SUPPORT == TRUE)
if ((gl_bta_adv_data_ptr = (tBTA_BLE_ADV_DATA *)osi_malloc(sizeof(tBTA_BLE_ADV_DATA))) == NULL) {
goto error_exit;
}
@@ -375,7 +383,8 @@ static bt_status_t btc_init_mem(void) {
goto error_exit;
}
memset((void *)gl_bta_scan_rsp_data_ptr, 0, sizeof(tBTA_BLE_ADV_DATA));
#endif ///BLE_INCLUDED == TRUE
#endif // (BLE_42_FEATURE_SUPPORT == TRUE)
#endif // BTC_DYNAMIC_MEMORY == TRUE
#if GATTS_INCLUDED == TRUE && GATT_DYNAMIC_MEMORY == TRUE
if ((btc_creat_tab_env_ptr = (esp_btc_creat_tab_t *)osi_malloc(sizeof(esp_btc_creat_tab_t))) == NULL) {
@@ -390,6 +399,13 @@ static bt_status_t btc_init_mem(void) {
#endif
#endif
#if BTC_HF_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE
if ((hf_local_param_ptr = (hf_local_param_t *)osi_malloc(BTC_HF_NUM_CB * sizeof(hf_local_param_t))) == NULL) {
goto error_exit;
}
memset((void *)hf_local_param_ptr, 0, BTC_HF_NUM_CB * sizeof(hf_local_param_t));
#endif
#if BTC_HF_CLIENT_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE
if ((hf_client_local_param_ptr = (hf_client_local_param_t *)osi_malloc(sizeof(hf_client_local_param_t))) == NULL) {
goto error_exit;
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -160,20 +160,31 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
if (p_data->req_data.p_data->write_req.is_prep) {
tBTA_GATT_STATUS status = GATT_SUCCESS;
if (blufi_env.prepare_buf == NULL) {
blufi_env.prepare_buf = osi_malloc(BLUFI_PREPAIR_BUF_MAX_SIZE);
blufi_env.prepare_len = 0;
do {
if (p_data->req_data.p_data->write_req.offset > BLUFI_PREPARE_BUF_MAX_SIZE) {
status = ESP_GATT_INVALID_OFFSET;
break;
}
if ((p_data->req_data.p_data->write_req.offset + p_data->req_data.p_data->write_req.len) > BLUFI_PREPARE_BUF_MAX_SIZE) {
status = ESP_GATT_INVALID_ATTR_LEN;
break;
}
if (blufi_env.prepare_buf == NULL) {
BLUFI_TRACE_ERROR("Blufi prep no mem\n");
status = GATT_NO_RESOURCES;
if (p_data->req_data.p_data->write_req.offset != 0) {
status = GATT_INVALID_OFFSET;
break;
}
blufi_env.prepare_buf = osi_malloc(BLUFI_PREPARE_BUF_MAX_SIZE);
blufi_env.prepare_len = 0;
if (blufi_env.prepare_buf == NULL) {
BLUFI_TRACE_ERROR("Blufi prep no mem\n");
status = GATT_NO_RESOURCES;
break;
}
}
} else {
if (p_data->req_data.p_data->write_req.offset > BLUFI_PREPAIR_BUF_MAX_SIZE) {
status = GATT_INVALID_OFFSET;
} else if ((p_data->req_data.p_data->write_req.offset + p_data->req_data.p_data->write_req.len) > BLUFI_PREPAIR_BUF_MAX_SIZE) {
status = GATT_INVALID_ATTR_LEN;
}
}
} while (0);
memset(&rsp, 0, sizeof(tGATTS_RSP));
rsp.attr_value.handle = p_data->req_data.p_data->write_req.handle;
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -95,7 +95,29 @@ void btc_blufi_report_error(esp_blufi_error_state_t state)
void btc_blufi_recv_handler(uint8_t *data, int len)
{
if (len < sizeof(struct blufi_hdr)) {
BTC_TRACE_ERROR("%s invalid data length: %d", __func__, len);
btc_blufi_report_error(ESP_BLUFI_DATA_FORMAT_ERROR);
return;
}
struct blufi_hdr *hdr = (struct blufi_hdr *)data;
// Verify if the received data length matches the expected length based on the BLUFI protocol
int target_data_len;
if (BLUFI_FC_IS_CHECK(hdr->fc)) {
target_data_len = hdr->data_len + 4 + 2; // Data + (Type + Frame Control + Sequence Number + Data Length) + Checksum
} else {
target_data_len = hdr->data_len + 4; // Data + (Type + Frame Control + Sequence Number + Data Length)
}
if (len != target_data_len) {
BTC_TRACE_ERROR("%s: Invalid data length: %d, expected: %d", __func__, len, target_data_len);
btc_blufi_report_error(ESP_BLUFI_DATA_FORMAT_ERROR);
return;
}
uint16_t checksum, checksum_pkt;
int ret;
@@ -366,7 +388,7 @@ void btc_blufi_send_wifi_list(uint16_t apCount, esp_blufi_ap_record_t *list)
int data_len;
uint8_t *p;
// malloc size: (len + RSSI + ssid buffer) * apCount;
uint malloc_size = (1 + 1 + sizeof(list->ssid)) * apCount;
uint32_t malloc_size = (1 + 1 + sizeof(list->ssid)) * apCount;
p = data = osi_malloc(malloc_size);
if (data == NULL) {
BTC_TRACE_ERROR("malloc error\n");
@@ -375,7 +397,7 @@ void btc_blufi_send_wifi_list(uint16_t apCount, esp_blufi_ap_record_t *list)
type = BLUFI_BUILD_TYPE(BLUFI_TYPE_DATA, BLUFI_TYPE_DATA_SUBTYPE_WIFI_LIST);
for (int i = 0; i < apCount; ++i)
{
uint len = strlen((const char *)list[i].ssid);
uint32_t len = strlen((const char *)list[i].ssid);
data_len = (p - data);
//current_len + ssid + rssi + total_len_value
if((data_len + len + 1 + 1) > malloc_size) {
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -9,6 +9,11 @@
#include "btc/btc_task.h"
#include "esp_blufi_api.h"
#ifdef __cplusplus
extern "C" {
#endif
#if (BLUFI_INCLUDED == TRUE)
#define BTC_BLUFI_GREAT_VER 0x01 //Version + Subversion
@@ -31,7 +36,9 @@ typedef struct {
UINT32 trans_id;
UINT8 congest;
UINT16 frag_size;
// Deprecated: This macro will be removed in the future
#define BLUFI_PREPAIR_BUF_MAX_SIZE 1024
#define BLUFI_PREPARE_BUF_MAX_SIZE 1024
uint8_t *prepare_buf;
int prepare_len;
/* Control reference */
@@ -193,5 +200,10 @@ void btc_blufi_cb_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
void btc_blufi_cb_deep_free(btc_msg_t *msg);
#endif /* __BLUFI_INT_H__ */
#endif ///BLUFI_INCLUDED == TRUE
#endif ///BLUFI_INCLUDED == TRUE
#ifdef __cplusplus
}
#endif
#endif /* __BLUFI_INT_H__ */
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -20,6 +20,10 @@
#include "esp_gap_ble_api.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define BLUFI_APP_UUID 0xFFFF
#define BLUFI_DEVICE_NAME "BLUFI_DEVICE"
@@ -40,6 +44,7 @@ void esp_blufi_gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *a
/* Initialise gatt server */
int esp_blufi_gatt_svr_init(void);
int esp_blufi_gatt_svr_deinit(void);
void esp_blufi_btc_init(void);
void esp_blufi_btc_deinit(void);
#endif
@@ -96,4 +101,7 @@ void esp_blufi_send_encap(void *arg);
int esp_blufi_handle_gap_events(struct ble_gap_event *event, void *arg);
#endif
#ifdef __cplusplus
}
#endif
#endif/* _ESP_BLUFI_ */
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -124,7 +124,31 @@ static size_t write_value(uint16_t conn_handle, uint16_t attr_handle,
}
}
btc_blufi_recv_handler(&ctxt->om->om_data[0], ctxt->om->om_len);
/* Data may come in linked om. So retrieve all data */
if (SLIST_NEXT(ctxt->om, om_next) != NULL) {
uint8_t *fw_buf = (uint8_t *)malloc(517 * sizeof(uint8_t));
memset(fw_buf, 0x0, 517);
memcpy(fw_buf, &ctxt->om->om_data[0], ctxt->om->om_len);
struct os_mbuf *last;
last = ctxt->om;
uint32_t offset = ctxt->om->om_len;
while (SLIST_NEXT(last, om_next) != NULL) {
struct os_mbuf *temp = SLIST_NEXT(last, om_next);
memcpy(fw_buf + offset , &temp->om_data[0], temp->om_len);
offset += temp->om_len;
last = SLIST_NEXT(last, om_next);
temp = NULL;
}
btc_blufi_recv_handler(fw_buf, offset);
free(fw_buf);
}
else {
btc_blufi_recv_handler(&ctxt->om->om_data[0], ctxt->om->om_len);
}
rc = ble_hs_mbuf_to_flat(ctxt->om, value->buf->om_data,
value->buf->om_len, &len);
if (rc != 0) {
@@ -216,6 +240,32 @@ static void init_gatt_values(void)
}
static void deinit_gatt_values(void)
{
int i = 0;
const struct ble_gatt_svc_def *svc;
const struct ble_gatt_chr_def *chr;
const struct ble_gatt_dsc_def *dsc;
for (svc = gatt_svr_svcs; svc && svc->uuid; svc++) {
for (chr = svc->characteristics; chr && chr->uuid; chr++) {
if (i < SERVER_MAX_VALUES && gatt_values[i].buf != NULL) {
os_mbuf_free(gatt_values[i].buf); /* Free the buffer */
gatt_values[i].buf = NULL; /* Nullify the pointer to avoid dangling references */
}
++i;
for (dsc = chr->descriptors; dsc && dsc->uuid; dsc++) {
if (i < SERVER_MAX_VALUES && gatt_values[i].buf != NULL) {
os_mbuf_free(gatt_values[i].buf); /* Free the buffer */
gatt_values[i].buf = NULL; /* Nullify the pointer to avoid dangling references */
}
++i;
}
}
}
}
int esp_blufi_gatt_svr_init(void)
{
int rc;
@@ -236,6 +286,18 @@ int esp_blufi_gatt_svr_init(void)
return 0;
}
int esp_blufi_gatt_svr_deinit(void)
{
deinit_gatt_values();
ble_gatts_free_svcs();
/* Deinitialize BLE GATT and GAP services */
ble_svc_gatt_deinit();
ble_svc_gap_deinit();
return 0;
}
static int
esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
{
@@ -418,8 +480,10 @@ uint8_t esp_blufi_init(void)
void esp_blufi_deinit(void)
{
blufi_env.enabled = false;
btc_msg_t msg;
esp_blufi_cb_param_t param;
btc_msg_t msg;
memset (&msg, 0x0, sizeof (msg));
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_DEINIT_FINISH;
param.deinit_finish.state = ESP_BLUFI_DEINIT_OK;
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -21,6 +21,11 @@
#define ESP_BLUFI_SUCCESS 0x00
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define BT_BD_ADDR_STR "%02x:%02x:%02x:%02x:%02x:%02x"
#define BT_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
@@ -100,4 +105,7 @@ void btc_blufi_call_deep_free(btc_msg_t *msg);
uint16_t btc_blufi_get_version(void);
#ifdef __cplusplus
}
#endif
#endif /* __BTC_BLUFI_PRF_H__ */
+342
View File
@@ -0,0 +1,342 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "hci_log/bt_hci_log.h"
#include "bt_common.h"
#include "osi/mutex.h"
#include "esp_attr.h"
#if (BT_HCI_LOG_INCLUDED == TRUE)
#define BT_HCI_LOG_PRINT_TAG (1)
#define BT_HCI_LOG_DATA_BUF_SIZE (1024 * HCI_LOG_DATA_BUFFER_SIZE)
#define BT_HCI_LOG_ADV_BUF_SIZE (1024 * HCI_LOG_ADV_BUFFER_SIZE)
typedef struct {
osi_mutex_t mutex_lock;
uint64_t log_record_in;
uint64_t log_record_out;
uint64_t buf_size;
uint8_t *p_hci_log_buffer;
uint8_t index;
bool overflow;
} bt_hci_log_t;
static const char s_hex_to_char_mapping[16] = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
};
static bt_hci_log_t g_bt_hci_log_data_ctl = {0};
static bt_hci_log_t g_bt_hci_log_adv_ctl = {0};
esp_err_t bt_hci_log_init(void)
{
uint8_t *g_bt_hci_log_data_buffer = NULL;
uint8_t *g_bt_hci_log_adv_buffer = NULL;
g_bt_hci_log_data_buffer = malloc(BT_HCI_LOG_DATA_BUF_SIZE);
if (!g_bt_hci_log_data_buffer) {
return ESP_ERR_NO_MEM;
}
g_bt_hci_log_adv_buffer = malloc(BT_HCI_LOG_ADV_BUF_SIZE);
if (!g_bt_hci_log_adv_buffer) {
if (g_bt_hci_log_data_buffer) {
free(g_bt_hci_log_data_buffer);
g_bt_hci_log_data_buffer = NULL;
}
return ESP_ERR_NO_MEM;
}
memset(g_bt_hci_log_data_buffer, 0, BT_HCI_LOG_DATA_BUF_SIZE);
memset(g_bt_hci_log_adv_buffer, 0, BT_HCI_LOG_ADV_BUF_SIZE);
memset(&g_bt_hci_log_data_ctl, 0, sizeof(bt_hci_log_t));
g_bt_hci_log_data_ctl.buf_size = BT_HCI_LOG_DATA_BUF_SIZE;
g_bt_hci_log_data_ctl.p_hci_log_buffer = g_bt_hci_log_data_buffer;
memset(&g_bt_hci_log_adv_ctl, 0, sizeof(bt_hci_log_t));
g_bt_hci_log_adv_ctl.buf_size = BT_HCI_LOG_ADV_BUF_SIZE;
g_bt_hci_log_adv_ctl.p_hci_log_buffer = g_bt_hci_log_adv_buffer;
osi_mutex_new((osi_mutex_t *)&g_bt_hci_log_data_ctl.mutex_lock);
osi_mutex_new((osi_mutex_t *)&g_bt_hci_log_adv_ctl.mutex_lock);
return ESP_OK;
}
esp_err_t bt_hci_log_deinit(void)
{
if (g_bt_hci_log_data_ctl.p_hci_log_buffer) {
free(g_bt_hci_log_data_ctl.p_hci_log_buffer);
g_bt_hci_log_data_ctl.p_hci_log_buffer = NULL;
}
if (g_bt_hci_log_adv_ctl.p_hci_log_buffer) {
free(g_bt_hci_log_adv_ctl.p_hci_log_buffer);
g_bt_hci_log_adv_ctl.p_hci_log_buffer = NULL;
}
osi_mutex_free((osi_mutex_t *)&g_bt_hci_log_data_ctl.mutex_lock);
osi_mutex_free((osi_mutex_t *)&g_bt_hci_log_adv_ctl.mutex_lock);
memset(&g_bt_hci_log_data_ctl, 0, sizeof(bt_hci_log_t));
memset(&g_bt_hci_log_adv_ctl, 0, sizeof(bt_hci_log_t));
return ESP_OK;
}
#if (BT_HCI_LOG_PRINT_TAG)
static char IRAM_ATTR *bt_data_type_to_str(uint8_t data_type)
{
char *tag = NULL;
switch (data_type)
{
case HCI_LOG_DATA_TYPE_COMMAND:
// hci cmd data
tag = "C";
break;
case HCI_LOG_DATA_TYPE_H2C_ACL:
// host to controller hci acl data
tag = "H";
break;
case HCI_LOG_DATA_TYPE_SCO:
// hci sco data
tag = "S";
break;
case HCI_LOG_DATA_TYPE_EVENT:
// hci event
tag = "E";
break;
case HCI_LOG_DATA_TYPE_ADV:
// controller adv report data
tag = NULL;
break;
case HCI_LOG_DATA_TYPE_C2H_ACL:
// controller to host hci acl data
tag = "D";
break;
case HCI_LOG_DATA_TYPE_SELF_DEFINE:
// self-defining data
tag = "S";
break;
default:
// unknown data type
tag = "U";
break;
}
return tag;
}
#endif
void bt_hci_log_record_hex(bt_hci_log_t *p_hci_log_ctl, uint8_t *hex, uint8_t hex_len)
{
uint8_t hci_log_char;
uint8_t *g_hci_log_buffer;
g_hci_log_buffer = p_hci_log_ctl->p_hci_log_buffer;
while (hex_len--)
{
hci_log_char = ((*hex) >> 4);
g_hci_log_buffer[p_hci_log_ctl->log_record_in] = s_hex_to_char_mapping [hci_log_char];
if (++ p_hci_log_ctl->log_record_in >= p_hci_log_ctl->buf_size) {
p_hci_log_ctl->log_record_in = 0;
}
if (p_hci_log_ctl->log_record_in == p_hci_log_ctl->log_record_out) {
p_hci_log_ctl->overflow = true;
}
hci_log_char = ((*hex) & 0x0f);
g_hci_log_buffer[p_hci_log_ctl->log_record_in] = s_hex_to_char_mapping [hci_log_char];
if (++p_hci_log_ctl->log_record_in >= p_hci_log_ctl->buf_size) {
p_hci_log_ctl->log_record_in = 0;
}
if (p_hci_log_ctl->log_record_in == p_hci_log_ctl->log_record_out) {
p_hci_log_ctl->overflow = true;
}
g_hci_log_buffer[p_hci_log_ctl->log_record_in] = ' ';
if (++ p_hci_log_ctl->log_record_in >= p_hci_log_ctl->buf_size) {
p_hci_log_ctl->log_record_in = 0;
}
if (p_hci_log_ctl->log_record_in == p_hci_log_ctl->log_record_out) {
p_hci_log_ctl->overflow = true;
}
++ hex;
}
}
void bt_hci_log_record_string(bt_hci_log_t *p_hci_log_ctl, char *string)
{
uint8_t *g_hci_log_buffer;
g_hci_log_buffer = p_hci_log_ctl->p_hci_log_buffer;
while (*string != '\0') {
g_hci_log_buffer[p_hci_log_ctl->log_record_in] = *string;
++string;
if (++p_hci_log_ctl->log_record_in >= p_hci_log_ctl->buf_size) {
p_hci_log_ctl->log_record_in = 0;
}
if (p_hci_log_ctl->log_record_in == p_hci_log_ctl->log_record_out) {
p_hci_log_ctl->overflow = true;
}
}
}
esp_err_t IRAM_ATTR bt_hci_log_record_data(bt_hci_log_t *p_hci_log_ctl, char *str, uint8_t data_type, uint8_t *data, uint8_t data_len)
{
osi_mutex_t mutex_lock;
uint8_t *g_hci_log_buffer;
if (!p_hci_log_ctl->p_hci_log_buffer) {
return ESP_FAIL;
}
g_hci_log_buffer = p_hci_log_ctl->p_hci_log_buffer;
if (!g_hci_log_buffer) {
return ESP_FAIL;
}
mutex_lock = p_hci_log_ctl->mutex_lock;
osi_mutex_lock(&mutex_lock, OSI_MUTEX_MAX_TIMEOUT);
#if (1)
// Add hci data index
bt_hci_log_record_hex(p_hci_log_ctl, &p_hci_log_ctl->index, 1);
#endif
#if (BT_HCI_LOG_PRINT_TAG)
char *tag = NULL;
tag = bt_data_type_to_str(data_type);
if (tag) {
bt_hci_log_record_string(p_hci_log_ctl, tag);
g_hci_log_buffer[p_hci_log_ctl->log_record_in] = ':';
if (++p_hci_log_ctl->log_record_in >= p_hci_log_ctl->buf_size) {
p_hci_log_ctl->log_record_in = 0;
}
if (p_hci_log_ctl->log_record_in == p_hci_log_ctl->log_record_out) {
p_hci_log_ctl->overflow = true;
}
}
#endif
if (str) {
bt_hci_log_record_string(p_hci_log_ctl, str);
}
bt_hci_log_record_hex(p_hci_log_ctl, data, data_len);
g_hci_log_buffer[p_hci_log_ctl->log_record_in] = '\n';
if (++p_hci_log_ctl->log_record_in >= p_hci_log_ctl->buf_size) {
p_hci_log_ctl->log_record_in = 0;
}
if (p_hci_log_ctl->log_record_in == p_hci_log_ctl->log_record_out) {
p_hci_log_ctl->overflow = true;
}
p_hci_log_ctl->index ++;
osi_mutex_unlock(&mutex_lock);
return ESP_OK;
}
void bt_hci_log_data_show(bt_hci_log_t *p_hci_log_ctl)
{
volatile uint64_t log_record_in,log_record_out;
uint8_t *g_hci_log_buffer;
if (!p_hci_log_ctl->p_hci_log_buffer) {
return;
}
osi_mutex_t mutex_lock = p_hci_log_ctl->mutex_lock;
osi_mutex_lock(&mutex_lock, OSI_MUTEX_MAX_TIMEOUT);
log_record_in = p_hci_log_ctl->log_record_in;
log_record_out = p_hci_log_ctl->log_record_out;
g_hci_log_buffer = p_hci_log_ctl->p_hci_log_buffer;
if (p_hci_log_ctl->overflow) {
log_record_out = log_record_in;
printf("%c",g_hci_log_buffer[log_record_out]);
if (++log_record_out >= p_hci_log_ctl->buf_size) {
log_record_out = 0;
}
}
while (log_record_in != log_record_out)
{
printf("%c",g_hci_log_buffer[log_record_out]);
if (++log_record_out >= p_hci_log_ctl->buf_size) {
log_record_out = 0;
}
}
p_hci_log_ctl->log_record_out = log_record_out;
p_hci_log_ctl->overflow = false;
osi_mutex_unlock(&mutex_lock);
}
static bool enable_hci_log_flag = true;
void bt_hci_log_record_hci_enable(bool enable)
{
enable_hci_log_flag = enable;
}
esp_err_t IRAM_ATTR bt_hci_log_record_hci_data(uint8_t data_type, uint8_t *data, uint8_t data_len)
{
if (!enable_hci_log_flag) return ESP_OK;
return bt_hci_log_record_data(&g_bt_hci_log_data_ctl, NULL, data_type, data, data_len);
}
esp_err_t IRAM_ATTR bt_hci_log_record_custom_data(char *string, uint8_t *data, uint8_t data_len)
{
if (!enable_hci_log_flag) return ESP_OK;
return bt_hci_log_record_data(&g_bt_hci_log_data_ctl, string, HCI_LOG_DATA_TYPE_SELF_DEFINE, data, data_len);
}
esp_err_t IRAM_ATTR bt_hci_log_record_hci_adv(uint8_t data_type, uint8_t *data, uint8_t data_len)
{
if (!enable_hci_log_flag) return ESP_OK;
return bt_hci_log_record_data(&g_bt_hci_log_adv_ctl, NULL, data_type, data, data_len);
}
void bt_hci_log_hci_data_show(void)
{
bt_hci_log_data_show(&g_bt_hci_log_data_ctl);
}
void bt_hci_log_hci_adv_show(void)
{
bt_hci_log_data_show(&g_bt_hci_log_adv_ctl);
}
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
@@ -0,0 +1,108 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_BT_HCI_LOG_H__
#define __ESP_BT_HCI_LOG_H__
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
#define HCI_LOG_DATA_TYPE_COMMAND (1)
#define HCI_LOG_DATA_TYPE_H2C_ACL (2)
#define HCI_LOG_DATA_TYPE_SCO (3)
#define HCI_LOG_DATA_TYPE_EVENT (4)
#define HCI_LOG_DATA_TYPE_ADV (5)
#define HCI_LOG_DATA_TYPE_SELF_DEFINE (6)
#define HCI_LOG_DATA_TYPE_C2H_ACL (7)
/**
*
* @brief This function is called to record self-defining data
* @param string : data identification
* @param data : data
* @param data_len : the length of data
*
* @return ESP_OK - success, other - failed
*
*/
esp_err_t bt_hci_log_record_custom_data(char *string, uint8_t *data, uint8_t data_len);
/**
*
* @brief This function is called to print all hci data record
*
*
* @return None
*
*/
void bt_hci_log_hci_data_show(void);
/**
*
* @brief This function is called to print all adv report
*
*
* @return None
*
*/
void bt_hci_log_hci_adv_show(void);
/**
*
* @brief This function is called to init hci log env
*
*
* @return ESP_OK - success, other - failed
*
*/
esp_err_t bt_hci_log_init(void);
/**
*
* @brief This function is called to deinit hci debug mode,
* and can only be called internally by Bluetooth
*
*
* @return ESP_OK - success, other - failed
*
*/
esp_err_t bt_hci_log_deinit(void);
/**
*
* @brief This function is called to record hci data without adv report event,
* and can only be called internally by Bluetooth
*
* @param str : data type, define in bt_data_type_to_str()
* @param data : data
* @param data_len : the length of data
*
* @return ESP_OK - success, other - failed
*
*/
esp_err_t bt_hci_log_record_hci_data(uint8_t data_type, uint8_t *data, uint8_t data_len);
/**
*
* @brief This function is called to record hci adv report event only
* and can only be called internally by Bluetooth
*
* @param str : data type, define in bt_data_type_to_str()
* @param data : data
* @param data_len : the length of data
* @return ESP_OK - success, other - failed
*
*/
esp_err_t bt_hci_log_record_hci_adv(uint8_t data_type, uint8_t *data, uint8_t data_len);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BT_HCI_LOG_H__ */
+47 -1
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -46,6 +46,7 @@
#define OSI_INITIAL_TRACE_LEVEL UC_BT_LOG_OSI_TRACE_LEVEL
#define BLUFI_INITIAL_TRACE_LEVEL UC_BT_LOG_BLUFI_TRACE_LEVEL
// MEMORY
#if UC_BT_BLE_DYNAMIC_ENV_MEMORY
#define BT_BLE_DYNAMIC_ENV_MEMORY TRUE
#define BTC_DYNAMIC_MEMORY TRUE
@@ -64,6 +65,51 @@
#define BT_BLE_DYNAMIC_ENV_MEMORY FALSE
#endif
#if UC_HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define HEAP_ALLOCATION_FROM_SPIRAM_FIRST TRUE
#else
#define HEAP_ALLOCATION_FROM_SPIRAM_FIRST FALSE
#endif
#if UC_BT_ABORT_WHEN_ALLOCATION_FAILS
#define HEAP_ALLOCATION_FAILS_ABORT TRUE
#else
#define HEAP_ALLOCATION_FAILS_ABORT FALSE
#endif
// HCI LOG
#if UC_BT_HCI_LOG_DEBUG_EN
#define BT_HCI_LOG_INCLUDED UC_BT_HCI_LOG_DEBUG_EN
#else
#define BT_HCI_LOG_INCLUDED FALSE
#endif
// HCI LOG TO SPI
#if UC_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
#define BT_BLE_LOG_SPI_OUT_HCI_ENABLED UC_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
#else
#define BT_BLE_LOG_SPI_OUT_HCI_ENABLED FALSE
#endif
// BLURDROID LOG TO SPI
#if UC_BT_BLE_LOG_SPI_OUT_HOST_ENABLED
#define BT_BLE_LOG_SPI_OUT_HOST_ENABLED UC_BT_BLE_LOG_SPI_OUT_HOST_ENABLED
#else
#define BT_BLE_LOG_SPI_OUT_HOST_ENABLED FALSE
#endif
#if UC_BT_HCI_LOG_DATA_BUFFER_SIZE
#define HCI_LOG_DATA_BUFFER_SIZE UC_BT_HCI_LOG_DATA_BUFFER_SIZE
#else
#define HCI_BUFFER_SIZE (5)
#endif
#if UC_BT_HCI_ADV_BUFFER_SIZE
#define HCI_LOG_ADV_BUFFER_SIZE UC_BT_HCI_LOG_ADV_BUFFER_SIZE
#else
#define HCI_LOG_ADV_BUFFER_SIZE (5)
#endif
/* OS Configuration from User config (eg: sdkconfig) */
#define TASK_PINNED_TO_CORE UC_TASK_PINNED_TO_CORE
#define BT_TASK_MAX_PRIORITIES configMAX_PRIORITIES
+56 -2
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -44,6 +44,15 @@
#define UC_BTC_TASK_STACK_SIZE 4096
#endif
/**********************************************************
* Alarm reference
**********************************************************/
#ifdef CONFIG_BT_ALARM_MAX_NUM
#define UC_ALARM_MAX_NUM CONFIG_BT_ALARM_MAX_NUM
#else
#define UC_ALARM_MAX_NUM 50
#endif
/**********************************************************
* Trace reference
**********************************************************/
@@ -85,11 +94,56 @@
#define UC_BT_BLUFI_ENABLE FALSE
#endif
//MEMORY DEBUG
//MEMORY
#ifdef CONFIG_BT_BLUEDROID_MEM_DEBUG
#define UC_BT_BLUEDROID_MEM_DEBUG TRUE
#else
#define UC_BT_BLUEDROID_MEM_DEBUG FALSE
#endif
#ifdef CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST
#define UC_HEAP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST
#else
#define UC_HEAP_ALLOCATION_FROM_SPIRAM_FIRST FALSE
#endif
#ifdef CONFIG_BT_ABORT_WHEN_ALLOCATION_FAILS
#define UC_BT_ABORT_WHEN_ALLOCATION_FAILS CONFIG_BT_ABORT_WHEN_ALLOCATION_FAILS
#else
#define UC_BT_ABORT_WHEN_ALLOCATION_FAILS FALSE
#endif
//HCI LOG
#ifdef CONFIG_BT_HCI_LOG_DEBUG_EN
#define UC_BT_HCI_LOG_DEBUG_EN TRUE
#else
#define UC_BT_HCI_LOG_DEBUG_EN FALSE
#endif
//HCI LOG TO SPI
#ifdef CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
#define UC_BT_BLE_LOG_SPI_OUT_HCI_ENABLED TRUE
#else
#define UC_BT_BLE_LOG_SPI_OUT_HCI_ENABLED FALSE
#endif
//BLUEDROID LOG TO SPI
#ifdef CONFIG_BT_BLE_LOG_SPI_OUT_HOST_ENABLED
#define UC_BT_BLE_LOG_SPI_OUT_HOST_ENABLED TRUE
#else
#define UC_BT_BLE_LOG_SPI_OUT_HOST_ENABLED FALSE
#endif
#ifdef CONFIG_BT_HCI_LOG_DATA_BUFFER_SIZE
#define UC_BT_HCI_LOG_DATA_BUFFER_SIZE CONFIG_BT_HCI_LOG_DATA_BUFFER_SIZE
#else
#define UC_BT_HCI_LOG_DATA_BUFFER_SIZE (5)
#endif
#ifdef CONFIG_BT_HCI_LOG_ADV_BUFFER_SIZE
#define UC_BT_HCI_LOG_ADV_BUFFER_SIZE CONFIG_BT_HCI_LOG_ADV_BUFFER_SIZE
#else
#define UC_BT_HCI_LOG_ADV_BUFFER_SIZE (5)
#endif
#endif /* __BT_USER_CONFIG_H__ */
+18 -30
View File
@@ -213,42 +213,30 @@ char *osi_strdup(const char *str)
void *osi_malloc_func(size_t size)
{
#if HEAP_MEMORY_DEBUG
void *p;
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
p = heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL);
#else
p = malloc(size);
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
osi_mem_dbg_record(p, size, __func__, __LINE__);
void *p = osi_malloc_base(size);
if (size != 0 && p == NULL) {
OSI_TRACE_ERROR("malloc failed (caller=%p size=%u)\n", __builtin_return_address(0), size);
#if HEAP_ALLOCATION_FAILS_ABORT
assert(0);
#endif
}
return p;
#else
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
return heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL);
#else
return malloc(size);
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
#endif /* #if HEAP_MEMORY_DEBUG */
}
void *osi_calloc_func(size_t size)
{
#if HEAP_MEMORY_DEBUG
void *p;
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
p = heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL);
#else
p = calloc(1, size);
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
osi_mem_dbg_record(p, size, __func__, __LINE__);
void *p = osi_calloc_base(size);
if (size != 0 && p == NULL) {
OSI_TRACE_ERROR("calloc failed (caller=%p size=%u)\n", __builtin_return_address(0), size);
#if HEAP_ALLOCATION_FAILS_ABORT
assert(0);
#endif
}
return p;
#else
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
return heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL);
#else
return calloc(1, size);
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
#endif /* #if HEAP_MEMORY_DEBUG */
}
void osi_free_func(void *ptr)
+2 -1
View File
@@ -21,6 +21,7 @@
#include <stdint.h>
#include "esp_timer.h"
#include "bt_user_config.h"
typedef struct alarm_t osi_alarm_t;
typedef uint64_t period_ms_t;
@@ -33,7 +34,7 @@ typedef enum {
OSI_ALARM_ERR_INVALID_STATE = -3,
} osi_alarm_err_t;
#define ALARM_CBS_NUM 50
#define ALARM_CBS_NUM UC_ALARM_MAX_NUM
#define ALARM_ID_BASE 1000
int osi_alarm_create_mux(void);
@@ -29,6 +29,15 @@ void *osi_malloc_func(size_t size);
void *osi_calloc_func(size_t size);
void osi_free_func(void *ptr);
// Memory alloc function without print and assertion
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define osi_malloc_base(size) heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#define osi_calloc_base(size) heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#else
#define osi_malloc_base(size) malloc((size))
#define osi_calloc_base(size) calloc(1, (size))
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
#if HEAP_MEMORY_DEBUG
void osi_mem_dbg_init(void);
@@ -41,13 +50,10 @@ void osi_men_dbg_set_section_start(uint8_t index);
void osi_men_dbg_set_section_end(uint8_t index);
uint32_t osi_mem_dbg_get_max_size_section(uint8_t index);
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define osi_malloc(size) \
({ \
void *p; \
p = heap_caps_malloc_prefer(size, 2, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL); \
p = osi_malloc_base(size); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
@@ -55,34 +61,11 @@ uint32_t osi_mem_dbg_get_max_size_section(uint8_t index);
#define osi_calloc(size) \
({ \
void *p; \
p = heap_caps_calloc_prefer(1, size, 2, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL); \
p = osi_calloc_base(size); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
#else
#define osi_malloc(size) \
({ \
void *p; \
p = malloc((size)); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
#define osi_calloc(size) \
({ \
void *p; \
p = calloc(1, (size)); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
#if 0
#define osi_malloc(size) \
do { \
@@ -122,13 +105,9 @@ do { \
#else
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define osi_malloc(size) heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#define osi_calloc(size) heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#else
#define osi_malloc(size) malloc((size))
#define osi_calloc(size) calloc(1, (size))
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
// Memory alloc function with print and assertion when fails
#define osi_malloc(size) osi_malloc_func((size))
#define osi_calloc(size) osi_calloc_func((size))
#define osi_free(p) free((p))
#endif /* HEAP_MEMORY_DEBUG */
@@ -76,4 +76,8 @@ void fixed_pkt_queue_unregister_dequeue(fixed_pkt_queue_t *queue);
void fixed_pkt_queue_process(fixed_pkt_queue_t *queue);
#ifdef __cplusplus
}
#endif
#endif
+2 -2
View File
@@ -271,10 +271,10 @@ _err:
}
for (int i = 0; i < thread->work_queue_num; i++) {
if (thread->work_queues[i]) {
if (thread->work_queues && thread->work_queues[i]) {
osi_work_queue_delete(thread->work_queues[i]);
thread->work_queues[i] = NULL;
}
thread->work_queues[i] = NULL;
}
if (thread->work_queues) {
@@ -1,4 +1,8 @@
/* aes.h - TinyCrypt interface to an AES-128 implementation */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,4 +1,8 @@
/* cbc_mode.h - TinyCrypt interface to a CBC mode implementation */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,4 +1,8 @@
/* ccm_mode.h - TinyCrypt interface to a CCM mode implementation */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,4 +1,8 @@
/* cmac_mode.h -- interface to a CMAC implementation */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved
@@ -1,4 +1,8 @@
/* constants.h - TinyCrypt interface to constants */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,4 +1,8 @@
/* ctr_mode.h - TinyCrypt interface to CTR mode */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* ctr_prng.h - TinyCrypt interface to a CTR-PRNG implementation */
/*
@@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* ecc.h - TinyCrypt interface to common ECC functions */
/* Copyright (c) 2014, Kenneth MacKay
@@ -1,4 +1,8 @@
/* ecc_dh.h - TinyCrypt interface to EC-DH implementation */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (c) 2014, Kenneth MacKay
@@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* ecc_dh.h - TinyCrypt interface to EC-DSA implementation */
/*
@@ -1,4 +1,8 @@
/* uECC_platform_specific.h - Interface to platform specific functions*/
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Copyright (c) 2014, Kenneth MacKay
* All rights reserved.
@@ -1,4 +1,8 @@
/* hmac.h - TinyCrypt interface to an HMAC implementation */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -124,7 +128,7 @@ int tc_hmac_update(TCHmacState_t ctx, const void *data,
* key == NULL or
* taglen != TC_SHA256_DIGEST_SIZE
* @note ctx is erased before exiting. This should never be changed/removed.
* @note Assumes the tag bufer is at least sizeof(hmac_tag_size(state)) bytes
* @note Assumes the tag buffer is at least sizeof(hmac_tag_size(state)) bytes
* state has been initialized by tc_hmac_init
* @param tag IN/OUT -- buffer to receive computed HMAC tag
* @param taglen IN -- size of tag in bytes
@@ -1,4 +1,8 @@
/* hmac_prng.h - TinyCrypt interface to an HMAC-PRNG implementation */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* sha256.h - TinyCrypt interface to a SHA-256 implementation */
/*
@@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* utils.h - TinyCrypt interface to platform-dependent run-time operations */
/*
@@ -0,0 +1,70 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_tinycrypt_port.h"
#if SOC_ECC_SUPPORTED
#include "esp_crypto_lock.h"
#include "esp_private/periph_ctrl.h"
#include "hal/ecc_hal.h"
#include "hal/ecc_ll.h"
static void esp_tinycrypt_acquire_ecc_hardware(void)
{
esp_crypto_ecc_lock_acquire();
periph_module_enable(PERIPH_ECC_MODULE);
}
static void esp_tinycrypt_release_ecc_hardware(void)
{
periph_module_disable(PERIPH_ECC_MODULE);
esp_crypto_ecc_lock_release();
}
int esp_tinycrypt_verify_ecc_point(const uint8_t *pk_x, const uint8_t *pk_y, uint8_t length)
{
int result;
esp_tinycrypt_acquire_ecc_hardware();
ecc_hal_write_verify_param(pk_x, pk_y, length);
ecc_hal_set_mode(ECC_MODE_VERIFY);
ecc_hal_start_calc();
while (!ecc_hal_is_calc_finished());
result = ecc_hal_read_verify_result();
esp_tinycrypt_release_ecc_hardware();
if (result == 1) {
return 0;
} else {
return -1;
}
}
int esp_tinycrypt_calc_ecc_mult(const uint8_t *p_x, const uint8_t *p_y, const uint8_t *scalar,
uint8_t *r_x, uint8_t *r_y, uint8_t num_bytes, bool verify_first)
{
int ret = -1;
ecc_mode_t work_mode = verify_first ? ECC_MODE_VERIFY_THEN_POINT_MUL : ECC_MODE_POINT_MUL;
esp_tinycrypt_acquire_ecc_hardware();
ecc_hal_write_mul_param(scalar, p_x, p_y, num_bytes);
ecc_hal_set_mode(work_mode);
ecc_hal_start_calc();
while (!ecc_hal_is_calc_finished());
ret = ecc_hal_read_mul_result(r_x, r_y, num_bytes);
esp_tinycrypt_release_ecc_hardware();
return ret;
}
#endif /* SOC_ECC_SUPPORTED */
@@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include <stdbool.h>
#include "soc/soc_caps.h"
#if SOC_ECC_SUPPORTED
int esp_tinycrypt_verify_ecc_point(const uint8_t *pk_x, const uint8_t *pk_y, uint8_t length);
int esp_tinycrypt_calc_ecc_mult(const uint8_t *p_x, const uint8_t *p_y, const uint8_t *scalar,
uint8_t *r_x, uint8_t *r_y, uint8_t num_bytes, bool verify_first);
#endif /* SOC_ECC_SUPPORTED */
@@ -1,4 +1,8 @@
/* aes_decrypt.c - TinyCrypt implementation of AES decryption procedure */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -30,6 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* aes_decrypt.c - TinyCrypt implementation of AES decryption procedure */
#include <tinycrypt/aes.h>
#include <tinycrypt/constants.h>
#include <tinycrypt/utils.h>
@@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* aes_encrypt.c - TinyCrypt implementation of AES encryption procedure */
/*
@@ -1,4 +1,8 @@
/* cbc_mode.c - TinyCrypt implementation of CBC mode encryption & decryption */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,4 +1,8 @@
/* ccm_mode.c - TinyCrypt implementation of CCM mode */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -30,6 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* ccm_mode.c - TinyCrypt implementation of CCM mode */
#include <tinycrypt/ccm_mode.h>
#include <tinycrypt/constants.h>
#include <tinycrypt/utils.h>
@@ -1,4 +1,8 @@
/* cmac_mode.c - TinyCrypt CMAC mode implementation */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* ctr_mode.c - TinyCrypt CTR mode implementation */
/*
@@ -1,4 +1,8 @@
/* ctr_prng.c - TinyCrypt implementation of CTR-PRNG */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (c) 2016, Chris Morrison
@@ -1,4 +1,8 @@
/* ecc.c - TinyCrypt implementation of common ECC functions */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (c) 2014, Kenneth MacKay
@@ -55,6 +59,9 @@
#include <tinycrypt/ecc.h>
#include <tinycrypt/ecc_platform_specific.h>
#include <string.h>
#include <stdio.h>
#include "esp_tinycrypt_port.h"
/* IMPORTANT: Make sure a cryptographically-secure PRNG is set and the platform
* has access to enough entropy in order to feed the PRNG regularly. */
@@ -635,6 +642,7 @@ void apply_z(uECC_word_t * X1, uECC_word_t * Y1, const uECC_word_t * const Z,
uECC_vli_modMult_fast(Y1, Y1, t1, curve); /* y1 * z^3 */
}
#if !SOC_ECC_SUPPORTED
/* P = (x1, y1) => 2P, (x2, y2) => P' */
static void XYcZ_initial_double(uECC_word_t * X1, uECC_word_t * Y1,
uECC_word_t * X2, uECC_word_t * Y2,
@@ -658,31 +666,6 @@ static void XYcZ_initial_double(uECC_word_t * X1, uECC_word_t * Y1,
apply_z(X2, Y2, z, curve);
}
void XYcZ_add(uECC_word_t * X1, uECC_word_t * Y1,
uECC_word_t * X2, uECC_word_t * Y2,
uECC_Curve curve)
{
/* t1 = X1, t2 = Y1, t3 = X2, t4 = Y2 */
uECC_word_t t5[NUM_ECC_WORDS];
wordcount_t num_words = curve->num_words;
uECC_vli_modSub(t5, X2, X1, curve->p, num_words); /* t5 = x2 - x1 */
uECC_vli_modSquare_fast(t5, t5, curve); /* t5 = (x2 - x1)^2 = A */
uECC_vli_modMult_fast(X1, X1, t5, curve); /* t1 = x1*A = B */
uECC_vli_modMult_fast(X2, X2, t5, curve); /* t3 = x2*A = C */
uECC_vli_modSub(Y2, Y2, Y1, curve->p, num_words); /* t4 = y2 - y1 */
uECC_vli_modSquare_fast(t5, Y2, curve); /* t5 = (y2 - y1)^2 = D */
uECC_vli_modSub(t5, t5, X1, curve->p, num_words); /* t5 = D - B */
uECC_vli_modSub(t5, t5, X2, curve->p, num_words); /* t5 = D - B - C = x3 */
uECC_vli_modSub(X2, X2, X1, curve->p, num_words); /* t3 = C - B */
uECC_vli_modMult_fast(Y1, Y1, X2, curve); /* t2 = y1*(C - B) */
uECC_vli_modSub(X2, X1, t5, curve->p, num_words); /* t3 = B - x3 */
uECC_vli_modMult_fast(Y2, Y2, X2, curve); /* t4 = (y2 - y1)*(B - x3) */
uECC_vli_modSub(Y2, Y2, Y1, curve->p, num_words); /* t4 = y3 */
uECC_vli_set(X2, t5, num_words);
}
/* Input P = (x1, y1, Z), Q = (x2, y2, Z)
Output P + Q = (x3, y3, Z3), P - Q = (x3', y3', Z3)
@@ -725,12 +708,49 @@ static void XYcZ_addC(uECC_word_t * X1, uECC_word_t * Y1,
uECC_vli_set(X1, t7, num_words);
}
#endif /* !SOC_ECC_SUPPORTED */
void XYcZ_add(uECC_word_t * X1, uECC_word_t * Y1,
uECC_word_t * X2, uECC_word_t * Y2,
uECC_Curve curve)
{
/* t1 = X1, t2 = Y1, t3 = X2, t4 = Y2 */
uECC_word_t t5[NUM_ECC_WORDS];
wordcount_t num_words = curve->num_words;
uECC_vli_modSub(t5, X2, X1, curve->p, num_words); /* t5 = x2 - x1 */
uECC_vli_modSquare_fast(t5, t5, curve); /* t5 = (x2 - x1)^2 = A */
uECC_vli_modMult_fast(X1, X1, t5, curve); /* t1 = x1*A = B */
uECC_vli_modMult_fast(X2, X2, t5, curve); /* t3 = x2*A = C */
uECC_vli_modSub(Y2, Y2, Y1, curve->p, num_words); /* t4 = y2 - y1 */
uECC_vli_modSquare_fast(t5, Y2, curve); /* t5 = (y2 - y1)^2 = D */
uECC_vli_modSub(t5, t5, X1, curve->p, num_words); /* t5 = D - B */
uECC_vli_modSub(t5, t5, X2, curve->p, num_words); /* t5 = D - B - C = x3 */
uECC_vli_modSub(X2, X2, X1, curve->p, num_words); /* t3 = C - B */
uECC_vli_modMult_fast(Y1, Y1, X2, curve); /* t2 = y1*(C - B) */
uECC_vli_modSub(X2, X1, t5, curve->p, num_words); /* t3 = B - x3 */
uECC_vli_modMult_fast(Y2, Y2, X2, curve); /* t4 = (y2 - y1)*(B - x3) */
uECC_vli_modSub(Y2, Y2, Y1, curve->p, num_words); /* t4 = y3 */
uECC_vli_set(X2, t5, num_words);
}
void EccPoint_mult(uECC_word_t * result, const uECC_word_t * point,
const uECC_word_t * scalar,
const uECC_word_t * initial_Z,
bitcount_t num_bits, uECC_Curve curve)
{
#if SOC_ECC_SUPPORTED
wordcount_t num_words = curve->num_words;
/* Only p256r1 is supported currently. */
assert (curve == uECC_secp256r1());
esp_tinycrypt_calc_ecc_mult((const uint8_t *)&point[0], (const uint8_t *)&point[num_words],
(uint8_t *)scalar, (uint8_t *)&result[0], (uint8_t *)&result[num_words],
num_words * uECC_WORD_SIZE, false);
#else
/* R0 and R1 */
uECC_word_t Rx[2][NUM_ECC_WORDS];
uECC_word_t Ry[2][NUM_ECC_WORDS];
@@ -769,6 +789,7 @@ void EccPoint_mult(uECC_word_t * result, const uECC_word_t * point,
uECC_vli_set(result, Rx[0], num_words);
uECC_vli_set(result + num_words, Ry[0], num_words);
#endif /* SOC_ECC_SUPPORTED */
}
uECC_word_t regularize_k(const uECC_word_t * const k, uECC_word_t *k0,
@@ -862,8 +883,6 @@ int uECC_generate_random_int(uECC_word_t *random, const uECC_word_t *top,
int uECC_valid_point(const uECC_word_t *point, uECC_Curve curve)
{
uECC_word_t tmp1[NUM_ECC_WORDS];
uECC_word_t tmp2[NUM_ECC_WORDS];
wordcount_t num_words = curve->num_words;
/* The point at infinity is invalid. */
@@ -877,19 +896,34 @@ int uECC_valid_point(const uECC_word_t *point, uECC_Curve curve)
return -2;
}
#if SOC_ECC_SUPPORTED
/* Only p256r1 is supported currently. */
if (curve != uECC_secp256r1()) {
return -5;
}
if (esp_tinycrypt_verify_ecc_point((const uint8_t *)&point[0],
(const uint8_t *)&point[num_words],
num_words * uECC_WORD_SIZE)) {
return -3;
}
#else
uECC_word_t tmp1[NUM_ECC_WORDS];
uECC_word_t tmp2[NUM_ECC_WORDS];
uECC_vli_modSquare_fast(tmp1, point + num_words, curve);
curve->x_side(tmp2, point, curve); /* tmp2 = x^3 + ax + b */
/* Make sure that y^2 == x^3 + ax + b */
if (uECC_vli_equal(tmp1, tmp2, num_words) != 0)
return -3;
#endif /* SOC_ECC_SUPPORTED */
return 0;
}
int uECC_valid_public_key(const uint8_t *public_key, uECC_Curve curve)
{
uECC_word_t _public[NUM_ECC_WORDS * 2];
uECC_vli_bytesToNative(_public, public_key, curve->num_bytes);
@@ -908,7 +942,6 @@ int uECC_valid_public_key(const uint8_t *public_key, uECC_Curve curve)
int uECC_compute_public_key(const uint8_t *private_key, uint8_t *public_key,
uECC_Curve curve)
{
uECC_word_t _private[NUM_ECC_WORDS];
uECC_word_t _public[NUM_ECC_WORDS * 2];
@@ -1,4 +1,8 @@
/* ec_dh.c - TinyCrypt implementation of EC-DH */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (c) 2014, Kenneth MacKay
@@ -1,4 +1,8 @@
/* ec_dsa.c - TinyCrypt implementation of EC-DSA */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Copyright (c) 2014, Kenneth MacKay
* All rights reserved.
@@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* uECC_platform_specific.c - Implementation of platform specific functions*/
/* Copyright (c) 2014, Kenneth MacKay
@@ -1,4 +1,8 @@
/* hmac.c - TinyCrypt implementation of the HMAC algorithm */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,4 +1,8 @@
/* hmac_prng.c - TinyCrypt implementation of HMAC-PRNG */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -30,6 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* hmac_prng.c - TinyCrypt implementation of HMAC-PRNG */
#include <tinycrypt/hmac_prng.h>
#include <tinycrypt/hmac.h>
#include <tinycrypt/constants.h>
@@ -1,4 +1,8 @@
/* sha256.c - TinyCrypt SHA-256 crypto hash algorithm implementation */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -1,4 +1,8 @@
/* utils.c - TinyCrypt platform-dependent run-time operations */
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
@@ -30,6 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* utils.c - TinyCrypt platform-dependent run-time operations */
#include <tinycrypt/utils.h>
#include <tinycrypt/constants.h>
+77 -5
View File
@@ -23,6 +23,14 @@ config BTDM_CTRL_BLE_MAX_CONN
BLE maximum connections of bluetooth controller.
Each connection uses 1KB static DRAM whenever the BT controller is enabled.
config BTDM_CTRL_BR_EDR_MIN_ENC_KEY_SZ_DFT
int "BR/EDR default minimum size of encryption key"
depends on BTDM_CTRL_MODE_BR_EDR_ONLY || BTDM_CTRL_MODE_BTDM
default 7
range 7 16
help
BR/EDR default minimum size of encryption key when start encryption.
config BTDM_CTRL_BR_EDR_MAX_ACL_CONN
int "BR/EDR ACL Max Connections"
depends on BTDM_CTRL_MODE_BR_EDR_ONLY || BTDM_CTRL_MODE_BTDM
@@ -139,6 +147,11 @@ config BTDM_CTRL_BLE_MAX_CONN_EFF
default BTDM_CTRL_BLE_MAX_CONN if BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM
default 0
config BTDM_CTRL_BR_EDR_MIN_ENC_KEY_SZ_DFT_EFF
int
default BTDM_CTRL_BR_EDR_MIN_ENC_KEY_SZ_DFT if BTDM_CTRL_MODE_BR_EDR_ONLY || BTDM_CTRL_MODE_BTDM
default 0
config BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF
int
default BTDM_CTRL_BR_EDR_MAX_ACL_CONN if BTDM_CTRL_MODE_BR_EDR_ONLY || BTDM_CTRL_MODE_BTDM
@@ -172,7 +185,7 @@ config BTDM_CTRL_PINNED_TO_CORE
choice BTDM_CTRL_HCI_MODE_CHOICE
prompt "HCI mode"
help
Speicify HCI mode as VHCI or UART(H4)
Specify HCI mode as VHCI or UART(H4)
config BTDM_CTRL_HCI_MODE_VHCI
bool "VHCI"
@@ -262,10 +275,10 @@ menu "MODEM SLEEP Options"
the bluetooth low power clock source.
config BTDM_CTRL_LPCLK_SEL_EXT_32K_XTAL
bool "External 32kHz crystal"
depends on RTC_CLK_SRC_EXT_CRYS
bool "External 32kHz crystal/oscillator"
depends on RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC
help
External 32kHz crystal has a nominal frequency of 32.768kHz and provides good frequency
External 32kHz crystal/oscillator has a nominal frequency of 32.768kHz and provides good frequency
stability. If used as Bluetooth low power clock, External 32kHz can support Bluetooth
modem sleep to be used with both DFS and light sleep.
endchoice
@@ -356,7 +369,7 @@ config BTDM_SCAN_DUPL_CACHE_SIZE
default 100
help
Maximum number of devices which can be recorded in scan duplicate filter.
When the maximum amount of device in the filter is reached, the cache will be refreshed.
When the maximum amount of device in the filter is reached, the oldest device will be refreshed.
config BTDM_SCAN_DUPL_CACHE_REFRESH_PERIOD
int "Duplicate scan list refresh period (seconds)"
@@ -398,6 +411,23 @@ config BTDM_CTRL_FULL_SCAN_SUPPORTED
The full scan function is mainly used to provide BLE scan performance.
This is required for scenes with high scan performance requirements, such as BLE Mesh scenes.
config BTDM_CTRL_SCAN_BACKOFF_UPPERLIMITMAX
bool "Disable active scan backoff"
default n
help
Disable active scan backoff. The bluetooth spec requires that scanners should run a backoff procedure to
minimize collision of scan request PDUs from nultiple scanners. If scan backoff is disabled, in active
scanning, scan request PDU will be sent every time when HW receives scannable ADV PDU.
config BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.
config BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP
bool "BLE adv report flow control supported"
depends on (BTDM_CTRL_MODE_BTDM || BTDM_CTRL_MODE_BLE_ONLY)
@@ -432,6 +462,48 @@ config BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD
If you set `BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD` to a small value or printf every adv lost event, it
may cause adv packets lost more.
menu "BLE disconnect when instant passed"
config BTDM_BLE_LLCP_CONN_UPDATE
bool "BLE ACL connection update procedure"
depends on (BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM)
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed during connection update procedure.
config BTDM_BLE_LLCP_CHAN_MAP_UPDATE
bool "BLE ACL channel map update procedure"
depends on (BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM)
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed in channel map update procedure.
endmenu
config BTDM_BLE_CHAN_ASS_EN
bool "Enable channel assessment"
depends on (BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM)
default y
help
If this option is enabled, The Controller will records the communication quality
for each channel and then start a timer to check and update the channel map every 4 seconds.
config BTDM_BLE_PING_EN
bool "Enable LE Ping procedure"
depends on (BTDM_CTRL_MODE_BTDM || BTDM_CTRL_MODE_BLE_ONLY)
default y
help
If this option is disabled, The Controller will not start the LE authenticated payload timer.
This option is used for some compatibility problems related to LE ping procedure.
config BTDM_CTRL_CONTROLLER_DEBUG_MODE_1
bool "Enable Bluetooth controller debugging mode 1 (for internal use only)"
default n
depends on BT_ENABLED
help
Enables specific debugging features for the Bluetooth controller.
This option is strictly for internal debugging purposes and should not be enabled in production environments,
as it may impact performance and stability.
config BTDM_RESERVE_DRAM
hex
+348 -140
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -44,6 +44,10 @@
#include "esp_rom_sys.h"
#include "hli_api.h"
#if CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
#include "ble_log/ble_log_spi_out.h"
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
#if CONFIG_BT_ENABLED
/* Macro definition
@@ -89,9 +93,10 @@ do{\
} while(0)
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
#define OSI_VERSION 0x00010004
#define OSI_VERSION 0x00010005
#define OSI_MAGIC_VALUE 0xFADEBEAD
#define BLE_CONTROLLER_MALLOC_CAPS (MALLOC_CAP_8BIT|MALLOC_CAP_DMA|MALLOC_CAP_INTERNAL)
/* Types definition
************************************************************************
*/
@@ -177,6 +182,7 @@ struct osi_funcs_t {
void (*_interrupt_l3_restore)(void);
void *(* _customer_queue_create)(uint32_t queue_len, uint32_t item_size);
int (* _coex_version_get)(unsigned int *major, unsigned int *minor, unsigned int *patch);
void (* _patch_apply)(void);
uint32_t _magic;
};
@@ -247,16 +253,26 @@ extern uint32_t _data_end_btdm_rom;
extern uint32_t _bt_bss_start;
extern uint32_t _bt_bss_end;
extern uint32_t _nimble_bss_start;
extern uint32_t _nimble_bss_end;
extern uint32_t _btdm_bss_start;
extern uint32_t _btdm_bss_end;
extern uint32_t _bt_controller_bss_start;
extern uint32_t _bt_controller_bss_end;
extern uint32_t _bt_data_start;
extern uint32_t _bt_data_end;
extern uint32_t _nimble_data_start;
extern uint32_t _nimble_data_end;
extern uint32_t _btdm_data_start;
extern uint32_t _btdm_data_end;
extern uint32_t _bt_controller_data_start;
extern uint32_t _bt_controller_data_end;
extern void config_bt_funcs_reset(void);
extern void config_ble_funcs_reset(void);
extern void config_btdm_funcs_reset(void);
#ifdef CONFIG_BT_BLUEDROID_ENABLED
extern void bt_stack_enableSecCtrlVsCmd(bool en);
#endif // CONFIG_BT_BLUEDROID_ENABLED
#if defined(CONFIG_BT_NIMBLE_ENABLED) || defined(CONFIG_BT_BLUEDROID_ENABLED)
extern void bt_stack_enableCoexVsCmd(bool en);
extern void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
extern void adv_stack_enableClearLegacyAdvVsCmd(bool en);
extern void advFilter_stack_enableDupExcListVsCmd(bool en);
#endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED)
/* Local Function Declare
*********************************************************************
@@ -330,6 +346,7 @@ static void *customer_queue_create_hlevel_wrapper(uint32_t queue_len, uint32_t i
static void interrupt_l3_disable(void);
static void interrupt_l3_restore(void);
static void bt_controller_deinit_internal(void);
static void patch_apply(void);
/* Local variable definition
***************************************************************************
@@ -417,6 +434,7 @@ static const struct osi_funcs_t osi_funcs_ro = {
._customer_queue_create = NULL,
#endif /* CONFIG_BTDM_CTRL_HLI */
._coex_version_get = coex_version_get_wrapper,
._patch_apply = patch_apply,
._magic = OSI_MAGIC_VALUE,
};
@@ -456,7 +474,11 @@ static DRAM_ATTR uint8_t btdm_lpcycle_us_frac = 0; // number of fractional bit f
#if CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG
// used low power clock
static DRAM_ATTR uint8_t btdm_lpclk_sel;
#if CONFIG_BTDM_CTRL_LPCLK_SEL_EXT_32K_XTAL
static DRAM_ATTR uint8_t btdm_lpclk_sel = ESP_BT_SLEEP_CLOCK_EXT_32K_XTAL;
#else
static DRAM_ATTR uint8_t btdm_lpclk_sel = ESP_BT_SLEEP_CLOCK_MAIN_XTAL;
#endif /* CONFIG_BTDM_CTRL_LPCLK_SEL_EXT_32K_XTAL */
#endif /* #ifdef CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG */
static DRAM_ATTR QueueHandle_t s_wakeup_req_sem = NULL;
@@ -798,7 +820,7 @@ static int32_t queue_send_hlevel_wrapper(void *queue, void *item, uint32_t block
* @param item The message which will be send
* @param hptw need do task yield or not
* @return send success or not
* There is an issue here: When the queue is full, it may reture true but it send fail to the queue, sometimes.
* There is an issue here: When the queue is full, it may return true but it send fail to the queue, sometimes.
* But in Bluetooth controller's isr, We don't care about the return value.
* It only required tp send success when the queue is empty all the time.
* So, this function meets the requirement.
@@ -906,7 +928,21 @@ static int IRAM_ATTR cause_sw_intr_to_core_wrapper(int core_id, int intr_no)
static void *malloc_internal_wrapper(size_t size)
{
return heap_caps_malloc(size, MALLOC_CAP_8BIT|MALLOC_CAP_DMA|MALLOC_CAP_INTERNAL);
return heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
}
void *malloc_ble_controller_mem(size_t size)
{
void *p = heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
if(p == NULL) {
ESP_LOGE(BTDM_LOG_TAG, "Malloc failed");
}
return p;
}
uint32_t get_ble_controller_free_heap_size(void)
{
return heap_caps_get_free_size(BLE_CONTROLLER_MALLOC_CAPS);
}
static int32_t IRAM_ATTR read_mac_wrapper(uint8_t mac[6])
@@ -1065,9 +1101,8 @@ static bool async_wakeup_request(int event)
switch (event) {
case BTDM_ASYNC_WAKEUP_REQ_HCI:
btdm_in_wakeup_requesting_set(true);
// NO break
case BTDM_ASYNC_WAKEUP_REQ_CTRL_DISA:
btdm_in_wakeup_requesting_set(true);
if (!btdm_power_state_active()) {
do_wakeup_request = true;
@@ -1100,10 +1135,10 @@ static void async_wakeup_request_end(int event)
bool request_lock = false;
switch (event) {
case BTDM_ASYNC_WAKEUP_REQ_HCI:
case BTDM_ASYNC_WAKEUP_REQ_CTRL_DISA:
request_lock = true;
break;
case BTDM_ASYNC_WAKEUP_REQ_COEX:
case BTDM_ASYNC_WAKEUP_REQ_CTRL_DISA:
request_lock = false;
break;
default:
@@ -1330,7 +1365,45 @@ static esp_err_t try_heap_caps_add_region(intptr_t start, intptr_t end)
return ret;
}
esp_err_t esp_bt_controller_mem_release(esp_bt_mode_t mode)
typedef struct {
intptr_t start;
intptr_t end;
const char* name;
} bt_area_t;
static esp_err_t esp_bt_mem_release_area(const bt_area_t *area)
{
esp_err_t ret = ESP_OK;
intptr_t mem_start = area->start;
intptr_t mem_end = area->end;
if (mem_start != mem_end) {
ESP_LOGD(BTDM_LOG_TAG, "Release %s [0x%08x] - [0x%08x], len %d", area->name, mem_start, mem_end, mem_end - mem_start);
ret = try_heap_caps_add_region(mem_start, mem_end);
}
return ret;
}
static esp_err_t esp_bt_mem_release_areas(const bt_area_t *area1, const bt_area_t *area2)
{
esp_err_t ret = ESP_OK;
if (area1->end == area2->start) {
bt_area_t merged_area = {
.start = area1->start,
.end = area2->end,
.name = area1->name
};
ret = esp_bt_mem_release_area(&merged_area);
} else {
esp_bt_mem_release_area(area1);
ret = esp_bt_mem_release_area(area2);
}
return ret;
}
static esp_err_t esp_bt_controller_rom_mem_release(esp_bt_mode_t mode)
{
bool update = true;
intptr_t mem_start=(intptr_t) NULL, mem_end=(intptr_t) NULL;
@@ -1341,7 +1414,8 @@ esp_err_t esp_bt_controller_mem_release(esp_bt_mode_t mode)
//already released
if (!(mode & btdm_dram_available_region[0].mode)) {
return ESP_ERR_INVALID_STATE;
ESP_LOGW(BTDM_LOG_TAG, "%s already released, mode %d",__func__, mode);
return ESP_OK;
}
for (int i = 0; i < sizeof(btdm_dram_available_region)/sizeof(btdm_dram_available_region_t); i++) {
@@ -1381,61 +1455,89 @@ esp_err_t esp_bt_controller_mem_release(esp_bt_mode_t mode)
}
}
if (mode == ESP_BT_MODE_BTDM) {
mem_start = (intptr_t)&_btdm_bss_start;
mem_end = (intptr_t)&_btdm_bss_end;
if (mem_start != mem_end) {
ESP_LOGD(BTDM_LOG_TAG, "Release BTDM BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_btdm_data_start;
mem_end = (intptr_t)&_btdm_data_end;
if (mem_start != mem_end) {
ESP_LOGD(BTDM_LOG_TAG, "Release BTDM Data [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
}
return ESP_OK;
}
esp_err_t esp_bt_controller_mem_release(esp_bt_mode_t mode)
{
esp_err_t ret = ESP_OK;
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_IDLE) {
return ESP_ERR_INVALID_STATE;
}
if (mode == ESP_BT_MODE_BTDM) {
bt_area_t cont_bss = {
.start = (intptr_t)&_bt_controller_bss_start,
.end = (intptr_t)&_bt_controller_bss_end,
.name = "BT Controller BSS",
};
bt_area_t cont_data = {
.start = (intptr_t)&_bt_controller_data_start,
.end = (intptr_t)&_bt_controller_data_end,
.name = "BT Controller Data"
};
ret = esp_bt_mem_release_areas(&cont_data, &cont_bss);
}
if (ret == ESP_OK) {
ret = esp_bt_controller_rom_mem_release(mode);
}
return ret;
}
esp_err_t esp_bt_mem_release(esp_bt_mode_t mode)
{
int ret;
intptr_t mem_start, mem_end;
esp_err_t ret = ESP_OK;
ret = esp_bt_controller_mem_release(mode);
if (ret != ESP_OK) {
return ret;
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_IDLE) {
return ESP_ERR_INVALID_STATE;
}
bt_area_t bss = {
.start = (intptr_t)&_bt_bss_start,
.end = (intptr_t)&_bt_bss_end,
.name = "BT BSS",
};
bt_area_t cont_bss = {
.start = (intptr_t)&_bt_controller_bss_start,
.end = (intptr_t)&_bt_controller_bss_end,
.name = "BT Controller BSS",
};
bt_area_t data = {
.start = (intptr_t)&_bt_data_start,
.end = (intptr_t)&_bt_data_end,
.name = "BT Data",
};
bt_area_t cont_data = {
.start = (intptr_t)&_bt_controller_data_start,
.end = (intptr_t)&_bt_controller_data_end,
.name = "BT Controller Data"
};
/*
* Free data and BSS section for Bluetooth controller ROM code.
* Note that rom mem release must be performed before section _bt_data_start to _bt_data_end is released,
* otherwise `btdm_dram_available_region` will no longer be available when performing rom mem release and
* thus causing heap corruption.
*/
ret = esp_bt_controller_rom_mem_release(mode);
if (mode == ESP_BT_MODE_BTDM) {
mem_start = (intptr_t)&_bt_bss_start;
mem_end = (intptr_t)&_bt_bss_end;
if (mem_start != mem_end) {
ESP_LOGD(BTDM_LOG_TAG, "Release BT BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_bt_data_start;
mem_end = (intptr_t)&_bt_data_end;
if (mem_start != mem_end) {
ESP_LOGD(BTDM_LOG_TAG, "Release BT Data [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
/* Start by freeing Bluetooth BSS section */
if (ret == ESP_OK) {
ret = esp_bt_mem_release_areas(&bss, &cont_bss);
}
mem_start = (intptr_t)&_nimble_bss_start;
mem_end = (intptr_t)&_nimble_bss_end;
if (mem_start != mem_end) {
ESP_LOGD(BTDM_LOG_TAG, "Release NimBLE BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_nimble_data_start;
mem_end = (intptr_t)&_nimble_data_end;
if (mem_start != mem_end) {
ESP_LOGD(BTDM_LOG_TAG, "Release NimBLE Data [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
/* Do the same thing with the Bluetooth data section */
if (ret == ESP_OK) {
ret = esp_bt_mem_release_areas(&data, &cont_data);
}
}
return ESP_OK;
return ret;
}
#if CONFIG_BTDM_CTRL_HLI
@@ -1458,6 +1560,117 @@ static void hli_queue_setup_pinned_to_core(int core_id)
}
#endif /* CONFIG_BTDM_CTRL_HLI */
// init low-power control resources
static esp_err_t btdm_low_power_mode_init(void)
{
esp_err_t err = ESP_OK;
#ifdef CONFIG_PM_ENABLE
s_btdm_allow_light_sleep = false;
#endif
// set default sleep clock cycle and its fractional bits
btdm_lpcycle_us_frac = RTC_CLK_CAL_FRACT;
btdm_lpcycle_us = 2 << (btdm_lpcycle_us_frac);
#if CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG
if (btdm_lpclk_sel == ESP_BT_SLEEP_CLOCK_EXT_32K_XTAL) {
// check whether or not EXT_CRYS is working
if (rtc_clk_slow_src_get() == SOC_RTC_SLOW_CLK_SRC_XTAL32K) {
#ifdef CONFIG_PM_ENABLE
s_btdm_allow_light_sleep = true;
#endif
} else {
ESP_LOGW(BTDM_LOG_TAG, "32.768kHz XTAL not detected, fall back to main XTAL as Bluetooth sleep clock\n"
"light sleep mode will not be able to apply when bluetooth is enabled");
btdm_lpclk_sel = ESP_BT_SLEEP_CLOCK_MAIN_XTAL; // set default value
}
} else if (btdm_lpclk_sel != ESP_BT_SLEEP_CLOCK_MAIN_XTAL) {
assert(0);
}
bool select_src_ret __attribute__((unused));
bool set_div_ret __attribute__((unused));
if (btdm_lpclk_sel == ESP_BT_SLEEP_CLOCK_MAIN_XTAL) {
select_src_ret = btdm_lpclk_select_src(BTDM_LPCLK_SEL_XTAL);
set_div_ret = btdm_lpclk_set_div(esp_clk_xtal_freq() * 2 / MHZ - 1);
assert(select_src_ret && set_div_ret);
btdm_lpcycle_us_frac = RTC_CLK_CAL_FRACT;
btdm_lpcycle_us = 2 << (btdm_lpcycle_us_frac);
} else { // btdm_lpclk_sel == BTDM_LPCLK_SEL_XTAL32K
select_src_ret = btdm_lpclk_select_src(BTDM_LPCLK_SEL_XTAL32K);
set_div_ret = btdm_lpclk_set_div(0);
assert(select_src_ret && set_div_ret);
btdm_lpcycle_us_frac = RTC_CLK_CAL_FRACT;
btdm_lpcycle_us = (RTC_CLK_CAL_FRACT > 15) ? (1000000 << (RTC_CLK_CAL_FRACT - 15)) :
(1000000 >> (15 - RTC_CLK_CAL_FRACT));
assert(btdm_lpcycle_us != 0);
}
btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_ORIG);
#elif CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_EVED
btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_EVED);
#else
btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_NONE);
#endif
#ifdef CONFIG_PM_ENABLE
if (!s_btdm_allow_light_sleep) {
if ((err = esp_pm_lock_create(ESP_PM_NO_LIGHT_SLEEP, 0, "btLS", &s_light_sleep_pm_lock)) != ESP_OK) {
return err;
}
}
if ((err = esp_pm_lock_create(ESP_PM_APB_FREQ_MAX, 0, "bt", &s_pm_lock)) != ESP_OK) {
return err;
}
esp_timer_create_args_t create_args = {
.callback = btdm_slp_tmr_callback,
.arg = NULL,
.name = "btSlp"
};
if ((err = esp_timer_create(&create_args, &s_btdm_slp_tmr)) != ESP_OK) {
return err;
}
s_pm_lock_acquired = true;
#endif
return err;
}
esp_bt_sleep_clock_t esp_bt_get_lpclk_src(void)
{
#if CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_INITED &&
btdm_controller_status != ESP_BT_CONTROLLER_STATUS_ENABLED) {
return ESP_BT_SLEEP_CLOCK_NONE;
}
return btdm_lpclk_sel;
#else
return ESP_BT_SLEEP_CLOCK_NONE;
#endif
}
esp_err_t esp_bt_set_lpclk_src(esp_bt_sleep_clock_t lpclk)
{
#if CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG
if (lpclk < ESP_BT_SLEEP_CLOCK_MAIN_XTAL || lpclk > ESP_BT_SLEEP_CLOCK_EXT_32K_XTAL) {
return ESP_ERR_INVALID_ARG;
}
if (btdm_controller_status == ESP_BT_CONTROLLER_STATUS_INITED ||
btdm_controller_status == ESP_BT_CONTROLLER_STATUS_ENABLED) {
ESP_LOGW(BTDM_LOG_TAG, "Please set the Bluetooth sleep clock source before Bluetooth initialization");
return ESP_ERR_INVALID_STATE;
}
btdm_lpclk_sel = lpclk;
return ESP_OK;
#else
return ESP_ERR_NOT_SUPPORTED;
#endif
}
esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
{
esp_err_t err;
@@ -1520,58 +1733,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
btdm_controller_mem_init();
periph_module_enable(PERIPH_BT_MODULE);
#ifdef CONFIG_PM_ENABLE
s_btdm_allow_light_sleep = false;
#endif
// set default sleep clock cycle and its fractional bits
btdm_lpcycle_us_frac = RTC_CLK_CAL_FRACT;
btdm_lpcycle_us = 2 << (btdm_lpcycle_us_frac);
#if CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG
btdm_lpclk_sel = BTDM_LPCLK_SEL_XTAL; // set default value
#if CONFIG_BTDM_CTRL_LPCLK_SEL_EXT_32K_XTAL
// check whether or not EXT_CRYS is working
if (rtc_clk_slow_src_get() == SOC_RTC_SLOW_CLK_SRC_XTAL32K) {
btdm_lpclk_sel = BTDM_LPCLK_SEL_XTAL32K; // External 32kHz XTAL
#ifdef CONFIG_PM_ENABLE
s_btdm_allow_light_sleep = true;
#endif
} else {
ESP_LOGW(BTDM_LOG_TAG, "32.768kHz XTAL not detected, fall back to main XTAL as Bluetooth sleep clock\n"
"light sleep mode will not be able to apply when bluetooth is enabled");
btdm_lpclk_sel = BTDM_LPCLK_SEL_XTAL; // set default value
}
#else
btdm_lpclk_sel = BTDM_LPCLK_SEL_XTAL; // set default value
#endif
bool select_src_ret __attribute__((unused));
bool set_div_ret __attribute__((unused));
if (btdm_lpclk_sel == BTDM_LPCLK_SEL_XTAL) {
select_src_ret = btdm_lpclk_select_src(BTDM_LPCLK_SEL_XTAL);
set_div_ret = btdm_lpclk_set_div(esp_clk_xtal_freq() * 2 / MHZ - 1);
assert(select_src_ret && set_div_ret);
btdm_lpcycle_us_frac = RTC_CLK_CAL_FRACT;
btdm_lpcycle_us = 2 << (btdm_lpcycle_us_frac);
} else { // btdm_lpclk_sel == BTDM_LPCLK_SEL_XTAL32K
select_src_ret = btdm_lpclk_select_src(BTDM_LPCLK_SEL_XTAL32K);
set_div_ret = btdm_lpclk_set_div(0);
assert(select_src_ret && set_div_ret);
btdm_lpcycle_us_frac = RTC_CLK_CAL_FRACT;
btdm_lpcycle_us = (RTC_CLK_CAL_FRACT > 15) ? (1000000 << (RTC_CLK_CAL_FRACT - 15)) :
(1000000 >> (15 - RTC_CLK_CAL_FRACT));
assert(btdm_lpcycle_us != 0);
}
btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_ORIG);
#elif CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_EVED
btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_EVED);
#else
btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_NONE);
#endif
periph_module_reset(PERIPH_BT_MODULE);
#if CONFIG_BTDM_CTRL_HCI_UART_FLOW_CTRL_EN
sdk_config_set_uart_flow_ctrl_enable(true);
@@ -1579,44 +1741,52 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
sdk_config_set_uart_flow_ctrl_enable(false);
#endif
#ifdef CONFIG_PM_ENABLE
if (!s_btdm_allow_light_sleep) {
if ((err = esp_pm_lock_create(ESP_PM_NO_LIGHT_SLEEP, 0, "btLS", &s_light_sleep_pm_lock)) != ESP_OK) {
goto error;
}
}
if ((err = esp_pm_lock_create(ESP_PM_APB_FREQ_MAX, 0, "bt", &s_pm_lock)) != ESP_OK) {
if ((err = btdm_low_power_mode_init()) != ESP_OK) {
ESP_LOGE(BTDM_LOG_TAG, "Low power module initialization failed");
goto error;
}
esp_timer_create_args_t create_args = {
.callback = btdm_slp_tmr_callback,
.arg = NULL,
.name = "btSlp"
};
if ((err = esp_timer_create(&create_args, &s_btdm_slp_tmr)) != ESP_OK) {
goto error;
}
s_pm_lock_acquired = true;
#endif
#if CONFIG_SW_COEXIST_ENABLE
coex_init();
#endif
#if CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
if (ble_log_spi_out_init() != 0) {
ESP_LOGE(BTDM_LOG_TAG, "BLE Log SPI output init failed");
goto error;
}
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
btdm_cfg_mask = btdm_config_mask_load();
if (btdm_controller_init(btdm_cfg_mask, cfg) != 0) {
err = btdm_controller_init(btdm_cfg_mask, cfg);
if (err != 0) {
ESP_LOGE(BTDM_LOG_TAG, "%s %d\n",__func__,err);
err = ESP_ERR_NO_MEM;
goto error;
}
#ifdef CONFIG_BT_BLUEDROID_ENABLED
bt_stack_enableSecCtrlVsCmd(true);
#endif // CONFIG_BT_BLUEDROID_ENABLED
#if defined(CONFIG_BT_NIMBLE_ENABLED) || defined(CONFIG_BT_BLUEDROID_ENABLED)
bt_stack_enableCoexVsCmd(true);
scan_stack_enableAdvFlowCtrlVsCmd(true);
adv_stack_enableClearLegacyAdvVsCmd(true);
advFilter_stack_enableDupExcListVsCmd(true);
#endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED)
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
return ESP_OK;
error:
#if CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
ble_log_spi_out_deinit();
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
bt_controller_deinit_internal();
return err;
@@ -1628,17 +1798,30 @@ esp_err_t esp_bt_controller_deinit(void)
return ESP_ERR_INVALID_STATE;
}
#if CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
ble_log_spi_out_deinit();
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
btdm_controller_deinit();
bt_controller_deinit_internal();
#ifdef CONFIG_BT_BLUEDROID_ENABLED
bt_stack_enableSecCtrlVsCmd(false);
#endif // CONFIG_BT_BLUEDROID_ENABLED
#if defined(CONFIG_BT_NIMBLE_ENABLED) || defined(CONFIG_BT_BLUEDROID_ENABLED)
bt_stack_enableCoexVsCmd(false);
scan_stack_enableAdvFlowCtrlVsCmd(false);
adv_stack_enableClearLegacyAdvVsCmd(false);
advFilter_stack_enableDupExcListVsCmd(false);
#endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED)
return ESP_OK;
}
static void bt_controller_deinit_internal(void)
// deinit low power control resources
static void btdm_low_power_mode_deinit(void)
{
periph_module_disable(PERIPH_BT_MODULE);
#ifdef CONFIG_PM_ENABLE
if (!s_btdm_allow_light_sleep) {
esp_pm_lock_delete(s_light_sleep_pm_lock);
@@ -1659,6 +1842,16 @@ static void bt_controller_deinit_internal(void)
s_pm_lock_acquired = false;
#endif
btdm_lpcycle_us = 0;
btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_NONE);
}
static void bt_controller_deinit_internal(void)
{
periph_module_disable(PERIPH_BT_MODULE);
btdm_low_power_mode_deinit();
if (s_wakeup_req_sem) {
semphr_delete_wrapper(s_wakeup_req_sem);
s_wakeup_req_sem = NULL;
@@ -1671,9 +1864,6 @@ static void bt_controller_deinit_internal(void)
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;
btdm_lpcycle_us = 0;
btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_NONE);
esp_bt_power_domain_off();
esp_phy_modem_deinit();
@@ -1699,6 +1889,18 @@ static void bt_shutdown(void)
return;
}
static void patch_apply(void)
{
config_btdm_funcs_reset();
#ifndef CONFIG_BTDM_CTRL_MODE_BLE_ONLY
config_bt_funcs_reset();
#endif
#ifndef CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY
config_ble_funcs_reset();
#endif
}
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
{
@@ -1732,7 +1934,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
sdk_config_set_bt_pll_track_enable(true);
// inititalize bluetooth baseband
// initialize bluetooth baseband
btdm_check_and_init_bb();
ret = btdm_controller_enable(mode);
@@ -1772,6 +1974,7 @@ esp_err_t esp_bt_controller_disable(void)
while (!btdm_power_state_active()) {
esp_rom_delay_us(1000);
}
async_wakeup_request_end(BTDM_ASYNC_WAKEUP_REQ_CTRL_DISA);
}
btdm_controller_disable();
@@ -1884,7 +2087,7 @@ esp_err_t esp_bredr_sco_datapath_set(esp_sco_data_path_t data_path)
return ESP_OK;
}
esp_err_t esp_ble_scan_dupilcate_list_flush(void)
esp_err_t esp_ble_scan_duplicate_list_flush(void)
{
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_ENABLED) {
return ESP_ERR_INVALID_STATE;
@@ -1893,9 +2096,14 @@ esp_err_t esp_ble_scan_dupilcate_list_flush(void)
return ESP_OK;
}
esp_err_t esp_ble_scan_dupilcate_list_flush(void)
{
return esp_ble_scan_duplicate_list_flush();
}
/**
* This function re-write controller's function,
* As coredump can not show paramerters in function which is in a .a file.
* As coredump can not show parameters in function which is in a .a file.
*
* After coredump fixing this issue, just delete this function.
*/
+370 -89
View File
@@ -2,15 +2,15 @@
menu "HCI Config"
choice BT_LE_HCI_INTERFACE
prompt "Select HCI interface"
prompt "HCI mode"
default BT_LE_HCI_INTERFACE_USE_RAM
config BT_LE_HCI_INTERFACE_USE_RAM
bool "ram"
bool "VHCI"
help
Use RAM as HCI interface
config BT_LE_HCI_INTERFACE_USE_UART
bool "uart"
bool "UART(H4)"
help
Use UART as HCI interface
endchoice
@@ -73,12 +73,26 @@ menu "HCI Config"
UART_PARITY_ODD
endchoice
config BT_LE_HCI_UART_TASK_STACK_SIZE
int "HCI uart task stack size"
depends on BT_LE_HCI_INTERFACE_USE_UART
default 1000
config BT_LE_HCI_UART_RX_BUFFER_SIZE
int "The size of rx ring buffer memory"
depends on !BT_LE_HCI_INTERFACE_USE_RAM
default 512
help
Set the size of uart task stack
The size of rx ring buffer memory
config BT_LE_HCI_UART_TX_BUFFER_SIZE
int "The size of tx ring buffer memory"
depends on !BT_LE_HCI_INTERFACE_USE_RAM
default 256
help
The size of tx ring buffer memory
config BT_LE_HCI_TRANS_TASK_STACK_SIZE
int "HCI transport task stack size"
depends on !BT_LE_HCI_INTERFACE_USE_RAM
default 2048
help
This configures stack size of hci transport task
endmenu
config BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT
@@ -95,86 +109,100 @@ menuconfig BT_LE_50_FEATURE_SUPPORT
help
Enable BLE 5 feature
config BT_LE_LL_CFG_FEAT_LE_2M_PHY
bool "Enable 2M Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable 2M-PHY
config BT_LE_LL_CFG_FEAT_LE_CODED_PHY
bool "Enable coded Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable coded-PHY
config BT_LE_EXT_ADV
bool "Enable extended advertising"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable this option to do extended advertising. Extended advertising
will be supported from BLE 5.0 onwards.
if BT_LE_EXT_ADV
config BT_LE_MAX_EXT_ADV_INSTANCES
int "Maximum number of extended advertising instances."
range 0 4
default 1
depends on BT_LE_EXT_ADV
help
Change this option to set maximum number of extended advertising
instances. Minimum there is always one instance of
advertising. Enter how many more advertising instances you
want.
Each extended advertising instance will take about 0.5k DRAM.
config BT_LE_EXT_ADV_MAX_SIZE
int "Maximum length of the advertising data."
range 0 1650
default 1650
depends on BT_LE_EXT_ADV
help
Defines the length of the extended adv data. The value should not
exceed 1650.
config BT_LE_ENABLE_PERIODIC_ADV
bool "Enable periodic advertisement."
default y
depends on BT_LE_EXT_ADV
help
Enable this option to start periodic advertisement.
config BT_LE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transer Sync Events"
depends on BT_LE_ENABLE_PERIODIC_ADV
if BT_LE_50_FEATURE_SUPPORT
config BT_LE_LL_CFG_FEAT_LE_2M_PHY
bool "Enable 2M Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
This enables controller transfer periodic sync events to host
Enable 2M-PHY
config BT_LE_LL_CFG_FEAT_LE_CODED_PHY
bool "Enable coded Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable coded-PHY
config BT_LE_EXT_ADV
bool "Enable extended advertising"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable this option to do extended advertising. Extended advertising
will be supported from BLE 5.0 onwards.
if BT_LE_EXT_ADV
config BT_LE_MAX_EXT_ADV_INSTANCES
int "Maximum number of extended advertising instances."
range 0 4
default 1
depends on BT_LE_EXT_ADV
help
Change this option to set maximum number of extended advertising
instances. Minimum there is always one instance of
advertising. Enter how many more advertising instances you
want.
Each extended advertising instance will take about 0.5k DRAM.
config BT_LE_EXT_ADV_MAX_SIZE
int "Maximum length of the advertising data."
range 0 1650
default 1650
depends on BT_LE_EXT_ADV
help
Defines the length of the extended adv data. The value should not
exceed 1650.
config BT_LE_ENABLE_PERIODIC_ADV
bool "Enable periodic advertisement."
default y
depends on BT_LE_EXT_ADV
help
Enable this option to start periodic advertisement.
config BT_LE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transfer Sync Events"
depends on BT_LE_ENABLE_PERIODIC_ADV
default y
help
This enables controller transfer periodic sync events to host
endif
config BT_LE_EXT_SCAN
bool "Enable extended scanning"
depends on BT_LE_50_FEATURE_SUPPORT && BT_LE_ROLE_OBSERVER_ENABLE
default y
help
Enable this option to do extended scanning.
config BT_LE_ENABLE_PERIODIC_SYNC
bool "Enable periodic sync"
default y
depends on BT_LE_EXT_SCAN
help
Enable this option to receive periodic advertisement.
if BT_LE_ENABLE_PERIODIC_SYNC
config BT_LE_MAX_PERIODIC_SYNCS
int "Maximum number of periodic advertising syncs"
range 0 3
default 1 if BT_LE_ENABLE_PERIODIC_ADV
default 0
help
Set this option to set the upper limit for number of periodic sync
connections. This should be less than maximum connections allowed by
controller.
config BT_LE_MAX_PERIODIC_ADVERTISER_LIST
int "Maximum number of periodic advertiser list"
range 1 5
default 5
help
Set this option to set the upper limit for number of periodic advertiser list.
endif
endif
config BT_LE_MAX_PERIODIC_SYNCS
int "Maximum number of periodic advertising syncs"
depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED
range 0 3
default 1 if BT_LE_ENABLE_PERIODIC_ADV
default 0
help
Set this option to set the upper limit for number of periodic sync
connections. This should be less than maximum connections allowed by
controller.
config BT_LE_MAX_PERIODIC_ADVERTISER_LIST
int "Maximum number of periodic advertiser list"
depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED
range 1 5
default 5
help
Set this option to set the upper limit for number of periodic advertiser list.
menu "Memory Settings"
depends on !BT_NIMBLE_ENABLED
@@ -253,7 +281,7 @@ config BT_LE_CONTROLLER_TASK_STACK_SIZE
help
This configures stack size of NimBLE controller task
config BT_LE_CONTROLLER_LOG_ENABLED
menuconfig BT_LE_CONTROLLER_LOG_ENABLED
bool "Controller log enable"
default n
help
@@ -264,22 +292,83 @@ config BT_LE_CONTROLLER_LOG_CTRL_ENABLED
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Enable controller log module
Enable controller log module
config BT_LE_CONTROLLER_LOG_HCI_ENABLED
bool "enable HCI log module"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Enable hci log module
Enable hci log module
config BT_LE_CONTROLLER_LOG_DUMP_ONLY
bool "Controller log dump mode only"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Only operate in dump mode
Only operate in dump mode
config BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
bool "Output ble controller logs to SPI bus (Experimental)"
depends on BT_LE_CONTROLLER_LOG_ENABLED
depends on !BT_LE_CONTROLLER_LOG_DUMP_ONLY
select BT_BLE_LOG_SPI_OUT_ENABLED
default n
help
Output ble controller logs to SPI bus
config BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
bool "Store ble controller logs to flash(Experimental)"
depends on !BT_LE_CONTROLLER_LOG_DUMP_ONLY
depends on BT_LE_CONTROLLER_LOG_ENABLED
default n
help
Store ble controller logs to flash memory.
config BT_LE_CONTROLLER_LOG_PARTITION_SIZE
int "size of ble controller log partition(Multiples of 4K)"
depends on BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
default 65536
help
The size of ble controller log partition shall be a multiples of 4K.
The name of log partition shall be "bt_ctrl_log".
The partition type shall be ESP_PARTITION_TYPE_DATA.
The partition sub_type shall be ESP_PARTITION_SUBTYPE_ANY.
config BT_LE_LOG_CTRL_BUF1_SIZE
int "size of the first BLE controller LOG buffer"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default 4096
help
Configure the size of the first BLE controller LOG buffer.
config BT_LE_LOG_CTRL_BUF2_SIZE
int "size of the second BLE controller LOG buffer"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default 1024
help
Configure the size of the second BLE controller LOG buffer.
config BT_LE_LOG_HCI_BUF_SIZE
int "size of the BLE HCI LOG buffer"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default 4096
help
Configure the size of the BLE HCI LOG buffer.
config BT_LE_CONTROLLER_LOG_WRAP_PANIC_HANDLER_ENABLE
bool "Enable wrap panic handler"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default n
help
Wrap esp_panic_handler to get controller logs when PC pointer exception crashes.
config BT_LE_CONTROLLER_LOG_TASK_WDT_USER_HANDLER_ENABLE
bool "Enable esp_task_wdt_isr_user_handler implementation"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default n
help
Implement esp_task_wdt_isr_user_handler to get controller logs when task wdt issue is triggered.
config BT_LE_LL_RESOLV_LIST_SIZE
int "BLE LL Resolving list size"
range 1 5
@@ -328,7 +417,6 @@ config BT_LE_CRYPTO_STACK_MBEDTLS
bool "Override TinyCrypt with mbedTLS for crypto computations"
default y
depends on !BT_NIMBLE_ENABLED
select MBEDTLS_ECP_RESTARTABLE
select MBEDTLS_CMAC_C
help
Enable this option to choose mbedTLS instead of TinyCrypt for crypto
@@ -336,7 +424,7 @@ config BT_LE_CRYPTO_STACK_MBEDTLS
config BT_LE_WHITELIST_SIZE
int "BLE white list size"
range 1 15
range 1 31
default 12
depends on !BT_NIMBLE_ENABLED
@@ -400,6 +488,26 @@ config BT_LE_SLEEP_ENABLE
help
Enable BLE sleep
choice BT_LE_LP_CLK_SRC
prompt "BLE low power clock source"
default BT_LE_LP_CLK_SRC_MAIN_XTAL
config BT_LE_LP_CLK_SRC_MAIN_XTAL
bool "Use main XTAL as RTC clock source"
help
User main XTAL as RTC clock source.
This option is recommended if external 32.768k XTAL is not available.
Using the external 32.768 kHz XTAL will have lower current consumption
in light sleep compared to using the main XTAL.
config BT_LE_LP_CLK_SRC_DEFAULT
bool "Use system RTC slow clock source"
help
Use the same slow clock source as system RTC
Using any clock source other than external 32.768 kHz XTAL at pin0 supports only
legacy ADV and SCAN due to low clock accuracy.
endchoice
config BT_LE_USE_ESP_TIMER
bool "Use Esp Timer for callout"
depends on !BT_NIMBLE_ENABLED
@@ -408,6 +516,7 @@ config BT_LE_USE_ESP_TIMER
Set this option to use Esp Timer which has higher priority timer instead of FreeRTOS timer
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
bool "BLE adv report flow control supported"
depends on BT_LE_ROLE_OBSERVER_ENABLE
default y
help
The function is mainly used to enable flow control for advertising reports. When it is enabled,
@@ -442,3 +551,175 @@ config BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD
config BT_LE_RELEASE_IRAM_SUPPORTED
bool
default y
config BT_LE_TX_CCA_ENABLED
bool "Enable TX CCA feature"
default n
help
Enable CCA feature to cancel sending the packet if the signal power is stronger than CCA threshold.
config BT_LE_DTM_ENABLED
bool "Enable Direct Test Mode (DTM) feature"
default n
config BT_LE_CCA_RSSI_THRESH
int "CCA RSSI threshold value"
depends on BT_LE_TX_CCA_ENABLED
range 20 100
default 20
help
Power threshold of CCA in unit of -1 dBm.
config BT_LE_FEAT_LL_ENCRYPTION
bool "Enable controller ACL encryption"
default y
config BT_LE_ROLE_CENTROL_ENABLE
bool "Enable BLE Centrol role function"
depends on !BT_NIMBLE_ENABLED
default y
help
Enable centrol role function.
config BT_LE_ROLE_PERIPHERAL_ENABLE
bool "Enable BLE Peripheral role function"
depends on !BT_NIMBLE_ENABLED
default y
help
Enable Peripheral role function.
config BT_LE_ROLE_BROADCASTER_ENABLE
bool "Enable BLE Broadcaster role function"
depends on !BT_NIMBLE_ENABLED
default y
help
Enable broadcaster role function.
config BT_LE_ROLE_OBSERVER_ENABLE
bool "Enable BLE Observer role function"
depends on !BT_NIMBLE_ENABLED
default y
help
Enable observer role function.
choice BT_LE_DFT_TX_POWER_LEVEL_DBM
prompt "BLE default Tx power level(dBm)"
default BT_LE_DFT_TX_POWER_LEVEL_P9
help
Specify default Tx power level(dBm).
config BT_LE_DFT_TX_POWER_LEVEL_N24
bool "-24dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N21
bool "-21dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N18
bool "-18dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N15
bool "-15dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N12
bool "-12dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N9
bool "-9dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N6
bool "-6dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N3
bool "-3dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N0
bool "0dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P3
bool "+3dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P6
bool "+6dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P9
bool "+9dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P12
bool "+12dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P15
bool "+15dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P18
bool "+18dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P20
bool "+20dBm"
endchoice
config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
int
default -24 if BT_LE_DFT_TX_POWER_LEVEL_N24
default -21 if BT_LE_DFT_TX_POWER_LEVEL_N21
default -18 if BT_LE_DFT_TX_POWER_LEVEL_N18
default -15 if BT_LE_DFT_TX_POWER_LEVEL_N15
default -12 if BT_LE_DFT_TX_POWER_LEVEL_N12
default -9 if BT_LE_DFT_TX_POWER_LEVEL_N9
default -6 if BT_LE_DFT_TX_POWER_LEVEL_N6
default -3 if BT_LE_DFT_TX_POWER_LEVEL_N3
default 0 if BT_LE_DFT_TX_POWER_LEVEL_N0
default 3 if BT_LE_DFT_TX_POWER_LEVEL_P3
default 6 if BT_LE_DFT_TX_POWER_LEVEL_P6
default 9 if BT_LE_DFT_TX_POWER_LEVEL_P9
default 12 if BT_LE_DFT_TX_POWER_LEVEL_P12
default 15 if BT_LE_DFT_TX_POWER_LEVEL_P15
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
config BT_CTRL_RUN_IN_FLASH_ONLY
bool "Reduce BLE IRAM usage (READ DOCS FIRST) (EXPERIMENTAL)"
default n
help
Move most IRAM into flash. This will increase the usage of flash and reduce ble performance.
Because the code is moved to the flash, the execution speed of the code is reduced.
To have a small impact on performance, you need to enable flash suspend (SPI_FLASH_AUTO_SUSPEND).
- Only one Tx-Rx can be performed in each connection interval. Therefore, reduce the connection interval
as much as possible to improve the throughput. If you want higher connection performance, you can
enable BT_LE_PLACE_CONN_RELATED_INTO_IRAM to put the connection-related code into iram.
- For HCI_LE_Extended_Create_Connection command, only 1M phy's connection parameters will be applied.
Other phys' will be ignored.
- For extended scanning, we may be unable to receive the extended adv with 300us MAFS.
config BT_LE_PLACE_CONN_RELATED_INTO_IRAM
bool "Place the connection-related code into IRAM"
depends on BT_CTRL_RUN_IN_FLASH_ONLY
default n
config BT_LE_PLACE_SLEEP_RELATED_INTO_IRAM
bool
depends on BT_CTRL_RUN_IN_FLASH_ONLY && BT_LE_SLEEP_ENABLE
default y
config BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.
menu "BLE disconnects when Instant Passed (0x28) occurs"
config BT_LE_CTRL_LLCP_CONN_UPDATE
bool "BLE ACL connection update procedure"
default n
help
If this option is enabled, Controller will terminate the connection
when Instant Passed (0x28) error occurs during connection update procedure.
config BT_LE_CTRL_LLCP_CHAN_MAP_UPDATE
bool "BLE ACL channel map update procedure"
default n
help
If this option is enabled, Controller will terminate the connection
when Instant Passed (0x28) error occurs in channel map update procedure.
config BT_LE_CTRL_LLCP_PHY_UPDATE
bool "BLE ACL PHY update procedure"
default n
help
If this option is enabled, Controller will terminate the connection
when Instant Passed (0x28) error occurs in PHY update procedure.
endmenu
config BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX
int "The value of upperlimitmax during scan backoff procedure"
range 1 256
default 32
help
The value of upperlimitmax needs to be a power of 2.
+71
View File
@@ -0,0 +1,71 @@
/*
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdlib.h>
#include "sdkconfig.h"
#include "esp_bt_cfg.h"
/* External functions or variables
************************************************************************
*/
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
void adv_stack_enableClearLegacyAdvVsCmd(bool en);
void chanSel_stack_enableSetCsaVsCmd(bool en);
void hci_stack_enableSetVsEvtMaskVsCmd(bool en);
void adv_stack_enableScanReqRxdVsEvent(bool en);
void conn_stack_enableChanMapUpdCompVsEvent(bool en);
void sleep_stack_enableWakeupVsEvent(bool en);
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
/* Local functions definition
***************************************************************************
*/
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
void ble_stack_enableVsCmds(bool en)
{
#if DEFAULT_BT_LE_ROLE_BROADCASTER
adv_stack_enableClearLegacyAdvVsCmd(en);
#endif // DEFAULT_BT_LE_ROLE_BROADCASTER
#if DEFAULT_BT_LE_ROLE_OBSERVER
scan_stack_enableAdvFlowCtrlVsCmd(en);
#endif // DEFAULT_BT_LE_ROLE_OBSERVER
chanSel_stack_enableSetCsaVsCmd(en);
hci_stack_enableSetVsEvtMaskVsCmd(en);
}
void ble_stack_enableVsEvents(bool en)
{
#if DEFAULT_BT_LE_ROLE_BROADCASTER
adv_stack_enableScanReqRxdVsEvent(en);
#endif // DEFAULT_BT_LE_ROLE_BROADCASTER
conn_stack_enableChanMapUpdCompVsEvent(en);
#if CONFIG_BT_LE_SLEEP_ENABLE
sleep_stack_enableWakeupVsEvent(en);
#endif // CONFIG_BT_LE_SLEEP_ENABLE
}
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
int ble_stack_enable(void)
{
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
ble_stack_enableVsCmds(true);
ble_stack_enableVsEvents(true);
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
return 0;
}
void ble_stack_disable(void)
{
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
ble_stack_enableVsEvents(false);
ble_stack_enableVsCmds(false);
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
}
@@ -0,0 +1,13 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _BLE_PRIV_H_
#define _BLE_PRIV_H_
int ble_stack_enable(void);
void ble_stack_disable(void);
#endif // _BLE_PRIV_H_
File diff suppressed because it is too large Load Diff
+320
View File
@@ -0,0 +1,320 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_bt_cfg.h"
#define BLE_ERR_UNKNOWN_HCI_CMD (0x01)
/* LL Features */
#define BLE_LL_FEAT_LE_ENCRYPTION (0x0000000001)
#define BLE_LL_FEAT_CONN_PARM_REQ (0x0000000002)
#define BLE_LL_FEAT_EXTENDED_REJ (0x0000000004)
#define BLE_LL_FEAT_PERIPH_INIT (0x0000000008)
#define BLE_LL_FEAT_LE_PING (0x0000000010)
#define BLE_LL_FEAT_DATA_LEN_EXT (0x0000000020)
#define BLE_LL_FEAT_LL_PRIVACY (0x0000000040)
#define BLE_LL_FEAT_EXT_SCAN_FILT (0x0000000080)
#define BLE_LL_FEAT_LE_2M_PHY (0x0000000100)
#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x0000000200)
#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x0000000400)
#define BLE_LL_FEAT_LE_CODED_PHY (0x0000000800)
#define BLE_LL_FEAT_EXT_ADV (0x0000001000)
#define BLE_LL_FEAT_PERIODIC_ADV (0x0000002000)
#define BLE_LL_FEAT_CSA2 (0x0000004000)
#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x0000008000)
#define BLE_LL_FEAT_MIN_USED_CHAN (0x0000010000)
#define BLE_LL_FEAT_CTE_REQ (0x0000020000)
#define BLE_LL_FEAT_CTE_RSP (0x0000040000)
#define BLE_LL_FEAT_CTE_TX (0x0000080000)
#define BLE_LL_FEAT_CTE_RX (0x0000100000)
#define BLE_LL_FEAT_CTE_AOD (0x0000200000)
#define BLE_LL_FEAT_CTE_AOA (0x0000400000)
#define BLE_LL_FEAT_CTE_RECV (0x0000800000)
#define BLE_LL_FEAT_SYNC_TRANS_SEND (0x0001000000)
#define BLE_LL_FEAT_SYNC_TRANS_RECV (0x0002000000)
#define BLE_LL_FEAT_SCA_UPDATE (0x0004000000)
#define BLE_LL_FEAT_REM_PKEY (0x0008000000)
#define BLE_LL_FEAT_CIS_CENTRAL (0x0010000000)
#define BLE_LL_FEAT_CIS_PERIPH (0x0020000000)
#define BLE_LL_FEAT_ISO_BROADCASTER (0x0040000000)
#define BLE_LL_FEAT_SYNC_RECV (0x0080000000)
#define BLE_LL_FEAT_CIS_HOST (0x0100000000)
#define BLE_LL_FEAT_POWER_CTRL_REQ (0x0200000000)
#define BLE_LL_FEAT_POWER_CHANGE_IND (0x0400000000)
#define BLE_LL_FEAT_PATH_LOSS_MON (0x0800000000)
#define BLE_LL_FEAT_PERIODIC_ADV_ADI (0x1000000000)
#define BLE_LL_FEAT_CONN_SUBRATING (0x2000000000)
#define BLE_LL_FEAT_CONN_SUBRATING_HOST (0x4000000000)
#define BLE_LL_FEAT_CHANNEL_CLASS (0x8000000000)
uint64_t ble_ll_supported_features;
void
ble_ll_supported_features_init(void)
{
ble_ll_supported_features = BLE_LL_FEAT_EXTENDED_REJ;
ble_ll_supported_features |= BLE_LL_FEAT_DATA_LEN_EXT;
#if DEFAULT_BT_LE_ROLE_CENTROL || DEFAULT_BT_LE_ROLE_PERIPHERAL
ble_ll_supported_features |= BLE_LL_FEAT_PERIPH_INIT;
ble_ll_supported_features |= BLE_LL_FEAT_CONN_PARM_REQ;
#endif
#if CONFIG_BT_LE_FEAT_LL_ENCRYPTION
ble_ll_supported_features |= BLE_LL_FEAT_LE_ENCRYPTION;
#endif
ble_ll_supported_features |= (BLE_LL_FEAT_LL_PRIVACY | BLE_LL_FEAT_EXT_SCAN_FILT);
ble_ll_supported_features |= BLE_LL_FEAT_LE_PING;
#if DEFAULT_BT_LE_EXT_ADV
ble_ll_supported_features |= BLE_LL_FEAT_EXT_ADV;
#endif
#if DEFAULT_BT_LE_PERIODIC_ADV
ble_ll_supported_features |= BLE_LL_FEAT_PERIODIC_ADV;
ble_ll_supported_features |= BLE_LL_FEAT_PERIODIC_ADV_ADI;
#endif
#if DEFAULT_BT_LE_PAST
ble_ll_supported_features |= BLE_LL_FEAT_SYNC_TRANS_RECV;
ble_ll_supported_features |= BLE_LL_FEAT_SYNC_TRANS_SEND;
#endif
#if DEGAULT_BT_LE_2M_PHY
ble_ll_supported_features |= BLE_LL_FEAT_LE_2M_PHY;
#endif
#if DEGAULT_BT_LE_CODED_PHY
ble_ll_supported_features |= BLE_LL_FEAT_LE_CODED_PHY;
#endif
#if DEFAULT_BT_LE_50_FEATURE_SUPPORT
ble_ll_supported_features |= BLE_LL_FEAT_CSA2;
ble_ll_supported_features |= BLE_LL_FEAT_SCA_UPDATE;
ble_ll_supported_features |= BLE_LL_FEAT_REM_PKEY;
ble_ll_supported_features |= BLE_LL_FEAT_CHANNEL_CLASS;
#endif
}
#if !DEFAULT_BT_LE_ROLE_BROADCASTER
void r_ble_ll_adv_rpa_timeout(void) { }
void r_ble_lll_adv_halt(void) { }
void r_ble_lll_adv_event_rmvd_from_sched(void) { }
void r_ble_lll_adv_ext_event_rmvd_from_sched(void) { }
int r_ble_ll_adv_enabled(void) { return 0; }
int r_ble_ll_adv_can_chg_whitelist(void) { return 1; }
int r_ble_ll_adv_set_random_addr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
void r_ble_ll_adv_reset(void) { }
void r_ble_ll_adv_init(void) { }
void r_ble_ll_adv_deinit(void) { }
int r_ble_ll_adv_env_init(void) { return 0; }
void r_ble_ll_adv_env_deinit(void) { }
int r_ble_lll_adv_rx_pkt_isr(void) { return -1; }
void r_ble_ll_adv_rx_pkt_in(void) { }
int r_ble_ll_adv_set_adv_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_read_txpwr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_set_adv_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_set_scan_rsp_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_adv_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_vendor_hci_legacy_adv_clear(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_set_data_related_addr_change(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif // !DEFAULT_BT_LE_ROLE_BROADCASTER
#if !DEFAULT_BT_LE_EXT_ADV
bool r_ble_ll_adv_ext_check_data_itvl(void) { return true; }
void r_ble_lll_adv_coex_dpc_update_on_aux_scheduled(void) { }
void r_ble_lll_adv_coex_dpc_calc_pti_update_itvl(void) { }
void r_ble_lll_adv_sec_done(void) { }
int r_ble_lll_adv_sec_schedule_next_aux(void) { return 0; }
void r_ble_lll_adv_sec_event_done(void) { }
int r_ble_lll_adv_secondary_tx_start_cb(void) { return 0; }
void r_ble_lll_adv_aux_schedule(void) { }
void r_ble_lll_adv_update_rsp_offset(void) { }
int r_ble_ll_adv_hci_set_random_addr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_param(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_adv_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_scan_rsp(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_rd_max_adv_data_len(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_rd_sup_adv_sets(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_remove(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_clear_all(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_EXT_ADV
#if !DEFAULT_BT_LE_PERIODIC_ADV
void r_ble_ll_adv_sm_stop_periodic(void) { }
void r_ble_lll_adv_periodic_event_done(void) { }
int r_ble_lll_adv_sync_tx_start_cb(void) { return 0; }
void r_ble_lll_adv_sync_tx_end(void) { }
int r_ble_lll_adv_periodic_start(void) { return 0; }
void r_ble_lll_adv_periodic_rmvd_from_sched(void) { }
int r_ble_ll_adv_periodic_set_param(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_periodic_set_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_periodic_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PERIODIC_ADV
#if !DEFAULT_BT_LE_ROLE_OBSERVER
void r_ble_lll_scan_halt(void) { }
void r_ble_ll_scan_end_adv_evt(void) { }
void r_ble_ll_scan_rx_pkt_in(void) { }
int r_ble_lll_scan_rx_pkt_isr(void) { return -1; }
int r_ble_ll_scan_env_init(void) { return 0; }
void r_ble_ll_scan_env_deinit(void) { }
void r_ble_ll_scan_init(void) { }
void r_ble_ll_scan_deinit(void) { }
void r_ble_ll_scan_reset(void) { }
int r_ble_ll_scan_can_chg_whitelist(void) { return 1; }
int r_ble_ll_scan_enabled(void) { return false; }
int r_ble_lll_scan_chk_resume(void) { return -1; }
int r_ble_ll_scan_set_scan_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_scan_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_scan_hci_update_adv_report_flow_ctrl(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_scan_hci_set_adv_report_flow_ctrl(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_OBSERVER
#if !DEFAULT_BT_LE_EXT_SCAN
void r_ble_lll_scan_duration_period_timers_restart(void) { }
void r_ble_lll_scan_duration_period_timers_stop(void) { }
int r_ble_ll_hci_send_legacy_ext_adv_report(void) { return -1; }
void r_ble_lll_sched_rmv_elem_type(void) { }
void r_ble_ll_scan_send_truncated(void) { }
void r_ble_ll_scan_aux_data_unref(void) { }
void r_ble_lll_scan_sched_remove(void) { }
void r_ble_lll_scan_aux_data_free(void) { }
void r_ble_lll_aux_scan_drop(void) { }
int r_ble_lll_sched_aux_scan(void) { return -1; }
int r_ble_lll_scan_rx_isr_on_aux(void) { return -1; }
void r_ble_lll_scan_period_timer_cb(void) { }
void r_ble_lll_scan_duration_timer_cb(void) { }
void r_ble_ll_scan_rx_pkt_in_on_aux(void) { }
int r_ble_ll_set_ext_scan_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_ext_scan_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_EXT_SCAN
#if !DEFAULT_BT_LE_ROLE_CENTROL
void r_ble_ll_init_rx_pkt_in(void) { }
int r_ble_lll_init_rx_pkt_isr(void) { return -1; }
int r_ble_ll_conn_create(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_create_cancel(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL
#if !DEFAULT_BT_LE_ROLE_CENTROL || !DEFAULT_BT_LE_EXT_SCAN
int r_ble_ll_ext_conn_create(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL || !DEFAULT_BT_LE_EXT_SCAN
#if !DEFAULT_BT_LE_ROLE_PERIPHERAL
int r_ble_ll_conn_slave_start(void) { return 0; }
#endif //!DEFAULT_BT_LE_ROLE_PERIPHERAL
#if !DEFAULT_BT_LE_ROLE_CENTROL && !DEFAULT_BT_LE_ROLE_PERIPHERAL
void r_ble_ll_conn_rx_data_pdu(void) { }
int r_ble_lll_conn_rx_pkt_isr(void) { return -1; }
int r_ble_ll_hci_disconnect(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_rd_rem_ver_cmd(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_update(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_rd_chan_map(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_read_rem_features(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_param_rr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_param_nrr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL && !DEFAULT_BT_LE_ROLE_PERIPHERAL
#if !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
int r_ble_ll_conn_chk_phy_upd_start(void) { return -1; }
void r_ble_ll_hci_ev_encrypt_chg(void) { }
int r_ble_ll_ctrl_enc_allowed_pdu_rx(void) { return 1; }
int r_ble_ll_ctrl_enc_allowed_pdu_tx(void) { return 1; }
uint8_t r_ble_ll_ctrl_rx_start_enc_rsp(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_pause_enc_rsp(void) { return 0x07; }
int r_ble_ll_hci_le_encrypt(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!CONFIG_BT_LE_FEAT_LL_ENCRYPTION
#if !DEFAULT_BT_LE_ROLE_PERIPHERAL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
uint8_t r_ble_ll_ctrl_rx_pause_enc_req(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_enc_req(void) { return 0x07; }
int r_ble_ll_conn_hci_le_ltk_reply(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_le_ltk_neg_reply(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_PERIPHERAL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
#if !DEFAULT_BT_LE_ROLE_CENTROL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
uint8_t r_ble_ll_ctrl_rx_start_enc_req(void) { return 0x07; }
void r_ble_ll_ctrl_rx_enc_rsp(void) { }
void r_ble_ll_ctrl_enc_req_make(void) { }
int r_ble_ll_conn_hci_le_start_encrypt(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
#if !DEGAULT_BT_LE_2M_PHY && !DEGAULT_BT_LE_CODED_PHY
void r_ble_ll_ctrl_phy_update_proc_complete(void) { }
void r_ble_ll_ctrl_phy_update_cancel(void) { }
uint8_t r_ble_ll_ctrl_rx_phy_update_ind(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_phy_rsp(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_phy_req(void) { return 0x07; }
void r_ble_ll_ctrl_phy_req_rsp_make(void) { }
#endif //DEGAULT_BT_LE_2M_PHY && DEGAULT_BT_LE_CODED_PHY
#if !DEFAULT_BT_LE_PERIODIC_SYNC
void r_ble_lll_sync_halt(void) { }
void r_ble_lll_sync_rmvd_from_sched(void) { }
int r_ble_ll_sync_list_search(void) { return -1; }
uint8_t r_ble_ll_ctrl_rx_periodic_sync_ind(void) { return 0x07; }
void r_ble_ll_sync_rx_pkt_in(void) { }
int r_ble_lll_sync_rx_pkt_isr(void) { return -1; }
int r_ble_ll_sync_env_init(void) { return 0; }
void r_ble_ll_sync_env_deinit(void) { }
void r_ble_ll_sync_init(void) { }
void r_ble_ll_sync_deinit(void) { }
void r_ble_ll_sync_reset(void) { }
bool r_ble_ll_sync_enabled(void) { return false; }
int r_ble_ll_sync_create(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_cancel(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_terminate(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_add(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_remove(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_clear(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_size(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_receive_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PERIODIC_SYNC
#if !DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_ADV
int r_ble_ll_adv_periodic_set_info_transfer(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_ADV
#if !DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_SYNC
int r_ble_ll_sync_transfer(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_set_sync_transfer_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_set_default_sync_transfer_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_SYNC
#if !DEFAULT_BT_LE_50_FEATURE_SUPPORT
uint8_t r_ble_ll_ctrl_rx_channel_reporting_ind(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_channel_status_ind(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_sca_req(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_sca_rsp(void) { return 0x07; }
void r_ble_ll_ctrl_channel_class_reporting_make(void) { }
void r_ble_ll_ctrl_channel_class_enable_make(void) { }
void r_ble_ll_ctrl_sca_req_rsp_make(void) { }
int r_ble_ll_modify_sca(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_req_peer_sca(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_50_FEATURE_SUPPORT
#if !DEFAULT_BT_LE_50_FEATURE_SUPPORT
int r_ble_ll_conn_hci_le_rd_phy(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_le_set_def_phy(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_le_set_phy(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_50_FEATURE_SUPPORT
#if !CONFIG_BT_LE_DTM_ENABLED
void r_ble_lll_dtm_rx_pkt_in(void) { }
int r_ble_lll_dtm_rx_isr_end(void) { return -1; }
void r_ble_lll_dtm_reset(void) { }
void r_ble_lll_dtm_init(void) { }
void r_ble_lll_dtm_deinit(void) { }
int r_ble_lll_dtm_env_init(void) { return 0; }
void r_ble_lll_dtm_env_deinit(void) { }
int r_ble_lll_hci_dtm_tx_test(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_hci_dtm_rx_test(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_dtm_end_test(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_hci_dtm_rx_test_v2(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_hci_dtm_tx_test_v2(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!CONFIG_BT_LE_DTM_ENABLED
+144 -9
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -28,7 +28,6 @@ extern "C" {
#else
#define BLE_LL_SCAN_PHY_NUMBER_N (1)
#endif
#define DEFAULT_BT_LE_MAX_PERIODIC_ADVERTISER_LIST MYNEWT_VAL(BLE_MAX_PERIODIC_ADVERTISER_LIST)
#define DEFAULT_BT_LE_MAX_PERIODIC_SYNCS MYNEWT_VAL(BLE_MAX_PERIODIC_SYNCS)
#define DEFAULT_BT_LE_MAX_CONNECTIONS MYNEWT_VAL(BLE_MAX_CONNECTIONS)
@@ -40,7 +39,24 @@ extern "C" {
#define DEFAULT_BT_NIMBLE_WHITELIST_SIZE MYNEWT_VAL(BLE_LL_WHITELIST_SIZE)
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_HCI_EVT_HI_BUF_COUNT)
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_HCI_EVT_LO_BUF_COUNT)
#if defined(CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT)
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
#else
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#define DEGAULT_BT_LE_2M_PHY (CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_2M_PHY)
#define DEGAULT_BT_LE_CODED_PHY (CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_CODED_PHY)
#define DEFAULT_BT_LE_EXT_ADV (CONFIG_BT_NIMBLE_EXT_ADV)
#define DEFAULT_BT_LE_PERIODIC_ADV (CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV)
#define DEFAULT_BT_LE_EXT_SCAN (CONFIG_BT_NIMBLE_EXT_SCAN)
#define DEFAULT_BT_LE_PERIODIC_SYNC (CONFIG_BT_NIMBLE_ENABLE_PERIODIC_SYNC)
#define DEFAULT_BT_LE_PAST (CONFIG_BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER)
#define DEFAULT_BT_LE_ROLE_OBSERVER MYNEWT_VAL(BLE_ROLE_OBSERVER)
#define DEFAULT_BT_LE_ROLE_CENTROL MYNEWT_VAL(BLE_ROLE_CENTRAL)
#define DEFAULT_BT_LE_ROLE_PERIPHERAL MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
#define DEFAULT_BT_LE_ROLE_BROADCASTER MYNEWT_VAL(BLE_ROLE_BROADCASTER)
#else
#if CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY
@@ -52,13 +68,13 @@ extern "C" {
#if defined(CONFIG_BT_LE_MAX_PERIODIC_ADVERTISER_LIST)
#define DEFAULT_BT_LE_MAX_PERIODIC_ADVERTISER_LIST (CONFIG_BT_LE_MAX_PERIODIC_ADVERTISER_LIST)
#else
#define DEFAULT_BT_LE_MAX_PERIODIC_ADVERTISER_LIST (5)
#define DEFAULT_BT_LE_MAX_PERIODIC_ADVERTISER_LIST (0)
#endif
#if defined(CONFIG_BT_LE_MAX_PERIODIC_SYNCS)
#define DEFAULT_BT_LE_MAX_PERIODIC_SYNCS (CONFIG_BT_LE_MAX_PERIODIC_SYNCS)
#else
#define DEFAULT_BT_LE_MAX_PERIODIC_SYNCS (1)
#define DEFAULT_BT_LE_MAX_PERIODIC_SYNCS (0)
#endif
#if defined(CONFIG_BT_LE_MAX_CONNECTIONS)
@@ -115,16 +131,139 @@ extern "C" {
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
#endif
#if defined(CONFIG_BT_LE_50_FEATURE_SUPPORT)
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
#else
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#if defined(CONFIG_BT_LE_LL_CFG_FEAT_LE_2M_PHY)
#define DEGAULT_BT_LE_2M_PHY (CONFIG_BT_LE_LL_CFG_FEAT_LE_2M_PHY)
#else
#define DEGAULT_BT_LE_2M_PHY (0)
#endif
#if defined(CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY)
#define DEGAULT_BT_LE_CODED_PHY (CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY)
#else
#define DEGAULT_BT_LE_CODED_PHY (0)
#endif
#if defined(CONFIG_BT_LE_EXT_ADV)
#define DEFAULT_BT_LE_EXT_ADV (CONFIG_BT_LE_EXT_ADV)
#else
#define DEFAULT_BT_LE_EXT_ADV (0)
#endif
#if defined(CONFIG_BT_LE_ENABLE_PERIODIC_ADV)
#define DEFAULT_BT_LE_PERIODIC_ADV (CONFIG_BT_LE_ENABLE_PERIODIC_ADV)
#else
#define DEFAULT_BT_LE_PERIODIC_ADV (0)
#endif
#if defined(CONFIG_BT_LE_EXT_SCAN)
#define DEFAULT_BT_LE_EXT_SCAN (CONFIG_BT_LE_EXT_SCAN)
#else
#define DEFAULT_BT_LE_EXT_SCAN (0)
#endif
#if defined(CONFIG_BT_LE_ENABLE_PERIODIC_SYNC)
#define DEFAULT_BT_LE_PERIODIC_SYNC (CONFIG_BT_LE_ENABLE_PERIODIC_SYNC)
#else
#define DEFAULT_BT_LE_PERIODIC_SYNC (0)
#endif
#if defined(BT_LE_PERIODIC_ADV_SYNC_TRANSFER)
#define DEFAULT_BT_LE_PAST (BT_LE_PERIODIC_ADV_SYNC_TRANSFER)
#else
#define DEFAULT_BT_LE_PAST (0)
#endif
#if defined(CONFIG_BT_LE_ROLE_CENTROL_ENABLE)
#define DEFAULT_BT_LE_ROLE_CENTROL (1)
#else
#define DEFAULT_BT_LE_ROLE_CENTROL (0)
#endif
#if defined(CONFIG_BT_LE_ROLE_PERIPHERAL_ENABLE)
#define DEFAULT_BT_LE_ROLE_PERIPHERAL (1)
#else
#define DEFAULT_BT_LE_ROLE_PERIPHERAL (0)
#endif
#if defined(CONFIG_BT_LE_ROLE_BROADCASTER_ENABLE)
#define DEFAULT_BT_LE_ROLE_BROADCASTER (1)
#else
#define DEFAULT_BT_LE_ROLE_BROADCASTER (0)
#endif
#if defined(CONFIG_BT_LE_ROLE_OBSERVER_ENABLE)
#define DEFAULT_BT_LE_ROLE_OBSERVER (1)
#else
#define DEFAULT_BT_LE_ROLE_OBSERVER (0)
#endif
#if defined (CONFIG_BT_LE_HCI_UART_FLOWCTRL)
#define DEFAULT_BT_LE_HCI_UART_FLOW_CTRL (CONFIG_BT_LE_HCI_UART_FLOWCTRL)
#if DEFAULT_BT_LE_HCI_UART_FLOW_CTRL
#define DEFAULT_BT_LE_HCI_UART_CTS_PIN (CONFIG_BT_LE_HCI_UART_CTS_PIN)
#define DEFAULT_BT_LE_HCI_UART_RTS_PIN (CONFIG_BT_LE_HCI_UART_RTS_PIN)
#else
#define DEFAULT_BT_LE_HCI_UART_CTS_PIN (-1)
#define DEFAULT_BT_LE_HCI_UART_RTS_PIN (-1)
#endif
#else
#define DEFAULT_BT_LE_HCI_UART_FLOW_CTRL (0)
#define DEFAULT_BT_LE_HCI_UART_CTS_PIN (-1)
#define DEFAULT_BT_LE_HCI_UART_RTS_PIN (-1)
#endif
#endif
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#ifdef CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS)
#else
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (0)
#endif
#ifdef CONFIG_BT_LE_CTRL_LLCP_CONN_UPDATE
#define BT_CTRL_BLE_LLCP_CONN_UPDATE (1<<0)
#else
#define BT_CTRL_BLE_LLCP_CONN_UPDATE (0<<0)
#endif
#ifdef CONFIG_BT_LE_CTRL_LLCP_CHAN_MAP_UPDATE
#define BT_CTRL_BLE_LLCP_CHAN_MAP_UPDATE (1<<1)
#else
#define BT_CTRL_BLE_LLCP_CHAN_MAP_UPDATE (0<<1)
#endif
#ifdef CONFIG_BT_LE_CTRL_LLCP_PHY_UPDATE
#define BT_CTRL_BLE_LLCP_PHY_UPDATE (1<<2)
#else
#define BT_CTRL_BLE_LLCP_PHY_UPDATE (0<<2)
#endif
#define BT_LE_CTRL_LLCP_DISC_FLAG (BT_CTRL_BLE_LLCP_CONN_UPDATE | BT_CTRL_BLE_LLCP_CHAN_MAP_UPDATE | BT_CTRL_BLE_LLCP_PHY_UPDATE)
#ifdef CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX
#define BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX (CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX)
#else
#define BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX (256)
#endif
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#else
#define HCI_UART_EN 0 // hci ram mode
#endif
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_RAM
#define DEFAULT_BT_LE_VHCI_ENABLED (CONFIG_BT_LE_HCI_INTERFACE_USE_RAM)
#else
#define DEFAULT_BT_LE_VHCI_ENABLED (0)
#endif
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
#define NIMBLE_SLEEP_ENABLE CONFIG_BT_LE_SLEEP_ENABLE
#else
@@ -155,8 +294,6 @@ extern "C" {
#define DEFAULT_BT_LE_HCI_UART_DATA_BITS (UART_DATA_8_BITS)
#define DEFAULT_BT_LE_HCI_UART_STOP_BITS (UART_STOP_BITS_1)
#define DEFAULT_BT_LE_HCI_UART_PARITY (0)
#define DEFAULT_BT_LE_HCI_UART_TASK_STACK_SIZE (CONFIG_BT_LE_HCI_UART_TASK_STACK_SIZE)
#define DEFAULT_BT_LE_HCI_UART_FLOW_CTRL (0)
#else
#define DEFAULT_BT_LE_HCI_UART_TX_PIN (0)
#define DEFAULT_BT_LE_HCI_UART_RX_PIN (0)
@@ -165,8 +302,6 @@ extern "C" {
#define DEFAULT_BT_LE_HCI_UART_DATA_BITS (0)
#define DEFAULT_BT_LE_HCI_UART_STOP_BITS (0)
#define DEFAULT_BT_LE_HCI_UART_PARITY (0)
#define DEFAULT_BT_LE_HCI_UART_TASK_STACK_SIZE (0)
#define DEFAULT_BT_LE_HCI_UART_FLOW_CTRL (0)
#endif
/* Unchanged configuration */
@@ -195,7 +330,7 @@ extern "C" {
#define RTC_FREQ_N (32000) /* in Hz */
#endif // CONFIG_XTAL_FREQ_26
#define BLE_LL_TX_PWR_DBM_N (9)
#define BLE_LL_TX_PWR_DBM_N (CONFIG_BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF)
#define RUN_BQB_TEST (0)
+166 -12
View File
@@ -23,7 +23,7 @@ config BT_CTRL_BLE_STATIC_ACL_TX_BUF_NB
default 0
help
BLE ACL buffer have two methods to be allocated. One is persistent allocating
(alloate when controller initialise, never free until controller de-initialise)
(allocate when controller initialise, never free until controller de-initialise)
another is dynamically allocating (allocate before TX and free after TX).
choice BT_CTRL_PINNED_TO_CORE_CHOICE
@@ -66,30 +66,33 @@ endchoice
config BT_CTRL_HCI_TL
int
default 0 if BT_CTRL_HCI_MODE_UART_H4
default 1 if BT_CTRL_HCI_M0DE_VHCI
default 1 if BT_CTRL_HCI_MODE_VHCI
default 1
help
HCI mode as VHCI or UART(H4)
config BT_CTRL_ADV_DUP_FILT_MAX
int "The maxinum number of 5.0 extend duplicate scan filter"
int "The maximum number of 5.0 extend duplicate scan filter"
range 1 500
default 30
help
The maxinum number of suplicate scan filter
The maximum number of suplicate scan filter
choice BT_BLE_CCA_MODE
prompt "BLE CCA mode"
default BT_BLE_CCA_MODE_NONE
help
Define BT BLE CCA mode
Note that if CCA feature is enabled, the hardware may not transmit packets due to channel busy.
Therefore, it may potentially lead to an increase in the time taken for scanning advertising packet
and establishing connections, or a decrease in the throughput rate of the connection.
config BT_BLE_CCA_MODE_NONE
bool "NONE"
config BT_BLE_CCA_MODE_HW
bool "Hardware"
config BT_BLE_CCA_MODE_SW
bool "Software"
bool "Software (experimental)"
endchoice
config BT_BLE_CCA_MODE
@@ -200,8 +203,8 @@ choice BT_CTRL_DFT_TX_POWER_LEVEL
bool "+15dBm"
config BT_CTRL_DFT_TX_POWER_LEVEL_P18
bool "+18dBm"
config BT_CTRL_DFT_TX_POWER_LEVEL_P21
bool "+21dBm"
config BT_CTRL_DFT_TX_POWER_LEVEL_P20
bool "+20dBm"
endchoice
config BT_CTRL_DFT_TX_POWER_LEVEL_EFF
@@ -221,11 +224,12 @@ config BT_CTRL_DFT_TX_POWER_LEVEL_EFF
default 12 if BT_CTRL_DFT_TX_POWER_LEVEL_P12
default 13 if BT_CTRL_DFT_TX_POWER_LEVEL_P15
default 14 if BT_CTRL_DFT_TX_POWER_LEVEL_P18
default 15 if BT_CTRL_DFT_TX_POWER_LEVEL_P21
default 15 if BT_CTRL_DFT_TX_POWER_LEVEL_P20
default 0
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
bool "BLE adv report flow control supported"
depends on (!BT_CTRL_RUN_IN_FLASH_ONLY) || (BT_CTRL_RUN_IN_FLASH_ONLY && BT_CTRL_BLE_SCAN)
default y
help
The function is mainly used to enable flow control for advertising reports. When it is enabled,
@@ -402,10 +406,10 @@ menu "MODEM SLEEP Options"
bluetooth can work under light sleep enabled. Main crystal has a relatively better performance
than other bluetooth low power clock sources.
config BT_CTRL_LPCLK_SEL_EXT_32K_XTAL
bool "External 32kHz crystal"
depends on RTC_CLK_SRC_EXT_CRYS
bool "External 32kHz crystal/oscillator"
depends on RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC
help
External 32kHz crystal has a nominal frequency of 32.768kHz and provides good frequency
External 32kHz crystal/oscillator has a nominal frequency of 32.768kHz and provides good frequency
stability. If used as Bluetooth low power clock, External 32kHz can support Bluetooth
modem sleep to be used with both DFS and light sleep.
@@ -444,7 +448,7 @@ config BT_CTRL_SLEEP_CLOCK_EFF
config BT_CTRL_HCI_TL_EFF
int
default 0 if BT_CTRL_HCI_MODE_UART_H4
default 1 if BT_CTRL_HCI_M0DE_VHCI
default 1 if BT_CTRL_HCI_MODE_VHCI
default 1
config BT_CTRL_AGC_RECORRECT_EN
@@ -467,3 +471,153 @@ config BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX
Disable active scan backoff. The bluetooth spec requires that scanners should run a backoff procedure to
minimize collision of scan request PDUs from nultiple scanners. If scan backoff is disabled, in active
scanning, scan request PDU will be sent every time when HW receives scannable ADV PDU.
config BT_BLE_ADV_DATA_LENGTH_ZERO_AUX
bool "Enable aux packet when ext adv data length is zero"
default n
help
When this option is enabled, auxiliary packets will be present in the events of
'Non-Connectable and Non-Scannable' regardless of whether the advertising length is 0.
If this option is not enabled, auxiliary packets will only be present when the advertising length is not 0.
config BT_CTRL_CHAN_ASS_EN
bool "Enable channel assessment"
default y
help
If this option is enabled, The Controller will records the communication quality
for each channel and then start a timer to check and update the channel map every 4 seconds.
config BT_CTRL_LE_PING_EN
bool "Enable LE Ping procedure"
default y
help
If this option is disabled, The Controller will not start the LE authenticated payload timer.
This option is used for some compatibility problems related to LE ping procedure.
menu "BLE disconnect when instant passed"
config BT_CTRL_BLE_LLCP_CONN_UPDATE
bool "BLE ACL connection update procedure"
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed during connection update procedure.
config BT_CTRL_BLE_LLCP_CHAN_MAP_UPDATE
bool "BLE ACL channel map update procedure"
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed in channel map update procedure.
config BT_CTRL_BLE_LLCP_PHY_UPDATE
bool "BLE ACL PHY update procedure"
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed in PHY update procedure.
endmenu
config BT_CTRL_RUN_IN_FLASH_ONLY
bool "Put all BLE Controller code in flash"
default n
help
If this option is enabled, all code for the Bluetooth controller will be moved from ROM and IRAM
to flash, saving over 20K bytes of memory. However, it will require more flash resources and the
performance of Bluetooth will decrease If this option is enabled, Bluetooth may not work properly
during erasing flash. It is recommended to turn on the auto suspend function of flash. After auto
suspend is turned on, Bluetooth interrupts can be executed normally during erasing flash, with less
impact on Bluetooth performance.
config BT_CTRL_DTM_ENABLE
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable direct test mode feature"
default n
config BT_CTRL_BLE_MASTER
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE master role feature"
default y
config BT_CTRL_BLE_TEST
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE QA test feature"
default n
config BT_CTRL_BLE_SCAN
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE scan feature"
default y
config BT_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.
menu "Controller debug log Options (Experimental)"
config BT_CTRL_LE_LOG_EN
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE debug log"
default n
config BT_CTRL_LE_HCI_LOG_EN
depends on BT_CTRL_LE_LOG_EN
bool "Enable BLE HCI log"
default n
config BT_CTRL_LE_LOG_DUMP_ONLY
depends on BT_CTRL_LE_LOG_EN
bool "Enable BLE log dump only"
default n
config BT_CTRL_LE_LOG_STORAGE_EN
depends on BT_CTRL_LE_LOG_EN
bool "Enable BLE log storage to flash"
default n
config BT_CTRL_LE_LOG_PARTITION_SIZE
int "The size of ble controller log partition(Multiples of 4K)"
depends on BT_CTRL_LE_LOG_STORAGE_EN
default 65536
help
The size of ble controller log partition shall be a multiples of 4K.
The name of log partition shall be "bt_ctrl_log".
The partition type shall be ESP_PARTITION_TYPE_DATA.
The partition sub_type shall be ESP_PARTITION_SUBTYPE_ANY.
config BT_CTRL_LE_LOG_SPI_OUT_EN
bool "Output ble controller logs to SPI bus"
depends on BT_CTRL_LE_LOG_EN
depends on !BT_CTRL_LE_LOG_DUMP_ONLY
select BT_BLE_LOG_SPI_OUT_ENABLED
default n
help
Output ble controller logs to SPI bus
config BT_CTRL_LE_LOG_MODE_EN
depends on BT_CTRL_LE_LOG_EN
int "Enable log for specified BLE mode"
range 0 4095
default 4093
config BT_CTRL_LE_LOG_LEVEL
depends on BT_CTRL_LE_LOG_EN
int "The level of BLE log"
range 0 5
default 2
config BT_CTRL_LE_LOG_BUF1_SIZE
depends on BT_CTRL_LE_LOG_EN
int "The size of BLE log buffer1"
default 1024
config BT_CTRL_LE_LOG_HCI_BUF_SIZE
depends on BT_CTRL_LE_LOG_EN
int "The size of BLE log HCI buffer"
default 1024
config BT_CTRL_LE_LOG_BUF2_SIZE
depends on BT_CTRL_LE_LOG_EN
int "The size of BLE log buffer2"
default 1024
endmenu
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -147,7 +147,7 @@ if BT_LE_EXT_ADV
Enable this option to start periodic advertisement.
config BT_LE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transer Sync Events"
bool "Enable Transfer Sync Events"
depends on BT_LE_ENABLE_PERIODIC_ADV
default y
help
@@ -301,7 +301,6 @@ config BT_LE_CRYPTO_STACK_MBEDTLS
bool "Override TinyCrypt with mbedTLS for crypto computations"
default y
depends on !BT_NIMBLE_ENABLED
select MBEDTLS_ECP_RESTARTABLE
select MBEDTLS_CMAC_C
help
Enable this option to choose mbedTLS instead of TinyCrypt for crypto
+86 -43
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -14,7 +14,10 @@
#include "sdkconfig.h"
#if CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port.h"
#endif // CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port_freertos.h"
#ifdef ESP_PLATFORM
@@ -26,7 +29,7 @@
#endif
#include "nimble/nimble_npl_os.h"
#include "nimble/ble_hci_trans.h"
#include "ble_hci_trans.h"
#include "os/endian.h"
#include "esp_bt.h"
@@ -69,12 +72,11 @@
#ifdef CONFIG_BT_BLUEDROID_ENABLED
/* ACL_DATA_MBUF_LEADINGSPCAE: The leadingspace in user info header for ACL data */
#define ACL_DATA_MBUF_LEADINGSPCAE 4
#endif
#endif // CONFIG_BT_BLUEDROID_ENABLED
/* Types definition
************************************************************************
*/
struct osi_coex_funcs_t {
uint32_t _magic;
uint32_t _version;
@@ -142,12 +144,12 @@ extern int ble_txpwr_get(esp_ble_enhanced_power_type_t power_type, uint16_t hand
extern int ble_get_npl_element_info(esp_bt_controller_config_t *cfg, ble_npl_count_info_t * npl_info);
extern uint32_t _bt_bss_start;
extern uint32_t _bt_bss_end;
extern uint32_t _nimble_bss_start;
extern uint32_t _nimble_bss_end;
extern uint32_t _nimble_data_start;
extern uint32_t _nimble_data_end;
extern uint32_t _bt_controller_bss_start;
extern uint32_t _bt_controller_bss_end;
extern uint32_t _bt_data_start;
extern uint32_t _bt_data_end;
extern uint32_t _bt_controller_data_start;
extern uint32_t _bt_controller_data_end;
/* Local Function Declaration
*********************************************************************
@@ -186,9 +188,8 @@ static DRAM_ATTR esp_bt_controller_status_t ble_controller_status = ESP_BT_CONTR
static bool s_ble_active = false;
#ifdef CONFIG_PM_ENABLE
static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
#define BTDM_MIN_TIMER_UNCERTAINTY_US (200)
#endif /* #ifdef CONFIG_PM_ENABLE */
#endif // CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#define BLE_RTC_DELAY_US (1100)
@@ -256,17 +257,17 @@ static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
{
#if CONFIG_SW_COEXIST_ENABLE
coex_schm_status_bit_set(type, status);
#endif
#endif // CONFIG_SW_COEXIST_ENABLE
}
static void coex_schm_status_bit_clear_wrapper(uint32_t type, uint32_t status)
{
#if CONFIG_SW_COEXIST_ENABLE
coex_schm_status_bit_clear(type, status);
#endif
#endif // CONFIG_SW_COEXIST_ENABLE
}
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#ifdef CONFIG_BT_BLUEDROID_ENABLED
bool esp_vhci_host_check_send_available(void)
{
if (ble_controller_status != ESP_BT_CONTROLLER_STATUS_ENABLED) {
@@ -319,6 +320,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
if (*(data) == DATA_TYPE_COMMAND) {
struct ble_hci_cmd *cmd = NULL;
cmd = (struct ble_hci_cmd *) ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
assert(cmd);
memcpy((uint8_t *)cmd, data + 1, len - 1);
ble_hci_trans_hs_cmd_tx((uint8_t *)cmd);
}
@@ -329,7 +331,6 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
assert(os_mbuf_append(om, &data[1], len - 1) == 0);
ble_hci_trans_hs_acl_tx(om);
}
}
esp_err_t esp_vhci_host_register_callback(const esp_vhci_host_callback_t *callback)
@@ -342,8 +343,7 @@ esp_err_t esp_vhci_host_register_callback(const esp_vhci_host_callback_t *callba
return ESP_OK;
}
#endif
#endif // CONFIG_BT_BLUEDROID_ENABLED
static int task_create_wrapper(void *task_func, const char *name, uint32_t stack_depth, void *param, uint32_t prio, void *task_handle, uint32_t core_id)
{
return (uint32_t)xTaskCreatePinnedToCore(task_func, name, stack_depth, param, prio, task_handle, (core_id < portNUM_PROCESSORS ? core_id : tskNO_AFFINITY));
@@ -601,7 +601,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
esp_err_t ret = ESP_OK;
ble_npl_count_info_t npl_info;
memset(&npl_info, 0, sizeof(ble_npl_count_info_t));
if (ble_controller_status != ESP_BT_CONTROLLER_STATUS_IDLE) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "invalid controller state");
return ESP_ERR_INVALID_STATE;
@@ -806,41 +805,85 @@ static esp_err_t try_heap_caps_add_region(intptr_t start, intptr_t end)
return ret;
}
typedef struct {
intptr_t start;
intptr_t end;
const char* name;
} bt_area_t;
static esp_err_t esp_bt_mem_release_area(const bt_area_t *area)
{
esp_err_t ret = ESP_OK;
intptr_t mem_start = area->start;
intptr_t mem_end = area->end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release %s [0x%08x] - [0x%08x], len %d", area->name, mem_start, mem_end, mem_end - mem_start);
ret = try_heap_caps_add_region(mem_start, mem_end);
}
return ret;
}
static esp_err_t esp_bt_mem_release_areas(const bt_area_t *area1, const bt_area_t *area2)
{
esp_err_t ret = ESP_OK;
if (area1->end == area2->start) {
bt_area_t merged_area = {
.start = area1->start,
.end = area2->end,
.name = area1->name
};
ret = esp_bt_mem_release_area(&merged_area);
} else {
esp_bt_mem_release_area(area1);
ret = esp_bt_mem_release_area(area2);
}
return ret;
}
esp_err_t esp_bt_mem_release(esp_bt_mode_t mode)
{
intptr_t mem_start, mem_end;
esp_err_t ret = ESP_OK;
if (ble_controller_status != ESP_BT_CONTROLLER_STATUS_IDLE) {
return ESP_ERR_INVALID_STATE;
}
bt_area_t bss = {
.start = (intptr_t)&_bt_bss_start,
.end = (intptr_t)&_bt_bss_end,
.name = "BT BSS",
};
bt_area_t cont_bss = {
.start = (intptr_t)&_bt_controller_bss_start,
.end = (intptr_t)&_bt_controller_bss_end,
.name = "BT Controller BSS",
};
bt_area_t data = {
.start = (intptr_t)&_bt_data_start,
.end = (intptr_t)&_bt_data_end,
.name = "BT Data",
};
bt_area_t cont_data = {
.start = (intptr_t)&_bt_controller_data_start,
.end = (intptr_t)&_bt_controller_data_end,
.name = "BT Controller Data"
};
if (mode & ESP_BT_MODE_BLE) {
mem_start = (intptr_t)&_bt_bss_start;
mem_end = (intptr_t)&_bt_bss_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release BT BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
/* Start by freeing Bluetooth BSS section */
if (ret == ESP_OK) {
ret = esp_bt_mem_release_areas(&bss, &cont_bss);
}
mem_start = (intptr_t)&_bt_data_start;
mem_end = (intptr_t)&_bt_data_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release BT Data [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_nimble_bss_start;
mem_end = (intptr_t)&_nimble_bss_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_nimble_data_start;
mem_end = (intptr_t)&_nimble_data_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE Data [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
/* Do the same thing with the Bluetooth data section */
if (ret == ESP_OK) {
ret = esp_bt_mem_release_areas(&data, &cont_data);
}
}
return ESP_OK;
return ret;
}

Some files were not shown because too many files have changed in this diff Show More