Support firmware update with Mi1S #234

Closed
opened 6 years ago by cpfeiffer · 75 comments
Owner

So far, only Mi and Mi1A are supported -- we should support fw update with Mi1S as well.

So far, only Mi and Mi1A are supported -- we should support fw update with Mi1S as well.
Poster
Owner

Note that the Mili_hr.fw is actually two firmwares in one: one for the Mi Band, one for the heartrate sensor. The contents need to be dissected and updated separately.

Note that the Mili_hr.fw is actually two firmwares in one: one for the Mi Band, one for the heartrate sensor. The contents need to be dissected and updated separately.
wanderer commented 5 years ago (Migrated from github.com)
Owner

👍

:+1:
Poster
Owner

I have a first working version of firmware update. At least I managed to update the heartrate firmware and now I even get a heartrate that is != 0.

I didn't update the mi band firmware yet, so I'm now at 1.3.74.64 (hr) and 4.15.11.19 (mi).

I have a first working version of firmware update. At least I managed to update the heartrate firmware and now I even get a heartrate that is != 0. I didn't update the mi band firmware yet, so I'm now at 1.3.74.64 (hr) and 4.15.11.19 (mi).
Poster
Owner

Needs some more love, verification and testing before I can push this.

Needs some more love, verification and testing before I can push this.
wanderer commented 5 years ago (Migrated from github.com)
Owner

I have an Mi1S let me know if you need a tester :)

I have an Mi1S let me know if you need a tester :)
Poster
Owner

Thanks, will do.

Thanks, will do.
Poster
Owner

@wanderer and everyone else:

FYI, the current status of firmware update for Mi1S is this:

  • I have successfully performed an HR firmware update
  • since the Mi1S firmware file (Mili_hr.fw) is actually two firmwares in one (HR + Mi), we have implemented double firmware update: first HR, then Mi in one go
  • we have successfully tested single firmware updates (Mi1 and Mi1A) after adding support for Mi1S fw update
  • we have automatic testcases that verify the recognition, dissecting and handling of both single and double firmware files
  • we have verified that fw recognition works for the following MiFit firmware versions: 1.5.912-1539 1.6.122-1549 1.6.352-1555 1.7.112-1573 1.7.611-1599 1.7.811-1603 1.8.111-1609. I didn't check whether there are already newer versions.
  • if we find a problem with a firmware, we fail gracefully without upgrading anything

And what's missing:

  • we haven't tested Mi1S double firmware update, yet

I won't be testing this at the moment, because I don't want to risk bricking my Mi1S before I have implemented some more heart rate functionality.

So if anyone's brave enough to test fw update on Mi1S, step up and report any problems here.

@wanderer and everyone else: FYI, the current status of firmware update for Mi1S is this: - [x] I have successfully performed an HR firmware update - [x] since the Mi1S firmware file (Mili_hr.fw) is actually two firmwares in one (HR + Mi), we have implemented double firmware update: first HR, then Mi in one go - [x] we have successfully tested single firmware updates (Mi1 and Mi1A) after adding support for Mi1S fw update - [x] we have automatic testcases that verify the recognition, dissecting and handling of both single and double firmware files - [x] we have verified that fw recognition works for the following MiFit firmware versions: 1.5.912-1539 1.6.122-1549 1.6.352-1555 1.7.112-1573 1.7.611-1599 1.7.811-1603 1.8.111-1609. I didn't check whether there are already newer versions. - [x] if we find a problem with a firmware, we fail gracefully without upgrading anything And what's missing: - [ ] we haven't tested Mi1S double firmware update, yet I won't be testing this at the moment, because I don't want to risk bricking my Mi1S before I have implemented some more heart rate functionality. So if anyone's brave enough to test fw update on Mi1S, step up and report any problems here.
bigretromike commented 5 years ago (Migrated from github.com)
Owner

Could you post instruction how to try it out ?:-)
Maybe I would be brave enough but have no idea how to try it ;-)

Could you post instruction how to try it out ?:-) Maybe I would be brave enough but have no idea how to try it ;-)
Poster
Owner

I don't have a link right now, but in the wiki there's a page describing how to do it. Make sure to turn on logging before, so that we have some information if anything goes wrong.

I don't have a link right now, but in the wiki there's a page describing how to do it. Make sure to turn on logging before, so that we have some information if anything goes wrong.
bigretromike commented 5 years ago (Migrated from github.com)
Owner

This link: https://github.com/Freeyourgadget/Gadgetbridge/wiki/Mi-Band-Firmware-Update

MiFit 2.0.4
24d8b84f8964489b893d1cb4581dc85f *Mili_hr.fw - 04.15.12.10

But how to check what version is it other than md5 and check list in wiki?
Can I overwrite the same version when updating?

This link: https://github.com/Freeyourgadget/Gadgetbridge/wiki/Mi-Band-Firmware-Update MiFit 2.0.4 24d8b84f8964489b893d1cb4581dc85f *Mili_hr.fw - 04.15.12.10 But how to check what version is it other than md5 and check list in wiki? Can I overwrite the same version when updating?
Poster
Owner

Gadgetbridge will tell you the version numbers. And you can install any version, even the version currently installed.

Gadgetbridge will tell you the version numbers. And you can install any version, even the version currently installed.
Poster
Owner

Note: there was a small bug in the update code that would prevent the second firmware to be updated. No harm done, but only the HR firmware would be updated with 0.9.0 and 0.9.1. This is fixed for 0.9.2.

Note: there was a small bug in the update code that would prevent the second firmware to be updated. No harm done, but only the HR firmware would be updated with 0.9.0 and 0.9.1. This is fixed for 0.9.2.
wanderer commented 5 years ago (Migrated from github.com)
Owner

I'm waiting for 0.9.2 to be pushed to f-droid

I'm waiting for 0.9.2 to be pushed to f-droid
Owner

@wanderer
If it's not clear, we have no influence on when fdroid's build server builds our project.

All we do is tagging and and waiting.
And 0.9.2 is tagged.

@wanderer If it's not clear, we have no influence on when fdroid's build server builds our project. All we do is tagging and and waiting. And 0.9.2 is tagged.
wanderer commented 5 years ago (Migrated from github.com)
Owner

ok 0.9.2 is on f-droid now. So i tried (twice) to update the firmware (using 04.15.12.10 for the 1s) and it seems to get stuck at the end. Here is a screenshot
screenshot_2016-03-27-21-15-20

It doesn't brick the device and the heart rate monitor is working now (it wasn't before). It just gets stuck there.

ok 0.9.2 is on f-droid now. So i tried (twice) to update the firmware (using 04.15.12.10 for the 1s) and it seems to get stuck at the end. Here is a screenshot ![screenshot_2016-03-27-21-15-20](https://cloud.githubusercontent.com/assets/158211/14069011/486b1a2c-f461-11e5-87fc-e30364660191.png) It doesn't brick the device and the heart rate monitor is working now (it wasn't before). It just gets stuck there.
Poster
Owner

Awesome, thanks a lot for trying it! Do you have a log file of the update process? If you don't know how to do that, there is a wiki page about this.

Thanks a bunch again!

Awesome, thanks a lot for trying it! Do you have a log file of the update process? If you don't know how to do that, there is a wiki page about this. Thanks a bunch again!
Poster
Owner

Oh and what fw versions does it display now?

Oh and what fw versions does it display now?
wanderer commented 5 years ago (Migrated from github.com)
Owner

Oh and what fw versions does it display now?

@cpfeiffer its says 4.15.11.19 (i tried to install 04.15.12.10 - 24d8b84f8964489b893d1cb4581dc85f

I didn't have logging turned on, so I just ran the update again with logging here are the results
log1.txt

> Oh and what fw versions does it display now? @cpfeiffer its says 4.15.11.19 (i tried to install 04.15.12.10 - 24d8b84f8964489b893d1cb4581dc85f I didn't have logging turned on, so I just ran the update again with logging here are the results [log1.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/191945/log1.txt)
Poster
Owner

Your log is very weird. Exactly the interesting part is missing (after 09:19:51.211). The following entries are all unrelated to fw update.

Your log is very weird. Exactly the interesting part is missing (after 09:19:51.211). The following entries are all unrelated to fw update.
wanderer commented 5 years ago (Migrated from github.com)
Owner

@cpfeiffer yeah it got stuck on the "update firmware..." screen. Which it didn't do last last time.

@cpfeiffer yeah it got stuck on the "update firmware..." screen. Which it didn't do last last time.
wanderer commented 5 years ago (Migrated from github.com)
Owner

screenshot_2016-03-28-19-50-51

it gets stuck here now. I see "metadata successfully sent" then that is it

![screenshot_2016-03-28-19-50-51](https://cloud.githubusercontent.com/assets/158211/14093785/75b49978-f51e-11e5-8c73-df51f84be61b.png) it gets stuck here now. I see "metadata successfully sent" then that is it
wanderer commented 5 years ago (Migrated from github.com)
Owner

@cpfeiffer yeah that log isn't right, im running it again. I'll have an update soon

@cpfeiffer yeah that log isn't right, im running it again. I'll have an update soon
wanderer commented 5 years ago (Migrated from github.com)
Owner

@cpfeiffer this should be more intersting :)

gadgetbridge.txt

@cpfeiffer this should be more intersting :) [gadgetbridge.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/192749/gadgetbridge.txt)
Poster
Owner

Thanks, I'm analyzing it right now.

Thanks, I'm analyzing it right now.
Poster
Owner

FWIW, I have a fix and will push it for 0.9.3 rsn.

FWIW, I have a fix and will push it for 0.9.3 rsn.
Poster
Owner

0.9.3 with the fix is on f-droid :-)

0.9.3 with the fix is on f-droid :-)
wanderer commented 5 years ago (Migrated from github.com)
Owner

@cpfeiffer
it seems to get stuck on this now

13:25:09.054 [GadgetBridge GATT Dispatcher] DEBUG n.f.g.s.b.BtLEQueue - About to run action: 30 March 1:20 pm: WriteAction on characteristic: 0000ff08-0000-1000-8000-00805f9b34fb

also note; i updated my firmware with the official app, so now we going from 04.15.12.10 -> 04.15.12.10... let me know if have to downgrade the firmware first

gadgetbridge.txt

@cpfeiffer it seems to get stuck on this now ``` 13:25:09.054 [GadgetBridge GATT Dispatcher] DEBUG n.f.g.s.b.BtLEQueue - About to run action: 30 March 1:20 pm: WriteAction on characteristic: 0000ff08-0000-1000-8000-00805f9b34fb ``` also note; i updated my firmware with the official app, so now we going from 04.15.12.10 -> 04.15.12.10... let me know if have to downgrade the firmware first [gadgetbridge.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196072/gadgetbridge.txt)
bofhbug commented 5 years ago (Migrated from github.com)
Owner

@cpfeiffer can you please re-enable the loging, as so its a totaly blind update...
`- LOG.info("Firmware update progress:" + firmwareProgress + " total len:" + len + " progress:" + (firmwareProgress / len));

  •        if (firmwareProgress >= len) {
    
  •            builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT), new byte[]{MiBandService.COMMAND_SYNC});
    
  •        } else {
    
  •            GB.updateInstallNotification(getContext().getString(R.string.updatefirmwareoperation_write_failed), false, 0, getContext());`
    
    8815f0d134
@cpfeiffer can you please re-enable the loging, as so its a totaly blind update... `- LOG.info("Firmware update progress:" + firmwareProgress + " total len:" + len + " progress:" + (firmwareProgress / len)); - if (firmwareProgress >= len) { - builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT), new byte[]{MiBandService.COMMAND_SYNC}); - } else { - GB.updateInstallNotification(getContext().getString(R.string.updatefirmwareoperation_write_failed), false, 0, getContext());` https://github.com/Freeyourgadget/Gadgetbridge/commit/8815f0d134e19648b664be12d709fa804511b256
bofhbug commented 5 years ago (Migrated from github.com)
Owner

