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

◆ sd_ble_gap_device_name_get()

uint32_t sd_ble_gap_device_name_get ( uint8_t * p_dev_name,
uint16_t * p_len )

#include <ble_gap.h>

Get GAP device name.

Note
If the device name is longer than the size of the supplied buffer, p_len will return the complete device name length, and not the number of bytes actually returned in p_dev_name. The application may use this information to allocate a suitable buffer size.
Parameters
[out]p_dev_namePointer to an empty buffer where the UTF-8 non NULL-terminated string will be placed. Set to NULL to obtain the complete device name length.
[in,out]p_lenLength of the buffer pointed by p_dev_name, complete device name length on output.
Return values
NRF_SUCCESSGAP device name retrieved successfully.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.
NRF_ERROR_DATA_SIZEInvalid data size(s) supplied.