This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sd_ble_gap_device_name_set() limits device name to 31 bytes

Hi there

In the service UUID 0x2A00 I am currently trying to set a device name >31bytes with sd_ble_gap_device_name_set(). I am using the Softdevice S132 V6.1.0. 

According to the ble_gap.h and the infocenter here, sd_ble_gap_device_name_set() supports up to BLE_GAP_DEVNAME_MAX_LEN = 248 bytes. (Which would comply to the core specification)

When I am trying to set a Name which is bigger than 31 bytes, the error code NRF_ERROR_INTERNAL is returned.

The error is not mentioned as return value nor do the 31 bytes match BLE_GAP_DEVNAME_MAX_LEN.

Is this behavior correct?

Thank you in advance!

Regards,

Pascal

Related