-
Notifications
You must be signed in to change notification settings - Fork 13
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
Trying on a Honor 4 Band #1
Comments
Here is what I get with LightBlue |
Hi @Nefast, sorry, but I can't be of much help here... it looks to me as if there is nothing wrong about what you are doing, other than using Windows ;-) The library that I'm using for BLE communication (Bleak) seems to be unable to enumerate services on your device on Windows. I searched their bug tracker and the only relevant issue I could find was this one: hbldh/bleak#60 - not sure if this is the same problem. I don't have Windows and can't really test my demo there. On macOS it seems to work... Bleak also supports Linux, so if you have Linux, maybe you could try if it's working any better there. Unfortunately, there basically aren't any cross-platform Python packages for BLE communication other than Bleak that I could find. All other packages are either Linux (BlueZ) or macOS (CoreBluetooth) specific, and nobody really seems to care about Windows... so I picked Bleak and hoped it would work for everybody, whereas I can do my development on macOS. Apparently not so easy... |
I'll see if adding delays/retry helps. However the error code mentioned in your links is different. |
@zyv Ok so I simply commented out the exception and it looks like it goes through
|
@Nefast oh wow, that sounds great - thanks for the info! Apparently it's indeed a bug in the BLE communication library, but since I don't use their service discovery functionality and communicate directly with proprietary Huawei service, simply commenting out the exception suffices. I presume you trimmed the log, because it just shows the first communication step (link negotiation). However, if it runs until the end without any errors and the last entry is the command sent to service 5 (time) without answer, then you are able to set time as well ;-) more to come... |
Ok so I'm a total newbie with BLE devices. Here is what I got after a few attempts. It looks like I had to turn bluetooth off on my phone and have the band in an "unpaired" state.
The text was updated successfully, but these errors were encountered: