diff --git a/components/bt/host/bluedroid/Kconfig.in b/components/bt/host/bluedroid/Kconfig.in index bb9fd7e218..c3a9388a3c 100644 --- a/components/bt/host/bluedroid/Kconfig.in +++ b/components/bt/host/bluedroid/Kconfig.in @@ -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)) 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 15b5c9bbe4..580b91fd68 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 @@ -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 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 c7420415cc..aaa6fdedf5 100644 --- a/components/bt/host/bluedroid/common/include/common/bt_target.h +++ b/components/bt/host/bluedroid/common/include/common/bt_target.h @@ -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 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 63953eaec7..65e1d7677d 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 @@ -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;