S145 SoftDevice for nRF54L15/nRF54L10/nRF54L05 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gatts_value_set()

uint32_t sd_ble_gatts_value_set ( uint16_t conn_handle,
uint16_t handle,
ble_gatts_value_t * p_value )

#include <ble_gatts.h>

Set the value of a given attribute.

Note
Values other than system attributes can be set at any time, regardless of whether any active connections exist.
Relevant Message Sequence Charts
GATTS Queued Writes: Prepare Queue Full
GATTS Queued Writes: App handled, no attributes require authorization
Parameters
[in]conn_handleConnection handle. Ignored if the value does not belong to a system attribute.
[in]handleAttribute handle.
[in,out]p_valueAttribute value information.
Return values
NRF_SUCCESSSuccessfully set the value of the attribute.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.
NRF_ERROR_INVALID_PARAMInvalid parameter(s) supplied.
NRF_ERROR_NOT_FOUNDAttribute not found.
NRF_ERROR_FORBIDDENForbidden handle supplied, certain attributes are not modifiable by the application.
NRF_ERROR_DATA_SIZEInvalid data size(s) supplied, attribute lengths are restricted by Maximum attribute lengths.
BLE_ERROR_INVALID_CONN_HANDLEInvalid connection handle supplied on a system attribute.