Commit Graph
5292 Commits
Author SHA1 Message Date
Jiang Jiang Jian 4e1b423458 Merge branch 'fix/ble_log_compression_issue_on_windows_v5.2' into 'release/v5.2'
fix(bt): fix BLE log compression build on Windows (5.2)

See merge request espressif/esp-idf!51242
2026-08-27 20:29:15 +08:00
Jiang Jiang Jian 56cf33255e Merge branch 'bugfix/fix_bluedroid_gatt_discover_downstream_stall_v5.2' into 'release/v5.2'
fix(ble/bluedroid): allow osi_event re-post during POSTING window (5.2)

See merge request espressif/esp-idf!52040
2026-08-27 20:27:51 +08:00
Jiang Jiang Jian 2626422601 Merge branch 'bugfix/a2dp_sink_nego_sbc_v5.2' into 'release/v5.2'
fix(bt): do not cap AVDTP Discover results by local SEP count (v5.2)

See merge request espressif/esp-idf!51755
2026-08-27 19:19:13 +08:00
Zhang Hai Peng df0fe25bda fix(ble/bluedroid): allow osi_event re-post during POSTING window
Do not reject osi_thread_post_event() when only POSTING is set.
QUEUED already prevents double-queueing; rejecting POSTING caused
HCI downstream lost wakeup. Add generic osi_event and hci downstream
diagnostics for post failures.


(cherry picked from commit 011138ffd9)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-08-25 19:55:06 +08:00
Zhang Hai Peng dfd8d39c0a docs(bt): clarify Bluedroid GATT signed write API comments
Correct misleading CHAR_PROP_BIT_AUTH wording and document CSRK-based
signed write usage for server permissions and client write APIs.


(cherry picked from commit 8d230c7650)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-08-25 19:55:05 +08:00
cjin eeffada095 fix(ble): fix sleep rejection if wifi enh config enabled on esp32-c6 2026-08-19 15:23:27 +08:00
yangfeng 3ac7132d4c fix(bt): do not cap AVDTP Discover results by local SEP count
- Closes https://github.com/espressif/esp-idf/issues/18848
2026-08-13 19:32:43 +08:00
Luo Xu bfc255a373 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-08-12 14:15:55 +08:00
Jiang Jiang Jian 7b7cd05583 Merge branch 'bugfix/a2dp_api_init_check_v5.2' into 'release/v5.2'
fix(bt): Fix compatibility with A2DP API legacy usage methods (v5.2)

See merge request espressif/esp-idf!51335
2026-08-11 13:58:00 +08:00
Jiang Jiang Jian 50e59f90f4 Merge branch 'feat/bt_in_psram_v5.2' into 'release/v5.2'
feat(bluedroid): Add config to place btu and hci task stack in psram (v5.2)

See merge request espressif/esp-idf!51495
2026-08-10 16:22:38 +08:00
Rahul Tank ce22ec9d47 Merge branch 'bugfix/add_nimble_cve_v5.2' into 'release/v5.2'
fix(nimble): Fixes for various NimBLE CVEs (v5.2)

See merge request espressif/esp-idf!51206
2026-08-10 07:05:49 +05:30
yangfeng cd93bd63b9 fix(bt): Fix compatibility with A2DP API legacy usage methods
- Modify the timing of API calls in the A2DP example
- Closes https://github.com/espressif/esp-idf/issues/18786
2026-08-07 08:04:07 +08:00
hejiaxin 94c8d6e9b6 feat(bluedroid): Add config to place btu and hci task stack in psram
- Also adjust the osi_thread_stop implementation.
2026-08-06 11:54:39 +08:00
Jiang Jiang Jian 7427b84306 Merge branch 'feat/support_pawr_connect_evt_v5.2' into 'release/v5.2'
feat(ble/bluedroid): Support PAWR connection event (5.2)

See merge request espressif/esp-idf!51438
2026-08-06 11:24:34 +08:00
Island 2d3581bcb1 Merge branch 'fix/ble_mesh_added_gatt_err_rsp_v5.2' into 'release/v5.2'
fix(ble_mesh): align GATTS read/write response handling with ATT (5.2)

