HOW TO CHANGE CHARACTERISTIC NAME AND SERVICE NAME FROM CODE

HI friends 

i am vary new to bluetooth ,

1.the problem is i want to give custom name for the UUID characteristics, as of now in mobile app it displaying unknown service ,and unknown characteristics .

2.i found some solution like in nrf connect mobile app if we long press on characteristics  we can edit the name but it is only possible locally  if we use other mobile again it will show same unkown characteristics .

3.please give any solution to change the service name and characteristics name globally llike if you scan and connect  with different mobile it should not change .

thanks in advance

  • Hi Bharath

    It's not really a peripheral/central issue. The Bluetooth specification doesn't provide a mechanism for reading out a human readable name for characteristics and services, on either side of the connection. What you get is the UUID, and if you want to display names for services and characteristics you need to maintain a map somewhere that links the UUID to the name. 

    You can store this map anywhere you like, and you could hard code it into the central or peripheral if you wanted to, but to save memory on the embedded device (peripheral in your case) it probably makes more sense to store it on the central/phone side. 

    Best regards
    Torbjørn

Related