bluez-rs icon indicating copy to clipboard operation
bluez-rs copied to clipboard

Allow duplicate entries to be discovered

Open skreborn opened this issue 5 years ago • 3 comments

I'm looking for a way to continually discover beacons that use simple advertising packets to emit telemetry data (among others). Is there a way to run discovery in a way that would allow me to capture and process all these packets, even if multiple packets are sent from the same device?

skreborn avatar Mar 06 '20 12:03 skreborn

I've never tried to do something like this myself. What's the current behaviour, and how is this stopping you from achieving your goal?

laptou avatar Mar 06 '20 18:03 laptou

Right now when starting discovery, a node that is broadcasting multiple advertisement frames with different data will only be discovered once. For using beacons as a means to transfer data, the user would need to see every advertisement frame.

Furthermore, right now discovery always seems to be active, while processing beacon data would only require passive scans.

The best interface in this case would probably be an event for every incoming raw (or parsed, but complete) advertisement frame. This way the user could process the advertisement data as appropriate.

I'm not sure if I overlooked it, but right now there's no such interface, right?

dbrgn avatar Jun 05 '20 23:06 dbrgn

I believe you have to add the device using AddDevice with BackgroundScan action. Then you'll get a passive scan with multiple events.

Afaict, the kernel mgmt interface does not allow for explicitly starting a passive scan in any other way.

Please note that removing the device from the list is currently broken (#14).

oxc avatar Sep 28 '20 17:09 oxc