See merge request espressif/esp-idf!51459
2026-08-05 16:03:03 +08:00
Wang Meng Yang 5ce46f2764 Merge branch 'change/refactor_hidh_datapath_v5.2' into 'release/v5.2'
Change/refactor hidh datapath[backport v5.2]

See merge request espressif/esp-idf!51283
2026-08-05 14:23:43 +08:00
Island f030f5f862 Merge branch 'fix/ble_log_compression_add_local_header_file_v5.2' into 'release/v5.2'
feat(ble_log): mirror local compression headers (5.2)

See merge request espressif/esp-idf!50948
2026-08-04 19:48:20 +08:00
Wang Meng Yang 1377dac554 Merge branch 'fix/aireview_critical_v5.2' into 'release/v5.2'
fix: Fix some critical bugs in classic bt (v5.2)

See merge request espressif/esp-idf!51293
2026-08-04 14:15:22 +08:00
Luo Xu 3d204ee3d5 feat(ble_log): mirror local compression headers
(cherry picked from commit ee732a4591)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-08-04 11:58:57 +08:00
Luo Xu ea5e0f245d 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-08-03 21:43:32 +08:00
Rahul Tank d39a411e53 fix(nimble): Fixes for various NimBLE CVEs 2026-08-03 15:42:51 +05:30
Zhi Wei Jian 4cd9273018 fix(ble/bluedroid): Build LE event mask from host feature macros
(cherry picked from commit 68dff5d798)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-08-03 15:25:36 +08:00
Zhi Wei Jian d17b62dbee feat(ble/bluedroid): Support PAWR connection event
(cherry picked from commit 7da7fa42ac)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-08-03 15:25:35 +08:00
Island 4a270847e9 Merge branch 'feat/update_mesh_lib_to_supported_get_lib_ver_v5.2' into 'release/v5.2'
Feat/update mesh lib to supported get lib ver (5.2)

See merge request espressif/esp-idf!51169
2026-08-03 11:30:56 +08:00
Rahul Tank 940c834103 Merge branch 'bugfix/fix_pawr_conn_event_v5.2' into 'release/v5.2'
fix(nimble):  Deliver PAwR peripheral CONNECT via sync callback (v5.2)

See merge request espressif/esp-idf!51257
2026-07-30 20:45:50 +05:30
hejiaxin 556e7cdad5 fix(bt_stack): Fix some critical bugs in classic_bt stack
related: obex, smp, pbap, sdp, rfcomm, stack_dm

- Deinit function doesn't delete connection when OBEX_DYNAMIC_MEMORY is on
- Union tGOEPC_DATA sometimes is free by osi_free in some cases when it contains mtu_id
- Add correct free and return solution after fail
- Fix symbol mistake in mod calculation
- Fix pointer-related UAF problems and memory free problems
- Fix buffer overflows and out-of-bounds access
- Fix infinite loops triggered by integer overflow wraparound
- Fix double free
- Change layer_specific usage to avoid heap overflow
- Add some NULL check for pointers
- Fix sdp_db free function
- Fix state table mismatch
2026-07-30 17:30:53 +08:00
Jin Cheng 18a99d2eb7 fix(bt/bluedroid): fixed incorrect eSCO packet type validation under secure connection mode in BlueDroid 2026-07-29 17:30:41 +08:00
hejiaxin 5434deb81d fix(bt): Fix some bug in stm_sco.c
- Memory safety
- State machine & logic integrity
- Resource leaks
- Edge cases check
2026-07-29 17:30:41 +08:00
liqigan 521786cac2 fix(bt/bluedroid): Fixed use after free issue on osi_event_delete 2026-07-29 11:27:27 +08:00
liqigan f81ab9974a fix(bt/bluedroid): Fixed HID host reconnection bug and enabled load HID devices
Closes https://github.com/espressif/esp-idf/issues/18335
2026-07-29 11:22:58 +08:00
liqigan 214e280b67 change(bt/bluedroid): Refactored HCI ACL datapath 2026-07-29 11:12:54 +08:00
liqigan cfbb43a4fc change(bt/bluedroid): Refactored HID host datapath 2026-07-29 11:12:45 +08:00
Wang Meng Yang 1db291682a Merge branch 'bugfix/bredr_critical_bugs_v5.2' into 'release/v5.2'
fix(bt/bluedroid): fixed issues from AI review in GAP, SPP, HID, L2CAP and HCI (v5.2)

See merge request espressif/esp-idf!51082
2026-07-28 19:43:38 +08:00
Rahul Tank 5aa51e4b9c fix(nimble): Deliver PAwR peripheral CONNECT via sync callback 2026-07-28 12:59:42 +05:30
luoxu c9e5af2508 feat(ble_mesh): update lib to 79e3fee04e 2026-07-28 12:16:47 +08:00
Luo Xu 641ec20d67 feat(ble_mesh): supported get lib version
(cherry picked from commit 56f78da32c)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-27 10:03:10 +08:00
Shreeyash Bhakare 609cb58a9b fix(nimble): Added security related fixes 2026-07-25 13:54:50 +05:30
Astha Verma 936d7c117c fix(nimble): Restore throughput after switching from LE Coded PHY 2026-07-24 18:13:33 +05:30
Rahul Tank 0ff25a3b51 Merge branch 'bugfix/red_rem_feat_evt_v5.2' into 'release/v5.2'
Handle Read Remote Supported Feature failure (v5.2)

See merge request espressif/esp-idf!50813
2026-07-24 14:34:33 +05:30
Island f36ae6c755 Merge branch 'fix/ble_hidd_remove_ccc_gating_v5.2' into 'release/v5.2'
fix(esp_hid/bluedroid): remove app-layer CCC gating in HID device (5.2)

See merge request espressif/esp-idf!51003
2026-07-23 19:26:23 +08:00
Wang Meng Yang 47e8e05222 Merge branch 'bugfix/low_spp_throughput_v5.2' into 'release/v5.2'
change(bt/bluedroid): increased port low watermark of RFCOMM (v5.2)

See merge request espressif/esp-idf!51088
2026-07-23 16:38:39 +08:00
Luo XuandWang Mengyang 30a9fae8c8 fix(bt): Fixed build error on array-bounds in HFP AG
(cherry picked from commit bbd20cae01)

Co-authored-by: Wang Mengyang <wangmengyang@espressif.com>
2026-07-23 16:15:57 +08:00
Island 82389b3e96 Merge branch 'fix/ble_log_compression_safety_v5.2' into 'release/v5.2'
fix(ble_log): fix unaligned access and buffer safety in log compression (5.2)

See merge request espressif/esp-idf!47927
2026-07-23 14:25:24 +08:00
Jin Cheng 30bf70a980 change(bt/bluedroid): increased port low watermark of RFCOMM
When PORT_RX_BUF_LOW_WM is too low, RFCOMM replenishes credits only
after receiving a relatively large number of packets, which may cause
the peer to exhaust its credits and enter a stop-and-wait state.
Increase the low watermark to replenish credits more promptly and
reduce the likelihood of the peer stalling while waiting for additional
credits.
2026-07-23 08:12:10 +08:00
Jin Cheng 72edcd18ea fix(bt/bluedroid): fixed issues from AI review in GAP, SPP, HID, L2CAP and HCI 2026-07-23 07:56:42 +08:00
Wang Meng Yang efed7bd6af Merge branch 'bugfix/hid_host_oob_read_v5.2' into 'release/v5.2'
fix(bt/bluedroid): fixed possible 1-byte OOB read in bta_hh_ctrl_dat_act (v5.2)

See merge request espressif/esp-idf!50976
2026-07-22 17:58:45 +08:00
Astha Verma c481185c04 fix(nimble): Handle Read Remote Supported Features failure correctly 2026-07-22 12:27:45 +05:30
Wang Meng Yang 02004d3fe1 Merge branch 'bugfix/a2dp_sbc_v5.2' into 'release/v5.2'
fix(bt): Fix the pointer sbc_start_frame is not initialized (v5.2)

See merge request espressif/esp-idf!51021
2026-07-22 14:08:16 +08:00
Zhou Xiao cafcf83921 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:10 +08:00
yangfeng 895ca78695 fix(bt): Fix the pointer sbc_start_frame is not initialized
- Closes https://github.com/espressif/esp-idf/issues/18835
2026-07-21 16:10:40 +08:00