Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 1 month ago.
BLE_API how to add descriptors to characteristics?
Hello.
I've analysing the examples (HeartRateService, et al) and trying to add a descriptor do the Heart Rate characteristic, but without success.
I've tried to create an attribute with:
GattCharacteristic::PresentationFormat format; ... GattAttribute(BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT, (uint8_t*)format);
And then save this attribute in an array, which I then pass to the hrmRate GattCharacteristic constructor.
One weird thing that happened: by doing this the board actually stopped advertising the 3 characteristics of the Heart Rate service, and started to only show the 1 (the heart rate characteristic).
Are there any examples of how to accomplish this?