Commit Graph

738 Commits

Author SHA1 Message Date
hejiaxin
f772cd6d38 fix(bt_hfp): Fix macro definition 2026-09-03 17:30:32 +08:00
hejiaxin
9f6cf1ac3c feat(bluedroid): Update LC3-SWB support in bluedroid
- Update LC3 in btc and bta, update AT
- Update LC3 in SCO frame transfer and examples
- improve lc3 transfer speed
- Fix some encoding and decoding bugs
- Rename the functions and macros to fit both msbc and lc3
- Add config dependency
- Add migration guides for bluetooth-classic
- change the statement of "Wide Band Speech" to "Wideband Speech" to fit HFPv1.10
2026-09-03 11:02:50 +08:00
Wang Meng Yang
63076cf266 Merge branch 'fix/bt_memory' into 'master'
fix(bt_memory): Reduce memory usage in transfer

See merge request espressif/esp-idf!51396
2026-08-28 14:52:59 +08:00
hejiaxin
12fe70031f fix(bt_avrcp): size some AVRC command buffers 2026-08-27 15:14:53 +08:00
hejiaxin
59eee88105 fix(bt_l2cap): size L2CAP ERTM S-frame & RX SDU buffer 2026-08-27 15:13:58 +08:00
hejiaxin
8a0156c4ed fix(bt_sdp): size SDP TX buffers 2026-08-27 15:11:44 +08:00
hejiaxin
53200e1ec4 fix(bt_rfcomm): size RFCOMM TX buffers by peer MTU 2026-08-27 15:10:28 +08:00
hejiaxin
b58556b338 fix(bt_hid): size HID TX buffers to report length 2026-08-27 15:10:05 +08:00
Island
e2930d30c8 Merge branch 'bugfix/fix_bluedroid_find_info_format_mismatch' into 'master'
fix(ble/bluedroid): restore find info PDU stop on UUID format mismatch

See merge request espressif/esp-idf!52063
2026-08-26 22:00:25 +08:00
Island
61aefd09ae Merge branch 'feat/ble_smp_repairing_hardening' into 'master'
feat(ble/bluedroid): add Kconfig options for BLE re-pairing hardening

See merge request espressif/esp-idf!51221
2026-08-26 15:07:45 +08:00
zhanghaipeng
196cb39545 fix(ble/bluedroid): restore find info PDU stop on UUID format mismatch
Restore GATT_NO_RESOURCES when sequential attributes have differing UUID
sizes so gatts_process_find_info() stops building the response PDU.
2026-08-26 11:20:23 +08:00
zhiweijian
88ea45be73 feat(ble/bluedroid): reject LE re-pairing that weakens an existing bond
Add smp_repairing_is_allowed() behind BT_BLE_SMP_HARDENED_REPAIRING so a
peer cannot replace an existing bond with one that has less MITM
protection, no Secure Connections, or a shorter key. Compare a preceding
Security Request against the pairing command AuthReq, not the
association-model result, and always allow first pairing.

A refusal keeps the stored bond. Pairing-failure erase is split by link
role: default is erase as Central and keep as Peripheral.

Closes BLERP (NDSS 2026) V3, V4 and V6.
2026-08-21 19:17:48 +08:00
zhiweijian
f864615d7d fix(ble/bluedroid): harden LE bond handling across encryption
Keep the existing bond until the new pairing is encrypted, and on encryption
failure drop the link instead of clearing keys. Recovering from a peer that
really deleted the bond is opt-in through BT_BLE_SMP_UNBOND_ON_KEY_MISSING.

Closes BLERP (NDSS 2026) V5, and stops an unauthenticated Pairing Request
from dropping the stored keys (V2 exploitation).
2026-08-21 19:17:48 +08:00
hejiaxin
dfc939ff02 fix(bt_obex): fix some bugs in bluedroid obex
- fix goepc wait state switch
- fix psm unbind's mismatch
- fix some resources leak
- fix goep connection's incorrect ternimation when congesting
- Add some NULL ptr check
2026-08-21 10:50:35 +08:00
linruihao
4f54340e51 feat(bt/bluedroid): support Classic Bluetooth PAN profile
- Port part of PAN/BNEP code from Android
- Add ESP API and BTC layer
2026-08-17 19:52:21 +08:00
Wang Meng Yang
362fa6b483 Merge branch 'bugfix/strncpy_compilation_issue' into 'master'
fix(bluedroid): Fix the compilation issue of BCM_STRNCPY_S

See merge request espressif/esp-idf!51578
2026-08-13 17:23:32 +08:00
yangfeng
0f2681a484 fix(bluedroid): Fix the compilation issue of BCM_STRNCPY_S 2026-08-13 10:04:28 +08:00
yangfeng
c4da788094 fix(bt): do not cap AVDTP Discover results by local SEP count
- Closes https://github.com/espressif/esp-idf/issues/18848
2026-08-13 09:53:07 +08:00
Island
5371ee669b Merge branch 'feat/support_pawr_connect_evt' into 'master'
feat(ble/bluedroid): Support PAWR connection event

See merge request espressif/esp-idf!50612
2026-08-03 10:16:58 +08:00
zhiweijian
7da7fa42ac feat(ble/bluedroid): Support PAWR connection event 2026-07-30 21:00:26 +08:00
Wang Meng Yang
744464271d Merge branch 'feat/bt_in_psram' into 'master'
feat(bluedroid): Add config to place btu and hci task stack in psram

Closes BT-4136

See merge request espressif/esp-idf!51002
2026-07-29 14:49:19 +08:00
Jiang Jiang Jian
139d968de0 Merge branch 'bugfix/sco_pkt_type_err' into 'master'
fix(bt/bluedroid): fixed incorrect eSCO packet type validation in secure connection mode

Closes BTQABR2023-849

