GATTS_SendReadResponse

C

uint16_t GATTS_SendReadResponse(uint16_t connHandle, GATTS_SendReadRespParams_T *p_respParams);

Description

Sends a Read or Read Blob response to a GATT client.

Note

The type of response (Read or Read Blob) is determined by the responseType field in the GATTS_SendReadRespParams_T structure. If the attribute's setting is SETTING_MANUAL_READ_RSP, the GATTS_EVT_READ event with readType ATT_READ_REQ or ATT_READ_BLOB_REQ will be sent to the application when the GATT server receives these requests. The application should then call this API to send the read response or an error response if the request is not permitted.

Parameters

ParameterDescription
[in] connHandleHandle of the connection to send the read response.
[in] p_respParamsPointer to the Read Response parameters. See GATTS_SendReadRespParams_T.

Return values

Return valueDescription
MBA_RES_SUCCESSRead response successfully initiated.
MBA_RES_FAILOperation not permitted; no corresponding read request received.
MBA_RES_OOMMemory allocation failure occurred internally.
MBA_RES_INVALID_PARAInvalid parameters, such as an invalid connection handle.