GATTC_DiscoverCharacteristicsByUUID
C
uint16_t GATTC_DiscoverCharacteristicsByUUID(uint16_t connHandle, GATTC_DiscoverCharacteristicByUuidParams_T *p_discParams);
Description
Initiates the discovery of characteristics with a specific UUID within a handle range.
Note
This function starts the discovery process for characteristics 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_CHAR_BY_UUID_RESP with procedureStatus set to 'continue' indicates that one or more characteristics have been found, but the discovery process is ongoing.
GATTC_EVT_DISC_CHAR_BY_UUID_RESP with procedureStatus set to 'finish' indicates the end of the discovery process, either because the last characteristic has been found or no more characteristics 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 characteristics 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 characteristics for. |
[in] p_discParams | Pointer to parameters specifying the UUID to discover and the handle range. See GATTC_DiscoverCharacteristicByUuidParams_T. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Discovery process successfully initiated. |
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. |