Commit Graph

134 Commits

Author SHA1 Message Date
Wang Meng Yang
95ddb84df1 Merge branch 'bugfix/fix_c3_some_bugs_06_15_v4.3' into 'release/v4.3'
Bugfix/fix c3 some bugs 06 15 v4.3

See merge request espressif/esp-idf!14017
2021-06-28 00:00:06 +00:00
Wang Meng Yang
3844f6bb84 Merge branch 'bugfix/ble_start_scan_crash_issue_mr_4.3' into 'release/v4.3'
ble start scan crash issue

See merge request espressif/esp-idf!14081
2021-06-25 11:25:36 +00:00
zwj
4d3715c836 support hw recorrect 2021-06-25 15:32:50 +08:00
wangmengyang
ffe43f2c45 component/bt: fixed the assert in checking hardware sleep state during wake-up
The hardware sleep state change can take some time after wake-up interrupt. Use busy waiting instead of directly assert
2021-06-24 08:28:24 +08:00
wangmengyang
4657069afd components/bt: Disable CS-RXDONEMSK to avoid RX interrupt flooding during scan event in Wi-Fi coexistence scenario 2021-06-23 19:14:41 +08:00
sushant.chougule
e6115da7e9 bt/component: Fix MIC error issue during start_encryption procedure in esp32c3 ble controller 2021-06-22 17:17:29 +08:00
“YangZhao”
fe9ecf2f7a If the scan window set as 4 slots and the scan interval set as 5 slots
,then the device will crash when starting scanning.This commit is to fix
this bug.
2021-06-21 21:56:03 +08:00
wangmengyang
ef6910467c components/bt: fixed performance issue for extended active scan in coexistence scenario: use the same priority for Rx of AUX_ADV_IND and AUX_SCAN_RSP 2021-06-17 19:34:03 +08:00
liaowenhao
7e4f7867f0 bugfix/fix crash when lmp flooding 2021-06-02 15:31:33 +08:00
baohongde
f0679fe175 components/bt: Delete BLE ADV priority high 2021-06-01 16:19:24 +00:00
Chinmay Chhajed
b7ab286edf bt controller: Fixed handling for invalid feature page. 2021-06-01 16:19:24 +00:00
wangmengyang
9c872b1851 components/bt: fixed bugs in Bluetooth Controller and Baseband
1. Removed the interrupt lock operation during controller enable/disable/reset, to avoid trigger interrupt watchdog time-out due to use of mutex/semaphore in coex_st_set

2: Update libbtbb.a for ESP32-C3 to fix the Rx performance issue for CODED PHY, especially in coexistence scenario
2021-04-29 03:58:29 +00:00
zwj
5e9aa539ea fix c3 ble disconnect due to connection parameters update 2021-04-23 20:39:40 +08:00
wangmengyang
cdcb85fd70 component/bt: add another bt-lib submodule and refactor the directories
# Conflicts:
#	.gitmodules
#	components/bt/component.mk
2021-04-22 07:46:55 +08:00
wangmengyang
257047c073 remove original esp32-bt-lib submodule 2021-04-21 20:40:35 +08:00
“YangZhao”
e45ce5c058 bugfix: Fix the issue that the controller do not report the timeout
disconnect event. This issue is caused by modem sleep.The sleep interrupt
will come the second time before the CLKN interrupt. If we disable the sleep
interrupt when it comes in the first time, the CLKN will never come.
2021-04-21 15:02:40 +08:00
zwj
2a7df3bcd8 optimize C3 multi-connection 2021-04-20 02:53:07 +00:00
xiongweichao
e16ec9a574 modify E8192 ELx200 ELx40 log level to LOGD 2021-04-14 19:33:03 +08:00
Jiang Jiang Jian
413bbe4de4 Merge branch 'bugfix/btdm_incorrectly_spelled_v4.3' into 'release/v4.3'
component/bt: fix Spelling mistakes(release v4.3)

See merge request espressif/esp-idf!12815
2021-03-29 05:07:57 +00:00
baohongde
72b27f1782 components/bt: Synchronize multiple branch of bt lib 2021-03-25 15:58:42 +08:00
baohongde
8e482c9423 components/bt: Fix assert without sw coexist enabled 2021-03-25 15:58:42 +08:00
baohongde
1fb45977fa component/coex: Decouple Wi-Fi and bluetooth with coexist to reduce binary file size 2021-03-25 15:58:42 +08:00
“YangZhao”
257728feab Fix the bug of modem sleep which may lead to the crash issue "assert(-218959118,0)" 2021-03-25 15:58:22 +08:00
wangmengyang
67402f035f component/bt: [ESP32S3] fix missing IRAM_ATTR for function in libbtdm_app.a 2021-03-24 03:38:56 +00:00
wangmengyang
7dd5568cb7 fixed incorrect Tx power mappings for ESP32C3 chip 2021-03-24 03:38:56 +00:00
XieWenxiang
dba5597edf component/bt: Modify some ambiguous descriptions(release v4.3) 2021-03-23 23:02:18 +08:00
Chinmay Chhajed
d01efe4b8c Fix for C2H flow control param check when only BLE mode is configured. 2021-03-11 12:04:01 +08:00
baohongde
e6ace495b4 Fix issues during light sleep and DFS 2021-03-10 14:14:49 +08:00
baohongde
b449909b35 Fix controller task watchdog in Wi-Fi test 2021-03-10 14:14:29 +08:00
gengyuchao
0253d825e9 Fix IRAM_ATTR missing 2021-03-10 14:14:04 +08:00
baohongde
1e77586120 components/bt: Fix crash in Bluetooth when esp_restart 2021-03-05 20:19:18 +08:00
Chinmay Chhajed
368ba6b077 component/bt: Added check for NULL valued combination key. 2021-02-09 12:09:32 +05:30
Chinmay Chhajed
5596f37af1 bt: removed esp_bt_get_mac()
There was no need for this function as there is already a way present to
fetch own mac address. Own mac addr can be fetched by calling
controller_get_interface().
2021-02-09 12:09:15 +05:30
wangmengyang
44dd496bea update esp32c3 btbb lib 21-02-08 and set coexist state when in scan(initiating) mode 2021-02-08 21:19:59 +08:00
wangmengyang
2dd730d35c component/bt: [esp32c3] modify Bluetooth coexistence options 2021-02-05 09:16:29 +00:00
baohongde
eef66789d4 Mac BB power down in light sleep
components/bt: Do not use feature: timer support isr dispatch method

