Commit Graph

5597 Commits

Author SHA1 Message Date
Sahil Yadav c946ef3789 feat(nimble): Support NimBLE log compression and decompression over SPI 2026-04-21 14:00:27 +08:00
Rahul Tank 55185d8406 Merge branch 'bugfix/fix_software_ecc' into 'master'
fix(nimble): Fix Software ecc issue in tinycrpyt

See merge request espressif/esp-idf!47708
2026-04-21 10:31:55 +05:30
Rahul Tank 258cd36a44 fix(nimble): Fix Software ecc issue in tinycrpyt 2026-04-20 10:51:21 +05:30
Wang Meng Yang de29856c92 Merge branch 'bugfix/relax_rsw_tid_check' into 'master'
fix(bt/controller): fixed several controller issues

Closes IDFGH-17125 and BTQABR2023-661

See merge request espressif/esp-idf!47688
2026-04-20 10:19:26 +08:00
Wang Meng Yang 9c380675dc Merge branch 'bugfix/ai_review_a2dp' into 'master'
fix(bt): fix A2DP issues reported by AI code review

Closes BT-4288

See merge request espressif/esp-idf!46787
2026-04-20 09:21:12 +08:00
Wang Meng Yang 29579cffe7 Merge branch 'bugfix/ai_review_hfp' into 'master'
fix(bt): fix HFP issues reported by AI code review

See merge request espressif/esp-idf!47008
2026-04-20 09:21:02 +08:00
Rahul Tank 5a134e1ccc fix(nimble): Fixes for various CVEs
*CVE-2025-62235
   *CVE-2025-53477
   *CVE-2025-53470
2026-04-17 14:18:16 +05:30
Island b5802cdecc Merge branch 'feat/iso_lea' into 'master'
feat(ble_audio): Support ISO & LE Audio functionalities (Preview)

Closes IDF-14820 and IDF-14822

See merge request espressif/esp-idf!46053
2026-04-17 14:05:03 +08:00
Rahul Tank c0ccef9f9c Merge branch 'feat/fsu_hci_cmd_evt' into 'master'
feat(nimble): Add support to 6.2 BLE HCI Command Event(FSU, UTP over OTA)

See merge request espressif/esp-idf!45914
2026-04-17 10:49:12 +05:30
yangfeng 8ca5ad43a3 fix(bt): fix HFP api and btc component issues reported by AI review 2026-04-17 10:06:55 +08:00
yangfeng 4388d9dfc7 fix(bt): fix HFP bta component issues reported by AI review 2026-04-17 10:06:55 +08:00
Linyan Liu 3ef5da096a feat(ble_audio): Support ISO & LE Audio functionalities (Preview) 2026-04-17 09:46:23 +08:00
Jin Cheng 83ede08702 fix(bt/controller): fixed sevaral controller issues
- Relax the TID checks during EPR to be compatible with some RealTek devices
        - Closes https://github.com/espressif/esp-idf/issues/18145
    - Fixed wrong HCI event used for eSCO connection update
    - Do not inform the host when conneciton request was automatically rejected
2026-04-16 20:27:47 +08:00
Rahul Tank 2e6e41f615 Merge branch 'bugfix/ai_fixes_common_components' into 'master'
Bugfix/ai fixes common components

See merge request espressif/esp-idf!47272
2026-04-16 17:03:46 +05:30
yangfeng 63f04b97f2 fix(bt): fix A2DP stack component issues reported by AI review 2026-04-16 17:06:03 +08:00
yangfeng 08c5766c96 fix(bt): fix A2DP bta component issues reported by AI review 2026-04-16 16:59:13 +08:00
yangfeng e3782bf2c0 fix(bt): fix A2DP api and btc component issues reported by AI review 2026-04-16 16:59:13 +08:00
Wang Meng Yang 5bb46aadb7 Merge branch 'bugfix/ai_review_avrcp' into 'master'
fix(bt): fix AVRCP component issues reported by AI review

Closes BT-4287

See merge request espressif/esp-idf!46832
2026-04-15 19:28:10 +08:00
Sahil Yadav f2a7313eb1 feat(nimble): Add support to 6.2 BLE HCI Command Event (FSU, UTP over OTA) 2026-04-15 10:08:21 +05:30
Rahul Tank 541065755d fix(nimble): Address review comments for hidd / hidh code 2026-04-14 15:40:18 +05:30
Rahul Tank d5bf44c5fe fix(nimble): Fix prox service to handle negative values 2026-04-14 14:25:06 +05:30
Rahul Tank eb178af05a Merge branch 'bugfix/fix_debug_assert_lock' into 'master'
fix(nimble): Resolve host lock assert in DEBUG mode

