From b5151105d3b34ab6d1d1ad3a3fc9c002713a0c44 Mon Sep 17 00:00:00 2001 From: Chen Jian Hua Date: Thu, 24 Jul 2025 21:33:33 +0800 Subject: [PATCH] fix(bt): Update bt lib for ESP32(d9a3de0) - Support BLE vendor HCI related params reset - Support multi conn optimization vendor hci command - Fixed the issue where rssi of conn is incorrect when latency is no zero - Fixed prio setting for BLE events - Fixed disconnection issue when coexisting with other BLE events - Fixed crash due to bandwidth full when updating conn params (cherry picked from commit f20c6a2813124fa119bd01516ecbd72bcd23371c) Co-authored-by: chenjianhua --- components/bt/controller/esp32/bt.c | 3 +++ components/bt/controller/lib_esp32 | 2 +- components/soc/esp32/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32/include/soc/soc_caps.h | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/components/bt/controller/esp32/bt.c b/components/bt/controller/esp32/bt.c index d1a3ddadb1..6c6ce7cd34 100644 --- a/components/bt/controller/esp32/bt.c +++ b/components/bt/controller/esp32/bt.c @@ -261,6 +261,7 @@ extern void bt_stack_enableCoexVsCmd(bool en); extern void scan_stack_enableAdvFlowCtrlVsCmd(bool en); extern void adv_stack_enableClearLegacyAdvVsCmd(bool en); extern void advFilter_stack_enableDupExcListVsCmd(bool en); +extern void arr_stack_enableMultiConnVsCmd(bool en); #endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED) /* Local Function Declare @@ -1726,6 +1727,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) scan_stack_enableAdvFlowCtrlVsCmd(true); adv_stack_enableClearLegacyAdvVsCmd(true); advFilter_stack_enableDupExcListVsCmd(true); + arr_stack_enableMultiConnVsCmd(true); #endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED) btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED; @@ -1765,6 +1767,7 @@ esp_err_t esp_bt_controller_deinit(void) scan_stack_enableAdvFlowCtrlVsCmd(false); adv_stack_enableClearLegacyAdvVsCmd(false); advFilter_stack_enableDupExcListVsCmd(false); + arr_stack_enableMultiConnVsCmd(false); #endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED) return ESP_OK; diff --git a/components/bt/controller/lib_esp32 b/components/bt/controller/lib_esp32 index 37e0472ea2..b8a08a0680 160000 --- a/components/bt/controller/lib_esp32 +++ b/components/bt/controller/lib_esp32 @@ -1 +1 @@ -Subproject commit 37e0472ea26fa0870e5b704c451b5290069a28c3 +Subproject commit b8a08a06807a692fe9387aa9e2ce7dfcfb29ba16 diff --git a/components/soc/esp32/include/soc/Kconfig.soc_caps.in b/components/soc/esp32/include/soc/Kconfig.soc_caps.in index 3cc86094ff..bb2b588d51 100644 --- a/components/soc/esp32/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32/include/soc/Kconfig.soc_caps.in @@ -955,6 +955,10 @@ config SOC_BT_H2C_ENC_KEY_CTRL_ENH_VSC_SUPPORTED bool default y +config SOC_BLE_MULTI_CONN_OPTIMIZATION + bool + default y + config SOC_ULP_HAS_ADC bool default y diff --git a/components/soc/esp32/include/soc/soc_caps.h b/components/soc/esp32/include/soc/soc_caps.h index c26ad0b800..f6f8ff21b8 100644 --- a/components/soc/esp32/include/soc/soc_caps.h +++ b/components/soc/esp32/include/soc/soc_caps.h @@ -453,6 +453,7 @@ #define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (0) /*!< Support BLE device privacy mode */ #define SOC_BLUFI_SUPPORTED (1) /*!< Support BLUFI */ #define SOC_BT_H2C_ENC_KEY_CTRL_ENH_VSC_SUPPORTED (1) /*!< Support Bluetooth Classic encryption key size configuration through vendor-specific HCI command */ +#define SOC_BLE_MULTI_CONN_OPTIMIZATION (1) /*!< Support multiple connections optimization */ /*-------------------------- ULP CAPS ----------------------------------------*/ #define SOC_ULP_HAS_ADC (1) /* ADC can be accessed from ULP */