Commit Graph
5790 Commits
Author SHA1 Message Date
Zhang Hai Peng e9fce74445 feat(ble/bluedroid): Optimize Bluedroid memory usage
- Delete unused device records (~356B each)


(cherry picked from commit 7d1c0e9a32)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:24:34 +08:00
Zhang Hai Peng 7b2b31bb0d fix(ble/bluedroid): cap Read By Type response length at ATT maximum
Read By Type Response Length is one octet (max 255). When MTU was
large enough to return a long characteristic value in one pair, the
server wrote (UINT8)(value_len + 2) and overflowed (e.g. 513 -> 1),
so the client rejected the PDU as GATT_INVALID_PDU (0x04).

Cap server value to 253 bytes per pair, clamp the length byte, and
continue long reads via Read Blob when the capped size is returned.


(cherry picked from commit 97905afccc)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:24:16 +08:00
Zhang Hai Peng 54e7b74cc1 fix(ble/bluedroid): Fixed potential double Execute Write Response
(cherry picked from commit 0a93ccd3b3)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:23:59 +08:00
Zhang Hai Peng f00c216ce2 fix(ble/bluedroid): preserve ATT error on prepare write completion
Skip prepare-write echo validation when the GATT stack reports a
non-success status. ATT Error Response carries no prepare-write echo
body (rsp_len=0), so the check incorrectly overwrote errors such as
GATT_INSUF_AUTHENTICATION (0x05) with GATT_INVALID_PDU (0x04).


(cherry picked from commit d5b9350d0f)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:23:38 +08:00
Zhang Hai Peng 4bf3d52183 fix(ble/bluedroid): unblock sync HCI cmd on Command Status error
Release the BLE sync semaphore and record HCI status when a
synchronous command is rejected via Command Status, since no
Command Complete event follows.


(cherry picked from commit 29ae92f4ef)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:49 +08:00
Zhang Hai Peng fab51c7925 fix(ble/bluedroid): set REQ_WAITING before GATTC service-change rediscovery
When service change cancels in-progress discovery, bta_gattc_disc_cmpl()
re-triggers discovery without marking auto_update as REQ_WAITING. If a
client command is queued in p_q_cmd, bta_gattc_start_discover() refuses
to restart and the command is never dispatched.


(cherry picked from commit 13926bb9bc)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:32 +08:00
Zhang Hai Peng 50c719356c fix(ble/bluedroid): report conn param update failure for unknown BD_ADDR
Route unknown BD_ADDR and other immediate failures through the existing
need_cb path so ESP_GAP_BLE_UPDATE_CONN_PARAMS_EVT is always delivered.


(cherry picked from commit f9eaeb5e84)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:14 +08:00
Zhang Hai Peng 95c5099ed9 fix(ble/bluedroid): add context to GATTC reg-notify cache warning
Include client_if, handle, bd_addr, and server cache state in the
warning logged when notification registration skips handle validation.


(cherry picked from commit 1085a32be8)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:14 +08:00
Zhang Hai Peng feb1da9239 fix(ble/bluedroid): return ESP_ERR_INVALID_ARG for invalid conn params
Return ESP_ERR_INVALID_ARG instead of ESP_FAIL when connection
parameter validation fails


(cherry picked from commit 6c53838e66)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:13 +08:00
Zhang Hai Peng 003a4007e5 fix(ble/bluedroid): reject adv data on legacy directed ext adv
(cherry picked from commit c339cec380)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:15:54 +08:00
Zhang Hai Peng 2f8c3b6c1a fix(ble/bluedroid): skip identity conversion for static random direct connect
Do not rewrite static or non-resolvable random peer addresses to
identity type 0x03 when CONFIG_BT_BLE_RPA_SUPPORTED is enabled.


(cherry picked from commit 2ef10ef488)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:15:35 +08:00
Jiang Jiang Jian c039510b18 Merge branch 'change/ble_update_lib_20260612_v6.1' into 'release/v6.1'
change(ble): [AUTO_MR] 20260612 - Update ESP BLE Controller Lib (6.1)

See merge request espressif/esp-idf!49611
2026-06-23 14:46:22 +08:00
Jiang Jiang Jian 85081d2414 Merge branch 'bugfix/fix_bluedroid_ai_review_bugs_20260427_v6.1' into 'release/v6.1'
Bugfix/fix bluedroid ai review bugs 20260427 (6.1)

