![]() |
S145 SoftDevice for nRF54L15/nRF54L10/nRF54L05 API documentation 10.0.0
|
| uint32_t sd_ble_gatts_hvx | ( | uint16_t | conn_handle, |
| ble_gatts_hvx_params_t const * | p_hvx_params ) |
#include <ble_gatts.h>
Notify or Indicate an attribute value.
This function checks for the relevant Client Characteristic Configuration descriptor value to verify that the relevant operation (notification or indication) has been enabled by the client. It is also able to update the attribute value before issuing the PDU, so that the application can atomically perform a value update and a server initiated transaction with a single API call.
| BLE_GATTS_EVT_HVN_TX_COMPLETE | Notification transmission complete. |
| BLE_GATTS_EVT_HVC | Confirmation received from the peer. |
| GATTS Handle Value Indication or Notification with System Attributes Missing |
| GATTS Handle Value Notification |
| GATTS Handle Value Indication |
| GATTS Handle Value Indication or Notification disabled |
| [in] | conn_handle | Connection handle. |
| [in,out] | p_hvx_params | Pointer to an HVx parameters structure. If ble_gatts_hvx_params_t::p_data contains a non-NULL pointer the attribute value will be updated with the contents pointed by it before sending the notification or indication. If the attribute value is updated, ble_gatts_hvx_params_t::p_len is updated by the SoftDevice to contain the number of actual bytes written, else it will be set to 0. |
| NRF_SUCCESS | Successfully queued a notification or indication for transmission, and optionally updated the attribute value. |
| BLE_ERROR_INVALID_CONN_HANDLE | Invalid Connection Handle. |
| NRF_ERROR_INVALID_STATE | One or more of the following is true:
|
| NRF_ERROR_INVALID_ADDR | Invalid pointer supplied. |
| NRF_ERROR_INVALID_PARAM | Invalid parameter(s) supplied. |
| BLE_ERROR_INVALID_ATTR_HANDLE | Invalid attribute handle(s) supplied. Only attributes added directly by the application are available to notify and indicate. |
| BLE_ERROR_GATTS_INVALID_ATTR_TYPE | Invalid attribute type(s) supplied, only characteristic values may be notified and indicated. |
| NRF_ERROR_NOT_FOUND | Attribute not found. |
| NRF_ERROR_FORBIDDEN | The connection's current security level is lower than the one required by the write permissions of the CCCD associated with this characteristic. |
| NRF_ERROR_DATA_SIZE | Invalid data size(s) supplied. |
| NRF_ERROR_BUSY | For BLE_GATT_HVX_INDICATION Procedure already in progress. Wait for a BLE_GATTS_EVT_HVC event and retry. |
| BLE_ERROR_GATTS_SYS_ATTR_MISSING | System attributes missing, use sd_ble_gatts_sys_attr_set to set them to a known value. |
| NRF_ERROR_RESOURCES | Too many notifications queued. Wait for a BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry. |
| NRF_ERROR_TIMEOUT | There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection. |