rand256 / valetudo

Valetudo RE - experimental vacuum software, cloud free
Apache License 2.0
667 stars 73 forks source link

S551-01 Cannot perform initial install of firmware #328

Closed mandomal closed 3 years ago

mandomal commented 3 years ago

Initial install of the firmware on new Roborock S5 fails using XVacuum. XVacuum connects to S5, retrieves token, and distributes package but the update fails immediately with the audible response "Failed to update firmware. Reverting to previous version." This happens with multiple firmware versions via https://vacuumz.info/download/gen2/.

How to Reproduce

  1. Reset Vacuum WiFi.
  2. Place Vacuum on charger.
  3. Connect to vacuum from android phone (disconnect from data).
  4. Select package (either 1898, 2008, or 2020 latest version with valetudo RE from https://vacuumz.info/download/gen2/).
  5. Vacuum power light blinks and responds audibly with "Updating Firmware", then quickly after responds with "Failed to update firmware. Reverting to previous version" and light stops blinking.
  6. XVacuum says the flashing was successful.
  7. Go to 192.168.8.1 for web interface but receive page error.

Alternatively, I've seen multiple sources from xda-developers state that all you need to do is factory reset the robot and perform the install as described on this page. In that case we can add step 0 as:

  1. Reset Vacuum by:      a. holding the home button (shaped like a plug) for 3-5 seconds.      b. after that time, continue to hold the home button and press and release the reset button with a paper clip under the flap to access the dust bin      c. with the home button still held down, wait until the power light blinks. the robot will then say something like "Resetting vacuum." and you can release the button.      d. The vacuum will not say anything when it is done, the power button will just stop blinking.

Expected behavior

  1. Reset Vacuum WiFi.
  2. Place Vacuum on charger.
  3. Connect to vacuum from android phone (disconnect from data).
  4. Select package (either 1898, 2008, or 2020 latest version with valetudo RE from https://vacuumz.info/download/gen2/). 5??? Flashing was successful (not sure how this is supposed to happen as I've found no video or guide that shows exactly what happens)
  5. XVacuum says the flashing was successful.
  6. Go to 192.168.8.1 for web interface to setup wifi.

Vacuum Model: Gen2/S5/Production date 10.2019

Valetudo Version: vacuum_1898_valetudo_re_0_9_8.pkg vacuum_2008_valetudo_re_0_9_8.pkg vacuum_2020_valetudo_re_0_9_8.pkg

User-Agent Android XVacuum

Additional context

rand256 commented 3 years ago

Which firmware version do you have already installed?

mandomal commented 3 years ago

I'm not entirely sure. Do I need to connect to the mi home app to find out?

rand256 commented 3 years ago

Probably yes.

I guess that if install fails even after correctly doing a factory reset, then you may have too high base firmware version preinstalled into your device, which completely prevents any custom firmware installation.

mandomal commented 3 years ago

I actually can't seem to connect my device to the mi home app either. The wifi name of the robot is "roborock-vacuum-s5_miap2125". Could the 2125 be the version?

I have read in a comment on this page that the app Flolevac can be used to downgrade the firmware. But I can't add my vacuum manually because I don't know it's device ID. Have you had any experience with this method?

mandomal commented 3 years ago

So I've downloaded flolevac and downgraded the firmware as low as 3.3.9_001308. Then reset the wifi and attempted another firmware update. But I still have the same error.

rand256 commented 3 years ago

Actually any firmware below 3.3.9_001900 should allow flashing custom images.

Maybe your issue isn't related to the device itself. I recall I've read somewhere that XVacuum app had some issues on Android 10+, so it might be the reason for installation failures. You could try some other installation methods like using mirobo tool from python-miio.

mandomal commented 3 years ago

You were right. I installed through my computer successfully. However, the factory original firmware was too high to do a local install in the first place. I would recommend using the flolevac app to downgrade the firmware before proceeding with the documented instructions.

mandomal commented 3 years ago

I will go ahead and close this issue. Thanks!