scanner status on WinRT backend #638
-
Hi all, is there a replacement for the status attribute of the new WinRT backend? I am following the official doc but that was only for dotnet backend, and now when I try to access the status attribute of the scanner, it give me Basically, I need to stop the scanning process and the scanner the moment it found any device or encountered any error (to be more exact, get the code to continue executing after the What I have currently (which is not working):
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
You could try https://github.com/hbldh/bleak/blob/develop/examples/scanner_byname.py. You can replace the lambda filter function with something that makes sense for your device if matching by name is not suitable. |
Beta Was this translation helpful? Give feedback.
-
Maybe I didn't phrase it properly, but what I meant was the moment it found any device, it stops. Not a particular one and I have no requirements for whatever it finds. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
You could try https://github.com/hbldh/bleak/blob/develop/examples/scanner_byname.py. You can replace the lambda filter function with something that makes sense for your device if matching by name is not suitable.