From edcb550e85b3cca7bb4a18bf9a38a434adda5149 Mon Sep 17 00:00:00 2001 From: luomanruo Date: Fri, 29 Dec 2023 15:30:18 +0800 Subject: [PATCH 1/4] ble(update): Update c2 lib to e5789394 --- components/bt/controller/lib_esp32c2/esp32c2-bt-lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/lib_esp32c2/esp32c2-bt-lib b/components/bt/controller/lib_esp32c2/esp32c2-bt-lib index 909c8bca55..414ae3699e 160000 --- a/components/bt/controller/lib_esp32c2/esp32c2-bt-lib +++ b/components/bt/controller/lib_esp32c2/esp32c2-bt-lib @@ -1 +1 @@ -Subproject commit 909c8bca55acdcbba1c32620482a7d1a10c28a07 +Subproject commit 414ae3699e58e7cc78773474182e054503a89737 From 46bbb6cb48ff2d0c8d14b14e352e12ab7ae2eaec Mon Sep 17 00:00:00 2001 From: luomanruo Date: Wed, 27 Dec 2023 14:48:26 +0800 Subject: [PATCH 2/4] ble: npl count is zero if nimble host is not used --- components/bt/controller/esp32c2/bt.c | 2 +- components/bt/porting/npl/freertos/src/npl_os_freertos.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/components/bt/controller/esp32c2/bt.c b/components/bt/controller/esp32c2/bt.c index 4933e12518..c68022bca2 100644 --- a/components/bt/controller/esp32c2/bt.c +++ b/components/bt/controller/esp32c2/bt.c @@ -1021,7 +1021,7 @@ void esp_ble_controller_log_dump_all(bool output) esp_panic_handler_reconfigure_wdts(5000); BT_ASSERT_PRINT("\r\n[DUMP_START:"); ble_log_async_output_dump_all(output); - BT_ASSERT_PRINT("]\r\n"); + BT_ASSERT_PRINT(":DUMP_END]\r\n"); portEXIT_CRITICAL_SAFE(&spinlock); } #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED diff --git a/components/bt/porting/npl/freertos/src/npl_os_freertos.c b/components/bt/porting/npl/freertos/src/npl_os_freertos.c index 86411ca131..92a1a8a82f 100644 --- a/components/bt/porting/npl/freertos/src/npl_os_freertos.c +++ b/components/bt/porting/npl/freertos/src/npl_os_freertos.c @@ -37,11 +37,19 @@ static const char *TAG = "Timer"; #error "not defined SOC_ESP_NIMBLE_CONTROLLER or SOC_ESP_NIMBLE_CONTROLLER is zero" #endif +#if CONFIG_BT_NIMBLE_ENABLED #define BLE_HOST_CO_COUNT (8) #define BLE_HOST_EV_COUNT (11 + BLE_HOST_CO_COUNT) #define BLE_HOST_EVQ_COUNT (3) #define BLE_HOST_SEM_COUNT (10) #define BLE_HOST_MUTEX_COUNT (4) +#else +#define BLE_HOST_CO_COUNT (0) +#define BLE_HOST_EV_COUNT (0) +#define BLE_HOST_EVQ_COUNT (0) +#define BLE_HOST_SEM_COUNT (0) +#define BLE_HOST_MUTEX_COUNT (0) +#endif struct os_mempool ble_freertos_ev_pool; static os_membuf_t *ble_freertos_ev_buf = NULL; From 6cc8d4e6979c24be73477e04c135d7c2a88e337e Mon Sep 17 00:00:00 2001 From: luomanruo Date: Wed, 10 Jan 2024 12:15:09 +0800 Subject: [PATCH 3/4] ble(update): Update c2 lib to e5789394 --- components/bt/controller/lib_esp32c2/esp32c2-bt-lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/lib_esp32c2/esp32c2-bt-lib b/components/bt/controller/lib_esp32c2/esp32c2-bt-lib index 414ae3699e..7f3eb5f556 160000 --- a/components/bt/controller/lib_esp32c2/esp32c2-bt-lib +++ b/components/bt/controller/lib_esp32c2/esp32c2-bt-lib @@ -1 +1 @@ -Subproject commit 414ae3699e58e7cc78773474182e054503a89737 +Subproject commit 7f3eb5f5568439cdb32dfe9dbf69d99e9c72e69f From dd7bd8ab34328e8bf52690d4402804307867a134 Mon Sep 17 00:00:00 2001 From: cjin Date: Wed, 17 Jan 2024 18:01:06 +0800 Subject: [PATCH 4/4] Revert "change(ble): added ble cca en and thresh option" This reverts commit f6760db77d975d82c7119a82387bc66b9e320c25. --- components/bt/controller/esp32c2/Kconfig.in | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/components/bt/controller/esp32c2/Kconfig.in b/components/bt/controller/esp32c2/Kconfig.in index 96b57e4d48..460f61cb67 100644 --- a/components/bt/controller/esp32c2/Kconfig.in +++ b/components/bt/controller/esp32c2/Kconfig.in @@ -463,23 +463,3 @@ config BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD config BT_LE_RELEASE_IRAM_SUPPORTED bool default y - -config BT_LE_TX_CCA_ENABLED - bool "BLE enable TX CCA feature" - default n - help - Enable the BLE (Bluetooth Low Energy) LBT (Listen Before Talk) function. Before transmitting a packet, - monitor the in-band CCA (Clear Channel Assessment). If the airborne carrier energy is too high, abandon - the packet transmission. Enabling this feature may potentially decrease BLE performance. In certain - countries and regions, when the maximum transmission power exceeds a certain limit, support for LBT - interference avoidance mechanisms is required. If the maximum transmission power does not reach the limit, - it may not be necessary to enable this function. - Please refer to the relevant certification regulations for details. - -config BT_LE_CCA_RSSI_THRESH - int "Power threshold to refrain packet transmission in unit of -1 dBm" - depends on BT_LE_TX_CCA_ENABLED - range 1 100 - default 75 - help - If a carrier signal above the threshold is detected in the air, refrain from packet transmission.