btleplug icon indicating copy to clipboard operation
btleplug copied to clipboard

Windows showing devices no longer advertising

Open FalsePsyche opened this issue 1 year ago • 0 comments

Hi all, we use btleplug in a tauri app, specifically for desktop. This crate works really well and we are very happy with it.

There is one issue we are coming across that I am hoping to get more clarification on. When scanning, specifically on Windows (have not tested this on Linux or Mac), a device will be shown even after the device is completely powered off and no longer advertising. We call start_scan() and then call peripherals() periodically (every second or so). This will show devices that are no longer advertising. But once we call stop_scan(), then start_scan() and peripherals() again, the device (that is completely off) will be gone. I feel like this question is a dumb one, but is there a way to filter out devices that are no longer advertising? Based on what I've read in this repo, this is a complicated subject and likely something that Windows is doing that we won't be able to control.

I appreciate all the hard work!

FalsePsyche avatar Oct 29 '24 18:10 FalsePsyche