Dear !!
Good day!!
I want to change the device name using command from mobile along wither after setting the device name i want update the Password, so can you share any example code.
Regards
Chandru
Dear !!
Good day!!
I want to change the device name using command from mobile along wither after setting the device name i want update the Password, so can you share any example code.
Regards
Chandru
Hi Chandru,
Assuming you use the nRF5 SDK you can change the device name using sd_ble_gap_device_name_set(), for instance as suggested here. Note that the advertising data also needs to be generated again as you can see in the end of the snippet. This snippet shows how to do this from the nRF isolated. You can also write to the device name characteristic (UUID 0x2A00) from the phone as you suggest if you only use Android, but for iOS this is not possible. So another option would be to use another mechanism (typically another custom service) to set the device name from a mobile phone, and then use the code indicated above.
Regarding password I am not sure what you refer to there. Can you elaborate?
Einar
Dear sir,
Thanks For quick responds!!.
Regarding password, Once we changed device name like that, even password needs to be change, once connect with mobile again it should not ask PW. and every new pair the device should ask password, which is the our expectations.
Thanks &Regards
Chandru
Hi Chandru,
Is this the passkey that can be used for MITM protection in BLE pairing, or is it something else? If you mean passkey, then you can set a passkey as shown here. If you want to set it from the phone then you need a custom service for it, or if you just want to generate it you could use the RNG to generate a 6 digit random number.
Einar
Dear sir,
As requested by you, I have tried the device name change, which is not changed, and the i'm using nRF5 SDK ble_app_uart (nRF52840_V17\nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_uart) base code, herewith i want to the change device name by using command command from mobile. Or uart . kindly suggest the solutions
regards
Chandru.A
Can you show what you have done and explain how you test and in which way it does not work? Also let me know if you get any error or warnings?