From c8def29e417dc27cd3ffa59c78a35afe850cbde2 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Tue, 5 Sep 2023 10:32:05 +0530 Subject: [PATCH] fix(nimble): add flag to indicate 5.0 feature support --- components/bt/host/nimble/Kconfig.in | 10 +++++++++- components/bt/host/nimble/nimble | 2 +- .../bt/host/nimble/port/include/esp_nimble_cfg.h | 6 ++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/components/bt/host/nimble/Kconfig.in b/components/bt/host/nimble/Kconfig.in index f883595d29..d395a03ace 100644 --- a/components/bt/host/nimble/Kconfig.in +++ b/components/bt/host/nimble/Kconfig.in @@ -445,10 +445,18 @@ config BT_NIMBLE_MAX_CONN_REATTEMPT help Defines maximum number of connection reattempts. +config BT_NIMBLE_50_FEATURE_SUPPORT + bool "Enable BLE 5 feature" + depends on BT_NIMBLE_ENABLED + default y if (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3) + default n if IDF_TARGET_ESP32 + help + Enable BLE 5 features + config BT_NIMBLE_EXT_ADV bool "Enable extended advertising." default n - depends on BT_NIMBLE_ENABLED && BT_SOC_SUPPORT_5_0 + depends on BT_NIMBLE_ENABLED && BT_NIMBLE_50_FEATURE_SUPPORT help Enable this option to do extended advertising. Extended advertising will be supported from BLE 5.0 onwards. diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 6669d8b418..e2d7a766fb 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 6669d8b418c7e483e1f750d354e462082ad695f9 +Subproject commit e2d7a766fb3927d008902611b3985e8595864c55 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 1f4b3302b3..b05737fe9a 100644 --- a/components/bt/host/nimble/port/include/esp_nimble_cfg.h +++ b/components/bt/host/nimble/port/include/esp_nimble_cfg.h @@ -50,6 +50,12 @@ #define MYNEWT_VAL_BLE_EXT_ADV (CONFIG_BT_NIMBLE_EXT_ADV) #endif +#ifndef CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT +#define BLE_50_FEATURE_SUPPORT (0) +#else +#define BLE_50_FEATURE_SUPPORT (CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT) +#endif + #ifndef MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE #ifdef CONFIG_BT_NIMBLE_EXT_ADV #define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN)