Skip to main content
M326.1
Associate II
September 15, 2020
Solved

Naming BLE service on STM32WB

  • September 15, 2020
  • 1 reply
  • 1945 views

Hello,

In STM32WB exemple BLE_HeartRate, i can see the name of HeartRate service on my phone (like image). But when i create my own service, how can i set a name for it ?

Thank you.

This topic has been closed for replies.
Best answer by Remi QUINTIN

​The service name is not detailed in the service characteristic but is defined by its uuid.

For the official services specified by SIG, the UUID is defined by the standard. So it is easy for any application to guess the service name from its uuid.

For any custom service, the uuid is defined the customer and would be associated with a service name only for remote application developed by the customer and being aware of this custom association: service name and uuid.

Hearth rate is one of the services officially defined by SIG with an official uuid associated to it. Therefore you can see the service name on any BLE device recognizing the official BLE services.

ST also developed custom services like BLE_p2pServer. In this case on ST mobile application on mobile is aware of the associated service name based on its custom uuid and can display it.

In your case, you defined your on service with your own uuid but you are using a ST mobile application that does not know the service name associated with your own uuid. You could do it if you can get the source code of the mobile application to add a few lines of codes to display your service name based on your uuid.

1 reply

Remi QUINTIN
Technical Moderator
October 8, 2020

​The service name is not detailed in the service characteristic but is defined by its uuid.

For the official services specified by SIG, the UUID is defined by the standard. So it is easy for any application to guess the service name from its uuid.

For any custom service, the uuid is defined the customer and would be associated with a service name only for remote application developed by the customer and being aware of this custom association: service name and uuid.

Hearth rate is one of the services officially defined by SIG with an official uuid associated to it. Therefore you can see the service name on any BLE device recognizing the official BLE services.

ST also developed custom services like BLE_p2pServer. In this case on ST mobile application on mobile is aware of the associated service name based on its custom uuid and can display it.

In your case, you defined your on service with your own uuid but you are using a ST mobile application that does not know the service name associated with your own uuid. You could do it if you can get the source code of the mobile application to add a few lines of codes to display your service name based on your uuid.