disable controller after wake up finished.

protect critical section of power down

choose clk in sleep

components/coex: mac bb power down in light sleep

components/coex: Macro changed

components/os: protect reserved interrupt number

update phy to phy_version 300,6e46ba7,Jan 25 2021

some bugfix
2021-01-28 22:28:04 +08:00
wangmengyang
ee480b7776 Refactor Bluetooth init/deinit mechanism
free osi_funcs struct memory duiring failure of controller_init when necessary

components/bt: use s_lp_stat.phy_enabled to control the on/off of phy module

clean up style for controller_disable

clean up some empty functions and unnecessary comments

Added async wakeup src "BTDM_ASYNC_WAKEUP_SRC_TMR"

remove use of assert in controller_init, set error code upon some exceptions

move stop esp_timer early to phase0, add state variable wakeup_timer_started
2021-01-28 19:27:17 +08:00
wangmengyang
06ea8a3028 remove use of macro "CONFIG_SPIRAM_USE_MALLOC" 2021-01-28 19:25:03 +08:00
wangmengyang
086b36d737 Refactor Bluetooth sleep mechanism
Refactor bluetooth hardware PowerUp/PowerDown functions

component/bt: fix use of a deprecated MACRO "CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE"

component/bt: fix sleep wakeup in controller disable procedure

remove use of s_pm_lock_sem

1. Modified the waking up approach from async to sync: post a message to controller task upon vhci downstream packets or controller disable, and in response, controller task goes through the wake-up procedure
2. Added Controller status check for the esp_vhci APIs
3. Adjust the procedure during controller_init, check the validity of arguments first

Some minor modifications for bluetooth sleep control and configuration

1. use variable flag s_btdm_allow_light_sleep to control the use of s_light_sleep_pm_lock
2. use variable btdm_lpclk_sel to choose bluetooth sleep clock, support only for external 32kHz crystal temporarily

component/bt: improve async_wakeup function

1. check power state first and then decide if wakeup needs to be performed
2. change the meaning of the return value, if wakeup request is posted to controller task, then return true, otherwise return false

put sleep control logics in controller init/deinit/enable/disable together

Use s_lp_cntl struct: replace bool-typed variable sleep_backup_en with s_lp_cntl.mac_bb_pd

Use s_lp_cntl struct: replace bool-typed variable s_btdm_allow_light_sleep with s_lp_cntl.no_light_sleep

Use s_lp_cntl struct: replace global variable btdm_lpclk_sel with s_lp_cntl.lpclk_sel

create semaphore s_wakeup_req_sem only when low power mode is required

Use s_lp_cntl struct: use s_lp_cntl.wakeup_timer_required to control the wakeup timer

use s_lp_stat to replace original state variable sleep_backup_done and s_pm_lock_acquired

one minor change for mac_bb_pd settings init: return error status if memeory allocation failed
2021-01-28 19:23:09 +08:00
wangmengyang
9742aa6f05 component/bt: handle sleep wakeup event in the context of controller task instead of timer task 2021-01-28 16:04:21 +08:00
wangmengyang
51be1af028 add coexist hook functions and fix bugs for coexistence 2021-01-27 06:37:04 +00:00
zwj
ea42d8e043 fix bluedroid deinit crash 2021-01-15 21:08:14 +08:00
zwj
7c1c669799 component/bt: add BLE v5.0 feature for bluedroid host 2021-01-15 17:55:12 +08:00
Island
1e73d90c29 Merge branch 'bugfix/bluedroid_avoid_same_bdaddr_conn' into 'master'
Bluedroid: Do not connect if peer BD_ADDR is same as own BD_ADDR.

See merge request espressif/esp-idf!11806
2021-01-14 14:47:21 +08:00
Chinmay Chhajed
e016b6b79b Bluedroid: Do not connect if peer BD_ADDR is same as own BD_ADDR. 2021-01-05 14:54:15 +05:30
baohongde
3b0fc48ab4 components/bt: Shutdown Bluetooth before esp_restart. 2020-12-21 20:08:10 +08:00
gengyuchao
247484c454 bugfix: clear the timer after remote reject when respond the parameters update 2020-12-17 22:19:44 +08:00
wangcheng
386a8e37f1 components/bt:fix exl200, add btdm_disable_adv_delay, fix RPA addr update error. 2020-12-17 10:57:54 +08:00
Wei Tian Hua
6b7c878581 Free ACL RX Buf in EM when disconnection 2020-12-16 18:02:39 +08:00
weitianhua
56f0978caa Add protection for interval_min when it comes to zero 2020-11-19 11:05:40 +08:00