GATTS_SendErrorResponse
C
uint16_t GATTS_SendErrorResponse(uint16_t connHandle, GATTS_SendErrRespParams_T *p_errParams);
Description
Sends an error response from the GATT Server.
Note
This function should be called when the application receives a request event that cannot be processed by the GATT server,such as a write request without write permission.
Parameters
Parameter | Description |
---|---|
[in] connHandle | Handle of the connection to send the error response. |
[in] p_errParams | Pointer to the parameters for the error response (see GATTS_SendErrRespParams_T). |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully initiates an error response. |
MBA_RES_FAIL | Operation not permitted; the error response does not match the received request. |
MBA_RES_OOM | Memory allocation failure occurred internally. |
MBA_RES_INVALID_PARA | Invalid parameters; the connection handle is not valid. |