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

ParameterDescription
[in] connHandleHandle of the connection to discover the descriptors for.
[in] startHandleStart handle of the range to query.
[in] endHandleEnd handle of the range to query.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully starts the discovering.
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.