Commit Graph
2109 Commits
Author SHA1 Message Date
Rahul Tank de70cf7e6b Merge branch 'bugfix/fix_gatt_crash' into 'master'
fix(nimble): serialize NPL eventq ops to fix callout_reset race

Closes BLERP-2939

See merge request espressif/esp-idf!49967
2026-06-29 10:21:02 +05:30
Jiang Jiang Jian ae860abd4c Merge branch 'bugfix/ai_review_btu_common' into 'master'
fix: Fix the critical issues of btu and bt_common from AI review report

See merge request espressif/esp-idf!49574
2026-06-29 12:00:22 +08:00
Jiang Jiang Jian af7e18f9d0 Merge branch 'bugfix/ai_review_a2dp' into 'master'
fix(bt): Fix the critical issues related to A2DP from AI review report

See merge request espressif/esp-idf!49355
2026-06-29 11:58:39 +08:00
Island 83c7c6ed82 Merge branch 'bugfix/fix_ble_write_fail' into 'master'
fix(ble/bluedroid): Fixed potential double Execute Write Response

Closes BLERP-2292

See merge request espressif/esp-idf!49413
2026-06-26 20:08:29 +08:00
Island 3fe6482c51 Merge branch 'bugfix/fix_ble_sync_cmd_command_status_err' into 'master'
fix(ble/bluedroid): unblock sync HCI cmd on Command Status error

Closes BLERP-2926

See merge request espressif/esp-idf!49965
2026-06-26 16:52:18 +08:00
Island a9921f900c Merge branch 'bugfix/fix_gattc_disc_cmpl_stranded_read' into 'master'
fix(ble/bluedroid): set REQ_WAITING before GATTC service-change rediscovery

Closes BLERP-2925

See merge request espressif/esp-idf!49940
2026-06-26 16:52:06 +08:00
Island b45f379fd1 Merge branch 'bugfix/fix_bluedroid_read_by_type_fail' into 'master'
fix(ble/bluedroid): cap Read By Type response length at ATT maximum

Closes BLERP-2895, BLERP-2896, and BLERP-2897

See merge request espressif/esp-idf!49656
2026-06-26 16:51:19 +08:00
Island ba17bb5c6f Merge branch 'opt/opt_bluedroid_memory' into 'master'
feat(ble/bluedroid): Optimize Bluedroid memory usage

Closes BLERP-2307

See merge request espressif/esp-idf!49666
2026-06-26 16:51:12 +08:00
Island 96234ffa93 Merge branch 'bugfix/preserve_hci_status_on_set_scan_params' into 'master'
fix(ble/bluedroid): preserve HCI status on BLE 4.2 GAP failures

Closes BLERP-2905

See merge request espressif/esp-idf!49746
2026-06-26 16:51:00 +08:00
Island 106fe3da23 Merge branch 'bugfix/fix_bluedroid_static_random_conn_rpa' into 'master'
fix(ble/bluedroid): skip identity conversion for static random direct connect

Closes BCI-620

See merge request espressif/esp-idf!49754
2026-06-26 16:50:54 +08:00
Island 296c0a28f2 Merge branch 'bugfix/fix_bluedroid_legacy_directed_adv_data_validate' into 'master'
fix(ble/bluedroid): reject non-zero adv data on legacy directed ext adv

Closes BLERP-2908

See merge request espressif/esp-idf!49758
2026-06-26 16:50:51 +08:00
Island 853f4ba18e Merge branch 'bugfix/fix_gap_update_conn_params_invalid_arg' into 'master'
fix(ble/bluedroid): return ESP_ERR_INVALID_ARG for invalid conn params

Closes BLERP-2915, BLERP-2917, and BLERP-2920

See merge request espressif/esp-idf!49854
2026-06-26 16:50:47 +08:00
zhanghaipeng 0a93ccd3b3 fix(ble/bluedroid): Fixed potential double Execute Write Response 2026-06-26 15:36:43 +08:00
Rahul Tank 33d5050aec fix(nimble): Add npl locks to avoid race condition 2026-06-25 17:31:47 +05:30
zhanghaipeng 2ef10ef488 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.
2026-06-25 19:15:25 +08:00
Island d598b2d14d Merge branch 'feat/add_ble_core_6x_feature_for_bluedroid' into 'master'
Feat/add ble core 6x feature for bluedroid

See merge request espressif/esp-idf!49409
2026-06-25 12:01:05 +08:00
zhanghaipeng 97905afccc 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.
2026-06-25 10:49:39 +08:00
yangfeng 16fa00e3b2 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-25 10:43:29 +08:00
Wang Meng Yang d0a96988f2 Merge branch 'bugfix/ai_review_avrcp' into 'master'
fix(bt): Fix the critical and high issues related to AVRCP from AI review report

See merge request espressif/esp-idf!49375
2026-06-24 21:25:54 +08:00
zhiweijian 919622c01c feat(ble/bluedroid): add CS Security Requirements host support (Core 6.3) 2026-06-24 17:54:53 +08:00
zhiweijian 3844e24207 feat(ble/bluedroid): add LE UTP host support (Core 6.2) 2026-06-24 17:54:53 +08:00
zhiweijianandCursor 2a8a96d650 feat(ble/bluedroid): add Shorter Connection Intervals host support (Core 6.2)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 17:54:53 +08:00
zhiweijian d568f2f151 feat(ble/bluedroid): add LL Extended Feature Set host support (Core 6.0) 2026-06-24 16:53:37 +08:00
zhiweijianandCursor 5372ce03a3 feat(ble/bluedroid): add Frame Space Update host support (Core 6.0)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 16:52:45 +08:00
zhiweijian e20d3f0197 feat(ble/bluedroid): add DBAF host support (Core 6.0) 2026-06-24 16:00:19 +08:00
zhanghaipeng 29ae92f4ef 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.
2026-06-24 15:32:50 +08:00
yangfeng 169a29defc fix(bt): Fix the high issues related to AVRCP from AI review report
- SDP/registration: handle SDP record creation and discovery failures safely
- AVRC stack: fix packet checks, fragment leaks, response build, and compile guards
- BTC AVRCP: fix return codes, connection state, metadata parsing, and memory leaks
- AVCTP: fix event passing, L2CAP conflicts, TX queue leaks, and disconnect handling
- Example: remove TG RN capability setup before initialization
2026-06-24 11:20:09 +08:00
yangfeng 3210f4eea5 fix(bt): Fix the critical issues related to AVRCP from AI review report
- recalculate len_left per attribute in avrc_bld_app_setting_text_rsp
- abort fragmented message reassembly when reassembly buffer alloc fails
2026-06-24 11:20:09 +08:00
yangfeng 0dce2d707d 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-23 20:15:48 +08:00
zhanghaipeng 13926bb9bc 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.
2026-06-23 20:08:14 +08:00
yangfeng 0211122300 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-23 19:36:16 +08:00
zhanghaipeng f9eaeb5e84 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.
2026-06-22 14:08:16 +08:00
zhanghaipeng 1085a32be8 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.
2026-06-22 12:14:13 +08:00
zhanghaipeng 6c53838e66 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
2026-06-22 11:56:22 +08:00
zhanghaipeng 7d1c0e9a32 feat(ble/bluedroid): Optimize Bluedroid memory usage
- Delete unused device records (~356B each)
2026-06-22 11:17:27 +08:00
Astha Verma 5f58bb5e5e fix(nimble): Added l2cap_coc throughput examples 2026-06-19 11:48:18 +05:30
Rahul Tank dd43cc3b7b Merge branch 'bugfix/fix_log_performance' into 'master'
fix(nimble): Gaurd ble_hs_log_mbuf/flat_buf against non-DEBUG log level

See merge request espressif/esp-idf!49653
2026-06-18 21:39:15 +05:30
Wang Meng Yang 63e9bfc9b8 Merge branch 'bugfix/ag_unknown_codec' into 'master'
fix(bt): skip unknown codecs when parsing AT+BAC

Closes BT-4384

See merge request espressif/esp-idf!49244
2026-06-18 17:22:03 +08:00
Wang Meng Yang 371f92bf8a Merge branch 'bugfix/bbp_517' into 'master'
fix(bt/bluedroid): fixed possible OOB read in btc_a2dp_sink_handle_inc_media

Closes BT-4398

See merge request espressif/esp-idf!49673
2026-06-18 15:14:47 +08:00
Wang Meng Yang 3963be89f4 Merge branch 'bugfix/bbp_515' into 'master'
fix(bt/bluedroid): fixed possible OOB read/write in process_l2cap_cmd

Closes BT-4397

See merge request espressif/esp-idf!49672
2026-06-18 14:39:05 +08:00
zhanghaipeng c339cec380 fix(ble/bluedroid): reject adv data on legacy directed ext adv 2026-06-17 17:50:29 +08:00
zhanghaipeng 47dd785a18 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.
2026-06-17 11:37:39 +08:00
Rahul Tank 490d918891 fix(nimble): Gaurd ble_hs_log_mbuf/flat_buf against non-DEBUG log level 2026-06-16 20:16:50 +08:00
Island 57b3b1777a Merge branch 'feat/ble-smp-multi-adv-static-random-address' into 'master'
feat(ble/bluedroid): Add BLE SMP support for multi-ADV with static random addresses

Closes BLERP-2698

See merge request espressif/esp-idf!49011
2026-06-16 15:24:26 +08:00
Jin Cheng 6cb20db4df fix(bt/bluedroid): fixed possible OOB write in btc_a2dp_sink_handle_inc_media 2026-06-15 20:26:48 +08:00
Jin Cheng bd60b1c267 fix(bt/bluedroid): fixed possible OOB read/write in process_l2cap_cmd 2026-06-15 20:26:15 +08:00
zhanghaipeng 7986e2faa8 feat(ble/bluedroid): Add BLE SMP support for multi-ADV with static random addresses 2026-06-15 14:41:51 +08:00
Wang Meng Yang 8160f8d5f5 Merge branch 'bugfix/bbp_481' into 'master'
fix(bt/bluedroid): added buffer length check for OBEX APIs

Closes BT-4367

See merge request espressif/esp-idf!49437
2026-06-12 18:30:32 +08:00
Jin Cheng 6979093544 fix(bt/bluedroid): added buffer length check for HID Device data indication 2026-06-12 12:18:02 +08:00
Rahul Tank 678cc62dac Merge branch 'fix/add_remaining_vars_to_heap' into 'master'
fix(nimble): Change remaining vars from Static to Dynamic

See merge request espressif/esp-idf!48334
2026-06-11 17:30:05 +05:30