Skip to content

Commit

Permalink
Merge branch 'backport/fix_ble_menuconfig_v4.4' into 'release/v4.4'
Browse files Browse the repository at this point in the history
Backport/fix ble menuconfig v4.4(backport v4.4)

See merge request espressif/esp-idf!27495
  • Loading branch information
Isl2017 committed Dec 4, 2023
2 parents 43dbb70 + 09076b5 commit 2be3fa2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
18 changes: 9 additions & 9 deletions components/bt/host/bluedroid/Kconfig.in
Expand Up @@ -1037,7 +1037,7 @@ config BT_ACL_CONNECTIONS

config BT_MULTI_CONNECTION_ENBALE
bool "Enable BLE multi-conections"
depends on BT_BLUEDROID_ENABLED
depends on BT_BLE_ENABLED
default y
help
Enable this option if there are multiple connections
Expand All @@ -1058,7 +1058,7 @@ config BT_BLE_DYNAMIC_ENV_MEMORY

config BT_BLE_HOST_QUEUE_CONG_CHECK
bool "BLE queue congestion check"
depends on BT_BLUEDROID_ENABLED
depends on BT_BLE_ENABLED
default n
help
When scanning and scan duplicate is not enabled, if there are a lot of adv packets around
Expand All @@ -1083,7 +1083,7 @@ config BT_BLE_ACT_SCAN_REP_ADV_SCAN

config BT_BLE_ESTAB_LINK_CONN_TOUT
int "Timeout of BLE connection establishment"
depends on BT_BLUEDROID_ENABLED
depends on BT_BLE_ENABLED
range 1 60
default 30
help
Expand Down Expand Up @@ -1118,7 +1118,7 @@ config BT_BLE_RPA_SUPPORTED

config BT_BLE_RPA_TIMEOUT
int "Timeout of resolvable private address"
depends on BT_BLUEDROID_ENABLED
depends on BT_BLE_ENABLED
range 1 3600
default 900
help
Expand All @@ -1127,35 +1127,35 @@ config BT_BLE_RPA_TIMEOUT

config BT_BLE_50_FEATURES_SUPPORTED
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
help
This enables BLE 5.0 features, this option only support esp32c3/esp32s3 chip

config BT_BLE_42_FEATURES_SUPPORTED
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
help
This enables BLE 4.2 features.

config BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER
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
help
This enables BLE periodic advertising sync transfer feature

config BT_BLE_FEAT_PERIODIC_ADV_ENH
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
help
Enable the periodic advertising enhancements

config BT_BLE_HIGH_DUTY_ADV_INTERVAL
bool "Enable BLE high duty advertising interval feature"
depends on BT_BLUEDROID_ENABLED
depends on BT_BLE_ENABLED
default n
help
This enable BLE high duty advertising interval feature
2 changes: 1 addition & 1 deletion components/bt/host/bluedroid/stack/smp/smp_api.c
Expand Up @@ -125,7 +125,7 @@ BOOLEAN SMP_Register (tSMP_CALLBACK *p_cback)
SMP_TRACE_EVENT ("SMP_Register state=%d", smp_cb.state);

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;

Expand Down
Expand Up @@ -404,6 +404,11 @@ static void gatts_profile_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_
{
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
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);
Expand Down
Expand Up @@ -158,6 +158,7 @@ The application registration takes place inside ``app_main()`` using the ``esp_b
```c
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
Expand Down

0 comments on commit 2be3fa2

Please sign in to comment.