-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
added Connect with timeout method on Peripheral #213
base: dev
Are you sure you want to change the base?
Conversation
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 #214 for the new version of |
Only 4 files with changes. Sorry, I can't rebase all that stuff properly. |
0ac0798
to
18eb626
Compare
18eb626
to
2560455
Compare
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. Looked through this MS docs |
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.