after the hr fw update its just hangs / or dont log out anyfing... (still wating after 20mins)
19:17:36.164 [GadgetBridge GATT Dispatcher] DEBUG n.f.g.s.b.BtLEQueue - About to run action: 30 March 19:12: WriteAction on characteristic: 0000ff05-0000-1000-8000-00805f9b34fb
19:17:44.741 [Binder_3] DEBUG n.f.g.s.b.BtLEQueue - characteristic write: 0000ff05-0000-1000-8000-00805f9b34fb (success)
19:17:44.742 [Binder_3] INFO n.f.g.s.d.m.MiBandSupport - handleControlPoint write status:0
19:17:44.742 [Binder_3] INFO n.f.g.s.d.m.MiBandSupport - handleControlPoint WROTE DATA:0x b
19:19:16.255 [Binder_1] DEBUG n.f.g.s.b.BtLEQueue - characteristic changed: 0000ff03-0000-1000-8000-00805f9b34fb value: 0x2
19:19:16.256 [Binder_1] INFO n.f.g.u.GB - Heart Rate Firmware successfully updated, now updating Mi Band Firmware
19:19:16.257 [Binder_1] DEBUG n.f.g.s.b.BtLEQueue - about to add: 19:19:16: Transaction task: send firmware info with 3 actions

D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): About to run action: 30 March 19:12: WriteAction on characteristic: 0000ff05-0000-1000-8000-00805f9b34fb
D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): characteristic write: 0000ff05-0000-1000-8000-00805f9b34fb (success)
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint write status:0
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x b
W/PackageManager( 1560): Failure retrieving resources for nodomain.freeyourgadget.gadgetbridge: Resource ID #0x0
I/Timeline( 1124): Timeline: Activity_windows_visible id: ActivityRecord{2e5fad86 u0 nodomain.freeyourgadget.gadgetbridge/.activities.FwAppInstallerActivity t584} time:8341133
D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): characteristic changed: 0000ff03-0000-1000-8000-00805f9b34fb value: 0x2
I/nodomain.freeyourgadget.gadgetbridge.util.GB(23158): Heart Rate Firmware successfully updated, now updating Mi Band Firmware
D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): about to add: 19:19:16: Transaction task: send firmware info with 3 actions
D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): About to run action: 30 March 19:19: nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceBusyAction: Updating Firmware…
W/nodomain.freeyourgadget.gadgetbridge.impl.GBDevice(23158): Attempt to mark device as busy with: Updating Firmware…, but is already busy with: Updating Firmware…
I/nodomain.freeyourgadget.gadgetbridge.impl.GBDevice(23158): Mark device as busy: Updating Firmware…
D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): About to run action: 30 March 19:19: WriteAction on characteristic: 0000ff05-0000-1000-8000-00805f9b34fb
I/nodomain.freeyourgadget.gadgetbridge.service.DeviceCommunicationService(23158): Setting broadcast receivers to: true
D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): characteristic changed: 0000ff03-0000-1000-8000-00805f9b34fb value: 0xc
D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): characteristic write: 0000ff05-0000-1000-8000-00805f9b34fb (success)
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint write status:0
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 7
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 7
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 3
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 10
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 4
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x a
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x c
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x f
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 4
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x a8
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 90
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 6a
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x c1
I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 0
D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): About to run action: 30 March 19:19: FirmwareInfoSucceededAction

after the hr fw update its just hangs / or dont log out anyfing... (still wating after 20mins) 19:17:36.164 [GadgetBridge GATT Dispatcher] DEBUG n.f.g.s.b.BtLEQueue - About to run action: 30 March 19:12: WriteAction on characteristic: 0000ff05-0000-1000-8000-00805f9b34fb 19:17:44.741 [Binder_3] DEBUG n.f.g.s.b.BtLEQueue - characteristic write: 0000ff05-0000-1000-8000-00805f9b34fb (success) 19:17:44.742 [Binder_3] INFO n.f.g.s.d.m.MiBandSupport - handleControlPoint write status:0 19:17:44.742 [Binder_3] INFO n.f.g.s.d.m.MiBandSupport - handleControlPoint WROTE DATA:0x b 19:19:16.255 [Binder_1] DEBUG n.f.g.s.b.BtLEQueue - characteristic changed: 0000ff03-0000-1000-8000-00805f9b34fb value: 0x2 19:19:16.256 [Binder_1] INFO n.f.g.u.GB - Heart Rate Firmware successfully updated, now updating Mi Band Firmware 19:19:16.257 [Binder_1] DEBUG n.f.g.s.b.BtLEQueue - about to add: 19:19:16: Transaction task: send firmware info with 3 actions D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): About to run action: 30 March 19:12: WriteAction on characteristic: 0000ff05-0000-1000-8000-00805f9b34fb D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): characteristic write: 0000ff05-0000-1000-8000-00805f9b34fb (success) I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint write status:0 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x b W/PackageManager( 1560): Failure retrieving resources for nodomain.freeyourgadget.gadgetbridge: Resource ID #0x0 I/Timeline( 1124): Timeline: Activity_windows_visible id: ActivityRecord{2e5fad86 u0 nodomain.freeyourgadget.gadgetbridge/.activities.FwAppInstallerActivity t584} time:8341133 D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): characteristic changed: 0000ff03-0000-1000-8000-00805f9b34fb value: 0x2 I/nodomain.freeyourgadget.gadgetbridge.util.GB(23158): Heart Rate Firmware successfully updated, now updating Mi Band Firmware D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): about to add: 19:19:16: Transaction task: send firmware info with 3 actions D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): About to run action: 30 March 19:19: nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceBusyAction: Updating Firmware… W/nodomain.freeyourgadget.gadgetbridge.impl.GBDevice(23158): Attempt to mark device as busy with: Updating Firmware…, but is already busy with: Updating Firmware… I/nodomain.freeyourgadget.gadgetbridge.impl.GBDevice(23158): Mark device as busy: Updating Firmware… D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): About to run action: 30 March 19:19: WriteAction on characteristic: 0000ff05-0000-1000-8000-00805f9b34fb I/nodomain.freeyourgadget.gadgetbridge.service.DeviceCommunicationService(23158): Setting broadcast receivers to: true D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): characteristic changed: 0000ff03-0000-1000-8000-00805f9b34fb value: 0xc D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): characteristic write: 0000ff05-0000-1000-8000-00805f9b34fb (success) I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint write status:0 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 7 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 7 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 3 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 10 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 4 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x a I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x c I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x f I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 4 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x a8 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 90 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 6a I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x c1 I/nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport(23158): handleControlPoint WROTE DATA:0x 0 D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue(23158): About to run action: 30 March 19:19: FirmwareInfoSucceededAction
Poster
Owner