See merge request espressif/esp-idf!49542
2026-06-14 11:04:54 +08:00
Jiang Jiang Jian 8b5b4ed238 Merge branch 'fix/ble_mesh_bug_report_v2_v6.1' into 'release/v6.1'
fix(ble_mesh): Miscellaneous bugfixes according to our internal bug report (v2)

See merge request espressif/esp-idf!49294
2026-06-14 00:01:18 +08:00
Jiang Jiang Jian 6b2f99fdde Merge branch 'bugfix/s31_wvt_test_v6.1' into 'release/v6.1'
Bugfix/s31 wvt test v6.1

See merge request espressif/esp-idf!49616
2026-06-13 15:01:47 +08:00
Jiang Jiang Jian 9e78314d07 Merge branch 'fix/reduce_acl_event_gaps_v6.1' into 'release/v6.1'
feat(ble): updated libble to 71d180a4 for esp32h4 and esp32s31 (6.1)

See merge request espressif/esp-idf!49593
2026-06-13 15:01:07 +08:00
Zhi Wei Jian 5b8171d0d1 fix(bt): fix BTC task and BLE mesh bluedroid adapter
(cherry picked from commit 678fb93245)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian af256786f4 fix(ble/bluedroid): fix HCI command and BTU robustness
(cherry picked from commit c9d13aaf64)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian be594ffd57 fix(ble/bluedroid): fix CTE and ISO API validation
(cherry picked from commit 0c3c894b7d)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian cd3109a29d fix(ble/bluedroid): fix GATT server lifecycle and callbacks
(cherry picked from commit 54a1e31916)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian 02bdc429b9 fix(ble/bluedroid): fix GATT client API parameter validation
(cherry picked from commit 653477c3e9)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian 8c4345b672 fix(ble/bluedroid): fix GATT client cache and service discovery
(cherry picked from commit b3ff15ed31)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian 0da4c99922 fix(ble/bluedroid): fix GAP BLE API parameter validation
(cherry picked from commit e3311c81c4)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian 1386b19072 fix(ble/bluedroid): fix BLE bonding key storage validation
(cherry picked from commit 62cdd4ac38)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Jiang Jiang Jian 55a4018a8c Merge branch 'idf/ble_iso_enh_v6.1' into 'release/v6.1'
feat(ble_iso): Split ISO task queue into priority tiers & add dispatch monitor (v6.1)

See merge request espressif/esp-idf!49512
2026-06-12 17:09:41 +08:00
Jiang Jiang Jian 37bd639db2 Merge branch 'fix/gattc-multi-app-notif-warning_v6.1' into 'release/v6.1'
fix(bt): Suppress gattc drop-notif warning for unregistered gatt_if (6.1)

See merge request espressif/esp-idf!49518
2026-06-12 16:51:05 +08:00
liqigan e4242d5b7e change(bt): Used esp_log as the print function for bredr controller 2026-06-12 15:39:30 +08:00
Jin Cheng ad5748f1af fix(bt/controller): fixed several BR/EDR controller bugs found by WVT regression tests on ESP32-S31 2026-06-12 15:39:17 +08:00
ShenWeilong 30458851b3 feat(ble): updated libble to 71d180a4 for esp32h4 and esp32s31 2026-06-12 14:47:03 +08:00
Shen Wei Long 213dca167e fix(bt): fixed the npl callout stop issue
(cherry picked from commit bb4eeb8edc)

Co-authored-by: ShenWeilong <shenweilong@espressif.com>
2026-06-12 14:40:49 +08:00
Zhou Xiao 28093221cc change(ble): [AUTO_MR] Update lib_esp32c2 to 750d4902
(cherry picked from commit 897f3b2af1)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-06-12 12:14:40 +08:00
Jiang Jiang Jian 83abf396e3 Merge branch 'idf/ble_iso_minor_update_v6.1' into 'release/v6.1'
feat(ble_iso): Minor update for some ISO internal functions (v6.1)

See merge request espressif/esp-idf!49324
2026-06-10 15:52:25 +08:00
Zhang Hai Peng ab5c9ff59c fix(bt): Suppress gattc drop-notif warning for unregistered gatt_if
GATT stack broadcasts notifications to every client app, so unregistered
gatt_if instances were flooding logs even when another app had registered
the handle. Only warn when no client app registered for the handle.