See merge request espressif/esp-idf!47185
2026-04-14 14:13:33 +05:30
yangfeng d997218dbc fix(bt): fix AVRCP component issues reported by AI review 2026-04-14 14:34:30 +08:00
Rahul Tank 02b57e7e77 fix(nimble): Address review fixes for tinycrypt / and blufi code 2026-04-14 11:22:10 +05:30
Island 70ddf98f50 Merge branch 'fix/add-scheduler-suspended-check-in-ble-log' into 'master'
fix: BLE Log Module Issues 20260407

See merge request espressif/esp-idf!47319
2026-04-14 10:52:17 +08:00
Rahul Tank ca5ce089a8 fix(nimble): Resolve host lock assert in DEBUG mode 2026-04-13 16:09:44 +05:30
Rahul Tank 1d1f05bdbe Merge branch 'bugfix/fix_blufi_watchdog' into 'master'
fix(blufi): Support DH negotiation on SoCs without hardware MPI

See merge request espressif/esp-idf!47215
2026-04-13 14:09:34 +05:30
Rahul Tank fb4ba7c453 fix(blufi): support DH negotiation on SoCs without hardware MPI 2026-04-10 10:31:13 +05:30
zhaoweiliang d7bfbef862 feat(ble): add adv tx options on ESP32-C5 2026-04-09 11:11:52 +08:00
zhaoweiliang 8ef46541cd feat(ble): add adv tx options on ESP32-H2 2026-04-09 11:11:52 +08:00
zhaoweiliang e85bb5cca8 feat(ble): add adv tx options on ESP32-C6 2026-04-09 11:11:52 +08:00
zhaoweiliang 24d0f0fad1 change(ble): [AUTO_MR] Update lib_esp32c6 to c9fbba6f 2026-04-09 11:11:52 +08:00
zhaoweiliang a23c9acab7 change(ble): [AUTO_MR] Update lib_esp32c5 to c9fbba6f 2026-04-09 11:11:52 +08:00
zhaoweiliang 9bfcc76221 change(ble): [AUTO_MR] Update lib_esp32h2 to c9fbba6f 2026-04-09 11:11:52 +08:00
Jin Cheng 8999e14df8 fix(bt/bluedroid): moved L2CAP length check into start packets only 2026-04-08 20:13:37 +08:00
Jon Gilmore 25ddfaab1c fix(bt/bluedroid): fix ACL reassembly dropping valid continuation fragments
The minimum length check in `reassemble_and_dispatch()` applied the START packet minimum (`HCI_ACL_PREAMBLE_SIZE + L2CAP_LENGTH_SIZE` = 8 bytes) to **all** ACL packets, including continuation fragments. Continuation fragments only carry the 4-byte ACL preamble (handle + length) with no L2CAP header, so small but valid continuations (5-7 bytes) were incorrectly rejected as "too short."

This caused the first L2CAP PDU in a rapid burst of BLE GATT indications to be silently dropped. The partial reassembly was orphaned, then discarded when the next indication's START fragment arrived, producing:

```
E BT_HCI: ACL packet too short (len=5)
W BT_HCI: reassemble_and_dispatch found unfinished packet for handle with start packet. Dropping old.
```

Parse the ACL preamble first (requires only 4 bytes) to determine the boundary flag, then apply the L2CAP length check only to START packets. Continuation packets are now accepted with the correct minimum of `HCI_ACL_PREAMBLE_SIZE` (4 bytes).

- ESP32-S3 connected to a BLE peripheral that fragments indications at 40 bytes per L2CAP PDU
- Peripheral sends 8+ indications within ~200ms (burst of state changes)
- The final continuation fragment of the first indication is small (5-6 bytes after type stripping)
- 100% reproducible on every burst; confirmed on ESP-IDF 5.5.3, 5.5.4, and 6.0.0

Verified on ESP32-S3 with a Sub-Zero wall oven (SO3050PESP, firmware 8.5):
- **Before fix:** First indication in every burst lost (ACL reassembly failure)
- **After fix:** All indications in burst delivered correctly, including when the final continuation fragment is 5-6 bytes

