Merge branch 'backport/fix_ble_menuconfig_v4.3' into 'release/v4.3'

Backport/fix ble menuconfig v4.3(backport v4.3)

See merge request espressif/esp-idf!27494
This commit is contained in:
Island
2023-12-04 16:30:17 +08:00
4 changed files with 16 additions and 10 deletions

View File

@ -1021,7 +1021,7 @@ config BT_ACL_CONNECTIONS
config BT_MULTI_CONNECTION_ENBALE config BT_MULTI_CONNECTION_ENBALE
bool "Enable BLE multi-conections" bool "Enable BLE multi-conections"
depends on BT_BLUEDROID_ENABLED depends on BT_BLE_ENABLED
default y default y
help help
Enable this option if there are multiple connections Enable this option if there are multiple connections
@ -1042,7 +1042,7 @@ config BT_BLE_DYNAMIC_ENV_MEMORY
config BT_BLE_HOST_QUEUE_CONG_CHECK config BT_BLE_HOST_QUEUE_CONG_CHECK
bool "BLE queue congestion check" bool "BLE queue congestion check"
depends on BT_BLUEDROID_ENABLED depends on BT_BLE_ENABLED
default n default n
help help
When scanning and scan duplicate is not enabled, if there are a lot of adv packets around When scanning and scan duplicate is not enabled, if there are a lot of adv packets around
@ -1067,7 +1067,7 @@ config BT_BLE_ACT_SCAN_REP_ADV_SCAN
config BT_BLE_ESTAB_LINK_CONN_TOUT config BT_BLE_ESTAB_LINK_CONN_TOUT
int "Timeout of BLE connection establishment" int "Timeout of BLE connection establishment"
depends on BT_BLUEDROID_ENABLED depends on BT_BLE_ENABLED
range 1 60 range 1 60
default 30 default 30
help help
@ -1102,7 +1102,7 @@ config BT_BLE_RPA_SUPPORTED
config BT_BLE_RPA_TIMEOUT config BT_BLE_RPA_TIMEOUT
int "Timeout of resolvable private address" int "Timeout of resolvable private address"
depends on BT_BLUEDROID_ENABLED depends on BT_BLE_ENABLED
range 1 3600 range 1 3600
default 900 default 900
help help
@ -1111,35 +1111,35 @@ config BT_BLE_RPA_TIMEOUT
config BT_BLE_50_FEATURES_SUPPORTED config BT_BLE_50_FEATURES_SUPPORTED
bool "Enable BLE 5.0 features" bool "Enable BLE 5.0 features"
depends on (BT_BLUEDROID_ENABLED && (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3)) depends on (BT_BLE_ENABLED && (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3))
default y default y
help help
This enables BLE 5.0 features, this option only support esp32c3/esp32s3 chip This enables BLE 5.0 features, this option only support esp32c3/esp32s3 chip
config BT_BLE_42_FEATURES_SUPPORTED config BT_BLE_42_FEATURES_SUPPORTED
bool "Enable BLE 4.2 features" bool "Enable BLE 4.2 features"
depends on (BT_BLUEDROID_ENABLED && (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3)) depends on (BT_BLE_ENABLED && (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3))
default n default n
help help
This enables BLE 4.2 features. This enables BLE 4.2 features.
config BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER config BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable BLE periodic advertising sync transfer feature" bool "Enable BLE periodic advertising sync transfer feature"
depends on (BT_BLUEDROID_ENABLED && BT_BLE_50_FEATURES_SUPPORTED && SOC_ESP_NIMBLE_CONTROLLER) depends on (BT_BLE_50_FEATURES_SUPPORTED && SOC_ESP_NIMBLE_CONTROLLER)
default n default n
help help
This enables BLE periodic advertising sync transfer feature This enables BLE periodic advertising sync transfer feature
config BT_BLE_FEAT_PERIODIC_ADV_ENH config BT_BLE_FEAT_PERIODIC_ADV_ENH
bool "Enable periodic adv enhancements(adi support)" bool "Enable periodic adv enhancements(adi support)"
depends on (BT_BLUEDROID_ENABLED && BT_BLE_50_FEATURES_SUPPORTED && SOC_ESP_NIMBLE_CONTROLLER) depends on (BT_BLE_50_FEATURES_SUPPORTED && SOC_ESP_NIMBLE_CONTROLLER)
default n default n
help help
Enable the periodic advertising enhancements Enable the periodic advertising enhancements
config BT_BLE_HIGH_DUTY_ADV_INTERVAL config BT_BLE_HIGH_DUTY_ADV_INTERVAL
bool "Enable BLE high duty advertising interval feature" bool "Enable BLE high duty advertising interval feature"
depends on BT_BLUEDROID_ENABLED depends on BT_BLE_ENABLED
default n default n
help help
This enable BLE high duty advertising interval feature This enable BLE high duty advertising interval feature

View File

@ -125,7 +125,7 @@ BOOLEAN SMP_Register (tSMP_CALLBACK *p_cback)
SMP_TRACE_EVENT ("SMP_Register state=%d", smp_cb.state); SMP_TRACE_EVENT ("SMP_Register state=%d", smp_cb.state);
if (smp_cb.p_callback != NULL) { if (smp_cb.p_callback != NULL) {
SMP_TRACE_ERROR ("SMP_Register: duplicate registration, overwrite it"); SMP_TRACE_WARNING ("SMP_Register: duplicate registration, overwrite it");
} }
smp_cb.p_callback = p_cback; smp_cb.p_callback = p_cback;

View File

@ -404,6 +404,11 @@ static void gatts_profile_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_
{ {
indicate_data[i] = i % 0xff; indicate_data[i] = i % 0xff;
} }
// if want to change the value in server database, call:
// esp_ble_gatts_set_attr_value(heart_rate_handle_table[IDX_CHAR_VAL_A], sizeof(indicate_data), indicate_data);
//the size of indicate_data[] need less than MTU size //the size of indicate_data[] need less than MTU size
esp_ble_gatts_send_indicate(gatts_if, param->write.conn_id, heart_rate_handle_table[IDX_CHAR_VAL_A], esp_ble_gatts_send_indicate(gatts_if, param->write.conn_id, heart_rate_handle_table[IDX_CHAR_VAL_A],
sizeof(indicate_data), indicate_data, true); sizeof(indicate_data), indicate_data, true);

View File

@ -158,6 +158,7 @@ The application registration takes place inside ``app_main()`` using the ``esp_b
```c ```c
esp_ble_gatts_app_register(ESP_HEART_RATE_APP_ID); esp_ble_gatts_app_register(ESP_HEART_RATE_APP_ID);
``` ```
The ``ESP_HEART_RATE_APP_ID`` serves as an application ID, distinguishing between various application layer callbacks. This identifier corresponds to the ``app_id`` found within the ``gatts_reg_evt_param`` in ESP_GATTS_REG_EVT.
## Setting GAP Parameters ## Setting GAP Parameters