(cherry picked from commit c18c8dc5e7)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-10 15:24:43 +08:00
Liu Linyan a8a8abcb39 feat(ble_iso): Split ISO task queue into priority tiers & add dispatch monitor 2026-06-10 15:20:38 +08:00
Jiang Jiang Jian e406662397 Merge branch 'fix/ble_funcs_reset_default_enabled_v6.1' into 'release/v6.1'
fix(bt): Add default BLE controller funcs reset enable (6.1)

See merge request espressif/esp-idf!49139
2026-06-10 11:13:04 +08:00
Jiang Jiang Jian c5c08f3328 Merge branch 'bugfix/issues_from_e22_eco2_testsv6.1' into 'release/v6.1'
fix(bt/controller): fixed several BR/EDR controller bugs found by WVT regression tests on ESP32-S31

See merge request espressif/esp-idf!49424
2026-06-09 20:08:34 +08:00
Jin Cheng b62e578edd fix(bt/controller): fixed several BR/EDR controller bugs found by WVT regression tests on ESP32-S31 2026-06-09 16:34:36 +08:00
Liu Linyan 8fbe03bf8c feat(ble_iso): Minor update for some ISO internal functions 2026-06-05 14:49:03 +08:00
yangfeng ead8107e82 fix: Fix missing handling for HCI_ERR_CONNECTION_EXISTS
- Closes https://github.com/espressif/esp-idf/issues/18562
2026-06-05 14:17:41 +08:00
luoxu ceaa55822a fix(ble_mesh): Miscellaneous bugfixes according to our internal bug report (v2) 2026-06-05 11:59:35 +08:00
Jiang Jiang Jian 039bf48d58 Merge branch 'feat/ble-log-iram-optim_v6.1' into 'release/v6.1'
opt(bt): Move SPI Tx Callback to Flash When SPI ISR IN IRAM Disabled (6.1)

See merge request espressif/esp-idf!48925
2026-06-05 10:38:12 +08:00
Jiang Jiang Jian c38e675c0b Merge branch 'idf/ble_audio_bluedroid_v6.1' into 'release/v6.1'
feat(ble_audio): Support running ISO & LE Audio with Bluedroid Host (v6.1)

See merge request espressif/esp-idf!49059
2026-06-05 10:36:25 +08:00
Jiang Jiang Jian 7cf57fe795 Merge branch 'fix/fix_conn_recycle_assertion_at_halt_v6.1' into 'release/v6.1'
fix(ble): fix conn recycle assertion at halt on ESP32-C2 (6.1)

See merge request espressif/esp-idf!49239
2026-06-05 10:35:22 +08:00
Jiang Jiang Jian 8c0d5b1693 Merge branch 'bugfix/fix_ble_coded_phy_performance_with_wifi_coex_v6.1' into 'release/v6.1'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(51d9dfde) (6.1)

See merge request espressif/esp-idf!48996
2026-06-05 10:28:41 +08:00
Jiang Jiang Jian 8ab8298677 Merge branch 'bugfix/fix_crash_due_to_error_print_v6.1' into 'release/v6.1'
fix(nimble): Update excessive logging prints in failure scenario (v6.1)

See merge request espressif/esp-idf!48917
2026-06-05 10:26:56 +08:00
Liu Linyan 91fc8d3905 feat(ble_audio): Support running ISO & LE Audio with Bluedroid Host 2026-06-04 15:41:36 +08:00
Jiang Jiang Jian 77f5214ab0 Merge branch 'fix/some_issue_s31_v6.1' into 'release/v6.1'
fix(bt/controller): fixed several controller issues (v6.1)

See merge request espressif/esp-idf!49117
2026-06-04 15:10:28 +08:00
Jin Chen 6f600996c7 fix(ble): fix conn recycle assertion at halt on ESP32-C2
(cherry picked from commit 5483aeedb6)

Co-authored-by: cjin <jinchen@espressif.com>
2026-06-03 17:54:11 +08:00
Zhou Xiao 265dde11e7 change(ble_log): reverted default ble log buffer size to 2048 bytes 2026-06-03 15:39:21 +08:00
Zhou Xiao 926dd7fe4a 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-06-03 15:39:17 +08:00