add API to enable notifications
- Dominant language
- C++
- Stars
- 81
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
refer to https://developer.mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/16517/?page=1#comment-38845
It could be that what's needed here is a simple API like: DiscoveredCharacteristic::enableNotification(), but then that would allow manipulation of only the CCCD. There may be other writable descriptors, which would then require a more generic API.
There's an API meant to discover descriptors for a Characteristic. https://github.com/mbedmicro/BLE_API/blob/master/ble/DiscoveredCharacteristic.h#L117
Unfortunately, we haven't implemented this for the nRF51 yet. The default implementation remains in effect: https://github.com/mbedmicro/BLE_API/blob/master/source/DiscoveredCharacteristic.cpp#L63
My thinking is that launching descriptor discovery should result in callbacks passing the DiscoveredDescriptors (which is a datatype which needs to be added to BLE_API). I'm not sure how best to handle the discovered descriptors following the callback. Perhaps they should be contained within the owning characteristic, or perhaps the user would issue reads/writes directly upon the discovered descriptors.
It would be lovely if the community comes together and proposes a solution (or even a pull request).
Contributor guide
Research direction
Read ble/DiscoveredCharacteristic.h at the descriptor-discovery API and source/DiscoveredCharacteristic.cpp at its default implementation, then review the linked forum discussion. Determine how descriptor discovery, DiscoveredDescriptors, callbacks, and subsequent reads or writes should work for the nRF51. Done means the community has settled the API design and the nRF51 implementation matches it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100