Closes https://github.com/espressif/esp-idf/issues/18414
2026-04-08 20:08:49 +08:00
Zhou Xiao a9b93ca0e5 fix(ble_log): ensure BLE Log IRAM functions are placed in IRAM on ESP32C2
On ESP32C2 with BT_CTRL_RUN_IN_FLASH_ONLY, the bt_default linker scheme
routes .iram1 sections to flash_text, causing BLE_LOG_IRAM_ATTR functions
to end up in flash instead of IRAM. Define a dedicated .ble_log_iram1
section for ESP32C2 and route it to iram0_bt_text unconditionally.
2026-04-07 19:02:14 +08:00
Rahul Tank b1050c5a9e fix(nimble): Fix DTM test end packet count parsing 2026-04-07 14:56:00 +05:30
Zhou Xiao 59536316c9 fix(ble_log): improve robustness with atomics, macro hygiene, and IRAM
- Use __atomic_fetch_add for stat_mgr counters to prevent lost updates
  under concurrent ISR/task access (H1)
- Use __atomic_load_n with ACQUIRE ordering for ref_count spin-loops (L1)
- Remove unnecessary BLE_LOG_IRAM_ATTR from ble_log_rt_task since it
  calls flash-resident functions and cannot run during flash ops (L3)
- Add parentheses to BLE_LOG_TRANS_FREE_SPACE and BLE_LOG_MAKE_FRAME_META
  macro parameters to prevent operator precedence bugs (M6)
2026-04-07 15:31:50 +08:00
Zhou Xiao 1275b78ad6 fix(ble_log): fix deinit race and concurrent flush deadlock
- Reorder deinit: stop RT task before destroying peripheral driver to
  prevent sending transports to a NULL dev_handle on dual-core (H2)
- Drain remaining queue items in rt_deinit to clean up transport state
- Add atomic flush_in_progress guard to prevent two concurrent
  ble_log_flush() callers from deadlocking on ref_count spin-wait (H5)
2026-04-07 15:31:40 +08:00
Zhou Xiao 3f8cfc5b1d fix(ble_log): fix crash and resource issues in peripheral drivers
- Handle scheduler-suspended and ISR context in UART redirect path
  to prevent xSemaphoreTake crash during light sleep (C1)
- Check uart_driver_install return value before setting inited flag (M1)
- Always clean up SPI device handle in deinit even if acquire_bus fails (M4)
2026-04-07 15:31:32 +08:00
Zhou Xiao 92979706d7 fix(ble_log): handle scheduler-suspended state in ble_log_rt_queue_trans
During light sleep transitions, the FreeRTOS scheduler is suspended but
xPortInIsrContext() returns false, causing xQueueSend with portMAX_DELAY
to hit a configASSERT. Add a check for taskSCHEDULER_SUSPENDED and use
a non-blocking send with rollback on queue-full to avoid resource leaks.
2026-04-07 15:15:31 +08:00
Island ac588e91b0 Merge branch 'ble_dev/esp32h4eco1_chip_20260403_iso' into 'master'
fix(ble): support ble iso for esp32h4 eco1

Closes IDF-12243 and IDF-12248

See merge request espressif/esp-idf!47260
2026-04-07 14:28:31 +08:00
ShenWeilong 583a8c441d fix(ble): fixed esp32h4 kconfig CI warning 2026-04-03 21:31:26 +08:00
Island d227dc7f23 Merge branch 'bugfix/fix_privacy_callback_trigger_multipe_times' into 'master'
Bugfix/fix privacy callback trigger multiple times

See merge request espressif/esp-idf!47205
2026-04-03 20:35:47 +08:00
Wang Meng Yang bb597ede48 Merge branch 'bugfix/btm_sec_free_dev' into 'master'
fix(bt): avoid deleting device record on partial transport cleanup

Closes BT-4248

See merge request espressif/esp-idf!45753
2026-04-03 19:18:13 +08:00
Island 51bbd5257a Merge branch 'dev/ble-log-202603' into 'master'
dev: BLE Log 202603

See merge request espressif/esp-idf!46934
2026-04-03 18:10:47 +08:00
wangjialiang ca8354932c fix(ble): support ble iso for esp32h4 eco1 2026-04-03 17:11:04 +08:00
Astha Verma 3b0cfa5970 fix(nimble): fix null dereference of ble_gatts_conn_aware_states after gatts stop 2026-04-03 10:14:03 +05:30
Island a6acf48f33 Merge branch 'ble_dev/esp32h4eco1_chip_20260326' into 'master'
feat(ble): added ble support for esp32h4 eco1

See merge request espressif/esp-idf!47100
2026-04-03 10:31:23 +08:00