You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jira 802, BLE Central scan() to filter Peripheral adv, git #369
New feature:
- Request from Arduino to make our Central BLE library to
scan Peripheral similar to an Apple device.
- When filter is set, advertisement from a Peripheral will
only show up once (until scan is stop and start again) with
the available() call. Otherwise, a Peripheral will appear
as often as the Central can detect its advertisement.
- Unlike an Apple device, the 101 operates under memory
constraints. Thus, the maximum number of filter entries
is limited to 20. In other words, if ther are more than
20 Peripherals, the filter will NOT be able to filter out
all the advertisement all the time. A Peripherla WILL
show up multiple times when available() is called.
Code mods:
1. BLECommon.h:
- Definition of the filter entries size.
2. BLEDeviceManager.cpp:
- Peripheral filtering initialization at
startScanningWithDuplicates().
- Added deviceInDuplicateFilterBuffer() for search a newly
detected Peripheral against a recorded list of devices.
- Added updateDuplicateFilter() to record any newly
detected Peripoheral.
- At available(), check for duplicated Peripheral prior
to return it to caller. Discard any reported Peripheral.
Record any newly detected one prior to return it to
caller.
0 commit comments