Commit Graph
5900 Commits
Author SHA1 Message Date
Sumeet Singh 44d956cf6a fix(nimble): Fix GATTC temp-list crash (v6.0) 2026-09-23 17:51:29 +05:30
Jiang Jiang Jian 3309bfc238 Merge branch 'bugfix/spp_deinit_crash_v6.0' into 'release/v6.0'
fix(bt/bluedroid): fixed heap corruption when deinit profiles during SDP discovery(v6.0)

See merge request espressif/esp-idf!53062
2026-09-23 12:03:38 +08:00
Zhou Xiao f4ec0e19b6 fix(bt): initialize BLE Log in host-only mode
Initialize and deinitialize BLE Log from the Bluedroid host lifecycle when the local
controller is disabled. Guard controller mbuf handling with BLE_LOG_LL_ENABLED so host-
only builds do not depend on controller headers.

Update NimBLE to b6e2f93db269ad2bba8715953cb56f93bae4fc2f to provide the corresponding
host-only initialization. Combine the host initialization fix and the final NimBLE
revision into one prerequisite commit.
2026-09-22 14:46:50 +08:00
xiongweichaoandCursor a72a6b60fb fix(bt/bluedroid): fixed heap corruption when deinit A2DP/HID during SDP discovery
Cancel in-flight SDP searches before freeing discovery databases in BTA AV
and HID Host. Otherwise a late SDP response can be parsed into a freed
buffer after esp_a2d_*_deinit / HID host disable, the same class of
corruption as JV/SPP deinit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 14:14:34 +08:00
xiongweichao 2b2b88a33c fix(bt/bluedroid): fixed heap corruption when deinit SPP during SDP discovery
bta_jv_disable() reset the control block and let BTA_JvFree() release
p_sdp_db/p_sdp_raw_data while an SDP service search could still be in
progress. Late SDP responses were then parsed into the freed discovery
database and corrupted the heap, so the crash surfaced much later in an
unrelated malloc(), inside TLSF remove_free_block().

Cancel the search first. SDP_CancelServiceSearch() moves the connection
control block to SDP_DISC_WAIT_CANCEL, and sdp_disc_server_rsp() matches
none of its PDU cases in that state, so a late response is rejected
instead of being written into the database.

Reachable from both esp_spp_deinit() and esp_bt_l2cap_deinit(), e.g. when
an application deinitializes SPP before ESP_SPP_DISCOVERY_COMP_EVT
arrives.
2026-09-22 14:14:34 +08:00
Astha Verma 8946ea2d7a fix(nimble): Connect with OTA address for host based privacy 2026-09-18 17:22:25 +05:30
Rahul Tank 05e2ad7bb2 Merge branch 'bugfix/l2cap_coc_disconnect_v6.0' into 'release/v6.0'
fix(nimble): fix l2cap_coc throughput disconnect on esp32c2 (v6.0)

See merge request espressif/esp-idf!52829
2026-09-18 16:41:49 +05:30
Wang Meng Yang 00940a344d Merge branch 'bugfix/fix_hfp_api_status_check_v6.0' into 'release/v6.0'
fix(bt/bluedroid): check HFP audio status before forwarding SCO data (v6.0)

See merge request espressif/esp-idf!52890
2026-09-18 14:39:42 +08:00
linruihao d783f9f02d fix(bt/bluedroid): check HFP audio status before forwarding SCO data 2026-09-17 09:32:45 +08:00
cjin 8408bf65ae feat(sleep_modem): allow multi modem to enable rf with regdma 2026-09-17 08:33:10 +08:00
Astha Verma 1da5d70034 fix(nimble): fix l2cap_coc throughput disconnect on esp32c2 2026-09-16 10:26:51 +05:30
Island 2d67f87b0e Merge branch 'feat/update_mesh_lib_to_supported_get_lib_ver_v6.0' into 'release/v6.0'
Feat/update mesh lib to supported get lib ver (6.0)

See merge request espressif/esp-idf!51173
2026-09-15 17:43:58 +08:00
Island 5ac710ee56 Merge branch 'feat/ble_smp_repairing_hardening_v6.0' into 'release/v6.0'
feat(ble/bluedroid): add Kconfig options for BLE re-pairing hardening (6.0)

See merge request espressif/esp-idf!52421
2026-09-15 14:12:07 +08:00
Island 602c154453 Merge branch 'feat/support_pawr_connect_evt_v6.0' into 'release/v6.0'
feat(ble/bluedroid): Support PAWR connection event (6.0)

See merge request espressif/esp-idf!51442
2026-09-15 14:12:05 +08:00
Jin Cheng b40d860987 fix(bt/bluedroid): fixed OOB read dring mSBC sync word check 2026-09-15 09:34:13 +08:00
Wang Meng Yang 50b9a4b19e Merge branch 'fix/bt_hfp_v6.0' into 'release/v6.0'
fix(bt_hfp): Fix some bugs in hfp (v6.0)

