The attribute start handle. If the type is `ESP_GATT_DB_DESCRIPTOR`, this parameter will be ignored.
end_handle
The attribute end handle. If the type is `ESP_GATT_DB_DESCRIPTOR`, this parameter will be ignored.
char_handle
The characteristic handle. This parameter is valid only if the type is `ESP_GATT_DB_DESCRIPTOR`.
count
The number of attributes found in the local GATTC cache with the given attribute type
Return value
- ESP_OK: Success - ESP_GATT_INVALID_HANDLE: Invalid GATT `start_handle`, `end_handle` - ESP_GATT_INVALID_PDU: NULL pointer to `count` - ESP_FAIL: Failure due to other reasons
Notes
1. This API does not trigger any event. 2. `start_handle` must be greater than 0, and smaller than `end_handle` if the `type` is not `ESP_GATT_DB_DESCRIPTOR`.
Examples
esp_ble_gattc_get_attr_count() is referenced by 7 libraries and example projects: