GATTC_DiscoverAllDescriptors
C
uint16_t GATTC_DiscoverAllDescriptors(uint16_t connHandle, uint16_t startHandle, uint16_t endHandle);
Description
Initiates the discovery of all descriptors with a specific UUID within a handle range.
Note
This function starts the discovery process for all descriptors with a specific UUID within the provided handle range. The discovery may result in a series of events indicating the status and results of the operation.
Events generated
GATTC_EVT_DISC_DESC_RESP with procedureStatus set to 'continue' indicates that one or more descriptors have been found, but the discovery process is ongoing.
GATTC_EVT_DISC_DESC_RESP with procedureStatus set to 'finish' indicates the end of the discovery process, either because the last descriptor has been found or no more descriptors are present within the range.
**GATTC_EVT_ERROR_RESP**with error code ATT_ERR_ATTRIBUTE_NOT_FOUND indicates the discovery process has ended due to no further descriptors being found.
ATT_EVT_TIMEOUT indicates a timeout occurred because the server did not respond to the request.
Parameters
Parameter | Description |
---|---|
[in] connHandle | Handle of the connection to discover the descriptors for. |
[in] startHandle | Start handle of the range to query. |
[in] endHandle | End handle of the range to query. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully starts the discovering. |
MBA_RES_OOM | Memory allocation failure occurred internally. |
MBA_RES_INVALID_PARA | Invalid parameters, such as an invalid connection handle. |
MBA_RES_BUSY | GATT Client is busy with another ongoing request. |