See merge request espressif/esp-idf!52750
2026-09-15 09:30:43 +08:00
Wang Meng Yang bde2b24561 Merge branch 'bugfix/fix_pbac_pm_config_v6.0' into 'release/v6.0'
fix(bt/bluedroid): enable sniff power management for PBAP client (v6.0)

See merge request espressif/esp-idf!52762
2026-09-14 17:23:33 +08:00
Island 4891edcd73 Merge branch 'change/ble_update_lib_20260904_v6.0' into 'release/v6.0'
change(ble): [AUTO_MR] 20260904 - Update ESP BLE Controller Lib (6.0)

See merge request espressif/esp-idf!52439
2026-09-14 10:36:09 +08:00
linruihao a3fa33aad3 fix(bt/bluedroid): enable sniff power management for PBAP client 2026-09-14 10:19:17 +08:00
Shreeyash Bhakare ec250befd6 fix(nimble): Send Prepare Write Request before Execute Write in write long with zero-length data 2026-09-11 14:57:16 +05:30
hejiaxin f43561e692 fix(bt_hfp): Fix some bugs in hfp
- Fix hfp callback data length
- Fix the solution of unknown AT command
2026-09-11 17:25:51 +08:00
Rahul Tank 8da0b7af1f Merge branch 'bugfix/nimble_issues_08092026_v6.0' into 'release/v6.0'
fix few nimble issues 08092026 (v6.0)

See merge request espressif/esp-idf!52601
2026-09-11 14:20:57 +05:30
zhaoweiliang b6520d92d5 change(ble): [AUTO_MR] Update lib_esp32c5 to acd9a26e 2026-09-11 16:18:06 +08:00
zhaoweiliang 4f4ee5eded change(ble): [AUTO_MR] Update lib_esp32h2 to acd9a26e 2026-09-11 16:17:08 +08:00
zhaoweiliang 13ba93d55c change(ble): [AUTO_MR] Update lib_esp32c6 to acd9a26e 2026-09-11 16:15:38 +08:00
Island e088053614 Merge branch 'fix/ble_log_compression_issue_on_windows_v6.0' into 'release/v6.0'
fix(bt): fix BLE log compression build on Windows (6.0)

See merge request espressif/esp-idf!51246
2026-09-11 14:53:34 +08:00
Island bb3321fedd Merge branch 'feat/bt_osal_build_configurable_v6.0' into 'release/v6.0'
feat(bt): Add Kconfig option to build the BT OSAL conditionally (6.0)

See merge request espressif/esp-idf!52516
2026-09-11 14:35:24 +08:00
Island 959545a41b Merge branch 'fix/ble_mesh_added_gatt_err_rsp_v6.0' into 'release/v6.0'
fix(ble_mesh): align GATTS read/write response handling with ATT (6.0)

See merge request espressif/esp-idf!51463
2026-09-11 14:33:57 +08:00
luoxu 764a3fe80f feat(ble_mesh): update lib to 79e3fee04e 2026-09-11 12:03:44 +08:00
Luo Xu 759fbad296 feat(ble_mesh): supported get lib version
(cherry picked from commit 56f78da32c)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-09-11 12:03:44 +08:00
Island 0c269a2f66 Merge branch 'fix/esp32-ble-dtm-txbuf-leak_v6.0' into 'release/v6.0'
Fix DTM TX buffer leak in the BLE controller that could cause memory exhaustion and Interrupt WDT timeout during or after DTM TX tests. (6.0)

See merge request espressif/esp-idf!52615
2026-09-10 20:50:53 +08:00
Island 0d25ea96d7 Merge branch 'feat/opt_prefer_bond_device_when_evicting_overflow_bonds_v6.0' into 'release/v6.0'
fix(bt/bluedroid): prefer disconnected peers when evicting overflow bonds (6.0)

See merge request espressif/esp-idf!52610
2026-09-10 20:50:40 +08:00
Island ba6bbdeb41 Merge branch 'bugfix/fix_bluedroid_find_info_format_mismatch_v6.0' into 'release/v6.0'
fix(ble/bluedroid): restore find info PDU stop on UUID format mismatch (6.0)

See merge request espressif/esp-idf!52080
2026-09-10 20:50:30 +08:00
Rahul Tank 768198540a Merge branch 'bugfix/hardware_error_assert_v6.0' into 'release/v6.0'
fix(nimble): Add hardware error event handling as normal event (v6.0)

