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

ParameterDescription
[in] connHandleHandle of the connection to send the read by type response.
[in] p_respParamsPointer to Read By Type Response parameters. See GATTS_SendReadByTypeRespParams_T.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully starts to send the read by type response.
MBA_RES_FAILOperation is not permitted if GATT server does not receive read by type request before.
MBA_RES_OOMInternal memory allocation failure.
MBA_RES_INVALID_PARAInvalid parameters. Connection handle is not valid.