Commit Graph
5892 Commits
Author SHA1 Message Date
Zhou Xiao 5c11f97421 change(ble): [AUTO_MR] Update lib_esp32h2 to a6519790
(cherry picked from commit 8a744e8e93)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-07-01 10:35:33 +08:00
Wang Meng Yang 5f4062d827 Merge branch 'bugfix/ai_review_btu_common_v6.0' into 'release/v6.0'
fix: Fix the critical issues of btu and bt_common from AI review report (v6.0)

See merge request espressif/esp-idf!50122
2026-06-30 19:25:09 +08:00
luoxu b710ac9830 fix(ble_mesh): Disable warning logging when advertising packets are discarded 2026-06-30 16:59:12 +08:00
Jin Cheng 0d118139ff fix(bt/bluedroid): fixed possible OOB write in btc_a2dp_sink_handle_inc_media 2026-06-30 14:43:00 +08:00
Jin Cheng 2a6c38d1eb fix(bt/bluedroid): fixed possible OOB read/write in process_l2cap_cmd 2026-06-30 14:42:56 +08:00
Jiang Jiang Jian d40f9586c5 Merge branch 'bugfix/ai_review_a2dp_v6.0' into 'release/v6.0'
fix(bt): Fix the critical issues related to A2DP from AI review report (v6.0)

See merge request espressif/esp-idf!50128
2026-06-30 12:03:32 +08:00
Jin Cheng f3230cae05 fix(bt/bluedroid): fixed SDP deinit race with pending callbacks
Cancel any active SDP search during disabling and mark the BTA SDP
callbacks inactive so late search completions are not propagated
after deinit. Guard BTC side SDP completion handling after cleanup
to avoid null references.
2026-06-30 11:57:31 +08:00
Island 518eabeb7d Merge branch 'bugfix/fix_bluedroid_static_random_conn_rpa_v6.0' into 'release/v6.0'
fix(ble/bluedroid): skip identity conversion for static random direct connect (6.0)

See merge request espressif/esp-idf!50085
2026-06-30 10:24:28 +08:00
Island e73366f64c Merge branch 'bugfix/fix_bluedroid_rpa_whitelist_conn_v6.0' into 'release/v6.0'
Fix connection failure when using RPA with whitelist filtering(ESP32) (6.0)

See merge request espressif/esp-idf!50091
2026-06-30 10:23:12 +08:00
Rahul Tank cd0ad239a6 Merge branch 'bugfix/nimble_issues_02062026_v6.0' into 'release/v6.0'
fix(nimble):  Fix few nimble issues 02062026 (v6.0)

See merge request espressif/esp-idf!49153
2026-06-29 21:52:48 +05:30
Island 6e73125228 Merge branch 'feat/spi_log_qa_frame_check_v6.0' into 'release/v6.0'
feat(ble_log): add FINAL_STAT session-end frame and flush hook before controller restart (6.0)

See merge request espressif/esp-idf!49958
2026-06-29 20:25:50 +08:00
Zhang Hai Peng af02bd9018 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-29 19:04:29 +08:00
Zhang Hai Peng add48e6f2c 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-29 19:04:29 +08:00
Zhang Hai Peng b13f63fd7f 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-29 19:04:29 +08:00
Zhang Hai Peng 0217c922fe 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-29 19:04:29 +08:00
Zhang Hai Peng a8ee33b38f fix(ble/bluedroid): preserve HCI status on BLE 4.2 GAP failures
Return BTM_HCI_ERROR | hci_status from legacy BLE 4.2 GAP HCI command
paths instead of mapping failures to BTM_ILLEGAL_VALUE or
BTM_NO_RESOURCES. Add btm_ble_status_from_hci() helper and propagate
real status through scan start/stop completion callbacks.


