-
• #2
As I understand it (I could be wrong!):
A characteristic on a device has a handle - it's basically a number (a byte value?) which is the index of the characteristic in that device.
Then there's the
cccd
- it's another handle that is used for setting flags to do with that characteristic. Specifically Espruino uses that handle to write to a device and ask for notifications - it's done here: jswrap_nrf_BluetoothRemoteGATTCharacteristic_startNotificationsSo Espruino stores those two as
handle_cccd
andhandle_value
(the actual characteristic) on BluetoothRemoteGATTCharacteristic. I think that should work for ESP32 as well.I'm not sure about the others if I'm honest, but I think you could probably ignore them safely for now.
-
• #3
Well, the only thing I know is, in a sample there is this:
- - Descriptor: Characteristic User Description
- - Descriptor: Client Characteristic Configuration
- - Descriptor: Characteristic Presentation Format
Found some more information in O'REILLY Getting started with Bluetooth Low Energy.
To be honest, no. of questionmarks in my face is more than before.
I'll try to ignore them for now :-)
- - Descriptor: Characteristic User Description
-
• #4
Client Characteristic Configuration
would be thecccd
I was talking about. I'm not 100% sure about the others - as you say, I'd ignore them until you think you need them :)
Bluetooth supports descriptors for characteristics.
In bluetooth.c for nrf is this:
I can't find a way where they are used.
Can descriptors be defined in javascript ?
If yes,is this the right place to search for descriptors ?