Commit Graph
307 Commits
Author SHA1 Message Date
liqigan a3e4d10f2a fix(bt/bluedroid): Fixed use after free issue on osi_event_delete 2026-08-13 07:49:29 +08:00
hejiaxin 49f12e853e feat(bluedroid): Add config to place btu and hci task stack in psram
- Also adjust the osi_thread_stop implementation.
2026-08-04 14:55:59 +08:00
Island c41feceb86 Merge branch 'fix/ble_log_compression_issue_on_windows_v5.5' into 'release/v5.5'
fix(bt): fix BLE log compression build on Windows (5.5)

See merge request espressif/esp-idf!51245
2026-08-03 11:31:41 +08:00
Island c96d10b850 Merge branch 'feat/add_bt_common_npl_v5.5' into 'release/v5.5'
feat(bt): Add host-agnostic BT OSAL and shared BLE profile task (5.5)

See merge request espressif/esp-idf!51218
2026-07-29 15:00:28 +08:00
Luo Xu 2921dd77b9 fix(bt): fix BLE log compression build on Windows
The BLE log compression feature (CONFIG_BT_LOG_CRITICAL_ONLY ->
BLE_COMPRESSED_LOG_ENABLE) failed to build on Windows while working
correctly on Linux, due to two shell/platform-specific issues in the
compression script.

1. Module/source argument quoting. CMakeLists.txt passes the
   semicolon-separated module and source lists wrapped in single quotes
   ("'${MODULES}'") to protect ';' from POSIX shells, which strip them.
   cmd.exe does not treat single quotes as quoting characters, so on
   Windows the quotes reached the script literally and
   args.module.split(';') produced "'BLE_MESH" / "BLE_HOST'" instead of
   the clean names. These never matched the YAML module keys, every
   module was skipped ("Skipping module ... - config not found"), the
   compressed sources were never generated, and the build failed. Strip
   surrounding quote characters before splitting; this is a no-op on
   Linux/macOS where the shell already removed them.

2. CRLF line endings. With core.autocrlf=true the IDF sources are
   checked out as CRLF on Windows. The generated *_log_index.h macros
   use backslash-newline line-continuation; a backslash followed by
   '\r\n' is not a valid continuation in C, producing floods of syntax
   errors when the header is compiled. Write generated headers with
   newline='' to force LF, and normalize source content to LF right
   after reading so '\r' embedded inside multi-line argument expressions
   is also handled. Byte offsets stay consistent because both tree-sitter
   parsing and tag replacement operate on the normalized content.

Verified by full clean builds of examples/bluetooth/esp_ble_mesh/
vendor_models/vendor_client (esp32c6, bluedroid + mesh) from both
cmd.exe and PowerShell; both produce an identical vendor_client.bin.


(cherry picked from commit aa9b565a6d)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-28 13:43:38 +08:00
chenjianhua 4460584d07 feat(bt): Add host-agnostic BT OSAL and shared BLE profile task
- Add bt_osal: event queues, mutexes, semaphores, callouts, etc.
- Add the shared BLE profile task and event queue
- Bring both up and tear them down in the host init/deinit paths
- Add unit tests for the OSAL and the profile task
2026-07-27 19:29:56 +08:00
Fu Hanxi d359f42f6d ci: apply idf-ci 1.x
(cherry picked from commit 21d772a24da646bfb672418cf056199cad9b17e4)
2026-07-27 10:52:35 +02:00
Island 5f29e3e2e1 Merge branch 'fix/ble_hidd_remove_ccc_gating_v5.5' into 'release/v5.5'
fix(esp_hid/bluedroid): remove app-layer CCC gating in HID device (5.5)

See merge request espressif/esp-idf!51006
2026-07-23 19:26:08 +08:00
luoxu dfb314ef75 feat(ble): reorganize log compression Kconfig
Move log-compression Kconfig files to host/ and profile/mesh/ directories and update source paths.
2026-07-23 14:37:22 +08:00
luoxu fde5663460 feat(ble): split log compression Kconfig into separate mesh and host files 2026-07-23 14:37:22 +08:00
Luo Xu d29f5461f8 fix(ble): fix Bluedroid log compression for newly added modules
(cherry picked from commit 8d4f1cb608)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-23 14:37:22 +08:00
Island efd98f4782 Merge branch 'fix/ble_log_compression_add_local_header_file_v5.5' into 'release/v5.5'
feat(ble_log): mirror local compression headers (5.5)

See merge request espressif/esp-idf!50951
2026-07-23 14:23:07 +08:00
Island 47bd7785b9 Merge branch 'feat/support_bluedroid_le_coc_and_eatt_v5.5' into 'release/v5.5'
feat(ble/bluedroid): Support bluedroid LE COC and EATT features (5.5)

See merge request espressif/esp-idf!50714
2026-07-23 10:06:52 +08:00
Zhou Xiao 2d91fe9b77 fix(bt): keep BLE log ISR state in internal RAM
(cherry picked from commit 2fa434eb50)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-07-21 19:44:16 +08:00
Rahul Tank 316f3e17b2 Merge branch 'bugfix/nimble_issues_17072026_v5.5' into 'release/v5.5'
fix(nimble): Fix few nimble issues 17072026 (v5.5)

See merge request espressif/esp-idf!50922
2026-07-21 10:24:38 +05:30
Island 8d17df6429 Merge branch 'fix/ble-log-64-bit-io-setup-support_v5.5' into 'release/v5.5'
fix(ble_log): use BIT64 over BIT to support 64-bit IO setup (5.5)

See merge request espressif/esp-idf!50330
2026-07-21 11:22:30 +08:00
Zhang Hai Peng f3b89d6b37 change(ble/bluedroid): disable host trace logs when BLE Log host is off
Default all Bluedroid layer trace levels to NONE when BLE async log
is enabled without BLE_LOG_HOST_LOG.


(cherry picked from commit 1f8f935e3f)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-07-21 10:44:09 +08:00
Zhi Wei Jian c055e45c8f feat(ble/bluedroid): Support bluedroid LE COC and EATT features
(cherry picked from commit 83f0831c53)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-21 10:25:58 +08:00
Rahul Tank 9fd7cb7e60 fix(nimble): Fix ECC HW byte-order and dropped SOC_ESP_NIMBLE_CONTROLLER 2026-07-20 17:31:50 +05:30
Luo Xu 9375c00ee8 feat(ble_log): mirror local compression headers
(cherry picked from commit ee732a4591)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-20 13:44:43 +08:00
Zhou Xiao 98ca927cff fix(ble_log): use BIT64 over BIT to support 64-bit IO setup
(cherry picked from commit a2876d304e)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-07-03 12:04:57 +08:00
Guo Zifan 193044f421 feat(ble_log): Add frame check support for restart flow
(cherry picked from commit a81322a2ce)

Co-authored-by: guozifan <guozifan@espressif.com>
2026-06-24 11:25:29 +08:00
Jiang Jiang Jian 8fd2003fb4 Merge branch 'change/revert-ble-log-trans-buf-size_v5.5' into 'release/v5.5'
change(ble_log): reverted default ble log buffer size to 2048 bytes (5.5)

See merge request espressif/esp-idf!49325
2026-06-17 12:00:17 +08:00
Zhi Wei Jian 0564668e0d fix(bt): fix BTC task and BLE mesh bluedroid adapter
(cherry picked from commit 678fb93245)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-10 19:53:55 +08:00
Zhou Xiao d390fc1f5f change(ble_log): reverted default ble log buffer size to 2048 bytes
(cherry picked from commit cce5bd6e51)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-06-05 15:07:42 +08:00
Jiang Jiang Jian e51e13b518 Merge branch 'feat/ble-log-iram-optim_v5.5' into 'release/v5.5'
opt(bt): Move SPI Tx Callback to Flash When SPI ISR IN IRAM Disabled (5.5)

See merge request espressif/esp-idf!48923
2026-06-03 10:31:17 +08:00
Jiang Jiang Jian a3ef6b3446 Merge branch 'change/ble_update_lib_20260520_v5.5' into 'release/v5.5'
change(ble): [AUTO_MR] 20260520 - Update ESP BLE Controller Lib (5.5)

See merge request espressif/esp-idf!48769
2026-06-03 10:29:48 +08:00
Rahul Tank ba5cfdb7e4 fix(nimble): Add support for shorter connection intervals 2026-05-28 15:52:48 +05:30
luoxu c6ecc65527 fix(bt): Normalize source paths for log compression pattern matching 2026-05-27 10:37:03 +08:00
ShenWeilong b56fa33bb4 change(bt): Separated bt/cmakelist to bt/controller/cmakelist and bt/porting/cmakelist 2026-05-27 10:37:03 +08:00
Zhou Xiao ed959163a2 change(ble_log): move spi tx callback to flash when spi isr in iram disabled
(cherry picked from commit 725e9ee162)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-05-26 19:34:41 +08:00
Mayank Tyagi a30e86ca10 feat(nimble): ADD BLE HCI logging support for ESP Insights 2026-05-20 13:38:00 +05:30
Zhang Hai Peng bf64433a6b feat(ble): Support BLE critical logs
(cherry picked from commit 0af57d731c)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-05-14 14:23:45 +08:00
zhiweijian 05aa5814db fix(ble): Fixed AI review bugs in bt common 2026-05-12 11:47:40 +08:00
luoxu b6b5eadffa fix(ble_log): use typing.Optional/List for Python 3.9 compatibility 2026-05-07 14:16:03 +08:00
Luo Xu b6bae0c813 fix(ble_log): fix size_info nibble misalignment for last odd-count arg
(cherry picked from commit f5a927e055)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-05-07 14:16:03 +08:00
Luo Xu 333f032b44 test(ble): add comprehensive test suite for log compression
(cherry picked from commit 58121d2540)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-05-07 14:16:03 +08:00
Luo Xu ecd68f98bd fix(ble): replace hardcoded tuple indices with FormatToken NamedTuple
(cherry picked from commit b7760a77e4)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-05-07 14:16:03 +08:00
Luo Xu c297b106ea fix(ble_log): fix unaligned access and buffer safety in log compression
(cherry picked from commit 3f2b6c97f8)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-05-07 14:16:03 +08:00
Rahul Tank f603dc91c5 fix(nimble): cleanup: remove extraneous script file
Removed files that were unintentionally included in an earlier commit
2026-04-30 14:20:16 +05:30
Shen Wei LongandZhou Xiao 3cf7acc29f change(ble_log): update ble log version to 5 for esp ble controller log encoding indication
(cherry picked from commit 836f87cc4a)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-27 11:44:01 +00:00
Rahul Tank d87209446d Merge branch 'feat/nimble_logs_compression_v5.5' into 'release/v5.5'
feat(nimble): Support NimBLE log compression and decompression over SPI (v5.5)

See merge request espressif/esp-idf!46997
2026-04-22 08:33:05 +05:30
Rahul Tank b39aeb1b5a fix(nimble): Fix Software ecc issue in tinycrpyt 2026-04-20 14:05:54 +05:30
Sahil Yadav 29a8c6e981 feat(nimble): Support NimBLE log compression and decompression over SPI 2026-04-19 09:49:35 +05:30
Rahul Tank 85bee88b27 fix(nimble): Address review comments for hidd / hidh code 2026-04-15 10:39:49 +05:30
Rahul Tank 176963d583 fix(nimble): Address review fixes for tinycrypt / and blufi code 2026-04-15 10:39:07 +05:30
Zhou Xiao 31e0ef14a8 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.


(cherry picked from commit a9b93ca0e5)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-14 13:14:15 +08:00
Zhou Xiao eef3374d46 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)


(cherry picked from commit 59536316c9)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-14 13:14:14 +08:00
Zhou Xiao 79e119b6b4 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)


(cherry picked from commit 1275b78ad6)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-14 13:14:14 +08:00
Zhou Xiao dbc2bb134d 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)


(cherry picked from commit 3f8cfc5b1d)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-14 13:14:13 +08:00