NimBLE: Added support of encrypted advertising data

This commit is contained in:
isha.pardikar@espressif.com
2023-05-05 12:43:21 +05:30
parent 64926fd137
commit db5b50af2c
25 changed files with 1822 additions and 5 deletions

View File

@@ -571,6 +571,8 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/nimble/host/src/ble_hs_mqueue.c"
"host/nimble/nimble/nimble/host/src/ble_hs_periodic_sync.c"
"host/nimble/nimble/nimble/host/src/ble_att.c"
"host/nimble/nimble/nimble/host/src/ble_ead.c"
"host/nimble/nimble/nimble/host/src/ble_aes_ccm.c"
"host/nimble/nimble/nimble/host/src/ble_gattc.c"
"host/nimble/nimble/nimble/host/src/ble_store.c"
"host/nimble/nimble/nimble/host/src/ble_sm_lgcy.c"

View File

@@ -679,3 +679,17 @@ config BT_NIMBLE_OPTIMIZE_MULTI_CONN
This option enables the use of vendor-specific APIs for multi-connections, which can
greatly enhance the stability of coexistence between numerous central and peripheral
devices. It will prohibit the usage of standard APIs.
config BT_NIMBLE_ENC_ADV_DATA
bool "Encrypted Advertising Data"
depends on SOC_ESP_NIMBLE_CONTROLLER
select BT_NIMBLE_EXT_ADV
help
This option is used to enable encrypted advertising data.
config BT_NIMBLE_MAX_EADS
int "Maximum number of EAD devices to save across reboots"
default 10
depends on BT_NIMBLE_ENABLED && BT_NIMBLE_ENC_ADV_DATA
help
Defines maximum number of encrypted advertising data key material to save

View File

@@ -104,6 +104,12 @@
#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (CONFIG_BT_NIMBLE_EXT_ADV_MAX_SIZE)
#endif
#ifndef CONFIG_BT_NIMBLE_ENC_ADV_DATA
#define MYNEWT_VAL_ENC_ADV_DATA (0)
#else
#define MYNEWT_VAL_ENC_ADV_DATA (CONFIG_BT_NIMBLE_ENC_ADV_DATA)
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
#define BLE_SCAN_RSP_DATA_MAX_LEN_N (1650)
#else
@@ -842,6 +848,10 @@
#define MYNEWT_VAL_BLE_STORE_MAX_CCCDS CONFIG_BT_NIMBLE_MAX_CCCDS
#endif
#ifdef CONFIG_BT_NIMBLE_MAX_EADS
#define MYNEWT_VAL_BLE_STORE_MAX_EADS CONFIG_BT_NIMBLE_MAX_EADS
#endif
#ifndef MYNEWT_VAL_BLE_STORE_CONFIG_PERSIST
#ifdef CONFIG_BT_NIMBLE_NVS_PERSIST
#define MYNEWT_VAL_BLE_STORE_CONFIG_PERSIST (1)