bleak icon indicating copy to clipboard operation
bleak copied to clipboard

Feature/windows pairing

Open jpeters-ml opened this issue 3 years ago • 11 comments

Code derived from #523.

Added Windows pairing to backends .NET and WinRT. Updated pairing example to allow Windows.

jpeters-ml avatar Sep 20 '21 21:09 jpeters-ml

Thanks for this. I currently don't have any devices to test this with. Does anyone have any suggestions of something I could get (or wants to send me a spare)?

dlech avatar Oct 04 '21 17:10 dlech

Thanks for this. I currently don't have any devices to test this with. Does anyone have any suggestions of something I could get (or wants to send me a spare)?

I think some suggested a device in another thread. Let me see what I can do.

Edit: Please send me an email, to the one listed on my account.

jpeters-ml avatar Oct 05 '21 15:10 jpeters-ml

There are still some conflicts to address. This is a lot of commits to rebase on develop, but try to resolve the last conflicts and we can see if this is mergable after that!

hbldh avatar Nov 26 '21 13:11 hbldh

I would really like to get this merged in to the main code base, but I am very busy with work at the moment (and have been since the PR was reviewed). If anyone would like to assist, I do not mind granting access for them.

jpeters-ml avatar Dec 28 '21 14:12 jpeters-ml

I'm pretty interested in looking into this. If I'm understanding correctly, it is functionally complete and is just a matter of cleanup from PR comments and more testing?

tcamise-gpsw avatar Jan 11 '22 00:01 tcamise-gpsw

I'm pretty interested in looking into this. If I'm understanding correctly, it is functionally complete and is just a matter of cleanup from PR comments and more testing?

Yes, that's correct.

jpeters-ml avatar Jan 11 '22 00:01 jpeters-ml

I'm pretty interested in looking into this. If I'm understanding correctly, it is functionally complete and is just a matter of cleanup from PR comments and more testing?

Yes, that's correct.

OK cool well I'll at least try to get this working on Ubuntu and Windows and go from there.

tcamise-gpsw avatar Jan 11 '22 00:01 tcamise-gpsw

OK cool well I'll at least try to get this working on Ubuntu and Windows and go from there.

let me know if you need/want access to make changes to the branch.

jpeters-ml avatar Jan 11 '22 00:01 jpeters-ml

Is there any schedule for release this feature?

snowuyl avatar Aug 04 '22 12:08 snowuyl

I want to bring this topic back to live. I already ported the WinRT part to bleak version 0.15.1 and using it successfully for a few weeks now in my environment. What do you think about splitting this thing up in two parts, one for WinRT and one for BlueZ? I can take care of the WinRT part but unfortunately have no capacity to do it also for BlueZ.

jochenjagers avatar Sep 22 '22 09:09 jochenjagers

Splitting it into smaller pieces is always a good thing.

I can't find it now, but someone recently mentioned implementing this as an async context manager, which I think is a good idea (it's been too long, I don't remember if it is done this way already or not). So it would be used like this:

async with BleakPairingAgent(callback):
    await client.pair()

Also, since #982 was just merged, I would like to rework this to follow the pattern used by BleakClient and BleakScanner there where we have a common top-level class with a platform specific backend (depedency-injection-like).

dlech avatar Sep 22 '22 15:09 dlech

FYI, I've made some attempt to move this along in #1100. It still needs a bit of work and there are still some unresolved issues, so feedback from anyone who wants to use this feature would be appreciated.

dlech avatar Oct 31 '22 17:10 dlech

After a too long time, I found some time (and need) to get back to this feature. However, I see that in the meantime bleak has evolved so much that it would be better to start from scratch than to update my initial implementation. Moreover, I see that this was again superseded with https://github.com/hbldh/bleak/pull/1100, which puts even more thought into the implementation.

In my opinion, this PR could be closed - however major part of this PR is also done by @jpeters-ml, which should provide his opinion. I'll base my fork on the pairing-agent branch and test.

bojanpotocnik avatar Nov 15 '22 10:11 bojanpotocnik

Considering that these changes are being moved with #1100 I don't mind closing this as I haven't had the time to update.

jpeters-ml avatar Nov 15 '22 14:11 jpeters-ml

Closing in favor of https://github.com/hbldh/bleak/pull/1100

dlech avatar Nov 16 '22 16:11 dlech