Merge branch 'bugfix/fix_att_rsp_timeout' into 'master'

Fixed bluedroid host ATT Ignore wrong response error

Closes BLEQABR23-30 and BT-3224

See merge request espressif/esp-idf!22688
This commit is contained in:
Jiang Jiang Jian 2023-03-23 17:10:54 +08:00
commit b6fda9723e
19 changed files with 49 additions and 8 deletions

View File

@ -4,11 +4,13 @@ config BT_CTRL_MODE_EFF
config BT_CTRL_BLE_MAX_ACT
int "BLE Max Instances"
default 10
default 6
range 1 10
help
BLE maximum activities of bluetooth controllerboth of connections,
scan , sync and adv(periodic adv, multi-adv).
scan , sync and adv(periodic adv, multi-adv). Each instance needs to
consume 828 bytes, you can save RAM by modifying the instance value
according to actual needs.
config BT_CTRL_BLE_MAX_ACT_EFF
int

View File

@ -1100,9 +1100,8 @@ config BT_MAX_DEVICE_NAME_LEN
config BT_BLE_RPA_SUPPORTED
bool "Update RPA to Controller"
depends on BT_BLUEDROID_ENABLED
default n if IDF_TARGET_ESP32
default y
depends on BT_BLUEDROID_ENABLED && !SOC_BLE_DEVICE_PRIVACY_SUPPORTED
default n
help
This enables controller RPA list function.
For ESP32, ESP32 only support network privacy mode. If this option is enabled, ESP32 will only accept
@ -1112,7 +1111,7 @@ config BT_BLE_RPA_SUPPORTED
cannot be used. This option is disabled by default on ESP32, please enable or disable this option according
to your own needs.
For ESP32C3, ESP32S3, ESP32H4 and ESP32C2, devices support network privacy mode and device privacy mode,
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

View File

@ -10,6 +10,7 @@
/* All the configuration from SDK defined here */
#include "bt_common.h"
#include "bt_user_config.h"
#include "soc/soc_caps.h"
/**********************************************************
* Thread/Task reference
@ -104,8 +105,12 @@
#ifdef CONFIG_BT_BLE_RPA_SUPPORTED
#define UC_BT_BLE_RPA_SUPPORTED CONFIG_BT_BLE_RPA_SUPPORTED
#else
#if SOC_BLE_DEVICE_PRIVACY_SUPPORTED
#define UC_BT_BLE_RPA_SUPPORTED TRUE
#else
#define UC_BT_BLE_RPA_SUPPORTED FALSE
#endif
#endif
#ifdef CONFIG_BT_BLE_50_FEATURES_SUPPORTED
#define UC_BT_BLE_50_FEATURES_SUPPORTED CONFIG_BT_BLE_50_FEATURES_SUPPORTED

View File

@ -78,7 +78,7 @@ typedef UINT8 tGATT_SEC_ACTION;
/* wait for ATT cmd response timeout value */
#define GATT_WAIT_FOR_RSP_TOUT 30
#define GATT_WAIT_FOR_DISC_RSP_TOUT 5
#define GATT_WAIT_FOR_DISC_RSP_TOUT 15
#define GATT_REQ_RETRY_LIMIT 2
#define GATT_WAIT_FOR_IND_ACK_TOUT 5

View File

@ -838,3 +838,7 @@ config SOC_BLE_MESH_SUPPORTED
config SOC_BT_CLASSIC_SUPPORTED
bool
default y
config SOC_BLE_DEVICE_PRIVACY_SUPPORTED
bool
default n

View File

@ -412,3 +412,4 @@
#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */
#define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */
#define SOC_BT_CLASSIC_SUPPORTED (1) /*!< Support Bluetooth Classic hardware */
#define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (0) /*!< Support BLE device privacy mode */

View File

@ -650,3 +650,7 @@ config SOC_ESP_NIMBLE_CONTROLLER
config SOC_BLE_50_SUPPORTED
bool
default y
config SOC_BLE_DEVICE_PRIVACY_SUPPORTED
bool
default y

View File

@ -305,3 +305,4 @@
#define SOC_BLE_MESH_SUPPORTED (0) /*!< Support BLE MESH */
#define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */
#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */
#define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (1) /*!< Support BLE device privacy mode */

View File

@ -958,3 +958,7 @@ config SOC_BLE_MESH_SUPPORTED
config SOC_BLE_50_SUPPORTED
bool
default y
config SOC_BLE_DEVICE_PRIVACY_SUPPORTED
bool
default y

View File

@ -417,3 +417,4 @@
#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */
#define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */
#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */
#define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (1) /*!< Support BLE device privacy mode */

View File

@ -1202,3 +1202,7 @@ config SOC_ESP_NIMBLE_CONTROLLER
config SOC_BLE_50_SUPPORTED
bool
default y
config SOC_BLE_DEVICE_PRIVACY_SUPPORTED
bool
default y

View File

@ -495,3 +495,4 @@
#define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */
#define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */
#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */
#define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (1) /*!< Support BLE device privacy mode */

View File

@ -1114,3 +1114,7 @@ config SOC_ESP_NIMBLE_CONTROLLER
config SOC_BLE_50_SUPPORTED
bool
default y
config SOC_BLE_DEVICE_PRIVACY_SUPPORTED
bool
default y

View File

@ -478,3 +478,4 @@
#define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */
#define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */
#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */
#define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (1) /*!< Support BLE device privacy mode */

View File

@ -862,3 +862,7 @@ config SOC_ESP_NIMBLE_CONTROLLER
config SOC_BLE_50_SUPPORTED
bool
default y
config SOC_BLE_DEVICE_PRIVACY_SUPPORTED
bool
default y

View File

@ -405,3 +405,4 @@
#define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */
#define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */
#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */
#define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (1) /*!< Support BLE device privacy mode */

View File

@ -1238,3 +1238,7 @@ config SOC_BLE_MESH_SUPPORTED
config SOC_BLE_50_SUPPORTED
bool
default y
config SOC_BLE_DEVICE_PRIVACY_SUPPORTED
bool
default y

View File

@ -503,3 +503,4 @@
#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */
#define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */
#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */
#define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (1) /*!< Support BLE device privacy mode */

View File

@ -248,7 +248,7 @@ void app_main(void)
FUNC_SEND_WAIT_SEM(esp_ble_gap_config_ext_adv_data_raw(2, sizeof(legacy_adv_data), &legacy_adv_data[0]), test_sem);
FUNC_SEND_WAIT_SEM(esp_ble_gap_config_ext_scan_rsp_data_raw(2, sizeof(legacy_scan_rsp_data), &legacy_scan_rsp_data[0]), test_sem);
// coded phy extend adv, Connectable advertising
// coded phy extend adv, Scannable advertising
FUNC_SEND_WAIT_SEM(esp_ble_gap_ext_adv_set_params(3, &ext_adv_params_coded), test_sem);
FUNC_SEND_WAIT_SEM(esp_ble_gap_ext_adv_set_rand_addr(3, addr_coded), test_sem);
FUNC_SEND_WAIT_SEM(esp_ble_gap_config_ext_scan_rsp_data_raw(3, sizeof(raw_scan_rsp_data_coded), &raw_scan_rsp_data_coded[0]), test_sem);