![]() |
S145 SoftDevice for nRF54LS05 API documentation 10.0.0
|
| uint32_t sd_ble_gatts_characteristic_add | ( | uint16_t | service_handle, |
| ble_gatts_char_md_t const * | p_char_md, | ||
| ble_gatts_attr_t const * | p_attr_char_value, | ||
| ble_gatts_char_handles_t * | p_handles ) |
#include <ble_gatts.h>
Add a characteristic declaration, a characteristic value declaration and optional characteristic descriptor declarations to the Attribute Table.
| GATTS ATT Table Population |
| [in] | service_handle | Handle of the service where the characteristic is to be placed, if BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. |
| [in] | p_char_md | Characteristic metadata. |
| [in] | p_attr_char_value | Pointer to the attribute structure corresponding to the characteristic value. |
| [out] | p_handles | Pointer to the structure where the assigned handles will be stored. |
| NRF_SUCCESS | Successfully added a characteristic. |
| NRF_ERROR_INVALID_ADDR | Invalid pointer supplied. |
| NRF_ERROR_INVALID_PARAM | Invalid parameter(s) supplied, service handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints. |
| NRF_ERROR_INVALID_STATE | Invalid state to perform operation, a service context is required. |
| NRF_ERROR_FORBIDDEN | Forbidden value supplied, certain UUIDs are reserved for the stack. |
| NRF_ERROR_NO_MEM | Not enough memory to complete operation. |
| NRF_ERROR_DATA_SIZE | Invalid data size(s) supplied, attribute lengths are restricted by Maximum attribute lengths. |