mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
docs(bt/bluedroid): Update ble example document
This commit is contained in:
@ -403,6 +403,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);
|
||||||
|
@ -159,6 +159,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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user