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

No longer works in OSX Monterey #3

Closed
pedropombeiro opened this issue Nov 2, 2021 · 10 comments
Closed

No longer works in OSX Monterey #3

pedropombeiro opened this issue Nov 2, 2021 · 10 comments

Comments

@pedropombeiro
Copy link

pedropombeiro commented Nov 2, 2021

After upgrading from Catalina to Monterey, it seems that scan is no longer working, as no devices are listed anymore:

$ python3 -m ph4_walkingpad.main -s --debug
2021-11-02 10:12:15 pedros-macbookpro16.home.pombei.ro asyncio[49062] DEBUG Using selector: KqueueSelector
2021-11-02 10:12:15 pedros-macbookpro16.home.pombei.ro ph4_walkingpad.cmd[49062] DEBUG Starting looper for loop <_UnixSelectorEventLoop running=False closed=False debug=False>
2021-11-02 10:12:15 pedros-macbookpro16.home.pombei.ro ph4_walkingpad.pad[49062] INFO Scanning for peripherals...
2021-11-02 10:12:15 pedros-macbookpro16.home.pombei.ro bleak.backends.corebluetooth.CentralManagerDelegate[49062] DEBUG centralManagerDidUpdateState_
2021-11-02 10:12:15 pedros-macbookpro16.home.pombei.ro bleak.backends.corebluetooth.CentralManagerDelegate[49062] DEBUG Bluetooth powered on
2021-11-02 10:12:15 pedros-macbookpro16.home.pombei.ro bleak.backends.corebluetooth.CentralManagerDelegate[49062] DEBUG 'isScanning' changed
2021-11-02 10:12:20 pedros-macbookpro16.home.pombei.ro bleak.backends.corebluetooth.CentralManagerDelegate[49062] DEBUG 'isScanning' changed

NOTE: This is probably related: hbldh/bleak#635

@ph4r05
Copy link
Owner

ph4r05 commented Nov 2, 2021

Thanks for the report! I can confirm this is an existing problem in the BT lib Bleak / OSX Monterey.

Hopefully it gets fixed soon. Unfortunately, there is not much we can do about it right now.

@pedropombeiro
Copy link
Author

It looks like we need to specify the service UUID (00010203-0405-0607-0809-0a0b0c0d1912?) we want to scan for when calling Bleak.

@ph4r05
Copy link
Owner

ph4r05 commented Dec 7, 2021

thanks for suggestion @pedropombeiro. Pls did you successfully tried to use it?

@pedropombeiro
Copy link
Author

I haven't @ph4r05. I'm using a project that sits one layer above this one, so I haven't yet patched this project in that one to test it out.

@ph4r05
Copy link
Owner

ph4r05 commented Dec 7, 2021

@pedropombeiro if there is a working code that sets service uuid and manages to connect I can apply the fix. I was not able to find PoC in the referenced issue.

@ph4r05
Copy link
Owner

ph4r05 commented Dec 7, 2021

As far as I can see, there are only some monkey-patching attempts to address this issue. When Bleak has a working interface so this workaround can be used, I can incorporate the fix. So it remains unfixed for the time being.

@ph4r05
Copy link
Owner

ph4r05 commented Dec 7, 2021

After a new release with hbldh/bleak#692 is out I will give it a try

@ph4r05 ph4r05 closed this as completed in fbfdbec Jan 19, 2022
@ph4r05
Copy link
Owner

ph4r05 commented Jan 19, 2022

@pedropombeiro it works again! :)

@pedropombeiro
Copy link
Author

@pedropombeiro it works again! :)

Thanks a lot for shepherding this @ph4r05! I'll give it a try!

@ph4r05
Copy link
Owner

ph4r05 commented Jan 19, 2022

note: avoid using -a or --address, it is mandatory to scan devices first on OSX 12+, so address will be picked up after scanning finishes.

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

No branches or pull requests

2 participants