Skip to content
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

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

blandger
Copy link
Contributor

@blandger blandger commented Sep 25, 2021

  1. I added method connect_with_timeout(&self, timeout: Duration) to Peripheral (ble device)

  2. 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.

@qwandor
Copy link
Collaborator

qwandor commented Oct 2, 2021

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 bluez-async.

@blandger
Copy link
Contributor Author

blandger commented Oct 2, 2021

Only 4 files with changes. Sorry, I can't rebase all that stuff properly.
Updated bluez-async to 0.5.0

@qwandor
Copy link
Collaborator

qwandor commented Oct 2, 2021

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.

@blandger
Copy link
Contributor Author

blandger commented Oct 9, 2021

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.

@qdot
Copy link
Contributor

qdot commented Sep 4, 2022

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?

@blandger
Copy link
Contributor Author

blandger commented Sep 4, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants