Gadgetbridge: Mi Band 2 firmware update support

Created on 8 Nov 2016  路  15Comments  路  Source: Freeyourgadget/Gadgetbridge

Hello,

this is mainly a question: I cannot find it anywhere on the Wiki, if 1) Mi Band 2 is now a really supported device by Gadgetbridge, and if 2) firmware update of Band 2 is possible via Gadgetbridge, similar to the way FW update is alreay available against Band 1-series (1A/1S etc.) devices?

device mi band 2 feature request

Most helpful comment

I updated README.md to make it clear which features for Mi2 are supported.

All 15 comments

This is not supported yet, sorry.

I updated README.md to make it clear which features for Mi2 are supported.

Just one more (small) thing: Also, under the section "Supported Devices" the bullet point

Mi Band 2 (only notifications)

should be updated (see #430).
Since it's right at the top, it might cause even more confusion.

Greetings all, I am new here so a[poligies in advance if I've posted incorrectly etc. I seen that firmware upgrade functionality has been requested for the Mi Band 2. On this device is this functionality essentuially the same as a firmware downgrade ? I.E: reverting to a older version of firmware ?

The reason I ask is, that the Mi Band 2 currently has a lot of issues with the heart rate sensor, sleep tracking and inaccurate calorie counting. Basically if you have a darker skin tone or a hairy wrist the Heart Rate sensor will fail to read your heart rate and display --x on the OLED display of the Mi band 2.

These issues were not always there, i.e: prior to Xiaomis firmware update V1.0.0.53 , the heart rate sensor was working fine, as was sleep tracking, calorie counting was also more accurate. These issues have been reported to Xiaomi via their forums by several users but they dont seem to be interested in resolving these issues or providing a method to roll back the firmware.

The last known working "good" firmware with correctly functioning heart rate sensor, sleep tracking and calorie counting was v1.0.0.39 this was bundled with Mi Fit app v2.1.9. It would beneficial to a lot of upset Mi band 2 owners if Gadgetbridge can provide the solution to downgrading back to v1.0.0.39 firmware !

I'm willing to try and help where I can , extracting firmware from the .apk etc, if anyone can asist with instructions on how to do this, I'm not a coder as such, so I probably wont be able to asist in adding the funtionality to dongrade/upgrade in gadgetbridge..Willing to help where I can though, with any testing etc.

@gsmtechUK uf you have the APK you can extract the firmware from it by using 7zip or another program that supports zip archives. You'll find a folder with name "assets" and several files with "fw" extension within. The firmware files for miband 2 have probably the name Mili_pro.fw . I don't think you can flash firmwares with GB yet, though.

@daniellegobbetti , Yes, you were right, the firmware files are pretty easy to extract from the apk they are in the assets folder. There must be some firmware version check in the Mi Fit application however, because you cant install an older version of the Mi Fit app and downgrade the firmware, but if yuo install a newer version of the Mi Fit app with new firmware, the band gets the new firmware pushed to it..
I wonder if theres a way to modify the apk and mark the older firmware as a newer version number so it gets pushed to the device,...

I'll try to have a look at it over the weekend.

I added initial code for firmware update. So far, only version 1.0.0.39 is recognized by the updater..That's also the only version I tested to install.

Installing different version should work, but you will get a warning beforehand. If you break it, you'll get to keep both pieces ;-)

See https://github.com/Freeyourgadget/Gadgetbridge/wiki/Mi-Band-Firmware-Update for how to install it.

Note: this will be in Gadgetbridge 0.15.0.

While some small things will be improved, the general support is there and the missing bits are only related to firmware updating. So I'll close this issue as implemented.

0.15.0 is tagged and should be available in F-Droid in a few days.

I did NOT test a downgrade, but I believe it will work. Please report back about successes (or lack thereof).

Oh and note, if you downgrade the firmware to 1.0.0.39 and then run Mi Fit, it might upgrade the firmware again. Not sure if it does this automatically even when you run Mi Fit <= 2.2.0 (which ships 1.0.0.39).

Again, feedback appreciated.

Many thanks for the rapid turnaround, I will test when I get a chance. Yes I believe you are right, while all versions of MiFit app dont always include a firmware update they have some sort of version check, so if you install a new version greather than v2.1.9 or 2,2.0 and you have firmware v1.0.0.39 it will autiomatically try to push the new firmware bundled wuith that particular version to the mi band 2, it was version v1.0.0.53 which caused all of the issues with HR senor and calorie tracking, sleep tracking. So if I want to keep v1.0.0.39 on the band I will have to keep miFit 2,2,0 installed and not update to any newer versions.

Latest news is that MiFit 2.2.9 is out, with a firmware upgrade whether this actually fixes any of the bugs remains to be seen.... the changelogs from xiaomi are useless.....

So.... MiFit 2.2.9 was released wth firmware 1.0.1.28 as usual...none of their exisitng bugs were fixedlike broken HR sensor (since firmware 1.0.0.53 and broken calorie count)....

  • Now the good news...Gadgetbridge 0.15.0 is on F-Droid.
  • I have succesfully managed to downgade the firmware on my Mi band 2 from the latest v1.0.1.28 to v1.0.0.39 extracted from the MiFit 2.2.0 APK .
  • My HR sensor issues now appear to be solved. I have installed MiFit 2.2.0 and all is well... I have not installed a newer version of MiFit because it will most likely force upgrade the firmware ..

Fantasitic Job cpfeiffer, many thanks for restoring my MiBand 2 to a useful state..where Xiaomi miserably failed !

Just like @maces (see #459) and @gsmtechUK reported, the firmware update to v1.0.0.39 went smoothly (although it took some nerve-racking five minutes :scream:).
I was on v1.0.0.19 before and my heart rate sensor also wasn't working. Since the update it works again. :tada:
Thanks @cpfeiffer!

How do you check firmware for compatibility? Hash? Is it possible to use your app to upload self-made firmware for mi band 2? It would be really interesting to play with it =)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bigretromike picture bigretromike  路  8Comments

ihsan-driveyello picture ihsan-driveyello  路  6Comments

RustyRaptor picture RustyRaptor  路  3Comments

Jiack214 picture Jiack214  路  4Comments

UncleInf picture UncleInf  路  3Comments