Commit Graph
6060 Commits
Author SHA1 Message Date
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 cc62c8bfb4 fix(bt): update ESP32 libbtdm_app.a to 4a0f94d5
- Fix connection failure when using RPA with whitelist filtering
- Fix disconnect with reason 0x08 during full scan
- Fix peer RPA resolution failure when advertising with a local identity address
2026-06-25 19:34:13 +08:00
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
Wang Meng Yang 3be1a334c0 Merge branch 'bugfix/ai_review_hfp' into 'master'
fix(bt): Fix the critical issues related to HFP from AI review report

See merge request espressif/esp-idf!49400
2026-06-24 20:54:46 +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
Island 005dd1ba8c Merge branch 'feat/spi_log_qa_frame_check' into 'master'
feat(ble_log): add FINAL_STAT session-end frame and flush hook before controller restart

See merge request espressif/esp-idf!49433
2026-06-24 10:46:43 +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
guozifan a81322a2ce feat(ble_log): Add frame check support for restart flow 2026-06-23 16:19:30 +08:00
Rahul Tank 7d33607e26 Merge branch 'feat/throughput_l2cap_coc' into 'master'
Added l2cap_coc example for throughput

Closes BLERP-2890

See merge request espressif/esp-idf!47284
2026-06-22 18:07:07 +05:30
Island bf08ef8b50 Merge branch 'feat/ble_log_compression_module_cfg_update' into 'master'
Feat/ble log compression module cfg update

See merge request espressif/esp-idf!48467
2026-06-22 14:15:26 +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
Jiang Jiang Jian 5a1adbfb1c Merge branch 'change/ble_update_lib_20260612' into 'master'
change(ble): [AUTO_MR] 20260612 - Update ESP BLE Controller Lib

Closes BLERP-2888

See merge request espressif/esp-idf!49605
2026-06-18 17:20:25 +08:00
luoxu c0286b25fa feat(ble): reorganize log compression Kconfig and add ISO
Move sub-Kconfig files into categorized directories (profile/mesh/,
host/, iso/audio/) and create the missing ISO/Audio compression
Kconfig with COMPRESSION + PRESERVE pairs for all 4 log levels,
matching the existing cmake tag definitions.
2026-06-18 15:28:10 +08:00
luoxu 8d4f1cb608 fix(ble): fix Bluedroid log compression for newly added modules 2026-06-18 15:28:10 +08:00
luoxu d88b964c8d feat(ble): split log compression Kconfig into separate mesh and host files 2026-06-18 15:28:10 +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
Liu Linyan 40efed2a7b fix(ble_audio): Fix mcc read may enter BUSY state while multiple notifications are received 2026-06-17 09:51:19 +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
Wang Meng Yang bfb7c81fc1 Merge branch 'bugfix/esp32_ctrl_issues' into 'master'
fix(bt/controller): fixed several BR/EDR controller bugs found by WVT regression tests on ESP32

See merge request espressif/esp-idf!49621
2026-06-16 16:47:28 +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
Xiao Xufeng 789ce684c9 fix(mmap): fixed some API read wrong data via mmap when flash being erased/written while XIP on PSRAM
Before:

The cache won't be disabled when XIP on psram. But during flash
erasing/programming, read data will be courrupt.

When XIP in psram is enabled, the image is not mapped to the cache so
usually there will be no flash access. The only way to read from flash
is via the driver or use mmap. The driver has protection during erasing,
while th mmap region not.

Now:

Mmap APIs provide a flag to make mmap->unmap region mutually exclusive
to flash erase/programming when XIP from psram. SPI Flash write APIs
will benefit from this. When the flag is used, no concurrent access to
mapped region will happen while writing; otherwise the cache will be
disable to avoid data corruption.

Most ESP-IDF APIs calls mmap with this flag. As for users calling
mmap-like APIs directly, they can choose whether to enable this by a
flag.

Closes https://github.com/espressif/esp-idf/issues/14897
2026-06-16 01:00:43 +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
Jin Cheng 676fd45ec9 fix(bt/controller): fixed several BR/EDR controller bugs found by WVT regression tests on ESP32 2026-06-15 15:26:09 +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