Commit Graph
442 Commits
Author SHA1 Message Date
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
linruihao d783f9f02d fix(bt/bluedroid): check HFP audio status before forwarding SCO data 2026-09-17 09:32:45 +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
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
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
Wang Meng Yang 70d938445d Merge branch 'fix/aireview_pbap_v6.0' into 'release/v6.0'
fix(bt_pbap): Fix some bugs in bluedroid PBAP (v6.0)

See merge request espressif/esp-idf!51728
2026-09-06 11:26:03 +08:00
Wang Meng Yang d5f9b93781 Merge branch 'change/refactor_hidh_datapath_v6.0' into 'release/v6.0'
Change/refactor hidh datapath[backport v6.0]

See merge request espressif/esp-idf!51279
2026-09-06 11:24:27 +08:00
hejiaxin 340ce2b338 fix(bt_pbap): Fix some bugs in bluedroid PBAP
- Add sdp_seq to avoid p_ccb being free during sdp
- Changed some BTA_Pba functions to return non-void value
- Improve error catching and report
- Refactor bta_pba_client_response to avoid UAF problem
- Rearrange btc_pba_client init flag to avoid some disturbing bug
2026-09-04 11:55:05 +08:00
yangfeng 9905ffe7f5 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-09-04 10:02:48 +08:00
zhanghaipeng 6d23cb7278 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.
2026-09-04 09:40:32 +08:00
chenjianhuaandCursor 9bd7168fa1 feat(bt): Add host-agnostic BT OSAL and shared BLE profile task
- Add bt_osal: event queues, mutexes, semaphores, callouts, etc.
- Add the shared BLE profile task and event queue
- Bring both up and tear them down in the host init/deinit paths
- Add unit tests for the OSAL and the profile task

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 21:27:15 +05:30
Zhi Wei Jian 551c40ed07 feat(ble/bluedroid): Support PAWR connection event
(cherry picked from commit 7da7fa42ac)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-08-03 15:26:01 +08:00
hejiaxin 7f42eabb08 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-29 17:05:31 +08:00
Jin Cheng fdcb70e608 fix(bt/bluedroid): fixed issues from AI review in GAP, SPP, HID, L2CAP and HCI 2026-07-23 07:42:23 +08:00
Zhi Wei Jian 1ade9c6f0e feat(ble/bluedroid): Support bluedroid dual identity
(cherry picked from commit 2358786647)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 14:17:33 +08:00
Zhi Wei Jian 87d614ba91 feat(ble/bluedroid): Support bluedroid LE COC and EATT features
(cherry picked from commit 83f0831c53)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 11:56:06 +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
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
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
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
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
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
Mayank Tyagi 0a90976237 feat(nimble): ADD BLE HCI logging support for ESP Insights 2026-06-29 15:25:36 +05:30
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 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
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
Zhi Wei Jian 4536a24c4c feat(ble/bluedroid): add CS Security Requirements host support (Core 6.3)
(cherry picked from commit 919622c01c)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 09:08:31 +08:00
Zhi Wei Jian 9fb8579038 feat(ble/bluedroid): add LE UTP host support (Core 6.2)
(cherry picked from commit 3844e24207)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 09:08:31 +08:00
Zhi Wei JianandCursor ae3f98e78d feat(ble/bluedroid): add Shorter Connection Intervals host support (Core 6.2)
Co-authored-by: Cursor <cursoragent@cursor.com>


(cherry picked from commit 2a8a96d650)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 09:08:30 +08:00
Zhi Wei Jian 78257b3e96 feat(ble/bluedroid): add LL Extended Feature Set host support (Core 6.0)
(cherry picked from commit d568f2f151)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 09:08:29 +08:00
Zhi Wei JianandCursor e23d745b76 feat(ble/bluedroid): add Frame Space Update host support (Core 6.0)
Co-authored-by: Cursor <cursoragent@cursor.com>


