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
Parameter | Description |
---|---|
[in] connHandle | Handle of the connection to send the read response. |
[in] p_respParams | Pointer to the Read Response parameters. See GATTS_SendReadRespParams_T. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Read response successfully initiated. |
MBA_RES_FAIL | Operation not permitted; no corresponding read request received. |
MBA_RES_OOM | Memory allocation failure occurred internally. |
MBA_RES_INVALID_PARA | Invalid parameters, such as an invalid connection handle. |