Bluetooth, assign custom name to Service/Characteristic #14129
Unanswered
GiacCecc
asked this question in
Libraries & Drivers
Replies: 1 comment 1 reply
-
Your descriptor only has write permission. So the client can set the name, but not read the value. I also found that the iphone version of nRF Connect will not show the Characteristic User Description (0x2901). You can see the descriptor with the Android version. iOS is very restrictive of what apps can do and filters certain characteristics. For instance, characteristics under 0x1801 Generic Access service can not be read. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I‘m working on a project with an ESP32-WROOM-32 that needs the use of Bluetooth to send and receive data from a central (I-Phone) as a GATT-Server. I use the nRF Connect app To interact with the ESP32 and the bluetooth low-level library from Micropython 1.22.2.
The Server has t least two different services with at least one characteristic each.
For the first service and its characteristic I used the "assigned numbers" for Environmental Sensing and Temperature from the SIG (Environmental Sensing Service = 0x181A and Temperature Characteristic = 0x2A6E) and I'm able to receive the data and to see the name of the service and of the characteristic in the nRF Connect app (see Screenshot).
For the second service (STEP_SERV) and its characteristic (STEP_CHAR) I used custom UUIDs. This service should offer the possibility to write an int to the server, that will use this value to rotate a stepper motor.
So far everything works as expected, but I´m having hard times trying to understand how I can assign a custom "name" to the custom service and its characteristic. I would like to see these names in the nRF Connect app when I connect to the server.
I tried adding a "Characteristic User Description" with 0x2901 (STEP_DESC) to the STEP_CHAR, returning an handle (self._desc_step) for it after registration and using this handle to write its name ("STEPPER") with .gatts_write(). Unfortunately it doesn't work.
Here is the code I used:
I would be glad if someone with some experience with it could give me an hint. Thank you all in advance!!!
Beta Was this translation helpful? Give feedback.
All reactions