(cherry picked from commit 5372ce03a3)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 09:08:29 +08:00
Zhi Wei Jian 0ad5f22cfa feat(ble/bluedroid): add DBAF host support (Core 6.0)
(cherry picked from commit e20d3f0197)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 09:08:28 +08:00
yangfeng a3f1ba390e fix(bt): Fix the critical issues related to HFP from AI review report
HFP AG:
- Fix mSBC EV3 second-packet payload length calculation to prevent OOB read and infinite loop
- Add init/deinit guards in HF AG helper functions to avoid NULL deref
- Return bt_status_t from btc_hf_ag_audio_data_send to avoid silent buffer leak on SLC failure
- Break SCO CI data loop when SCO is not open to prevent CPU starvation
- Guard BTM_FreeSCN(0) and reset SCN after free in bta_ag_del_records
- Use OI_UINT32 for mSBC decode frame length to avoid stack corruption
- Bound AT Dial command string copy to BTA_AG_AT_MAX_LEN
HFP Client:
- Check osi_calloc result before use when reassembling split mSBC frames
- Use OI_UINT32 for mSBC decode frame length to avoid stack corruption
- Free SDP db, collision/AT timers and queued AT cmds before scb reset on disable
- Fix mSBC EV3 second-packet payload length calculation (same as AG)
- Reject pcm_resample input smaller than overlap window (96 bytes) on filtered path
- Break SCO CI data loop when SCO is not open to prevent CPU starvation
- Guard BTM_FreeSCN(0) and reset SCN after free in bta_hf_client_del_record
2026-06-25 12:08:06 +08:00
Zhang Hai Peng 6e6394de74 fix(bt/bluedroid): validate handle in esp_ble_gattc_register_for_notify
(cherry picked from commit aa29772cbe1ec0fb1c5c6629dc5bf333a0194198)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-22 00:24:14 +08:00
Zhi Wei Jian cebf129df8 fix(ble/bluedroid): fix CTE and ISO API validation
(cherry picked from commit 0c3c894b7d)

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

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-10 19:54:00 +08:00
Zhi Wei Jian 7e97000e5c fix(ble/bluedroid): fix GATT client API parameter validation
(cherry picked from commit 653477c3e9)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-10 19:53:59 +08:00
Zhi Wei Jian 638e633e04 fix(ble/bluedroid): fix GAP BLE API parameter validation
(cherry picked from commit e3311c81c4)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-10 19:53:59 +08:00
Jiang Jiang Jian 45bbf6d506 Merge branch 'bugfix/fix_ble_coded_phy_rx_bug_v6.0' into 'release/v6.0'
fix(coex): fix ble coded phy rx issue when aborted by coex (v6.0)

See merge request espressif/esp-idf!48982
2026-06-03 16:39:10 +08:00
Zhang Hai Peng c3f56c18fa docs(bt): clarify BLE TX power priority and granularity
(cherry picked from commit 4ab49f267b)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-02 10:23:40 +08:00
Zhang Hai Peng 2a2cf950e8 docs(bt): clarify GATT client auth_req may trigger SMP
(cherry picked from commit 43734e7d7b)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-02 10:23:39 +08:00
Zhang Hai Peng c06569f101 docs(bt/bluedroid): add usage note for esp_ble_get_cur_sendable_packets_num
(cherry picked from commit 27fc241384)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-02 10:23:39 +08:00
Zhang Hai Peng 7971ea4ac7 feat(ble/bluedroid): add auto-setting for is_aux parameter in esp_ble_gattc_enh_open
(cherry picked from commit 1a9f2af505)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-02 10:23:38 +08:00
Zhang Hai Peng 068ef1e983 doc(ble/bluedroid): clarify callback notes to avoid time-consuming ops
(cherry picked from commit 4590b4bb34)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-02 10:23:38 +08:00
Zhang Hai Peng 231be0cb3b fix(ble/bluedroid): Ensure HIGH_DUTY_ADV_INTERVAL config is applied in stack
(cherry picked from commit 82c5c1fef3)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-02 10:23:37 +08:00
zhiweijian 76b7ddd13e fix(ble/bluedroid): note LE Coded PHY impact on Wi-Fi coexistence in bluedroid GAP/GATT APIs 2026-05-28 10:30:54 +08:00
yangfeng 001dc26361 fix: Remove the check for recv and send being NULL 2026-05-18 15:13:58 +08:00