From abded4ab4464ec23c5f71ff860822c7a93b24b27 Mon Sep 17 00:00:00 2001 From: Geng Yuchao Date: Tue, 18 Feb 2025 16:26:00 +0800 Subject: [PATCH 1/3] feat(ble):Support Bluetooth LE 5.1 direction finding feature --- components/soc/esp32c61/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c61/include/soc/soc_caps.h | 1 + components/soc/esp32h2/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32h2/include/soc/soc_caps.h | 1 + components/soc/esp32h21/include/soc/soc_caps.h | 1 + 5 files changed, 11 insertions(+) diff --git a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in index 45459aa642..064a33934d 100644 --- a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in @@ -1283,6 +1283,10 @@ config SOC_BLE_MULTI_CONN_OPTIMIZATION bool default y +config SOC_BLE_CTE_SUPPORTED + bool + default y + config SOC_PHY_COMBO_MODULE bool default y diff --git a/components/soc/esp32c61/include/soc/soc_caps.h b/components/soc/esp32c61/include/soc/soc_caps.h index d78b5972f8..2ccc6def12 100644 --- a/components/soc/esp32c61/include/soc/soc_caps.h +++ b/components/soc/esp32c61/include/soc/soc_caps.h @@ -518,6 +518,7 @@ #define SOC_BLE_PERIODIC_ADV_ENH_SUPPORTED (1) /*!< Support For BLE Periodic Adv Enhancements */ #define SOC_BLUFI_SUPPORTED (1) /*!< Support BLUFI */ #define SOC_BLE_MULTI_CONN_OPTIMIZATION (1) /*!< Support multiple connections optimization */ +#define SOC_BLE_CTE_SUPPORTED (1) /*!< Support Bluetooth LE Constant Tone Extension (CTE) */ /*------------------------------------- PHY CAPS -------------------------------------*/ #define SOC_PHY_COMBO_MODULE (1) /*!< Support Wi-Fi, BLE and 15.4*/ diff --git a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in index 5f00c2bf5a..9c3f5ea562 100644 --- a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in @@ -1567,6 +1567,10 @@ config SOC_BLE_PERIODIC_ADV_ENH_SUPPORTED bool default y +config SOC_BLE_CTE_SUPPORTED + bool + default y + config SOC_DEBUG_HAVE_OCD_STUB_BINS bool default y diff --git a/components/soc/esp32h2/include/soc/soc_caps.h b/components/soc/esp32h2/include/soc/soc_caps.h index af1c0d05d6..7661f12ce0 100644 --- a/components/soc/esp32h2/include/soc/soc_caps.h +++ b/components/soc/esp32h2/include/soc/soc_caps.h @@ -623,6 +623,7 @@ #define SOC_BLE_POWER_CONTROL_SUPPORTED (1) /*!< Support Bluetooth Power Control */ #define SOC_BLE_MULTI_CONN_OPTIMIZATION (1) /*!< Support multiple connections optimization */ #define SOC_BLE_PERIODIC_ADV_ENH_SUPPORTED (1) /*!< Support For BLE Periodic Adv Enhancements */ +#define SOC_BLE_CTE_SUPPORTED (1) /*!< Support Bluetooth LE Constant Tone Extension (CTE) */ /*------------------------------------- DEBUG CAPS -------------------------------------*/ #define SOC_DEBUG_HAVE_OCD_STUB_BINS (1) diff --git a/components/soc/esp32h21/include/soc/soc_caps.h b/components/soc/esp32h21/include/soc/soc_caps.h index df005f563a..a395920c2b 100644 --- a/components/soc/esp32h21/include/soc/soc_caps.h +++ b/components/soc/esp32h21/include/soc/soc_caps.h @@ -568,3 +568,4 @@ // #define SOC_BLE_POWER_CONTROL_SUPPORTED (1) /*!< Support Bluetooth Power Control */ // #define SOC_BLE_MULTI_CONN_OPTIMIZATION (1) /*!< Support multiple connections optimization */ // #define SOC_BLE_PERIODIC_ADV_ENH_SUPPORTED (1) /*!< Support For BLE Periodic Adv Enhancements */ +// #define SOC_BLE_CTE_SUPPORTED (1) /*!< Support Bluetooth LE Constant Tone Extension (CTE) */ From adc61d3c8df2d71417575961925d2d19211d78f2 Mon Sep 17 00:00:00 2001 From: Geng Yuchao Date: Tue, 11 Mar 2025 21:22:48 +0800 Subject: [PATCH 2/3] feat(ble):Add Kconfig support for direction finding feature --- components/bt/controller/esp32c6/Kconfig.in | 10 ++++++++++ components/bt/controller/esp32h2/Kconfig.in | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/components/bt/controller/esp32c6/Kconfig.in b/components/bt/controller/esp32c6/Kconfig.in index 70165672f6..18b4039895 100644 --- a/components/bt/controller/esp32c6/Kconfig.in +++ b/components/bt/controller/esp32c6/Kconfig.in @@ -228,6 +228,16 @@ config BT_LE_POWER_CONTROL_ENABLED help Set this option to enable the Power Control feature on controller +config BT_LE_CTE_FEATURE_ENABLED + bool "Enable Bluetooth LE Direction Finding (AoA/AoD)" + depends on BT_LE_50_FEATURE_SUPPORT && SOC_BLE_CTE_SUPPORTED + default n + help + Enable this option to activate Bluetooth LE Direction Finding (AoA/AoD) feature. + Note: + This feature allows devices to determine the direction of a Bluetooth CTE signal, + enabling Angle of Arrival (AoA) and Angle of Departure (AoD) functionality. + menu "Memory Settings" depends on !BT_NIMBLE_ENABLED diff --git a/components/bt/controller/esp32h2/Kconfig.in b/components/bt/controller/esp32h2/Kconfig.in index d270ca4913..858a772217 100644 --- a/components/bt/controller/esp32h2/Kconfig.in +++ b/components/bt/controller/esp32h2/Kconfig.in @@ -228,6 +228,19 @@ config BT_LE_POWER_CONTROL_ENABLED help Set this option to enable the Power Control feature on controller +config BT_LE_CTE_FEATURE_ENABLED + bool "Enable Bluetooth LE Direction Finding (AoA/AoD)" + depends on BT_LE_50_FEATURE_SUPPORT && SOC_BLE_CTE_SUPPORTED && !(BT_LE_SECURITY_ENABLE) + default n + help + Enable this option to activate Bluetooth LE Direction Finding (AoA/AoD) feature. + Note: + This feature allows devices to determine the direction of a Bluetooth CTE signal, + enabling Angle of Arrival (AoA) and Angle of Departure (AoD) functionality. + In chip esp32h2, Direction Finding is not supported in encrypted + communication scenarios. If you are using chip esp32h2, ensure that encryption is + disabled when using this feature. + menu "Memory Settings" depends on !BT_NIMBLE_ENABLED From 815e89d8c8b1a56926362d10f15bbdc731c864a9 Mon Sep 17 00:00:00 2001 From: Geng Yuchao Date: Thu, 13 Mar 2025 20:25:38 +0800 Subject: [PATCH 3/3] fix(nimble): Fix variable type conversion compile errors --- components/bt/host/nimble/nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 7648fba967..330b3df62d 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 7648fba9672ee62d4ccdfb407b741d7d342a16db +Subproject commit 330b3df62daaf3b699901ee7cc93dc4fb1c26e26