Commit Graph
100 Commits
Author SHA1 Message Date
xiongweichao b0694c2485 fix(bt): skip unknown codecs when parsing AT+BAC
Peers may report custom or non-standard codec UUIDs in AT+BAC alongside
CVSD/mSBC. Returning BTA_AG_CODEC_NONE on the first unknown entry
discarded already-parsed standard codecs. Log unknown UUIDs and continue
parsing so negotiated capabilities still reflect supported codecs.
2026-06-03 19:26:01 +08:00
xiongweichao 6115a920f1 feat(bt): support classic Bluetooth sleep mode on ESP32-S31 2026-05-18 15:36:12 +08:00
xiongweichao 0bc4f8ab8e fix(bt): Fix crash due to functions not placed in IRAM 2026-03-23 14:28:58 +08:00
xiongweichao 1d77103291 fix(bt): fix crash when calling esp_spp_start_discovery twice in succession 2026-03-12 02:06:05 +00:00
xiongweichao 4ef57f9c81 fix(bt): Replace 32k_xtal with rtc_slow 2026-02-06 08:24:33 +00:00
xiongweichao 5827a5ad4b fix(bt): Add some debug logs during A2DP sink decoding 2026-02-06 08:24:14 +00:00
xiongweichao 91b9e7be7c fix(ble): Fix restore write-back error caused by memory allocated in PSRAM 2026-02-06 16:23:24 +08:00
xiongweichao d3c5f23b4c fix(bt): retry when L2CAP write fails 2025-12-29 11:11:57 +08:00
xiongweichao 906063665a fix(bt): fix l2cap malloc fail in throughput test 2025-12-29 11:11:57 +08:00
xwc d117e8d59b fix(ble): Fix assertion caused by ring buffer read size mismatch expected rx size 2025-12-26 17:04:07 +08:00
xiongweichao 86975e6487 fix(bt): fixed crash caused by deinit during A2DP connection initiation
- Only clean up when idle
2025-11-26 11:31:56 +08:00
xiongweichao 67efd21f3d feat(bt): Adds an SPP API parameter to indicate whether to create SPP record 2025-11-19 06:06:01 +00:00
xiongweichao 7daac582ac refactor(example/bt): Remove APIs starting with periph_ 2025-11-17 11:47:43 +08:00
xiongweichao 3618b4732a refactor(example/bt): Refactor controller_hci_uart example for ESP32-C3/S3 to use UHCI driver 2025-11-17 11:47:43 +08:00
xiongweichao 7920885608 fix(ble): fix ci power save test connection failure 2025-10-16 15:59:19 +08:00
xiongweichao 28404a6324 feat(bt): Add record_handle in ESP_SDP_REMOVE_RECORD_COMP_EVT 2025-07-07 19:12:00 +08:00
xiongweichao c2d666a6d9 fix(ble): keep the log of the bluetooth sleep clock source consistent 2025-07-01 19:17:20 +08:00
xiongweichao a8ed0133ca feat(bt/bluedroid): Add events to indicate the initialization states of AVRCP 2025-05-28 11:24:32 +00:00
xiongweichao f02e35363b feat(bt): Add API to get some information of Classic Bluetooth profile 2025-04-23 14:46:40 +08:00
xiongweichao b9182a8293 fix(bt): Fixed l2cap not reporting stop server completion event 2025-04-21 16:06:15 +08:00
xiongweichao e7a6d3298c fix(bt): fixed spp not reporting write event 2025-04-14 15:42:41 +08:00
xiongweichao 4b5ccbe7f1 fix(bt): Fixed the issue with l2cap not using dynamic memory 2025-04-11 16:45:53 +08:00
xiongweichao 007a2a30f5 fix(bt): Fixed write_read task stack overflow in l2cap example 2025-04-11 16:45:53 +08:00
xiongweichao 1f7658ed42 feat(bt): Added events for l2cap register and unregister vfs 2025-04-11 16:45:53 +08:00
xiongweichao 1a6c9d7c15 feat(bt): Add API to get profile status 2025-04-01 16:14:19 +08:00
xiongweichao b2a5b967c9 fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles
- Due to the number of service security records exceeding the maximum value, the connection failed
2025-03-27 14:07:24 +08:00
xiongweichao 88ee19d3d3 fix(bt/bluedroid): fixed other events being reported when disconnected
- Since no initial value is assigned, the variable evt is a random value,
causing the ESP_BT_GAP_DISC_STATE_CHANGED_EVT event to be reported when
the connection is disconnected.
2025-03-20 17:21:14 +08:00
xiongweichao 7311e67f4b fix(bt/bluedroid): Fixed freeing spp server memory when disconnected 2025-03-06 19:25:37 +08:00
xiongweichao bc23851be7 fix(bt): Fixed SDP record integrity check bug 2025-02-12 10:55:25 +08:00
xiongweichao c2cea8ff26 fix(bt/bluedroid): fixed the format error of passkey printing 2025-02-10 16:46:58 +08:00
xiongweichao aacfce691e fix(bt/bluedroid): Fixed incorrect types of some variables in SDP 2025-02-10 16:46:58 +08:00
xiongweichao a13c76b539 fix(bt): Fix incorrect type returned when searching SAP record 2025-02-10 16:46:58 +08:00
xiongweichao 45bfc024dd fix(bt): Fix the incorrect record found using uuid16 search 2025-02-10 16:46:58 +08:00
xiongweichao aa674c4eab feat(bt): Added API to get/set low power clock source 2025-01-21 17:50:17 +08:00
xiongweichao 8e8e577d2c fix(bt): Fixed some controller bugs
- Fix epr not being initiated after authentication is completed
- Fixed the issue HCI_READ_CLOCK returned parameter in slot
- Fixed the missmatching of CLKN and FCNT after clock update
2024-12-16 19:15:18 +08:00
xiongweichao a1c89bb7df fix(ble): fixed that the resolvable private address does not change when light sleep is enabled 2024-12-16 11:11:55 +08:00
xiongweichao 19bf3ece26 fix(bt/bluedroid): fixed issues introduced by byte alignment
- esp_bt_uuid_t is byte aligned, tBT_UUID is 4-byte aligned.
2024-11-22 10:37:14 +08:00
xiongweichao 383bc035ce fix(bt): Move esp_wifi_bt_power_domain_on/off to esp_phy_init.h 2024-11-19 10:12:37 +08:00
xiongweichao 4b4a9a2174 fix(bt/bluedroid): Fixed the incorrect error code returned
when receiving an invalid command
2024-11-14 10:20:53 +08:00
xiongweichao 35ef6f5140 fix(bt/bluedroid): Replace free/malloc with osi_free/malloc 2024-10-31 17:14:25 +08:00
xiongweichao b71597416d feat(bt/bluedroid): Report sniff interval to application layer 2024-09-23 15:23:36 +08:00
xiongweichao ff83d87bce feat(ble): Support using 32k oscillator as Bluetooth sleep clock 2024-09-18 16:16:43 +08:00
xiongweichao a55d8bf12b fix(bt/bluedroid): Fix the protocol stack to exit sniff mode
- Already in result mode but request change indication has not been cleared
2024-09-04 15:08:01 +08:00
xiongweichao e50547f664 fix(bt/controller): Fixed disconnection issue
- Fixed the issue of disconnection caused by updating the channel map in sniff mode
2024-07-31 10:33:33 +08:00
xiongweichao a3d3b74e35 fix(bt/bluedroid): Fixed deadlock caused by not unlocking 2024-05-27 19:36:17 +08:00
xiongweichao 0b0d316d4c fix(bt/bluedroid): Fixed L2CAP using wrong handle
- Fixed the issue of using the wrong handle to handle the BTA_JV_L2CAP_READ_EVT event.
- Closes https://github.com/espressif/esp-idf/issues/13847
2024-05-27 19:34:46 +08:00
xiongweichao 3237cce6b5 docs: Update the process of Bluetooth entering sleep in the sleep_modes.rst 2024-04-25 10:19:41 +08:00
xiongweichao f535fdff2d fix(bt/bluedroid): Fixed crash after bluedroid deinit
hci_host_env.downstream_data_ready is set to NULL during bluedroid deinit,
causing the controller to use a null pointer when calling callback.
2024-04-11 10:39:44 +08:00
Xiong Wei Chao d4234309a5 Merge branch 'bugfix/spp_crash_after_deint' into 'master'
fix(bt/bluedroid):  Fixed SPP crash due to the connection not being disconnected before esp_spp_deinit was called

Closes BT-3657

See merge request espressif/esp-idf!29999
2024-04-07 19:53:45 +08:00
xiongweichao 3d19c3db13 feat(ble): Added API to get low power clock source 2024-04-07 17:30:55 +08:00
xiongweichao cca828d03a fix(bt/bluedroid): Fix SPP crash after deinit
- The disconnection event comes up after spp disable is completed, so a null pointer is used.
2024-04-07 15:51:43 +08:00
Xiong Wei Chao 7915aee213 Merge branch 'bugfix/sdp_remove_record_no_evt' into 'master'
fix(bt/bluedroid): Fixed the crash caused by using illegal pointers during SDP deinit

Closes BTQABR2023-201

See merge request espressif/esp-idf!29288
2024-04-01 10:17:31 +08:00
xiongweichao eabd31e849 fix(bt/bluedorid): Fixed crash caused by using illegal pointer 2024-03-27 19:05:39 +08:00
xiongweichao 1c30191ac4 fix(bt/bluedorid): Fixed no event when removing an invalid SDP record 2024-03-27 19:05:39 +08:00
xiongweichao dd943fad9a fix(ble): Fixed macro definition error for 136K clock drift 2024-01-29 11:29:01 +08:00
xiongweichao 3e2ef4f26c fix(ble): Fixed Bluetooth not waking up due to clock drift 2024-01-25 10:23:02 +08:00
xiongweichao a4f228da46 fix(ble): Fixed the issue of being unable to enter light sleep
- Fixed the issue where light sleep cannot be entered when external 32k XTAL does not exist
2024-01-17 10:29:43 +08:00
xiongweichao 71442ef6de fix(bt/bluedroid): Fixed SPP connection failure
The connection failure is caused by the BTU and application layer status being out of sync.
2023-12-21 17:42:26 +08:00
Xiong Wei Chao 0331e6fabd Merge branch 'bugfix/role_switch_enc_mode_lmp_timeout' into 'master'
bt: Fix disconnection due to lmp messages not being processed by both sides

