diff --git a/components/bt/host/bluedroid/Kconfig.in b/components/bt/host/bluedroid/Kconfig.in index d87000e139..85175654ef 100644 --- a/components/bt/host/bluedroid/Kconfig.in +++ b/components/bt/host/bluedroid/Kconfig.in @@ -215,6 +215,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 @@ -1100,6 +1107,15 @@ config BT_BLE_RPA_SUPPORTED For other BLE 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 || SOC_ESP_NIMBLE_CONTROLLER)) diff --git a/components/bt/host/bluedroid/common/include/common/bluedroid_user_config.h b/components/bt/host/bluedroid/common/include/common/bluedroid_user_config.h index 05cb6fab27..3fde16f61a 100644 --- a/components/bt/host/bluedroid/common/include/common/bluedroid_user_config.h +++ b/components/bt/host/bluedroid/common/include/common/bluedroid_user_config.h @@ -288,12 +288,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 diff --git a/components/bt/host/bluedroid/common/include/common/bt_target.h b/components/bt/host/bluedroid/common/include/common/bt_target.h index 68d7902145..5329e1b887 100644 --- a/components/bt/host/bluedroid/common/include/common/bt_target.h +++ b/components/bt/host/bluedroid/common/include/common/bt_target.h @@ -493,6 +493,10 @@ #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 @@ -503,6 +507,10 @@ #define BT_CLASSIC_BQB_INCLUDED FALSE #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 diff --git a/components/bt/host/bluedroid/stack/btm/include/btm_ble_int.h b/components/bt/host/bluedroid/stack/btm/include/btm_ble_int.h index 8d52c65fe9..113af0dfb4 100644 --- a/components/bt/host/bluedroid/stack/btm/include/btm_ble_int.h +++ b/components/bt/host/bluedroid/stack/btm/include/btm_ble_int.h @@ -143,8 +143,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;