Comments (7)
@denics check this out - https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2462 - @psolyca and his team did an excellent job further reversing stuff and integrating it into GB.
from huawei-lpv2.
I forgot to say that I am using a Debian laptop and the honor band firmware is 1.5.53
from huawei-lpv2.
Hi @denics, I think that you are the first one to try this on Linux (using the BlueZ backend), and thus you've just hit the bug in the Bluetooth client library that I'm using: hbldh/bleak#150 . I developed my library on macOS and others have tested it on Windows - pairing is not actually required, and connection still works for bands, which haven't updated the handshake process.
I'm not sure how I can help - I'm under extreme time pressure right now, so can only make some suggestions for you to explore:
- You can try to talk to Bleak people and see if you can help them with the issue
- You can try to abstract Bleak from my code, and add support for some other library, which would work with BlueZ
As I was looking for a Bluetooth client library, unfortunately, Bleak was the only one I found to be remotely usable. There are also some others, but they are either unmaintained, or incomplete, or not cross-platform, or everything at the same time.
- https://github.com/IanHarvey/bluepy
- https://github.com/adafruit/Adafruit_Python_BluefruitLE
- https://github.com/peplin/pygatt
I think in as far as BlueZ is concerned, bluepy should work best, so you could just write a small async wrapper class that mimics Bleak interface and drop it in, to see if you can get any further with that... I'm only using some very few rudimentary functions, so it shouldn't take much time.
Hope that helps!
from huawei-lpv2.
Thank you @zyv , i'll try to explore both of your suggestions. I would really like to use gadgetbridge with my device.
from huawei-lpv2.
Hi @denics , if your end goal is to extend GadgetBridge and you are okay with Java, then maybe it will be easier for you to start rebuilding my library on top of the GadgetBridge infrastructure. The only problem is that Huawei has changed the handshake, so it has to be reverse engineered again and just porting my code 1:1 will not bring you too far.
My goal was to study the protocol first, and then create a tool that can be used on any computer, not only Android smartphones. Therefore I took Python as a fast prototyping language. But as you can see, it has some downsides too - like very sad state of support for BLE development. If you are well familiar with Android development infrastructure, then maybe it will be easier for you to build a prototype using that instead.
Just make sure to document your findings :) or maybe you could even use my wiki for your efforts...
from huawei-lpv2.
Thanks for the lead! Indeed if I find the time to reverse engineer the handshake I will put my findings in here.
from huawei-lpv2.
I'm closing this since the initial question has been answered, please feel free to ask again if there is anything I can help you with.
from huawei-lpv2.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huawei-lpv2.