Commit Graph

5304 Commits

Author SHA1 Message Date
Jin Cheng
e50072d0b7 fix(bt/controller): update ESP32 libbtdm_app.a to fix missing QoS_Setup_Cmpl event 2026-09-07 12:25:17 +08:00
Jiang Jiang Jian
4f7226bb6e Merge branch 'bugfix/fix_nimble_issue_2608' into 'release/v5.2'
fix(nimble): Fix few nimble issues 2608 (v5.2)

See merge request espressif/esp-idf!52110
2026-08-28 19:36:24 +08:00
Jiang Jiang Jian
fa007af38f Merge branch 'bugfix/qos_div_zero_v5.2' into 'release/v5.2'
fix(bt): update ESP32 libbtdm_app.a to fix several issues (v5.2)

See merge request espressif/esp-idf!52057
2026-08-28 13:56:58 +08:00
Jiang Jiang Jian
f9eb0fc601 Merge branch 'idf/ble_mesh_iv_recover_v5.2' into 'release/v5.2'
feat(ble_mesh): Enable IV Index recovery by default (5.2)

See merge request espressif/esp-idf!52105
2026-08-27 21:36:00 +08:00
Jiang Jiang Jian
0dfa74b617 Merge branch 'change/ble_update_lib_20260824_v5.2' into 'release/v5.2'
change(ble): [AUTO_MR] 20260824 - Update ESP BLE Controller Lib (5.2)

See merge request espressif/esp-idf!52016
2026-08-27 20:29:31 +08:00
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
Rahul Tank
a01916d093 fix(nimble): Fix ECC HW byte-order and dropped SOC_ESP_NIMBLE_CONTROLLER 2026-08-26 15:51:28 +05:30
Rahul Tank
97963f57ee fix(nimble): bound PAwR synced connect retries in the example 2026-08-26 15:49:36 +05:30
Rahul Tank
75428d48e6 fix(nimble): Added change to stop adv before starting new adv 2026-08-26 15:49:31 +05:30
Liu Linyan
b8c3479672 feat(ble_mesh): Enable IV Index recovery by default
(cherry picked from commit 8e59eb4850)

Co-authored-by: Liu Linyan <liulinyan@espressif.com>
2026-08-26 17:34:39 +08:00
Jin Cheng
b5aecb9349 fix(bt): update ESP32 libbtdm_app.a to fix several issues
- fixed IntegerDividedByZero during Qos negotiation.
  Closes https://github.com/espressif/esp-idf/issues/18951
- ignored the check for bandwidth and retransmission effort when Host
  accepts the SCO connection request.
2026-08-26 09:20:15 +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
zhaoweiliang
48010a1e2a change(ble): [AUTO_MR] Update lib_esp32c6 to cdaefea1 2026-08-25 15:09:14 +08:00
zhaoweiliang
a8dbbb6910 change(ble): [AUTO_MR] Update lib_esp32h2 to cdaefea1 2026-08-25 15:08:58 +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