1.1.2.1.2.4.20 GATTS_SendReadByTypeResponse
C
uint16_t GATTS_SendReadByTypeResponse(uint16_t connHandle, GATTS_SendReadByTypeRespParams_T *p_respParams);
Description
GATT Server sends the Read By Type response. This API should be called to send the response only when event GATTS_EVT_READ is received.
Note
If the attribute setting of the attribute is set as SETTING_MANUAL_READ_RSP, the event GATTS_EVT_READ with readType is ATT_READ_BY_TYPE_REQ will be sent to application when GATT server receives the request performing on this attribute. In this case, application need to call this API to send read by type response or send error response if the request is not permitted.
Parameters
Parameter | Description |
---|---|
[in] connHandle | Handle of the connection to send the read by type response. |
[in] p_respParams | Pointer to Read By Type Response parameters. See GATTS_SendReadByTypeRespParams_T. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully starts to send the read by type response. |
MBA_RES_FAIL | Operation is not permitted if GATT server does not receive read by type request before. |
MBA_RES_OOM | Internal memory allocation failure. |
MBA_RES_INVALID_PARA | Invalid parameters. Connection handle is not valid. |