Radio Notifications API missing functionality?
- Dominant language
- C++
- Stars
- 81
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
Recently, the Radio notification API was modified to NOT initiate radio notification when a callback is registered using [onRadioNotification](https://github.com/ARMmbed/ble/blob/master/ble/Gap.h#L981). This conforms to the documentation, which now enforces applications to execute something like the following to get Radio Notifications started:
```
ble.gap().onRadioNotification(someHandlerFunction);
ble.gap().initRadioNotification();
```
Nevertheless, the handler only really gets called when there is radio activity, such as after calling `ble.gap().startAdvertising()`. Wouldn't it be best if the radio notification is initiated inside the `onRadioNotification()` call and just modify the documentation to describe this behaviour? After all, you only register a callback because you actually want to get the callback.
Alternatively, if you want to not change the documentation, wouldnt it make sense to have a `stopRadioNotification()` API that allows you to start and stop the radio notification events whenever you want? i.e. even during the advertising process.
Contributor guide
Research direction
Start with ble/Gap.h around onRadioNotification, then trace the existing initRadioNotification flow and its interaction with startAdvertising. Compare the documented callback sequence with the observed behavior. Done requires a decided API behavior and aligned documentation, with validation of the chosen start/stop semantics.
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
- 25/100