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

ParameterDescription
[in] connHandleHandle of the connection to discover the characteristics for.
[in] p_discParamsPointer to parameters specifying the UUID to discover and the handle range. See GATTC_DiscoverCharacteristicByUuidParams_T.

Return values

Return valueDescription
MBA_RES_SUCCESSDiscovery process successfully initiated.
MBA_RES_OOMMemory allocation failure occurred internally.
MBA_RES_INVALID_PARAInvalid parameters, such as an invalid connection handle.
MBA_RES_BUSYGATT Client is busy with another ongoing request.