@bofhbug Thanks for testing this! Will have a look at your output in a minute.

The logging there was bogus, so I removed it. The builder.xxx (e.g. write()) operations are double asynchronous:

  • they are first added to the builder altogether
  • only the call to queue() will actually pass all the actions into BtLEQueue, which will then dispatch them one at a time in a separate thread
  • and then, the actual BTLE writes are async as well.

The LOG statements between the writes were executed too early, way before any BT communication happened.

But I also changed SetProgressAction (which updates the progress bar) to log the progress. Doesn't this work?

@bofhbug Thanks for testing this! Will have a look at your output in a minute. The logging there was bogus, so I removed it. The builder.xxx (e.g. write()) operations are double asynchronous: - they are first added to the builder altogether - only the call to queue() will actually pass all the actions into BtLEQueue, which will then dispatch them one at a time in a separate thread - and then, the actual BTLE writes are async as well. The LOG statements between the writes were executed too early, way before any BT communication happened. But I also changed SetProgressAction (which updates the progress bar) to log the progress. Doesn't this work?
Poster
Owner

@bofhbug the log looks quite OK actually, even though it could indeed be a little more verbose.
AFAICS it updated hr firmware successfully and then sends metadata for the mi band firmware, which is accepted (receives 0xc = MibandService.NOTIFY_FW_CHECK_SUCCESS on ff03).

I'm surprised that this success is not logged though. Might be that the listener is not attached anymore so the notification is not reacted upon.

@bofhbug the log looks quite OK actually, even though it could indeed be a little more verbose. AFAICS it updated hr firmware successfully and then sends metadata for the mi band firmware, which is accepted (receives 0xc = MibandService.NOTIFY_FW_CHECK_SUCCESS on ff03). I'm surprised that this success is not logged though. Might be that the listener is not attached anymore so the notification is not reacted upon.
Poster
Owner

@bofhbug oh, could it be that you don't have debug logging turned on in Gadgetbridge? If you enable it, you will get verbose log output, see here.

@bofhbug oh, could it be that you don't have debug logging turned on in Gadgetbridge? If you enable it, you will get verbose log output, see [here](https://github.com/Freeyourgadget/Gadgetbridge/wiki/Log-Files).
Poster
Owner

@wanderer writing the same firmware again should be no problem, I did that already with Mi 1A. Thanks for testing, checking your log file now.

@wanderer writing the same firmware again should be no problem, I did that already with Mi 1A. Thanks for testing, checking your log file now.
Poster
Owner

@wanderer your log somehow ends in the middle of sending the data (the heart rate firmware, AFAICS). No idea why this happens, but this is unrelated to the latest changes.

@wanderer your log somehow ends in the middle of sending the data (the heart rate firmware, AFAICS). No idea why this happens, but this is unrelated to the latest changes.
bofhbug commented 5 years ago (Migrated from github.com)
Owner

@cpfeiffer shure i turned on the debug logging in Gadgetbridge ;)
but i was only abel to turn it on with FORCE STOP (via android app info) as quit only dont workd
gadgetbridge_2016-03-30_snip.log.txt
gadgetbridge093_catlog_2016-03-30.txt

@cpfeiffer shure i turned on the debug logging in Gadgetbridge ;) but i was only abel to turn it on with FORCE STOP (via android app info) as quit only dont workd [gadgetbridge_2016-03-30_snip.log.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196189/gadgetbridge_2016-03-30_snip.log.txt) [gadgetbridge093_catlog_2016-03-30.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196190/gadgetbridge093_catlog_2016-03-30.txt)
Poster
Owner

@bofhbug thanks for the update! One weird thing in your log is the order in which bluetooth gatt events are received at the low level.

We first write some meta info, then we get an event from the mi band telling us that the meta info is correct, and only then we get an OK from the Android bluetooth API that the meta info writes actually succeeded.

This is unexpected, although I don't know if this is actually the cause for the problem. Interestingly this only happens for the mi band firmware; for the hr firmware we get the events in the other (expected order).

@bofhbug thanks for the update! One weird thing in your log is the order in which bluetooth gatt events are received at the low level. We first write some meta info, then we get an event from the mi band telling us that the meta info is correct, and _only then_ we get an OK from the Android bluetooth API that the meta info writes actually succeeded. This is unexpected, although I don't know if this is actually the cause for the problem. Interestingly this only happens for the mi band firmware; for the hr firmware we get the events in the other (expected order).
bofhbug commented 5 years ago (Migrated from github.com)
Owner

i have also logs form Gadgetbridge 0.92, if needed

i have also logs form Gadgetbridge 0.92, if needed
bofhbug commented 5 years ago (Migrated from github.com)
Owner

Could you make that the notifications shown as toasts while updating the fw, but also be shown on the update-screen with time stamp etc. so that this information is still visible after updating the app was successful?

Could you make that the notifications shown as toasts while updating the fw, but also be shown on the update-screen with time stamp etc. so that this information is still visible after updating the app was successful?
Poster
Owner

Yeah, that would be useful.

Yeah, that would be useful.
Poster
Owner

After staring another minute, I found the problem. It's indeed an order/timing problem. Will fix in a few minutes.

After staring another minute, I found the problem. It's indeed an order/timing problem. Will fix in a few minutes.
bofhbug commented 5 years ago (Migrated from github.com)
Owner
[gadgetbridge0.9.2_up.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196315/gadgetbridge0.9.2_up.txt)
Poster
Owner

