From 71901499b9dd9931a4af29126c497ffa32d1edd4 Mon Sep 17 00:00:00 2001 From: cjin Date: Tue, 12 Dec 2023 17:32:59 +0800 Subject: [PATCH] change(ble): added ble cca en and thresh option --- components/bt/controller/esp32c2/Kconfig.in | 20 ++++++++++++++++++++ components/bt/controller/esp32c6/Kconfig.in | 20 ++++++++++++++++++++ components/bt/controller/esp32h2/Kconfig.in | 20 ++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/components/bt/controller/esp32c2/Kconfig.in b/components/bt/controller/esp32c2/Kconfig.in index 05e15708f1e9..f834701471c4 100644 --- a/components/bt/controller/esp32c2/Kconfig.in +++ b/components/bt/controller/esp32c2/Kconfig.in @@ -464,3 +464,23 @@ 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. diff --git a/components/bt/controller/esp32c6/Kconfig.in b/components/bt/controller/esp32c6/Kconfig.in index 884a4740f1d4..560e5ada4e72 100644 --- a/components/bt/controller/esp32c6/Kconfig.in +++ b/components/bt/controller/esp32c6/Kconfig.in @@ -571,3 +571,23 @@ config BT_LE_SCAN_DUPL_CACHE_REFRESH_PERIOD config BT_LE_MSYS_INIT_IN_CONTROLLER bool "Msys Mbuf Init in Controller" 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. diff --git a/components/bt/controller/esp32h2/Kconfig.in b/components/bt/controller/esp32h2/Kconfig.in index b63d4aa86597..ee7106ad8991 100644 --- a/components/bt/controller/esp32h2/Kconfig.in +++ b/components/bt/controller/esp32h2/Kconfig.in @@ -564,3 +564,23 @@ config BT_LE_SCAN_DUPL_CACHE_REFRESH_PERIOD config BT_LE_MSYS_INIT_IN_CONTROLLER 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.