Closes BTQABR2023-38 and BTQABR2023-37

See merge request espressif/esp-idf!24757
2023-08-04 10:23:26 +08:00
Xiong Wei Chao 12d6268095 Merge branch 'docs/update_bluetooth_power_save_readme' into 'master'
Docs: update bluetooth power save readme

Closes FCS-1258

See merge request espressif/esp-idf!24562
2023-07-17 12:14:39 +08:00
xiongweichao 381292df31 fix(bt/controller): Fix disconnection due to lmp messages not being processed by both sides
The master sent lmp_enc_mode_req, and the slave sent lmp_switch_req.
However, both sides failed to handle the LMP message, resulting in LMP timeout.
2023-07-13 10:32:16 +08:00
xiongweichao e1be273e63 docs(bt/example): Updated bluetooth power save readme 2023-07-11 11:14:31 +08:00
xiongweichao d26ad599c4 docs(sleep_modes): Updated Wi-Fi/Bluetooth and Sleep Modes in docs 2023-07-11 11:14:31 +08:00
xiongweichao e86b367f21 change(bt/Bluedroid): Update AVRCP version to 1.5 2023-07-03 03:57:26 +00:00
xiongweichao 2fa475bc2c bt: Fixed some bluetooth bugs
1. Fixed LC_AFH_UPDATE_IND  has not benn processed causing memory exhaustion
2. Fixed no free elt in prog push
3. Fixed disconnect due to sniff with error Dsniff
4. Fixed the problem that the host continued to send ACL data to the controller after disconnection, which caused the connection to fail again
2023-06-25 16:32:07 +08:00
xiongweichao 3fd18692a2 components/bt: Fix crash due to NULL point 2023-06-25 16:18:30 +08:00
Xiong Wei Chao 9b3dfe2caf Merge branch 'feature/add_bluetooth_nimble_lightsleep_example' into 'master'
bt: Added an example of Bluetooth using light sleep

Closes BCI-299 and BT-1879

See merge request espressif/esp-idf!19698
2023-05-10 19:51:07 +08:00
xiongweichao a7519e17c8 bt: Deleted some redundant variables in HFP_AG 2023-05-04 15:36:23 +08:00
xiongweichao 1532675692 bt: Added an example of Bluetooth using light sleep 2023-05-04 14:41:31 +08:00
xiongweichao f04b663ac4 bt: Fixed the inconsistency between the indicator event received by the HF application layer and the actually received indicator.
Closes https://github.com/espressif/esp-idf/issues/6486
2023-04-27 10:06:18 +08:00
xiongweichao 481034060a bt: Fixed the problem of out-of-bounds access caused by the variable-length array introduced in 3268075231
Closes https://github.com/espressif/esp-idf/issues/11264
2023-04-26 19:31:07 +08:00
xiongweichao de24e9b86e bt: Fixed codec mode error in ESP_HF_WBS_RESPONSE_EVT 2023-04-26 17:51:16 +08:00
xiongweichao 5a80ea3bd9 Fixed the issue that the a2dp source would not send the media start command due to the connection initiated by the peer device
Closes https://github.com/espressif/esp-idf/issues/11170
2023-04-19 15:13:36 +08:00
xiongweichao 30c87c7a82 bt:Fixed esp32 controller bug
1. Fixed crash after controller disable and re-enable
2. Fixed the crash caused by processing the HCI_Read_Remote_Extented_Features command in the non-connected state

