I want to change the device name when the device connected,how can i do it with my sdk5.1 in the nrf51822 s110 ble_app_hrs?
I want to change the device name when the device connected,how can i do it with my sdk5.1 in the nrf51822 s110 ble_app_hrs?
Whose device name are you looking to find? If you want to check your own device name, you can use sd_ble_gap_device_name_get(), but if you need the name of the peer device, you'll have to implement a GATT Client, discovering the GAP service and then read the Device Name characteristic.
However, if you're looking to identify a single central device, I'd recommend you to instead do it either based on address or based on shared encryption keys.
Whose device name are you looking to find? If you want to check your own device name, you can use sd_ble_gap_device_name_get(), but if you need the name of the peer device, you'll have to implement a GATT Client, discovering the GAP service and then read the Device Name characteristic.
However, if you're looking to identify a single central device, I'd recommend you to instead do it either based on address or based on shared encryption keys.