See merge request espressif/esp-idf!52553
2026-09-10 17:33:50 +05:30
Luo Xu 59a30e9ba2 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-09-10 10:29:15 +08:00
Luo Xu 12aa692dcc fix(ble_mesh): align GATTS read/write response handling with ATT
bt_mesh_bta_gatts_cb did not always answer ATT Read/Write Requests:
- READ: on a callback error it only logged a warning and sent nothing; a
  0-byte read (Read Blob at an offset equal to the value length) also sent
  nothing, although it is a successful empty read.
- WRITE: on a callback error it sent nothing, and a partial/zero write was
  treated as success.
- Both: when the handle was not found or the attribute had no read/write
  callback, the request was silently dropped.

An ATT Request must always be answered:

- READ: len >= 0 is success -> Read Response (a 0-byte read yields an empty
  value); len < 0 -> ATT Error Response carrying the callback's error code
  (-len, since BLE_MESH_GATT_ERR(x) == -x). The copy length is clamped to
  the source buffer size as a defensive bound. If the handle is unknown or
  the attribute has no read callback, respond with INVALID_HANDLE /
  READ_NOT_PERMITTED.
- WRITE: when need_rsp is set, always reply. len == write length -> Write
  Response; otherwise (negative ATT error, partial write, or 0) -> ATT
  Error Response (the negative code, or UNLIKELY for partial/0). If the
  handle is unknown or the attribute has no write callback, respond with
  INVALID_HANDLE / WRITE_NOT_PERMITTED. Write Without Response still sends
  no response.

A non-success status passed to BTA_GATTS_SendRsp is turned into an ATT
Error Response by the GATT layer (gatt_sr_process_app_rsp ->
gatt_send_error_rsp).


(cherry picked from commit ed1f4de3a3)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-09-10 10:29:07 +08:00
Astha Verma 5048d40e1b fix(nimble): Fix nimble HID service discovery 2026-09-09 14:09:04 +05:30
Zhang Hai Peng 77570dfbde fix(bt): remove noisy OSI event handler enter/exit debug logs
These per-event traces fire on every async dispatch and flood BT logs
without aiding diagnosis; higher-layer traces remain for debugging.


(cherry picked from commit b9b9b8633f)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-09-09 14:26:49 +08:00
Zhang Hai Peng b011c3fc72 fix(bt): update ESP32 libbtdm_app.a to 919c7f4b
- fixed dtm tx buffer leak issue


(cherry picked from commit ab7bb35192)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-09-09 14:26:49 +08:00
Zhang Hai Peng a7e56b0fac fix(bt/bluedroid): prefer disconnected peers when evicting overflow bonds
When the bond list is full, drop the oldest disconnected device instead
of the oldest NVS entry, and allow a per-bond except flag so selected
devices are never auto-removed.


(cherry picked from commit bf86892eef)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-09-09 14:25:55 +08:00
Rahul Tank 16cd970a43 Merge branch 'bugfix/fix_coex_crash_v6.0' into 'release/v6.0'
fix(nimble): Prevent crash in deinit when host init was not completed (v6.0)

See merge request espressif/esp-idf!52565
2026-09-09 11:15:32 +05:30
Wang Meng Yang 2441aff81d Merge branch 'bugfix/bta_disable_not_run_v6.0' into 'release/v6.0'
fix(bt/bluedroid): fixed BTA event dispatch race during module disable (v6.0)

See merge request espressif/esp-idf!51975
2026-09-09 11:39:09 +08:00
Rahul Tank 4cb6a3f218 fix(nimble): Prevent crash in deinit when host init was not completed 2026-09-08 15:35:29 +05:30
Rahul Tank 1e8fd755ad fix(nimble): Add hardware error event handling as normal event 2026-09-08 12:10:53 +05:30
Jiang Jiang Jian 3702e3446d Merge branch 'bugfix/qos_not_reported_v6.0' into 'release/v6.0'
fix(bt/controller): update ESP32 libbtdm_app.a to fix missing QoS_Setup_Cmpl event (v6.0)

See merge request espressif/esp-idf!52491
2026-09-08 10:36:17 +08:00
Island 4dd996365c Merge branch 'fix/fix_ble_retention_dependency_order_v6.0' into 'release/v6.0'
fix(ble): fix ble retention dependency order (6.0)

See merge request espressif/esp-idf!52465
2026-09-08 10:25:13 +08:00
cjin bed7b04631 fix(ble): fix ble retention dependency order 2026-09-07 20:20:03 +08:00
chenjianhua 8e76bd045c feat(bt): Add Kconfig option to build the BT OSAL conditionally 2026-09-07 19:45:28 +08:00
Rahul Tank 454b29f257 fix(nimble): Fix for BLERP attack 2026-09-07 12:29:32 +05:30
Jin Cheng d05b70bde0 fix(bt/controller): update ESP32 libbtdm_app.a to fix missing QoS_Setup_Cmpl event 2026-09-07 12:21:57 +08:00