Closes https://github.com/espressif/esp-idf/issues/10835
2023-04-11 12:03:09 +08:00
xiongweichao 8f5c33cec1 1.Fixed disconnection due to not handling lmp_unsniff_req in LC_WAIT_SNIFF_SUB_RSP state
2.Fixed crash caused by supervision timeout greater than sniff interval
2023-03-30 11:15:38 +08:00
xiongweichao 3b5939396d bt:Added a parameter to tell the user the result of the pass through command implementation 2023-02-22 15:37:54 +08:00
xiongweichao 76734369a8 Remove compile option for bluedroid classic bluetooth examples 2022-12-21 10:57:42 +00:00
xiongweichao 9d56c4c215 Assert when malloc user_data fail 2022-12-05 20:30:45 +08:00
xiongweichao 07621fdea8 Modified spp vfs example 2022-12-05 20:30:45 +08:00
xiongweichao 6bce9b7029 Fixed memory leak when SPP initialization failed 2022-12-05 20:30:45 +08:00
xiongweichao 4a702a2011 Added esp_spp_vfs_unregister() to free memory allocated by esp_spp_vfs_register() 2022-12-05 20:30:43 +08:00
xiongweichao 592675fd5b Fixed incorrect parameters in switching to BTC context 2022-11-30 10:41:54 +08:00
xiongweichao 3268075231 bt:Modify the member variable *arg in struct btc_msg to arg[0] 2022-11-30 10:41:54 +08:00
xiongweichao 40f6239fd7 bt: Fixed memory leak due to not freeing memory if posting a message to a thread fails 2022-11-30 10:41:52 +08:00
xiongweichao c497d7d6c1 bt: Remove SPP default send buffer size option and add parameters to configure send buffer size in esp_spp_enhance_init() 2022-11-29 10:20:47 +08:00
xiongweichao ecf2eea1d6 bt: Added esp_spp_enhance_init() API to indicate whether to enable L2CAP ERTM 2022-11-28 20:42:53 +08:00
xiongweichao cbf3467d4e Fixed a2dp failing to connect again after disconnect 2022-11-28 11:37:14 +08:00
xiongweichao cf788a241d bt: Update HFP version to v1.8 2022-11-23 20:17:22 +08:00
xiongweichao 923cdcf75a bt: Update A2DP version to v1.4 2022-11-23 20:17:22 +08:00
xiongweichao 33d351898a bt:Fixed the use of invalid configuration when the peer device configures the stream, and returned an incorrect error code 2022-11-23 20:17:22 +08:00
xiongweichao 01a67d001e bt: Keep the maximum number of credits unchanged 2022-10-27 19:45:25 +08:00
xiongweichao 7885f80597 bt: Replaced the tx queue in SPP VFS mode with ringbuffer 2022-10-27 19:45:25 +08:00
xiongweichao ea41a21b0e bt: Split SPP application layer data packets according to the MTU of the peer 2022-10-27 19:45:25 +08:00
xiongweichao a0ec1c8291 bt: Enter the congestion state when the queue length waiting for the peer to ack is greater than or equal to the L2CAP ERTM tx window size 2022-10-27 19:45:25 +08:00
xiongweichao bda54af557 bt: Fixed SPP VFS mode not being able to send data 2022-10-25 14:17:45 +08:00
xiongweichao 4e895104ef bt: Fixed esp_spp_write() crash when len is 0
Closes https://github.com/espressif/esp-idf/issues/9977
2022-10-20 06:18:14 +00:00
xiongweichao 80e3d965ae Fixed deadlock due to wrong parameter when calling btc_transfer_context() after calling esp_bluedroid_disable()
Closes https://github.com/espressif/esp-idf/issues/9672
2022-09-01 11:47:46 +08:00
xiongweichao 697755dfe5 Fixed sink not being able to output mono audio because it can only decode dual channel audio data 2022-08-25 11:36:28 +08:00
xiongweichao a3df364269 Fixed the bt_spp_initiator example that did not set the uart source clock when initializing the uart, which caused a crash 2022-08-23 15:46:07 +08:00
xiongweichao 9ee49832ea Fix bluetooth disconnection issue when light sleep and baseband power down are enabled 2022-08-22 15:06:48 +08:00