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

◆ sd_ble_gap_device_name_set()

uint32_t sd_ble_gap_device_name_set ( ble_gap_conn_sec_mode_t const * p_write_perm,
uint8_t const * p_dev_name,
uint16_t len )

#include <ble_gap.h>

Set GAP device name.

Note
If the device name is located in application flash memory (see ble_gap_cfg_device_name_t), it cannot be changed. Then NRF_ERROR_FORBIDDEN will be returned.
Parameters
[in]p_write_permWrite permissions for the Device Name characteristic, see ble_gap_conn_sec_mode_t.
[in]p_dev_namePointer to a UTF-8 encoded, non NULL-terminated string.
[in]lenLength of the UTF-8, non NULL-terminated string pointed to by p_dev_name in octets (must be smaller or equal than BLE_GAP_DEVNAME_MAX_LEN).
Return values
NRF_SUCCESSGAP device name and permissions set successfully.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.
NRF_ERROR_INVALID_PARAMInvalid parameter(s) supplied.
NRF_ERROR_DATA_SIZEInvalid data size(s) supplied.
NRF_ERROR_FORBIDDENDevice name is not writable.