GATTC_DiscoverAllDescriptors
C
uint16_t GATTC_DiscoverAllDescriptors(uint16_t connHandle, uint16_t startHandle, uint16_t endHandle);
Description
GATT Client starts discovering all descriptors within the given handle range when this API is called.
Following events may be generated:
Event GATTC_EVT_DISC_DESC_RESP with procedureStatus in GATT_EvtDiscDescResp_T set to continue. This indicates descriptors are found but the discovery is not yet complete. (more descriptors may be present)
Event GATTC_EVT_DISC_DESC_RESP with procedureStatus in GATT_EvtDiscDescResp_T set to Finish. This indicates termination of the procedure. (Handle of last found descriptor is equal to end handle of input handle range)
Event GATTC_EVT_ERROR_RESP with error code ATT_ERRCODE_ATTRIBUTE_NOT_FOUND is generated. This indicates termination of the procedure. (Handle of last found descriptor is not same as end handle of the input handle range or no descriptor was found)
Events generated
GATTC_EVT_ERROR_RESP Generated when characteristic descriptors not found or discovery procedure is end.
GATTC_EVT_DISC_DESC_RESP Generated when characteristic descriptors discovered from remote.
ATT_EVT_TIMEOUT Generated when server does not respond the request.
Parameters
Parameter | Description |
---|---|
[in] connHandle | Handle of the connection to discover the descriptors for. |
[in] startHandle | Start of the querying handle range. |
[in] endHandle | End of the querying handle range. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully starts the discovering. |
MBA_RES_OOM | Internal memory allocation failure. |
MBA_RES_INVALID_PARA | Invalid parameters. Connection handle is not valid. |
MBA_RES_BUSY | GATT Client is busy. Another request is ongoing. |