(cherry picked from commit 47dd785a18)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-29 19:04:29 +08:00
Zhang Hai Peng 005e8029a9 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-29 19:04:29 +08:00
Zhang Hai Peng ad3a325cc9 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-29 19:04:29 +08:00
Zhang Hai Peng 50b98393c6 fix(ble/bluedroid): Fixed potential double Execute Write Response
(cherry picked from commit 0a93ccd3b3)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-29 19:04:29 +08:00
Zhang Hai Peng be3b2cf56b 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-29 19:04:29 +08:00
Zhang Hai Peng 78f1bd2ccf 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-29 19:04:29 +08:00
Zhang Hai Peng 702972227d 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-29 19:04:29 +08:00
Zhang Hai Peng 3a0344e321 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-29 19:04:29 +08:00
Sumeet Singh 5dfb38a6d3 fix(nimble): Add npl locks to avoid race condition (v6.0) 2026-06-29 15:45:00 +05:30
Astha Verma b0f278ec19 fix(nimble): Added l2cap_coc throughput examples 2026-06-29 15:41:54 +05:30
Rahul Tank 13ce6692eb fix(nimble): Gaurd ble_hs_log_mbuf/flat_buf against non-DEBUG log level 2026-06-29 15:38:45 +05:30
Island 0ced163703 Merge branch 'feat/add_ble_core_6x_feature_for_bluedroid_v6.0' into 'release/v6.0'
Feat/add ble core 6x feature for bluedroid (6.0)

See merge request espressif/esp-idf!50053
2026-06-29 17:59:32 +08:00
Sumeet Singh dbe2e860da fix(nimble): Change remaining vars from Static to Dynamic (v6.0) 2026-06-29 15:25:37 +05:30
Rahul Tank f783d3a7eb fix(nimble): Deinit NimBLE stop event in host task 2026-06-29 15:25:37 +05:30
Rahul Tank 609ad13324 fix(nimble): Fix for clang compilation issues 2026-06-29 15:25:37 +05:30
Rahul Tank b633c5e2a5 fix(nimble): Add support for shorter connection intervals 2026-06-29 15:25:37 +05:30
Rahul Tank b2ab997d3f fix(nimble): Fix compilation issues in Gatt SPS service 2026-06-29 15:25:37 +05:30
Rahul Tank 3b270b8c67 fix(nimble): Remove extra/unwanted prints 2026-06-29 15:25:36 +05:30
Mayank Tyagi 562a32ba46 fix(nimble): Avoid deadlock caused by local writes taking s_hidd_mutex 2026-06-29 15:25:36 +05:30
Mayank Tyagi 842941b488 fix(nimble): Forward HID report/control/protocol writes as HIDD events 2026-06-29 15:25:36 +05:30
Mayank Tyagi 0a90976237 feat(nimble): ADD BLE HCI logging support for ESP Insights 2026-06-29 15:25:36 +05:30
Jiang Jiang Jian f02fad8ce1 Merge branch 'bugfix/ai_review_avrcp_v6.0' into 'release/v6.0'
fix(bt): Fix the critical and high issues related to AVRCP from AI review report (v6.0)

See merge request espressif/esp-idf!50020
2026-06-29 15:43:53 +08:00
Jiang Jiang Jian 965ebfce03 Merge branch 'bugfix/ai_review_hfp_v6.0' into 'release/v6.0'
fix(bt): Fix the critical issues related to HFP from AI review report (v6.0)

See merge request espressif/esp-idf!50007
2026-06-29 15:43:38 +08:00
Jiang Jiang Jian 777411abb9 Merge branch 'feat/ble-smp-multi-adv-static-random-address_v6.0' into 'release/v6.0'
feat(ble/bluedroid): Add BLE SMP support for multi-ADV with static random addresses (6.0)

See merge request espressif/esp-idf!49789
2026-06-29 15:41:49 +08:00
Jiang Jiang Jian 76c727dfdf Merge branch 'bugfix/ag_unknown_codec_vv6.0' into 'release/v6.0'
fix(bt): skip unknown codecs when parsing AT+BAC(v6.0)

See merge request espressif/esp-idf!49840
2026-06-29 15:41:42 +08:00
Jiang Jiang Jian 97ccc904c5 Merge branch 'bugfix/bbp_isses_v6.0' into 'release/v6.0'
Bugfix/bbp isses v6.0

See merge request espressif/esp-idf!49624
2026-06-29 15:40:16 +08:00
Jiang Jiang Jian c1aeac2888 Merge branch 'bugfix/fix_bluedroid_ai_review_bugs_20260427_v6.0' into 'release/v6.0'
Bugfix/fix bluedroid ai review bugs 20260427 (6.0)

See merge request espressif/esp-idf!49541
2026-06-29 15:39:47 +08:00
Jiang Jiang Jian 4cc49bd9b7 Merge branch 'fix/ble_mesh_bug_report_v2_v6.0' into 'release/v6.0'
fix(ble_mesh): Miscellaneous bugfixes according to our internal bug report (v2) (v6.1)

See merge request espressif/esp-idf!49321
2026-06-29 15:37:24 +08:00
Jiang Jiang Jian 870760093f Merge branch 'bugfix/acl_conn_state_error_v6.0' into 'release/v6.0'
fix: Fix missing handling for HCI_ERR_CONNECTION_EXISTS (v6.0)

See merge request espressif/esp-idf!49313
2026-06-29 15:37:20 +08:00
Jiang Jiang Jian 08f007f68d Merge branch 'fix-bind_int_wdt_to_cache_livelock_fix_v6.0' into 'release/v6.0'
fix(esp_system): bind int_wdt to cache livelock workaround (v6.0)

See merge request espressif/esp-idf!49169
2026-06-29 15:36:59 +08:00
Jiang Jiang Jian 4ebe898101 Merge branch 'feat/ble-log-iram-optim_v6.0' into 'release/v6.0'
opt(bt): Move SPI Tx Callback to Flash When SPI ISR IN IRAM Disabled (6.0)

See merge request espressif/esp-idf!48924
2026-06-29 15:32:59 +08:00
yangfeng fe06f59a88 fix(bt): Fix the critical issues related to A2DP from AI review report
AVDT:
- Roll back CCB allocation when cmd/rsp queue creation fails
- Free media packet on invalid handle in AVDT_WriteReqOpt
- Zero-init timeout failure message before GETCAP callback
- Initialize lcid_tbl to 0xFF to avoid mapping to tc_tbl[0]
BTA/AVRCP:
- Use size_t for AVRC message copy buffer allocation
- Allocate before register in BTA_AvEnable
- Guard BTA_AvRegister callback when enable never completed
- Remove invalid free of inline Cover Art image_descriptor
A2DP BTC/API:
- Default g_a2dp_on_deinit to true before profile init
- Reject source audio send when A2DP is deiniting
- Add shutdown state check in btc_a2dp_sink_shutdown
- Guard A2DP source timer against freed dynamic local param
2026-06-29 15:00:49 +08:00
yangfeng 84e210df45 fix: Fix the critical issues of btu and bt_common from AI review report
- advance connect queue on synchronous connect_cb failure
- lock bta_alarm_hash_map in all BTA timer APIs
- free controller params after stack disable; cleanup on init fail
- handle BTE_InitStack failure and signal init future
- validate HCI remote name event length before parse
- drop stale L2CAP quick-timer alarm events
2026-06-29 14:46:01 +08:00
Island 608c9495a4 Merge branch 'bugfix/fix_ble_reg_notify_no_fail_v6.0' into 'release/v6.0'
validate handle in esp_ble_gattc_register_for_notify (6.0)

See merge request espressif/esp-idf!48546
2026-06-29 14:39:34 +08:00
Island 760495e0b2 Merge branch 'fix/ble_funcs_reset_default_enabled_v6.0' into 'release/v6.0'
fix(bt): Add default BLE controller funcs reset enable (6.0)

See merge request espressif/esp-idf!49138
2026-06-29 14:39:15 +08:00