VacuumRobots manual update root Howto

unregist edited this page Dec 29, 2018 · 20 revisions


There is a automatic tool for flashing. See in the firmwarebuilder release.
Details can be found in the PR#47


Do not flash Gen2 firmware to Gen1, and vice versa!

General idea

  1. Install python-miio (python3!)
  2. Install ccrypt(apt-get install ccrypt)
  3. Create custom image with, Copy MD5 sum
    • you need to create your own ssh keypair and create an authorized key file
      • for Windows you might use PuttyGen to create the keypair
    • copy language pack (#LanguageCode#.pkg) and v11_xxxxxx.pkg into folder of the
      • english.pkg is obsolete now, all new firmwares contain the new english soundfiles
      • to enable english by default, you need to convert your vacuum from CCC to CE (see here)
    • image builder needs to be as root (need to mount image)
      • if you use Windows: you need to run it in a Linux VM, Windows WSL and MacOS does not work
  4. Install local webserver and place created image (located in /output) into htdocs
    • do not change filename, it must have the format v11_xxxxxx.pkg
    • You may use also the integrated Python3-HTTP-Server
  5. Connect the vacuum robot to the charging station

Update without automatic flasher (obsolete if you use

  1. Put vacuum robot in unprovisioned mode (press WiFi button)
  2. Connect to open WiFi of the robot(rockrobo-XXXX)
    • Do not connect to any other network (e.g. LAN)
  3. mirobo discover --handshake true

    • You'll retrieve the token (copy hash represented by placholder #Token for further use):
    • INFO:miio.device: IP 192.168.8.x (ID: $) - token: b'#Token'
  4. mirobo --ip= --token=#Token_from_above# status -> should return status

  5. mirobo --ip= --token=#Token_from_above# raw-command miIO.ota '{"mode":"normal", "install":"1", "app_url":"http://#ipaddress-of-your-computer#/v11_#version#.pkg", "file_md5":"#md5#","proc":"dnld install"}'

    • replace ipaddress, version and md5 with your data ( md5 = copied md5 sum of section "preparation" step 3)
    • Check status with command from 4)
    • Wait 10 minutes (you should see an access on your http server, when http-get is done)
  6. In case you get a warning about battery needs to be at least 20% charged: connect the robot with your charging station and charge it while updating. This warning can appear even if your robot is charged more then 20%.
  7. If update is complete: try ssh access on with user root

Instructions on Linux

These instructions were tested on Ubuntu 14.04 and 17.10 and Debian 9 and Fedora 27.

Create the firmware image

  1. Install the required packages:
    Ubuntu: sudo apt-get install ccrypt git wget unzip
    Fedora: sudo dnf install ccrypt git wget unzip
  2. Create a working directory: mkdir dc && cd dc
  3. Download the dustcloud firmwarebuilder: wget
    • Unzip the file unzip
  4. Download the firmware image and language data:
  5. Copy your public SSH key to the working directory: cp ~/.ssh/ .
    • if you don't have SSH keys yet, refer to this guide to create them.
  6. Run the image builder: sudo ./dustcloud/devices/xiaomi.vacuum/firmwarebuilder/ -f v11_001228.pkg -k
  7. After the build has succeeded, you are ready to upload the firmware to your vacuum.

Upload the firmware image

This assumes we are still in the working directory from the building step.

  1. Install the required packages: sudo apt-get install python3 python3-pip python3-venv python3-dev
  2. Create a virtual env for our python packages: python3 -m venv .venv
  3. Enter the virtual env: . .venv/bin/activate
  4. Install wheel so the other packages can be installed successfully: pip install wheel
  5. Install python-miio for communicating with the vacuum: pip install python-miio
  6. Now press the wifi button on your vacuum and join the wifi created by it ('roborock-vacuum-s5_XXXXXXXX' or similar).
  7. Use the flasher script to upload the new firmware: python -f output/v11_001228.pkg
  8. The update takes several minutes. After the upload is complete, the robot explains that it is now going to install an upgrade and restarts when it is complete. Once the robot has successfully restarted, you can connect to it via SSH.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.