See merge request espressif/esp-idf!51251
2026-07-29 14:41:23 +08:00
Wang Meng Yang
82b28b2641 Merge branch 'fix/aireview_critical' into 'master'
fix: Fix some critical bugs in classic bt

See merge request espressif/esp-idf!50312
2026-07-29 11:41:36 +08:00
Jin Cheng
c274987a7a fix(bt/bluedroid): fixed incorrect eSCO packet type validation under secure connection mode in BlueDroid 2026-07-28 15:21:29 +08:00
Wang Meng Yang
0185451ed1 Merge branch 'fix/bluedroid_aireview' into 'master'
Fix/bluedroid aireview

See merge request espressif/esp-idf!49972
2026-07-24 16:58:20 +08:00
hejiaxin
54cd579d3b 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-23 15:46:38 +08:00
hejiaxin
b6b97b8e58 feat(bluedroid): Add config to place btu and hci task stack in psram
- Also adjust the osi_thread_stop implementation.
2026-07-23 14:40:37 +08:00
hejiaxin
1553b0ce67 fix(bt): Fix some bug in stm_sco.c
- Memory safety
- State machine & logic integrity
- Resource leaks
- Edge cases check
2026-07-23 10:56:32 +08:00
liqigan
540a4216df change(bt/bluedroid): Refactored HCI ACL datapath 2026-07-22 14:41:20 +08:00
Wang Meng Yang
bc428c91d5 Merge branch 'bugfix/bredr_critical_bugs' into 'master'
bugfix: fix issues raised from AI review

See merge request espressif/esp-idf!49755
2026-07-22 14:31:28 +08:00
Island
30c632bebb Merge branch 'bugfix/fix_bluedroid_set_rand_addr_during_scan' into 'master'
fix(ble/bluedroid): report set rand addr result on HCI complete

Closes BLERP-2965

See merge request espressif/esp-idf!50663
2026-07-21 10:39:27 +08:00
Jin Cheng
970923ba7d fix(bt/bluedroid): fixed issues from AI review in GAP, SPP, HID, L2CAP and HCI 2026-07-17 17:15:56 +08:00
Wang Meng Yang
4b82a06d73 Merge branch 'bugfix/fix_bredr_inq_crash' into 'master'
fix(bt/bluedroid): fix crash during bredr inquiry when zero-addr device is found

Closes WIFI-7491

See merge request espressif/esp-idf!50672
2026-07-17 10:34:54 +08:00
Alexey Lapshin
37bdc6a827 Merge branch 'fix/bt__unused-but-set-variable_warnings' into 'master'
fix(bt): fix unused-but-set-variable warnings

See merge request espressif/esp-idf!50657
2026-07-15 13:01:45 +04:00
Island
36d4af40ad Merge branch 'bugfix/fix_bluedroid_read_multi' into 'master'
fix(ble/bluedroid): fix GATT Read Multiple response handling

Closes BLERP-2900

See merge request espressif/esp-idf!49690
2026-07-14 10:28:41 +08:00
Island
fb195f7b50 Merge branch 'bugfix/fix_bluedroid_ext_adv_param_fail_state' into 'master'
fix(ble/bluedroid): preserve ext adv state when set params fails

Closes BLERP-2962 and IDFGH-17144

See merge request espressif/esp-idf!50470
2026-07-14 10:28:30 +08:00
linruihao
8cbb5276c2 fix(bt/bluedroid): fix crash during bredr inquiry when zero-addr device is found 2026-07-13 16:25:18 +08:00
zhanghaipeng
23519567e4 fix(ble/bluedroid): track ext scan state for rand addr check
Update inq_var.state only after btsnd_hcic_ble_ext_scan_enable succeeds.
Clear BTM_BLE_SCANNING on explicit stop and controller scan timeout.
2026-07-13 15:58:32 +08:00
Alexey Lapshin
46ddc0f4b2 fix(bt): fix unused-but-set-variable warnings 2026-07-13 12:01:15 +07:00
Zhi Wei Jian
2e6cbccd55 Merge branch 'feat/support_bluedroid_dual_identify' into 'master'
feat(ble/bluedroid): Support bluedroid dual indentify

See merge request espressif/esp-idf!49640
2026-07-13 10:03:39 +08:00
zhiweijian
2358786647 feat(ble/bluedroid): Support bluedroid dual identity 2026-07-10 17:57:09 +08:00
zhiweijian
abbf001120 fix(ble/bluedroid): use BOOLEAN for BLE HCI command builders 2026-07-10 10:57:19 +08:00
zhiweijian
4fd1ebb4a9 fix(ble/bluedroid): clean up LE CoC connect on CCB alloc failure 2026-07-10 10:57:10 +08:00
zhiweijian
34b59d30ae docs(ble/bluedroid): note ISO BIG HCI alloc failure not checked 2026-07-10 10:56:59 +08:00
zhiweijian
82e71c1767 fix(ble/bluedroid): fix direct-connect cleanup and adv bounds 2026-07-10 10:56:47 +08:00
zhiweijian
93ab11d564 fix(ble/bluedroid): validate BLE confirm/OOB and sec-check device 2026-07-10 10:56:38 +08:00
zhiweijian
98efe02385 fix(ble/bluedroid): validate SMP pair-fail reason and OOB device 2026-07-10 10:56:25 +08:00
zhiweijian
6c3267ee84 fix(ble/bluedroid): route ATT indication-conf timeout separately 2026-07-10 10:55:59 +08:00
zhiweijian
bb00b9817d fix(ble/bluedroid): validate ATT PDU sizes 2026-07-10 10:55:39 +08:00
zhiweijian
37562af0ea fix(ble/bluedroid): re-lookup GATT TCB after enc-complete callback 2026-07-10 10:55:29 +08:00