From be335581644b40637e96942aa4979e7bff60b27f Mon Sep 17 00:00:00 2001 From: Geng Yuchao Date: Mon, 1 Apr 2024 19:56:15 +0800 Subject: [PATCH 1/2] feat: Add direction finding relate defines and kconfig and CMakeLists --- components/bt/CMakeLists.txt | 2 ++ components/bt/host/nimble/Kconfig.in | 7 +++++++ components/bt/host/nimble/port/include/esp_nimble_cfg.h | 9 ++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/components/bt/CMakeLists.txt b/components/bt/CMakeLists.txt index 24e1517aa3ed..a56403fa5de1 100644 --- a/components/bt/CMakeLists.txt +++ b/components/bt/CMakeLists.txt @@ -661,6 +661,7 @@ if(CONFIG_BT_ENABLED) host/nimble/nimble/nimble/host/services/tps/include host/nimble/nimble/nimble/host/services/hid/include host/nimble/nimble/nimble/host/services/sps/include + host/nimble/nimble/nimble/host/services/cte/include host/nimble/nimble/nimble/host/util/include host/nimble/nimble/nimble/host/store/ram/include host/nimble/nimble/nimble/host/store/config/include @@ -683,6 +684,7 @@ if(CONFIG_BT_ENABLED) "host/nimble/nimble/nimble/host/services/cts/src/ble_svc_cts.c" "host/nimble/nimble/nimble/host/services/hid/src/ble_svc_hid.c" "host/nimble/nimble/nimble/host/services/sps/src/ble_svc_sps.c" + "host/nimble/nimble/nimble/host/services/cte/src/ble_svc_cte.c" "host/nimble/nimble/nimble/host/src/ble_hs_conn.c" "host/nimble/nimble/nimble/host/src/ble_store_util.c" "host/nimble/nimble/nimble/host/src/ble_sm.c" diff --git a/components/bt/host/nimble/Kconfig.in b/components/bt/host/nimble/Kconfig.in index 5bb08e5ac705..eb1acaead652 100644 --- a/components/bt/host/nimble/Kconfig.in +++ b/components/bt/host/nimble/Kconfig.in @@ -646,6 +646,13 @@ config BT_NIMBLE_PERIODIC_ADV_ENH help Enable the periodic advertising enhancements +config BT_NIMBLE_AOA_AOD + bool "Direction Finding" + depends on BT_NIMBLE_50_FEATURE_SUPPORT && SOC_BLE_CTE_SUPPORTED + default n + help + Enable support for Connectionless and Connection Oriented Direction Finding + menuconfig BT_NIMBLE_GATT_CACHING bool "Enable GATT caching" depends on BT_NIMBLE_ENABLED && BT_NIMBLE_50_FEATURE_SUPPORT diff --git a/components/bt/host/nimble/port/include/esp_nimble_cfg.h b/components/bt/host/nimble/port/include/esp_nimble_cfg.h index 9370be89b81d..878b97df7b16 100644 --- a/components/bt/host/nimble/port/include/esp_nimble_cfg.h +++ b/components/bt/host/nimble/port/include/esp_nimble_cfg.h @@ -1836,6 +1836,14 @@ #endif #endif +#ifndef MYNEWT_VAL_BLE_AOA_AOD +#ifdef CONFIG_BT_NIMBLE_AOA_AOD +#define MYNEWT_VAL_BLE_AOA_AOD CONFIG_BT_NIMBLE_AOA_AOD +#else +#define MYNEWT_VAL_BLE_AOA_AOD (0) +#endif +#endif + #if CONFIG_BT_CONTROLLER_DISABLED && CONFIG_BT_NIMBLE_TRANSPORT_UART #ifndef MYNEWT_VAL_BLE_TRANSPORT_UART_PORT #define MYNEWT_VAL_BLE_TRANSPORT_UART_PORT CONFIG_BT_NIMBLE_TRANSPORT_UART_PORT @@ -1869,5 +1877,4 @@ #define MYNEWT_VAL_BLE_TRANSPORT_UART_STOP_BITS (1) #endif #endif - #endif From 42a51189740d72197255f6e78b0bbe27bd68b70b Mon Sep 17 00:00:00 2001 From: Geng Yuchao Date: Fri, 30 Aug 2024 15:50:48 +0800 Subject: [PATCH 2/2] feat: Add support for BLE 5.1 Direction Finding feature --- 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 8373c4afb346..d47cb44f2459 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 8373c4afb34630ca54448cf6cd5d349aa2f9bfab +Subproject commit d47cb44f245919fcf776c5ee094ec60f28b43fce