Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Download updated firmware? #12

Open
odlg opened this issue Aug 31, 2020 · 4 comments
Open

Download updated firmware? #12

odlg opened this issue Aug 31, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@odlg
Copy link

odlg commented Aug 31, 2020

Would it be possible to extend this to download new firmware for Huami devices?

@argrento
Copy link
Owner

Yes, I think it would be possible. At least I can not see any problems with implementing this feature.

@TimelessNL
Copy link

This would be a really nice feature!

I recently acquired a Mi Band 5, and I was wondering how to update the firmware in the future (while running GadgetBridge).

Since GadgetBridge is unable to distribute the firmware, the only official way to update the device is to (re)install the Mi Fit app and (re)pair the device. But this will probably also reset the auth-key?

The unofficial way would be to download them from this topic that distributes (most likely official) firmwares for the MB5 using mega.nz, but I personally would like to download the firmware's myself to ensure they are authentic.

Having huami-token to acquire the firmware/res/font files would be a nice addition 👍.

@argrento argrento added the enhancement New feature or request label Sep 7, 2020
@argrento argrento self-assigned this Sep 7, 2020
@TimelessNL
Copy link

TimelessNL commented Feb 26, 2021

@argrento, great that this feature is implemented 🥳 .
Very much appreciated.

Unfortunately there are 2 issues for me:

  1. The string here is missing a cast, which is causing:
ID of the device to check for updates (-1 for all of them): 0
Traceback (most recent call last):
  File "./huami_token.py", line 354, in <module>
    device.get_firmware(wearables[wearable_id])
TypeError: list indices must be integers or slices, not str
  1. What device did you use during development, my MiBand5 (it being on V1.0.1.84) clearly needs an update but unfortunately the script seems to suggest otherwise (I printed some of the variables to see what is being send/received):
ID of the device to check for updates (-1 for all of them): -1
Be extremely careful with downloaded files!

Checking for device 0...
{'productionSource': '257', 'deviceSource': '59', 'fontVersion': '0', 'fontFlag': '0', 'appVersion': '5.9.2-play_100355', 'firmwareVersion': 'V1.0.1.84', 'hardwareVersion': 'V0.44.18.2', 'support8Bytes': 'true'}
<Response [200]>
{'deviceType': 'ALL', 'deviceSource': 59, 'ignore': False}
No updates found!

The 5.9.2-play_100355 number seems to suggest the Zepp app and not Mi Fit. Or Am I incorrectly assuming this should work on the Mi Bands?

@argrento argrento reopened this Feb 26, 2021
@argrento
Copy link
Owner

  1. Forgot to test that case. Fixed it.
  2. I'll do some more tests with my Mi Band 5.

Zepp can work correctly with Mi Band (checked by myself). I'll try to figure out with my Mi Band 5, what's the problem.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants