GATTS_SendHandleValue
C
uint16_t GATTS_SendHandleValue(uint16_t connHandle, GATTS_HandleValueParams_T *p_hvParams);
Description
Sends a Handle Value Notification or Indication to a GATT client.
Note
The type of message sent (notification or indication) is determined by the sendType field in the GATTS_HandleValueParams_T structure. sendType in GATTS_HandleValueParams_T determines if a notification or Indication is sent. A notification or indication can be sent only if the property matches and the CCCD value is configured to be enabled.
Events generated
GATTS_EVT_HV_CONFIRM is generated if an indication is successfully sent.
ATT_EVT_TIMEOUT is generated if the client does not respond to an indication.
Parameters
Parameter | Description |
---|---|
[in] connHandle | Handle of the connection to send Handle Value Notification/Indication. |
[in] p_hvParams | Pointer to the parameters for the Handle Value operation. See GATTS_HandleValueParams_T. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Operation successfully started. |
MBA_RES_FAIL | Operation failed due to invalid permissions or unavailable memory. |
MBA_RES_OOM | Memory allocation failure occurred internally. |
MBA_RES_INVALID_PARA | Invalid parameters, such as an invalid connection handle or out-of-range values. |
MBA_RES_BUSY | An indication is already in progress. |
MBA_RES_NO_RESOURCE | No resources available to send the handle value. |