The last commit fixes the mentioned problem. Can you build from source yourself or do you need to wait for a new release?

The last commit fixes the mentioned problem. Can you build from source yourself or do you need to wait for a new release?
Poster
Owner

Oh, btw, with "that would be useful" I mentioned the displaying of the firmware update results in the view, rather than the 0.9.2 logfile. Sorry :-}

Oh, btw, with "that would be useful" I mentioned the displaying of the firmware update results in the view, rather than the 0.9.2 logfile. Sorry :-}
bofhbug commented 5 years ago (Migrated from github.com)
Owner

i tryd to build it my selfe with AIDE but it dont got it working.
https://play.google.com/store/apps/details?id=com.aide.ui&referrer=utm_source%3Daidewebsite%26utm_campaign%3Dhomepage

if you have a link to a virtualbox vm image, i can try the build for my self

i tryd to build it my selfe with AIDE but it dont got it working. https://play.google.com/store/apps/details?id=com.aide.ui&referrer=utm_source%3Daidewebsite%26utm_campaign%3Dhomepage if you have a link to a virtualbox vm image, i can try the build for my self
Poster
Owner

Wow, I didn't know AIDE.

If you download Android Studio and a JDK (Oracle JDK is preferred by Android Studio) to your PC, run it and install the necessary Android SDKs (23 and 19) you can build Gadgetbridge either from Android Studio directly ("Debug app", which will also install Gadgetbridge on your connected device) or simply by executing in the Gadgetbridge directory
./gradlew packageDebug
adb install ./app/build/outputs/apk/app-debug-unaligned.apk
Note that the apk conflicts with your previous (f-droid) version, so you would need to uninstall that and you would lose the configuration and data of your previous Gadgetbridge installation.

An alternative to building yourself might be https://jitpack.io/

Sorry, we don't have a virtualbox image at the moment.

Wow, I didn't know AIDE. If you download [Android Studio](http://tools.android.com/download/studio) and a JDK ([Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html) is preferred by Android Studio) to your PC, run it and install the necessary Android SDKs (23 and 19) you can build Gadgetbridge either from Android Studio directly ("Debug app", which will also install Gadgetbridge on your connected device) or simply by executing in the Gadgetbridge directory `./gradlew packageDebug` `adb install ./app/build/outputs/apk/app-debug-unaligned.apk` Note that the apk conflicts with your previous (f-droid) version, so you would need to uninstall that and you would lose the configuration and data of your previous Gadgetbridge installation. An alternative to building yourself might be https://jitpack.io/ Sorry, we don't have a virtualbox image at the moment.
bofhbug commented 5 years ago (Migrated from github.com)
Owner

ok after houers to get the Android Studio to compile the apk without error, its flash borth fw.
but not in all combinations... so with some hw fw versionen the hr flash faild and than its not posibil to flash an other hw fw...
with trying diferent mi fit versions, i was abel to get an working/flashabel state again.
logfiles get uploadet later

ok after houers to get the Android Studio to compile the apk without error, its flash borth fw. but not in all combinations... so with some hw fw versionen the hr flash faild and than its not posibil to flash an other hw fw... with trying diferent mi fit versions, i was abel to get an working/flashabel state again. logfiles get uploadet later
bofhbug commented 5 years ago (Migrated from github.com)
Owner

the firmware ver. / mi fit ver.
24d8b84f8964489b893d1cb4581dc85f 1.8.771base/assets/Mili_hr.fw
24d8b84f8964489b893d1cb4581dc85f Mili_hr_04.15.12.10__1.3.74.64_form_2.0.4-2034.fw
24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_1.8.511-1613_minAPI18(armeabi)(nodpi)/assets/Mili_hr04.15.12.10.fw
24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_1.8.711-1610_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_1.8.711-1615_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_2.0.0-2027_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_2.0.1-2029_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_2.0.4-2034_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
36a2fc74a9f91b0d41f4e0ac6600b2ae Mili_hr_4.15.11.7__1.3.73.16_form_1.7.521-1595.fw
36a2fc74a9f91b0d41f4e0ac6600b2ae com.xiaomi.hm.health_1.7.521-1595_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
394a9994a5640a076ffd5cb1371a2274 Mi_Fit_2.0.4_ios_ipk_firmwarefiles_form_MiFit.app_2016-03-27/assets/Mili_hr.fw
394a9994a5640a076ffd5cb1371a2274 Mili_hr_04.16.3.7__1.3.76.20_form_2.0.4_ios_ipk.fw
7be80f0061efdf660e25a2d7cb3b6660 Mili_hr_04.15.11.20__1.3.73.16_from_1.8.441-1609.fw
7be80f0061efdf660e25a2d7cb3b6660 com.xiaomi.hm.health_1.7.811-1603_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
7be80f0061efdf660e25a2d7cb3b6660 com.xiaomi.hm.health_1.8.111-1609_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
7be80f0061efdf660e25a2d7cb3b6660 com.xiaomi.hm.health_1.8.441-1609_minAPI18(armeabi)(nodpi)/assets/Mili_hr04.15.11.20.fw
cc6928d907578f6a623418a871c19ad5 Mili_hr_4.15.11.13__1.3.73.16_form_1.7.611-1599.fw
cc6928d907578f6a623418a871c19ad5 com.xiaomi.hm.health_1.7.611-1599_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
d12f48b107b17977e6036cc334de275d Mili_hr_04.15.5.14__1.3.68.81_form_1.6.352-1555.fw
d12f48b107b17977e6036cc334de275d com.xiaomi.hm.health-1.6.122-1549-minAPI18/assets/Mili_hr.fw
d12f48b107b17977e6036cc334de275d com.xiaomi.hm.health-1.6.352-1555-minAPI18/assets/Mili_hr.fw
e0415c2240b429c932c8f97b5d600699 Mili_hr_04.15.9.30__1.3.73.5_form_1.7.421-1588.fw
e0415c2240b429c932c8f97b5d600699 com.xiaomi.hm.health_1.7.112-1573_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
e0415c2240b429c932c8f97b5d600699 com.xiaomi.hm.health_1.7.421-1588_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw

the firmware ver. / mi fit ver. 24d8b84f8964489b893d1cb4581dc85f 1.8.771base/assets/Mili_hr.fw 24d8b84f8964489b893d1cb4581dc85f Mili_hr_04.15.12.10__1.3.74.64_form_2.0.4-2034.fw 24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_1.8.511-1613_minAPI18(armeabi)(nodpi)/assets/Mili_hr04.15.12.10.fw 24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_1.8.711-1610_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw 24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_1.8.711-1615_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw 24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_2.0.0-2027_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw 24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_2.0.1-2029_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw 24d8b84f8964489b893d1cb4581dc85f com.xiaomi.hm.health_2.0.4-2034_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw 36a2fc74a9f91b0d41f4e0ac6600b2ae Mili_hr_4.15.11.7__1.3.73.16_form_1.7.521-1595.fw 36a2fc74a9f91b0d41f4e0ac6600b2ae com.xiaomi.hm.health_1.7.521-1595_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw 394a9994a5640a076ffd5cb1371a2274 Mi_Fit_2.0.4_ios_ipk_firmwarefiles_form_MiFit.app_2016-03-27/assets/Mili_hr.fw 394a9994a5640a076ffd5cb1371a2274 Mili_hr_04.16.3.7__1.3.76.20_form_2.0.4_ios_ipk.fw 7be80f0061efdf660e25a2d7cb3b6660 Mili_hr_04.15.11.20__1.3.73.16_from_1.8.441-1609.fw 7be80f0061efdf660e25a2d7cb3b6660 com.xiaomi.hm.health_1.7.811-1603_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw 7be80f0061efdf660e25a2d7cb3b6660 com.xiaomi.hm.health_1.8.111-1609_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw 7be80f0061efdf660e25a2d7cb3b6660 com.xiaomi.hm.health_1.8.441-1609_minAPI18(armeabi)(nodpi)/assets/Mili_hr04.15.11.20.fw cc6928d907578f6a623418a871c19ad5 Mili_hr_4.15.11.13__1.3.73.16_form_1.7.611-1599.fw cc6928d907578f6a623418a871c19ad5 com.xiaomi.hm.health_1.7.611-1599_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw d12f48b107b17977e6036cc334de275d Mili_hr_04.15.5.14__1.3.68.81_form_1.6.352-1555.fw d12f48b107b17977e6036cc334de275d com.xiaomi.hm.health-1.6.122-1549-minAPI18/assets/Mili_hr.fw d12f48b107b17977e6036cc334de275d com.xiaomi.hm.health-1.6.352-1555-minAPI18/assets/Mili_hr.fw e0415c2240b429c932c8f97b5d600699 Mili_hr_04.15.9.30__1.3.73.5_form_1.7.421-1588.fw e0415c2240b429c932c8f97b5d600699 com.xiaomi.hm.health_1.7.112-1573_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw e0415c2240b429c932c8f97b5d600699 com.xiaomi.hm.health_1.7.421-1588_minAPI18(armeabi)(nodpi)/assets/Mili_hr.fw
bofhbug commented 5 years ago (Migrated from github.com)
Owner
16mb debug logs and catlogs... [gadgetbridge-logcat_2016-03-30-2100.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196952/gadgetbridge-logcat_2016-03-30-2100.txt) [gadgetbridge-logcat_2016-03-31-0400.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196954/gadgetbridge-logcat_2016-03-31-0400.txt) [gadgetbridge-logcat_2016-03-31-0500.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196955/gadgetbridge-logcat_2016-03-31-0500.txt) [Mili_hr_fw_md5sum.md5.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196956/Mili_hr_fw_md5sum.md5.txt) [gadgetbridge-2016-03-31.1.log.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196957/gadgetbridge-2016-03-31.1.log.txt) [gadgetbridge-2016-03-31.1a.log.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196958/gadgetbridge-2016-03-31.1a.log.txt) [gadgetbridge-2016-03-31.2.log.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196953/gadgetbridge-2016-03-31.2.log.txt) [gadgetbridge-2016-03-31.2a.log.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/196959/gadgetbridge-2016-03-31.2a.log.txt)
Poster
Owner

Dude, I owe you a beer! I will digest the log ASAP, but it might not be today because of traveling.

Thanks a lot!

Dude, I owe you a beer! I will digest the log ASAP, but it might not be today because of traveling. Thanks a lot!
bofhbug commented 5 years ago (Migrated from github.com)
Owner

apart of the other issues, the screens at the firmware update and after this are not so clear :(
so at the moment IMHO you need the catlog / debug logs to see if the flashing was/is good or not..
photo_2016-03-31_12-55-43
photo_2016-03-31_12-55-48
photo_2016-03-31_12-55-53

apart of the other issues, the screens at the firmware update and after this are not so clear :( so at the moment IMHO you need the catlog / debug logs to see if the flashing was/is good or not.. ![photo_2016-03-31_12-55-43](https://cloud.githubusercontent.com/assets/1086634/14173804/9b0591d6-f740-11e5-872d-fee9a13b83be.jpg) ![photo_2016-03-31_12-55-48](https://cloud.githubusercontent.com/assets/1086634/14173805/9b1d123e-f740-11e5-8c7b-6ab6f3126c7b.jpg) ![photo_2016-03-31_12-55-53](https://cloud.githubusercontent.com/assets/1086634/14173806/9b3b74f4-f740-11e5-8729-5cd866af6297.jpg)
bofhbug commented 5 years ago (Migrated from github.com)
Owner

some times the device infos are not fully displayed or read out
photo_2016-03-31_12-55-14
photo_2016-03-31_12-55-33
photo_2016-03-31_12-55-39

some times the device infos are not fully displayed or read out ![photo_2016-03-31_12-55-14](https://cloud.githubusercontent.com/assets/1086634/14173851/dfc56378-f740-11e5-9207-fce764004a6d.jpg) ![photo_2016-03-31_12-55-33](https://cloud.githubusercontent.com/assets/1086634/14173853/dfc7bb5a-f740-11e5-85cc-a1f69fcaa0f6.jpg) ![photo_2016-03-31_12-55-39](https://cloud.githubusercontent.com/assets/1086634/14173852/dfc7acdc-f740-11e5-956b-3a2c598210b4.jpg)
bofhbug commented 5 years ago (Migrated from github.com)
Owner

or in the worst cace, with this FW vers. its not possibil to flash it with Gadgetbridge any more, as Gadgetbridge not aceppt the fw files.
photo_2016-03-31_12-55-57

or in the worst cace, with this FW vers. its not possibil to flash it with Gadgetbridge any more, as Gadgetbridge not aceppt the fw files. ![photo_2016-03-31_12-55-57](https://cloud.githubusercontent.com/assets/1086634/14173904/34cf441a-f741-11e5-9083-4f338c13b3e9.jpg)
Poster
Owner

This is only partly related to fw update, it just means that we cannot identify some versions. This should be easily fixable when having the necessary information (I hope it's all in the logs).

This is only partly related to fw update, it just means that we cannot identify some versions. This should be easily fixable when having the necessary information (I hope it's all in the logs).
bofhbug commented 5 years ago (Migrated from github.com)
Owner

(I hope it's all in the logs).

from my side it must be in the logs

> (I hope it's all in the logs). from my side it must be in the logs
Poster
Owner

Due to limited time right now I only had a go at fixing the device detection (so that the HW version is not displayed as '?').

Because when the hw version is unknown we do not recognize it as Mi1S and then won't attempt to perform any firmware update. This should be fixed with the latest commit. I will check the logs for firmware update failures tomorrow.

Due to limited time right now I only had a go at fixing the device detection (so that the HW version is not displayed as '?'). Because when the hw version is unknown we do not recognize it as Mi1S and then won't attempt to perform any firmware update. This should be fixed with the latest commit. I will check the logs for firmware update failures tomorrow.
Poster
Owner

BTW, device information is not available when the device is still "connecting", so that's expected.

BTW, device information is not available when the device is still "connecting", so that's expected.
JohRausch commented 5 years ago (Migrated from github.com)
Owner

When trying a firmware update to Mi Fit 2.0.5 on a new Mi1S, Gadgetbridge seems to to not finish the "Updating Firmware" process. The log file appears to be still emtpy.
screenshot_2016-04-02-10-27-56
screenshot_2016-04-02-10-41-04

When trying a firmware update to Mi Fit 2.0.5 on a new Mi1S, Gadgetbridge seems to to not finish the "Updating Firmware" process. The log file appears to be still emtpy. ![screenshot_2016-04-02-10-27-56](https://cloud.githubusercontent.com/assets/9266217/14225353/50dbc810-f8c0-11e5-8814-e7002e2fec6c.png) ![screenshot_2016-04-02-10-41-04](https://cloud.githubusercontent.com/assets/9266217/14225352/50dbc658-f8c0-11e5-8f96-500a142d4252.png)
JohRausch commented 5 years ago (Migrated from github.com)
Owner

Upgrade to 1.8.711 firmware worked. Here's the logfile from trying to (unsuccessfully) upgrade to 2.0.5 from 1.8.711:
gadgetbridge.log.txt

Upgrade to 1.8.711 firmware worked. Here's the logfile from trying to (unsuccessfully) upgrade to 2.0.5 from 1.8.711: [gadgetbridge.log.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/200778/gadgetbridge.log.txt)
Poster
Owner

Thanks! I will have a look at it in the evening. No idea what they changed with 2.x

Thanks! I will have a look at it in the evening. No idea what they changed with 2.x
JohRausch commented 5 years ago (Migrated from github.com)
Owner

No problem! A new firmware "Mili_pro.fw" has also been added to the assets folder with 2.x.

No problem! A new firmware "Mili_pro.fw" has also been added to the assets folder with 2.x.
Poster
Owner

Oww. What could that be? Didn't watch whether Xiami released a new gadget recently.

Oww. What could that be? Didn't watch whether Xiami released a new gadget recently.
JohRausch commented 5 years ago (Migrated from github.com)
Owner

I'm also wondering. Couldn't find anything relevant about a new device or the firmware itself.

I'm also wondering. Couldn't find anything relevant about a new device or the firmware itself.
Poster
Owner
Maybe this one: http://www.theverge.com/2016/3/29/11322922/xiaomi-rice-cooker-mi-ecosystem
Poster
Owner

@JohRausch Your log looks incomplete. If it is complete, then the update stops early in the middle of sending data, very weird.

Did you try updating to 2.x again?

@JohRausch Your log looks incomplete. If it is complete, then the update stops early in the middle of sending data, very weird. Did you try updating to 2.x again?
JohRausch commented 5 years ago (Migrated from github.com)
Owner

It appears so, sorry. I just checked it out again just now: The update didn't work for the 2.x apk, but was successful for 1.8.771. However, the initial message diplays the identical FW and HR numbers for 2.0.5 and 1.8.771. Not sure whether there would be any difference in any case regarding the Mi1S.

It appears so, sorry. I just checked it out again just now: The update didn't work for the 2.x apk, but was successful for 1.8.771. However, the initial message diplays the identical FW and HR numbers for 2.0.5 and 1.8.771. Not sure whether there would be any difference in any case regarding the Mi1S.
JohRausch commented 5 years ago (Migrated from github.com)
Owner

Here's another logfile from an update attempt:
gadgetbridge.log_02042016.txt

Here's another logfile from an update attempt: [gadgetbridge.log_02042016.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/200966/gadgetbridge.log_02042016.txt)
Poster
Owner

Weird, again just stops logging and sending data. I'll try turning off the low latency mode again, maybe that causes problems.

What's the actual behavior when this happens, does it really stop doing anything? If it does something, like displaying an error, it could be that there is a problem with the logging itself, e.g. some bidders not flushed. I guess I'll have to try myself :-)

That it displays the same versions is another weirdness.

Weird, again just stops logging and sending data. I'll try turning off the low latency mode again, maybe that causes problems. What's the actual behavior when this happens, does it really stop doing anything? If it does something, like displaying an error, it could be that there is a problem with the logging itself, e.g. some bidders not flushed. I guess I'll have to try myself :-) That it displays the same versions is another weirdness.
Poster
Owner

@JohRausch One thing about your screenshots: do you have two different Mi Bands? The screenshot shows one device named MI1S (not connected) and another "MI" (connected, and upgrading).

Did you manually rename the one device to "MI" (if that is indeed another 1S device)?

@JohRausch One thing about your screenshots: do you have two different Mi Bands? The screenshot shows one device named MI1S (not connected) and another "MI" (connected, and upgrading). Did you manually rename the one device to "MI" (if that is indeed another 1S device)?
Poster
Owner

@JohRausch BTW, I just compared the Mili_hr.fw of 1.8.711 and 2.0.5 and they are indeed the same. There must be a different reason why one works and the other not. Maybe your download was interrupted/corrupted? Can you compare the file sizes?

@JohRausch BTW, I just compared the Mili_hr.fw of 1.8.711 and 2.0.5 and they are indeed the same. There must be a different reason why one works and the other not. Maybe your download was interrupted/corrupted? Can you compare the file sizes?
JohRausch commented 5 years ago (Migrated from github.com)
Owner

@cpfeiffer About the two devices: I only own one device, but my bluetooth manager shows up two MI1S. Could be a neighbor who also owns the wristband. After forgetting both paired devices, I could only connect to the one I updated earlier.
screenshot_2016-04-02-23-03-58

Regarding the update. I checked again and the update seems to have finished successfully eventually. It took about 15 minutes and I wrongly assumed that it would be stuck in some loop, considering the short time it took to update before:
gadgetbridge.log.txt

@cpfeiffer About the two devices: I only own one device, but my bluetooth manager shows up two MI1S. Could be a neighbor who also owns the wristband. After forgetting both paired devices, I could only connect to the one I updated earlier. ![screenshot_2016-04-02-23-03-58](https://cloud.githubusercontent.com/assets/9266217/14228988/50fac5f0-f927-11e5-9882-8140fc48c917.png) Regarding the update. I checked again and the update seems to have finished successfully eventually. It took about 15 minutes and I wrongly assumed that it would be stuck in some loop, considering the short time it took to update before: [gadgetbridge.log.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/201028/gadgetbridge.log.txt)
Poster
Owner

Wow, that is indeed a lot. I just successfully updated to 4.15.11.20, and it also took a lot of time.

Wow, that is indeed a lot. I just successfully updated to 4.15.11.20, and it also took a lot of time.
Poster
Owner

I declare this fixed because it works for all cases that I tested with. For the performance problem, feel free to open a separate ticket. It might be caused by the new logger configuration, which (finally) properly rolls old logfiles and zips them. During a firmware update, lots of log statements are created, so it is possible that the 2MB threshold is reached, causing the rolling and zipping to occur. Maybe that takes some time.

Besides that, I just successfully updated to the latest and greatest (2.0.5 Mi Fit) firmware.

I declare this fixed because it works for all cases that I tested with. For the performance problem, feel free to open a separate ticket. It might be caused by the new logger configuration, which (finally) properly rolls old logfiles and zips them. During a firmware update, lots of log statements are created, so it is possible that the 2MB threshold is reached, causing the rolling and zipping to occur. Maybe that takes some time. Besides that, I just successfully updated to the latest and greatest (2.0.5 Mi Fit) firmware.
Poster
Owner

Oh, and thanks again to all testers and commenter! 👍

Oh, and thanks again to all testers and commenter! :+1:
6arms1leg commented 5 years ago (Migrated from github.com)
Owner

I wanted to add some information about the Mi Band 1S to the Mi Band Firmware Information wiki page, but unfortunately it has become read-only.
Here are my findings:

Firmware 4.15 (Mi Band 1S)
4.15.11.19

  • alarms: do not work
  • notifications: work
  • activity recognition: technically works, but especially the sleep data is far off, showing far too many sleep hours.
  • connection: works
  • battery life: no remarks
  • gadgetbridge fw installer nr.: ?

4.15.12.10

  • alarms: work
  • notifications: work
  • activity recognition: works
  • connection: works
  • battery life: no remarks
  • gadgetbridge fw installer nr.: ?

HR Firmware (Mi Band 1S)
0.0.0.0 (Wrong display?)

  • Heart rate measurement (Debug screen): not working

1.3.74.64

  • Heart rate measurement (Debug screen): working

Maybe you want to add the information to the wiki? Otherwise I would be happy to add it myself, if the wiki becomes editable again.
If I have the time, I will try some more Versions next week...

I wanted to add some information about the Mi Band 1S to the [Mi Band Firmware Information wiki page](https://github.com/Freeyourgadget/Gadgetbridge/wiki/Mi-Band-Firmware-Information), but unfortunately it has become read-only. Here are my findings: **Firmware 4.15 (Mi Band 1S)** **4.15.11.19** - alarms: do not work - notifications: work - activity recognition: technically works, but especially the sleep data is far off, showing far too many sleep hours. - connection: works - battery life: no remarks - gadgetbridge fw installer nr.: ? **4.15.12.10** - alarms: work - notifications: work - activity recognition: works - connection: works - battery life: no remarks - gadgetbridge fw installer nr.: ? **HR Firmware (Mi Band 1S)** **0.0.0.0** (Wrong display?) - Heart rate measurement (Debug screen): not working **1.3.74.64** - Heart rate measurement (Debug screen): working Maybe you want to add the information to the wiki? Otherwise I would be happy to add it myself, if the wiki becomes editable again. If I have the time, I will try some more Versions next week...
Poster
Owner

@6arms1leg Excellent, I'm adding this to the wiki right now, and restructure the page a bit to make it more readable. Thanks!

@6arms1leg Excellent, I'm adding this to the wiki right now, and restructure the page a bit to make it more readable. Thanks!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.