This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How could I change device name for iOS?

FormerMember
FormerMember

Hi.

I want to change device name to identify multiple devices. When I am using two device, the initial device name is "device". If I connect these two device to iphone, the device names of both are "device". It user may be confused, thus I want to change this name as "device1" and "device2".

I have made some test code to do this with NUS Service. After connection is established, phone send device name to the BLE device as "device1" or "device2" over Nordic Uart Service. In device side, after receiving the device namae, save this and restart. After boot up these devices advertise device name as "device1" and "device2".

Android phone show these devices name as "device1" or "device2". but iPhone shows these devices name as "device".

How can I change device name at iOS?

PS) service_change character is activated as

#define IS_SRVC_CHANGED_CHARACT_PRESENT 1

ble_enable_params.gatts_enable_params.service_changed = IS_SRVC_CHANGED_CHARACT_PRESENT;
err_code = sd_ble_enable(&ble_enable_params);
  • As far as I know, iOS uses the GAP device name to identify devices it has connected to. This means you have to reconnect (and do service discovery) to the device for the device name to update, as it will ignore the device name in the advertisement packet. Once you reconnect the device name will be updated and you will see the correct name the next time you scan for the device.

Related