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
Scan by manufacturerData #153
Comments
Android allows scanning by a mask of the manufacturer data bits: http://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setManufacturerData(int, byte[], byte[]). Do we want that too? Do we want to also allow matching just a prefix of the data? We can allow just exact matches for now, and extend the array/buffersource value to an object if/when developers ask for more. Should manufacturerData be a Map from id to array/buffersource or an object whose keys are the id? e.g. filters: [{ manufacturerData: {0x0043: [0xcf, 0x19, 0x00, 0x09, 0x01, 0x00]} }]
filters: [{ manufacturerData: new Map([[0x0043, [0xcf, 0x19, 0x00, 0x09, 0x01, 0x00]]] }]
filters: [{ manufacturerData: {0x0043: new UInt8Array([0xcf, 0x19, 0x00, 0x09, 0x01, 0x00])} }]
filters: [{
manufacturerData: {
0x0043: {
bits: new UInt8Array([0xcf, 0x19, 0x00, 0x09, 0x01, 0x00]),
mask: new UInt8Array([0xff, 0xff, 0x00, 0xff, 0xff, 0x00]),
matchType: 'prefix',
}
}] I'm leaning toward using an object, and allowing |
A simple |
We should also allow filtering by Service Data. |
I believe we can close this issue since #265 has been merged and handle |
It would be nice to be able to scan with filters on manufacturer data.
Here's how it would look like for the Rolling Spider Drone:
According to https://github.com/voodootikigod/node-rolling-spider/blob/8996973eaee36be829d984d4ee7e37b0152b379d/lib/drone.js#L94
The text was updated successfully, but these errors were encountered: