adafruit / adafruit/Adafruit_nRF52_Arduino
[Feature] Updating advertising data on the fly
- Dominant language
- C
- Stars
- 699
- Forks
- 570
- PR merge metrics
- No merged PRs in 30d
Description
It would be useful if there was an option to change advertising data on the fly (without stopping and re-starting advertising).
`sd_ble_gap_adv_set_configure` can be called even when advertising is active, so my suggestion is to add a new method `updateData()` to `BLEAdvertising`, that more or less contains this code: https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/d3f3b34319fefddf8ac67bd4a0587e189ab4cbb8/libraries/Bluefruit52Lib/src/BLEAdvertising.cpp#L341-L363
Another solution would be to have `BLEAdvertising::_start` check if advertising is already active
Contributor guide
No contributing guide indexed for this repository
Research direction
Read libraries/Bluefruit52Lib/src/BLEAdvertising.cpp around lines 341-363 and inspect BLEAdvertising::_start, using the linked source as the starting point. Determine the intended API approach, then verify that advertising data can be updated while advertising remains active without stopping and restarting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100