S145 SoftDevice for nRF54LS05 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gatts_service_add()

uint32_t sd_ble_gatts_service_add ( uint8_t type,
ble_uuid_t const * p_uuid,
uint16_t * p_handle )

#include <ble_gatts.h>

Add a service declaration to the Attribute Table.

Note
Secondary Services are only relevant in the context of the entity that references them, it is therefore forbidden to add a secondary service declaration that is not referenced by another service later in the Attribute Table.
Relevant Message Sequence Charts
GATTS ATT Table Population
Parameters
[in]typeToggles between primary and secondary services, see GATT Server Service Types.
[in]p_uuidPointer to service UUID.
[out]p_handlePointer to a 16-bit word where the assigned handle will be stored.
Return values
NRF_SUCCESSSuccessfully added a service declaration.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.
NRF_ERROR_INVALID_PARAMInvalid parameter(s) supplied, Vendor Specific UUIDs need to be present in the table.
NRF_ERROR_FORBIDDENForbidden value supplied, certain UUIDs are reserved for the stack.
NRF_ERROR_NO_MEMNot enough memory to complete operation.