Commit Graph
100 Commits
Author SHA1 Message Date
xiongweichao 69b56b0315 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-22 11:13:48 +08:00
xiongweichao 8cda04c402 fix(bt): fix crash when calling esp_spp_start_discovery twice in succession 2026-03-16 19:42:07 +08:00
xiongweichao 13f32812e6 fix(bt): Add some debug logs during A2DP sink decoding 2026-02-25 10:05:00 +08:00
xiongweichao 91126a706c fix(bt): Replace 32k_xtal with rtc_slow 2026-02-25 10:05:00 +08:00
xiongweichao 7fab4726cc fix(ble): Fix restore write-back error caused by memory allocated in PSRAM 2026-02-24 10:31:56 +08:00
xiongweichao 556af73952 fix(bt): retry when L2CAP write fails 2026-01-12 06:09:35 +00:00
xiongweichao 964c3e4db6 fix(bt): fix l2cap malloc fail in throughput test 2026-01-12 06:09:35 +00:00
xiongweichao 75122a3eea fix(bt): fixed crash caused by deinit during A2DP connection initiation
- Only clean up when idle
2025-12-01 11:51:28 +00:00
xiongweichao bb945d92fd feat(bt): Adds an SPP API parameter to indicate whether to create SPP record 2025-11-21 15:56:57 +08:00
xiongweichao 4d34845ab6 fix(ble): fix ci power save test connection failure 2025-10-21 19:07:14 +08:00
xiongweichao f96817051f feat(bt): Add record_handle in ESP_SDP_REMOVE_RECORD_COMP_EVT 2025-07-21 10:30:02 +08:00
xiongweichao b23cf5c696 fix(ble): keep the log of the bluetooth sleep clock source consistent 2025-07-04 10:31:11 +08:00
xiongweichao 00512cd39a feat(bt/bluedroid): Add events to indicate the initialization states of AVRCP 2025-05-30 10:14:32 +08:00
xiongweichao 60f188198b feat(bt): Add API to get some information of Classic Bluetooth profile 2025-04-25 14:47:57 +08:00
xiongweichao d909fe2156 fix(bt): Fixed l2cap not reporting stop server completion event 2025-04-24 15:14:45 +08:00
xiongweichao a2d88bf700 fix(bt): fixed spp not reporting write event 2025-04-15 19:07:35 +08:00
xiongweichao 7e3efc45ad fix(bt): Fixed the issue with l2cap not using dynamic memory 2025-04-15 19:07:31 +08:00
xiongweichao 4a64e655de fix(bt): Fixed write_read task stack overflow in l2cap example 2025-04-15 19:07:26 +08:00
xiongweichao 259bc660b3 feat(bt): Added events for l2cap register and unregister vfs 2025-04-15 19:07:21 +08:00
xiongweichao 805543ce42 fix(bt): Fix ci failure due to code spelling errors 2025-04-08 10:05:51 +08:00
xiongweichao 3721a43afc feat(bt): Add API to get profile status 2025-04-07 19:17:01 +08:00
xiongweichao 8d5543b191 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 19:56:52 +08:00
xiongweichao 51591ba7b9 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-21 11:17:43 +08:00
xiongweichao d127ebb160 fix(bt/bluedroid): Fixed freeing spp server memory when disconnected 2025-03-11 12:03:19 +08:00
xiongweichao 059a6cdd65 fix(bt): Fixed SDP record integrity check bug 2025-02-21 18:02:02 +08:00
xiongweichao b3521b51f1 fix(bt/bluedroid): fixed the format error of passkey printing 2025-02-21 18:02:02 +08:00
xiongweichao c3bfb484d0 fix(bt/bluedroid): Fixed incorrect types of some variables in SDP 2025-02-21 18:02:02 +08:00
xiongweichao ff81e4b9ee fix(bt): Fix incorrect type returned when searching SAP record 2025-02-21 18:02:02 +08:00
xiongweichao 9e33139206 fix(bt): Fix the incorrect record found using uuid16 search 2025-02-21 18:02:02 +08:00
xiongweichao 5a94c54fb8 feat(bt): Added API to get/set low power clock source 2025-01-23 11:19:36 +08:00
xiongweichao 45890e88e0 fix(ble): fixed that the resolvable private address does not change when light sleep is enabled 2024-12-17 10:52:55 +08:00
xiongweichao 5bc5695ff0 fix(bt/bluedroid): fixed issues introduced by byte alignment
- esp_bt_uuid_t is byte aligned, tBT_UUID is 4-byte aligned.
2024-11-28 10:16:06 +08:00
xiongweichao 82ef0a6b94 fix(bt/bluedroid): Fixed the incorrect error code returned
when receiving an invalid command
2024-11-19 07:11:20 +08:00
xiongweichao 68b16aa2ba fix(bt/bluedroid): Replace free/malloc with osi_free/malloc 2024-11-01 17:49:39 +08:00
xiongweichao 2b30323a2b feat(ble): Support using 32k oscillator as Bluetooth sleep clock 2024-10-25 17:25:18 +08:00
xiongweichao 93f862d6fd feat(bt/bluedroid): Report sniff interval to application layer 2024-09-27 14:11:26 +08:00
xiongweichao a9f47ffd5e 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-09 15:30:39 +08:00
xiongweichao b1c9475b71 fix(bt/controller): Fixed disconnection issue
- Fixed the issue of disconnection caused by updating the channel map in sniff mode
2024-08-16 12:20:47 +08:00
xiongweichao 4a919356ba fix(bt/bluedroid): Fixed deadlock caused by not unlocking 2024-06-25 00:59:25 +08:00
xiongweichao 6c01ce3ae2 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-06-25 00:59:25 +08:00
xiongweichao 9eb61ef5a7 docs: Update the process of Bluetooth entering sleep in the sleep_modes.rst 2024-05-09 11:01:31 +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
xiongweichao 3850fe14b6 bt: Fixed that i2s_channel_disable was not called before calling i2s_channel_reconfig_std_clock in the A2DP sink example, which caused reconfiguring the I2S clock to fail 2022-08-12 16:44:48 +08:00
xiongweichao bb5e7004b9 make bluetooth and wifi use the same low power clock 2022-08-04 14:01:34 +08:00
xiongweichao 1fec2b9529 ESP32S3:bluetooth support use main XTAL in light sleep mode 2022-08-04 14:01:34 +08:00
xiongweichao d85d927bb0 ESP32C3:bluetooth support use main XTAL in light sleep mode 2022-08-04 14:01:34 +08:00
xiongweichao 7eedd710c2 fix legacy pair controller does not send the link key to the host
Closes https://github.com/espressif/esp-idf/issues/5850
2022-07-28 14:21:48 +08:00
xiongweichao b0b6ad21f8 coex: fixed crash when calculating end transfer time 2022-07-11 15:26:53 +08:00