-
-
Notifications
You must be signed in to change notification settings - Fork 284
CurieBLE: BLE.scan(...) allways scans without duplicate filter #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This issue is logged as Jira 802. @sandeepmistry I think touch on this topic before. The latest Nordic stack does not have readily available support for duplicate filtering. Will investigating this issue further. |
Ok, if this is not supported by the Nordic soft device stack, the current API's are very confusing and we need to change them. |
…t issue arduino#369 1. Add the soft duplicate filter feature.
…t issue arduino#369 1. Add the soft duplicate filter feature.
…t issue arduino#369 1. Add the soft duplicate filter feature.
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.
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.
Addressed by #457 |
I've tested this with the 2.0.1 RC1 release, now a duplicate filter is present. Closing. |
In https://github.com/01org/corelibs-arduino101/blob/master/libraries/CurieBLE/examples/central/scan/scan.ino:
If I change the
BLE.scan();
line to eitherBLE.scan(true);
orBLE.scan(false);
all scan without duplicates. I expect it to only receive peripheral per Bluetooth address with the duplicate filter enabled.The text was updated successfully, but these errors were encountered: