From d89736babfa5a9da2163e5776f3018432e86f2ca Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Thu, 16 Feb 2023 19:56:41 +0530 Subject: [PATCH] Nimble: Update example configuration to enable ext adv feature only for BLE5.0 supported chips --- components/bt/host/nimble/Kconfig.in | 2 +- components/soc/esp32c2/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c2/include/soc/soc_caps.h | 1 + components/soc/esp32c3/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c3/include/soc/soc_caps.h | 1 + components/soc/esp32c6/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c6/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/esp32h4/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32h4/include/soc/soc_caps.h | 1 + components/soc/esp32s3/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32s3/include/soc/soc_caps.h | 1 + .../nimble/ble_l2cap_coc/coc_blecent/main/Kconfig.projbuild | 3 ++- .../nimble/ble_l2cap_coc/coc_bleprph/main/Kconfig.projbuild | 3 ++- .../bluetooth/nimble/ble_periodic_adv/main/Kconfig.projbuild | 3 ++- .../bluetooth/nimble/ble_periodic_sync/main/Kconfig.projbuild | 3 ++- .../bluetooth/nimble/ble_phy/phy_cent/main/Kconfig.projbuild | 3 ++- .../bluetooth/nimble/ble_phy/phy_prph/main/Kconfig.projbuild | 3 ++- examples/bluetooth/nimble/blecent/main/Kconfig.projbuild | 3 ++- examples/bluetooth/nimble/bleprph/main/Kconfig.projbuild | 3 ++- 21 files changed, 47 insertions(+), 9 deletions(-) diff --git a/components/bt/host/nimble/Kconfig.in b/components/bt/host/nimble/Kconfig.in index 90beb1a6b2d..5a64736a33e 100644 --- a/components/bt/host/nimble/Kconfig.in +++ b/components/bt/host/nimble/Kconfig.in @@ -502,7 +502,7 @@ config BT_NIMBLE_MAX_CONN_REATTEMPT menuconfig BT_NIMBLE_50_FEATURE_SUPPORT bool "Enable BLE 5 feature" - depends on BT_NIMBLE_ENABLED + depends on BT_NIMBLE_ENABLED && (SOC_BLE_50_SUPPORTED || !BT_CONTROLLER_ENABLED) default y help Enable BLE 5 feature diff --git a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in index bd64d98a2c8..8f376d3e78a 100644 --- a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in @@ -662,3 +662,7 @@ config SOC_BLE_MESH_SUPPORTED config SOC_ESP_NIMBLE_CONTROLLER bool default y + +config SOC_BLE_50_SUPPORTED + bool + default y diff --git a/components/soc/esp32c2/include/soc/soc_caps.h b/components/soc/esp32c2/include/soc/soc_caps.h index d9bb3e70f18..823331ea692 100644 --- a/components/soc/esp32c2/include/soc/soc_caps.h +++ b/components/soc/esp32c2/include/soc/soc_caps.h @@ -308,3 +308,4 @@ #define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */ #define SOC_BLE_MESH_SUPPORTED (0) /*!< Support BLE MESH */ #define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */ +#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */ diff --git a/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in index a7665e4eddc..bc703eae566 100644 --- a/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in @@ -958,3 +958,7 @@ config SOC_BLE_SUPPORTED config SOC_BLE_MESH_SUPPORTED bool default y + +config SOC_BLE_50_SUPPORTED + bool + default y diff --git a/components/soc/esp32c3/include/soc/soc_caps.h b/components/soc/esp32c3/include/soc/soc_caps.h index fef9c410ca9..c4ad02d05e3 100644 --- a/components/soc/esp32c3/include/soc/soc_caps.h +++ b/components/soc/esp32c3/include/soc/soc_caps.h @@ -417,3 +417,4 @@ /*---------------------------------- Bluetooth CAPS ----------------------------------*/ #define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */ #define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */ +#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */ diff --git a/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in index 96615ff958a..0070dbb9ee6 100644 --- a/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in @@ -1182,3 +1182,7 @@ config SOC_BLE_MESH_SUPPORTED config SOC_ESP_NIMBLE_CONTROLLER bool default y + +config SOC_BLE_50_SUPPORTED + bool + default y diff --git a/components/soc/esp32c6/include/soc/soc_caps.h b/components/soc/esp32c6/include/soc/soc_caps.h index ee2cd1e40bf..936824854a5 100644 --- a/components/soc/esp32c6/include/soc/soc_caps.h +++ b/components/soc/esp32c6/include/soc/soc_caps.h @@ -494,3 +494,4 @@ #define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */ #define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */ #define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */ +#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */ diff --git a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in index 40910c74dd3..9260ffefb61 100644 --- a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in @@ -1078,3 +1078,7 @@ config SOC_BLE_MESH_SUPPORTED config SOC_ESP_NIMBLE_CONTROLLER bool default y + +config SOC_BLE_50_SUPPORTED + bool + default y diff --git a/components/soc/esp32h2/include/soc/soc_caps.h b/components/soc/esp32h2/include/soc/soc_caps.h index 05e230dd21b..9b1e48c0810 100644 --- a/components/soc/esp32h2/include/soc/soc_caps.h +++ b/components/soc/esp32h2/include/soc/soc_caps.h @@ -471,3 +471,4 @@ #define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */ #define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */ #define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */ +#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */ diff --git a/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in index 917ac0755b5..c63a589bc23 100644 --- a/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in @@ -858,3 +858,7 @@ config SOC_BLE_MESH_SUPPORTED config SOC_ESP_NIMBLE_CONTROLLER bool default y + +config SOC_BLE_50_SUPPORTED + bool + default y diff --git a/components/soc/esp32h4/include/soc/soc_caps.h b/components/soc/esp32h4/include/soc/soc_caps.h index 28c0d8dce64..3332825cd0a 100644 --- a/components/soc/esp32h4/include/soc/soc_caps.h +++ b/components/soc/esp32h4/include/soc/soc_caps.h @@ -402,3 +402,4 @@ #define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */ #define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */ #define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */ +#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */ diff --git a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in index f890f8b7552..ffacafc80a6 100644 --- a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in @@ -1230,3 +1230,7 @@ config SOC_BLE_SUPPORTED config SOC_BLE_MESH_SUPPORTED bool default y + +config SOC_BLE_50_SUPPORTED + bool + default y diff --git a/components/soc/esp32s3/include/soc/soc_caps.h b/components/soc/esp32s3/include/soc/soc_caps.h index 1199a7fdd30..6168882e38a 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -502,3 +502,4 @@ /*---------------------------------- Bluetooth CAPS ----------------------------------*/ #define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */ #define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */ +#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */ diff --git a/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/main/Kconfig.projbuild b/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/main/Kconfig.projbuild index e142a26c824..5397f94ed51 100644 --- a/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/main/Kconfig.projbuild +++ b/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/main/Kconfig.projbuild @@ -8,8 +8,9 @@ menu "Example Configuration" config EXAMPLE_EXTENDED_ADV bool + depends on SOC_BLE_50_SUPPORTED default y if SOC_ESP_NIMBLE_CONTROLLER - select BT_NIMBLE_EXT_ADV if SOC_ESP_NIMBLE_CONTROLLER + select BT_NIMBLE_EXT_ADV prompt "Enable Extended Adv" help Use this option to enable extended advertising in the example diff --git a/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/main/Kconfig.projbuild b/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/main/Kconfig.projbuild index 28393e4eb76..e7a2f956024 100644 --- a/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/main/Kconfig.projbuild +++ b/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/main/Kconfig.projbuild @@ -50,8 +50,9 @@ menu "Example Configuration" config EXAMPLE_EXTENDED_ADV bool + depends on SOC_BLE_50_SUPPORTED default y if SOC_ESP_NIMBLE_CONTROLLER - select BT_NIMBLE_EXT_ADV if SOC_ESP_NIMBLE_CONTROLLER + select BT_NIMBLE_EXT_ADV prompt "Enable Extended Adv" help Use this option to enable extended advertising in the example diff --git a/examples/bluetooth/nimble/ble_periodic_adv/main/Kconfig.projbuild b/examples/bluetooth/nimble/ble_periodic_adv/main/Kconfig.projbuild index 46004b80051..37a6fb825de 100644 --- a/examples/bluetooth/nimble/ble_periodic_adv/main/Kconfig.projbuild +++ b/examples/bluetooth/nimble/ble_periodic_adv/main/Kconfig.projbuild @@ -2,8 +2,9 @@ menu "Example Configuration" config EXAMPLE_EXTENDED_ADV bool + depends on SOC_BLE_50_SUPPORTED default y if SOC_ESP_NIMBLE_CONTROLLER - select BT_NIMBLE_EXT_ADV if SOC_ESP_NIMBLE_CONTROLLER + select BT_NIMBLE_EXT_ADV prompt "Enable Extended Adv" help Use this option to enable extended advertising in the example diff --git a/examples/bluetooth/nimble/ble_periodic_sync/main/Kconfig.projbuild b/examples/bluetooth/nimble/ble_periodic_sync/main/Kconfig.projbuild index c2a5a3d69a9..7bbaeb5486c 100644 --- a/examples/bluetooth/nimble/ble_periodic_sync/main/Kconfig.projbuild +++ b/examples/bluetooth/nimble/ble_periodic_sync/main/Kconfig.projbuild @@ -1,8 +1,9 @@ menu "Example Configuration" config EXAMPLE_EXTENDED_ADV bool + depends on SOC_BLE_50_SUPPORTED default y if SOC_ESP_NIMBLE_CONTROLLER - select BT_NIMBLE_EXT_ADV if SOC_ESP_NIMBLE_CONTROLLER + select BT_NIMBLE_EXT_ADV prompt "Enable Extended Adv" help Use this option to enable extended advertising in the example diff --git a/examples/bluetooth/nimble/ble_phy/phy_cent/main/Kconfig.projbuild b/examples/bluetooth/nimble/ble_phy/phy_cent/main/Kconfig.projbuild index f491ef56ad7..3e8b65b83fd 100644 --- a/examples/bluetooth/nimble/ble_phy/phy_cent/main/Kconfig.projbuild +++ b/examples/bluetooth/nimble/ble_phy/phy_cent/main/Kconfig.projbuild @@ -8,8 +8,9 @@ menu "Example Configuration" config EXAMPLE_EXTENDED_ADV bool + depends on SOC_BLE_50_SUPPORTED default y if SOC_ESP_NIMBLE_CONTROLLER - select BT_NIMBLE_EXT_ADV if SOC_ESP_NIMBLE_CONTROLLER + select BT_NIMBLE_EXT_ADV prompt "Enable Extended Adv" help Use this option to enable extended advertising in the example diff --git a/examples/bluetooth/nimble/ble_phy/phy_prph/main/Kconfig.projbuild b/examples/bluetooth/nimble/ble_phy/phy_prph/main/Kconfig.projbuild index 3488cd409eb..58c8303b5c7 100644 --- a/examples/bluetooth/nimble/ble_phy/phy_prph/main/Kconfig.projbuild +++ b/examples/bluetooth/nimble/ble_phy/phy_prph/main/Kconfig.projbuild @@ -47,8 +47,9 @@ menu "Example Configuration" config EXAMPLE_EXTENDED_ADV bool + depends on SOC_BLE_50_SUPPORTED default y if SOC_ESP_NIMBLE_CONTROLLER - select BT_NIMBLE_EXT_ADV if SOC_ESP_NIMBLE_CONTROLLER + select BT_NIMBLE_EXT_ADV prompt "Enable Extended Adv" help Use this option to enable extended advertising in the example diff --git a/examples/bluetooth/nimble/blecent/main/Kconfig.projbuild b/examples/bluetooth/nimble/blecent/main/Kconfig.projbuild index 43026a74b56..cead6afc5c7 100644 --- a/examples/bluetooth/nimble/blecent/main/Kconfig.projbuild +++ b/examples/bluetooth/nimble/blecent/main/Kconfig.projbuild @@ -8,8 +8,9 @@ menu "Example Configuration" config EXAMPLE_EXTENDED_ADV bool + depends on SOC_BLE_50_SUPPORTED default y if SOC_ESP_NIMBLE_CONTROLLER - select BT_NIMBLE_EXT_ADV if SOC_ESP_NIMBLE_CONTROLLER + select BT_NIMBLE_EXT_ADV prompt "Enable Extended Adv" help Use this option to enable extended advertising in the example diff --git a/examples/bluetooth/nimble/bleprph/main/Kconfig.projbuild b/examples/bluetooth/nimble/bleprph/main/Kconfig.projbuild index 1df20aded2c..8f4d044c312 100644 --- a/examples/bluetooth/nimble/bleprph/main/Kconfig.projbuild +++ b/examples/bluetooth/nimble/bleprph/main/Kconfig.projbuild @@ -50,8 +50,9 @@ menu "Example Configuration" config EXAMPLE_EXTENDED_ADV bool + depends on SOC_BLE_50_SUPPORTED default y if SOC_ESP_NIMBLE_CONTROLLER - select BT_NIMBLE_EXT_ADV if SOC_ESP_NIMBLE_CONTROLLER + select BT_NIMBLE_EXT_ADV prompt "Enable Extended Adv" help Use this option to enable extended advertising in the example