bluedroid: add config for robust caching and RPA timeout

This commit is contained in:
chenjianhua 2022-12-07 15:18:10 +08:00
parent 7e6b085c53
commit 53dd9f0a31
4 changed files with 36 additions and 2 deletions

View File

@ -200,6 +200,13 @@ config BT_GATTS_SEND_SERVICE_CHANGE_MODE
default 1 if BT_GATTS_SEND_SERVICE_CHANGE_MANUAL
default 0
config BT_GATTS_ROBUST_CACHING_ENABLED
bool "Enable Robust Caching on Server Side"
depends on BT_GATTS_ENABLE
default n
help
This option enable gatt robust caching feature on server
config BT_GATTC_ENABLE
bool "Include GATT client module(GATTC)"
depends on BT_BLE_ENABLED
@ -1085,6 +1092,15 @@ config BT_BLE_RPA_SUPPORTED
For BLE other chips, devices support network privacy mode and device privacy mode, users can switch the
two modes according to their own needs. So this option is enabled by default.
config BT_BLE_RPA_TIMEOUT
int "timeout of resolvable private address"
depends on BT_BLUEDROID_ENABLED
range 1 3600
default 900
help
This set RPA timeout of Controller and Host.
Default is 900 s (15 minutes). Range is 1 s to 1 hour (3600 s).
config BT_BLE_50_FEATURES_SUPPORTED
bool "Enable BLE 5.0 features"
depends on (BT_BLUEDROID_ENABLED && (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3))

View File

@ -301,12 +301,24 @@
#define UC_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0
#endif
#ifdef CONFIG_BT_GATTS_ROBUST_CACHING_ENABLED
#define UC_BT_GATTS_ROBUST_CACHING_ENABLED CONFIG_BT_GATTS_ROBUST_CACHING_ENABLED
#else
#define UC_BT_GATTS_ROBUST_CACHING_ENABLED 0
#endif
#ifdef CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN
#define UC_BT_BLE_ACT_SCAN_REP_ADV_SCAN CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN
#else
#define UC_BT_BLE_ACT_SCAN_REP_ADV_SCAN FALSE
#endif
#ifdef CONFIG_BT_BLE_RPA_TIMEOUT
#define UC_BT_BLE_RPA_TIMEOUT CONFIG_BT_BLE_RPA_TIMEOUT
#else
#define UC_BT_BLE_RPA_TIMEOUT 900
#endif
//SCO VOICE OVER HCI
#ifdef CONFIG_BT_HFP_AUDIO_DATA_PATH_HCI
#define UC_BT_HFP_AUDIO_DATA_PATH_HCI CONFIG_BT_HFP_AUDIO_DATA_PATH_HCI

View File

@ -496,10 +496,18 @@
#define GATTS_SEND_SERVICE_CHANGE_MODE UC_BT_GATTS_SEND_SERVICE_CHANGE_MODE
#endif
#ifdef UC_BT_GATTS_ROBUST_CACHING_ENABLED
#define GATTS_ROBUST_CACHING_ENABLED UC_BT_GATTS_ROBUST_CACHING_ENABLED
#endif
#ifdef UC_BT_BLE_ACT_SCAN_REP_ADV_SCAN
#define BTM_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY UC_BT_BLE_ACT_SCAN_REP_ADV_SCAN
#endif
#ifdef UC_BT_BLE_RPA_TIMEOUT
#define BTM_BLE_PRIVATE_ADDR_INT UC_BT_BLE_RPA_TIMEOUT
#endif
/* This feature is used to eanble interleaved scan*/
#ifndef BTA_HOST_INTERLEAVE_SEARCH
#define BTA_HOST_INTERLEAVE_SEARCH FALSE

View File

@ -145,8 +145,6 @@ typedef struct {
#define BTM_BLE_ISVALID_PARAM(x, min, max) (((x) >= (min) && (x) <= (max)) || ((x) == BTM_BLE_CONN_PARAM_UNDEF))
#define BTM_BLE_PRIVATE_ADDR_INT 900 /* 15 minutes minimum for random address refreshing */
typedef struct {
UINT16 discoverable_mode;
UINT16 connectable_mode;