refactor(examples): disable unused BT options in bluedroid BLE examples

Add sdkconfig.defaults to turn off unused Bluedroid host features per
example role (GATT client/server, SMP, legacy adv, etc.).
This commit is contained in:
zhiweijian
2026-05-29 10:16:21 +08:00
parent 11b5ef5b3d
commit 433d5d03d8
30 changed files with 193 additions and 0 deletions

View File

@@ -6,3 +6,9 @@ CONFIG_BT_ENABLED=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT client only example
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_ADV_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -6,3 +6,9 @@ CONFIG_BT_ENABLED=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT server only example
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -8,3 +8,8 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for ANCS example
# (advertises as peripheral and acts as GATT client to ANCS service)
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,8 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for compatibility test (server with SMP)
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,10 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for Eddystone receiver (scanning only)
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_ADV_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -10,3 +10,10 @@ CONFIG_EXMAPLE_EDDYSTONE_SEND_UID=y
CONFIG_EXMAPLE_EDDYSTONE_SEND_URL=n
CONFIG_EXMAPLE_EDDYSTONE_SEND_TLM=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for Eddystone sender (advertising only)
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -12,3 +12,8 @@ CONFIG_BT_BLE_SMP_ENABLE=y
# Options: CONFIG_BT_SMP_CRYPTO_STACK_TINYCRYPT or CONFIG_BT_SMP_CRYPTO_STACK_MBEDTLS
CONFIG_BT_SMP_CRYPTO_STACK_TINYCRYPT=y
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for encrypted adv data central (client with SMP)
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_42_ADV_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -12,3 +12,8 @@ CONFIG_BT_BLE_SMP_ENABLE=y
# Options: CONFIG_BT_SMP_CRYPTO_STACK_TINYCRYPT or CONFIG_BT_SMP_CRYPTO_STACK_MBEDTLS
CONFIG_BT_SMP_CRYPTO_STACK_TINYCRYPT=y
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for encrypted adv data peripheral (server with SMP)
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,8 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for HID device example (server with SMP)
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -6,3 +6,10 @@ CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
# Disable unused Bluedroid host features for iBeacon (advertising/scanning only, no GATT/SMP)
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,8 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_MULTI_CONNECTION_ENBALE=y
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for multi-connection central
# (acts as both GATT server and GATT client, but no SMP)
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -9,3 +9,9 @@ CONFIG_BT_ACL_CONNECTIONS=50
CONFIG_BT_ALARM_MAX_NUM=150
CONFIG_BT_MULTI_CONNECTION_ENBALE=y
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT server only example
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,9 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT client only example
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_ADV_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -6,3 +6,11 @@ CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT server only example
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -9,3 +9,9 @@ CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT=y
CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT client only example
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_ADV_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -9,3 +9,9 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT server only example
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,9 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT client only example
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_ADV_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,8 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT security client example
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_42_ADV_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,8 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT security server example
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,9 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT server only example
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,9 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT server only example
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_SCAN_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -7,3 +7,9 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not set
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Disable unused Bluedroid host features for GATT client only example
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_42_ADV_EN is not set
# CONFIG_BT_BLE_42_DTM_TEST_EN is not set

View File

@@ -2,3 +2,7 @@
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
#
CONFIG_BT_ENABLED=y
# Disable unused Bluedroid host features (GATT security client, extended scan only)
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_50_DTM_TEST_EN is not set

View File

@@ -2,3 +2,7 @@
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
#
CONFIG_BT_ENABLED=y
# Disable unused Bluedroid host features (GATT security server, extended adv only)
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_50_DTM_TEST_EN is not set

View File

@@ -8,3 +8,8 @@ CONFIG_BT_BLE_42_FEATURES_SUPPORTED=n
# CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_GATTS_NOTIFY_THROUGHPUT=y
CONFIG_GATTC_WRITE_THROUGHPUT=n
# Disable unused Bluedroid host features (GATT client only)
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_50_DTM_TEST_EN is not set

View File

@@ -9,3 +9,8 @@ CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=n
# CONFIG_BT_LE_50_FEATURE_SUPPORT is not used on ESP32, ESP32-C3 and ESP32-S3.
# CONFIG_BT_LE_50_FEATURE_SUPPORT=n
# Disable unused Bluedroid host features (GATT server only)
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_50_DTM_TEST_EN is not set

View File

@@ -14,3 +14,4 @@ CONFIG_BT_BLE_SMP_ENABLE=n
CONFIG_BT_BLE_50_EXTEND_ADV_EN=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
CONFIG_BT_BLE_50_DTM_TEST_EN=n

View File

@@ -2,5 +2,20 @@
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
#
CONFIG_BT_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=y
CONFIG_BT_BLE_ENABLED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=n
# Multiple extended advertisers only
CONFIG_BT_LE_MAX_EXT_ADV_INSTANCES=4
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
CONFIG_BT_BLE_50_EXTEND_ADV_EN=y
CONFIG_BT_BLE_50_EXTEND_SCAN_EN=n
CONFIG_BT_BLE_50_EXTEND_SYNC_EN=n
CONFIG_BT_BLE_50_PERIODIC_ADV_EN=n
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_50_DTM_TEST_EN is not set

View File

@@ -3,3 +3,18 @@
#
CONFIG_BT_ENABLED=y
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
CONFIG_BT_BLUEDROID_ENABLED=y
CONFIG_BT_BLE_ENABLED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=n
# Periodic extended advertiser only (no scan / sync / GATT)
CONFIG_BT_BLE_50_EXTEND_ADV_EN=y
CONFIG_BT_BLE_50_PERIODIC_ADV_EN=y
CONFIG_BT_BLE_50_EXTEND_SCAN_EN=n
CONFIG_BT_BLE_50_EXTEND_SYNC_EN=n
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_50_DTM_TEST_EN is not set

View File

@@ -3,3 +3,18 @@
#
CONFIG_BT_ENABLED=y
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
CONFIG_BT_BLUEDROID_ENABLED=y
CONFIG_BT_BLE_ENABLED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=n
# Periodic advertising sync role: extended scan + sync only (no extended adv / no periodic adv in host)
CONFIG_BT_BLE_50_EXTEND_SCAN_EN=y
CONFIG_BT_BLE_50_EXTEND_SYNC_EN=y
# CONFIG_BT_BLE_50_EXTEND_ADV_EN is not set
# CONFIG_BT_BLE_50_PERIODIC_ADV_EN is not set
# CONFIG_BT_GATTS_ENABLE is not set
# CONFIG_BT_GATTC_ENABLE is not set
# CONFIG_BT_BLE_SMP_ENABLE is not set
# CONFIG_BT_BLE_50_DTM_TEST_EN is not set