Target service handle to add the characteristic descriptor
descr_uuid
The pointer to the descriptor UUID
perm
Descriptor access permission
char_descr_val
The pointer to the characteristic descriptor value
control
The pointer to the attribute response control byte
Return value
- ESP_OK: Success - ESP_ERR_INVALID_ARG: Invalid arguments - ESP_FAIL: Failure due to other reasons
Notes
1. This function triggers `ESP_GATTS_ADD_CHAR_DESCR_EVT`. 2. `control->auto_rsp` should be set to `ESP_GATT_AUTO_RSP` or `ESP_GATT_RSP_BY_APP`. 3. For stack respond attribute (`ESP_GATT_AUTO_RSP`), `char_val` should not be NULL and `char_val->attr_max_len` must be greater than 0.
Examples
esp_ble_gatts_add_char_descr() is referenced by 5 libraries and example projects: