2023-02-16 11:19 AM
My biggest issue currently is on my external app which is connecting to the WB that it cannot get the descriptor.
As I debug using BLE using LightBlue there is no descriptor in my characteristic.
As I notice recently by reading again the manual there is a command aci_gatt_add_char_desc() which in my opinion add the missing descriptor. By generating the default project with cubeMX, this function is never called. As there are no comments in the code, neither any documentation about this routine, this makes it hard to implement correctly. This would really helpful if the documentation could be extended (@Remy ISSALYS ). Thanks in advance!
Solved! Go to Solution.
2023-02-20 09:34 AM
Hello,
The command aci_gatt_add_char_desc is used when you have to create several instances of the same characteristic.
In your case, I think you search the Client Characteristic Configuration Descriptor (CCCD) to enable or disable the notification. The CCCD is create when you add your characteristic through aci_gatt_add_char command.
The command returns the handle of the declaration attribute. The attribute that holds the Characteristic Value is always allocated at the next handle (Char_Handle + 1).
The Characteristic Value is immediately followed, in order, by:
For instance, if CHAR_PROP_NOTIFY is selected but not CHAR_PROP_BROADCAST nor CHAR_PROP_EXT, then the Client Characteristic Configuration Descriptor attribute handle is Char_Handle + 2.
Best Regards,
2023-02-20 09:34 AM
Hello,
The command aci_gatt_add_char_desc is used when you have to create several instances of the same characteristic.
In your case, I think you search the Client Characteristic Configuration Descriptor (CCCD) to enable or disable the notification. The CCCD is create when you add your characteristic through aci_gatt_add_char command.
The command returns the handle of the declaration attribute. The attribute that holds the Characteristic Value is always allocated at the next handle (Char_Handle + 1).
The Characteristic Value is immediately followed, in order, by:
For instance, if CHAR_PROP_NOTIFY is selected but not CHAR_PROP_BROADCAST nor CHAR_PROP_EXT, then the Client Characteristic Configuration Descriptor attribute handle is Char_Handle + 2.
Best Regards,