added Connect with timeout method on Peripheral
-
I added method
connect_with_timeout(&self, timeout: Duration)to Peripheral (ble device) -
Looks like bluez/async changed enum variant to
DeviceEvent::Rssi
Checked on linux only. I don't know how to implement that for Windows, macOS though.
I'm not sure what you've done here, but you've somehow included a bunch of other commits. Can you rebase so this only has your new commits? You probably want to rebase on top of https://github.com/deviceplug/btleplug/pull/214 for the new version of bluez-async.
Only 4 files with changes. Sorry, I can't rebase all that stuff properly. Updated bluez-async to 0.5.0
Okay, I've rebased for you and fixed the formatting. The build is still broken on MacOS and Windows though, you'll need to implement the new method on all three platforms before we can merge this.
I looked at windows-rs MS code and docs (around BLEDevice) and I don't see the clear way to introduce 'connect timeout' using exposed Win API. I'll appreciate If someone can give a right direction.
This needs rebasing again, and I'm still not sure the lack of windows/macOS has been addressed, plus now we also need to consider android?
I looked MS docs for making such 'connect variant' and don't see simple approach to implement that. I hope that is possible but don't have a good idea how to combine timeout with the ble win api. I have capabilities to test such thing locally too. As for MacOs I don't have any ability to implement and check such functionality at all, sorry. I didn't see Android sources yet to think on that.
Looked through this MS docs https://microsoft.github.io/windows-docs-rs/doc/windows/Devices/Bluetooth/index.html
This never got updated for the newer platforms, and we've moved on enough that it probably needs a full rebuild if it's going to happen. Closing, can open a new impl PR if one happens.