Skip to content

Latest commit

 

History

History
61 lines (58 loc) · 4.33 KB

UPDATE-howto.md

File metadata and controls

61 lines (58 loc) · 4.33 KB

Preparation

  1. Install python-mirobo (python3!)
  2. Install ccrypt(apt-get install ccrypt)
  3. Create custom image with imagebuilder.sh, 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 english.pkg and v11_xxxxxx.pkg into folder of the imagebuilder.sh
    • image builder needs to be as root (need to mount image)
      • if you use Windows: you need to run it in a Linux VM
  4. Install local webserver and place created image 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

  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

  4. mirobo --ip=192.168.8.1 --token=#Token_from_above# status -> should return status

  5. mirobo --ip=192.168.8.1 --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
    • Check status with command from 4)
    • Wait 10 minutes (you should see an access on your http server)
  6. If update is complete: try ssh access on 192.168.8.1 with user root

Instructions on Mac OS

  1. Install homebrew package manager
  2. Install python3: brew install python3
  3. Install a python3 package manager like pipenv: python3 pip install- -user pipenv
    • You need to add the python3 installation to your system's PATH like it is recommended on the pipenv page
    • e.g. export PATH=$PATH:/Users/<yourUsername>/Library/Python/3.6/bin
    • set correct locales for pipenv, e.g. export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8
  4. Install python-miio by going to the project folder of this repo and type pipenv install requests which will install all necessary requirements for python3. python-mirobo is outdated and isn't updated anymore.
  5. Install ccrypt: brew install ccrypt
  6. Create a ssh keypair: ssh-keygen -f ~/.ssh/id_rsa_xiaomi
  7. Create an authorized_keys file and place the content of ~/.ssh/id_rsa_xiaomi.pub in there: cat ~/.ssh/id_rsa_xiaomi.pub > <this-repo-path>/xiaomi.vacuum.gen1/firmwarebuilder/authorized_keys
  8. Make the imagebuilder.sh script executable: chmod +x <this-repo-path>/xiomi.vacuum.gen1/firmwarebuilder/imagebuilder.sh
  9. Install fuse and ext4 support to open the firmware images
    • brew cask install osxfuse
    • brew install m4 autoconf automake libtool e2fsprogs
    • follow these instructions.
    • brew install ext4fuse
    • The first time you'll mount an ext4 fs with fuse, it will prompt you to allow the extension (at least on High Sierra). Allow and retry the script, otherwise you'll need to use a Linux VM
  10. execute xiomi.vacuum.gen1/firmwarebuilder/imagebuilder.sh with a version number. The version number must be the same as the fw image you've copied to the folder. e.g. ./imagebuilder.sh 003094
  11. note the returned MD5 sum. You can see the md5 sum also in the output folder under v11_xxxxxx.md5
  12. execute pipenv shell from the repo root folder to enable support for python-mirobo
  13. Put vacuum robot in unprovisioned mode (Reset Wifi by pressing Power and Dock button for a few seconds until you hear "resetting WiFi")
  14. Connect to open WiFi of the robot(rockrobo-XXXX)
    • Do not connect to any other network (e.g. LAN)
  15. Execute mirobo discover --handshake true and note the returned token
  16. Execute mirobo --ip=192.168.8.1 --token=#Token_from_above# status
    • should return status
  17. Execute mirobo --ip=192.168.8.1 --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
    • Check status with command from 4)
    • Wait 10 minutes (you should see an access on your http server)
  18. If update is complete: try ssh access on 192.168.8.1 with user root