Reflashing the robot vacuum cleaner Xiaomi from the computer: from choosing firmware to recovering from brick

Robot vacuum cleaners Xiaomi based on a chip MT7688 (including the Mi Robot Vacuum 1/1S, Viomi V2/V3 Mijia clones allow custom firmware to be installed via PCs, allowing access to advanced features like map zoning, integration with Home Assistant, or de-linking from Xiaomi servers. Incorrect firmware selection or interruption of the process can turn the device into a brick).

This guide contains only proven methods of firmware through USB-TTL Wi-Fi adapter (for models with support) OTA), current tools (Valetudo, OpenMiHome, DustBuilder) and solutions to common errors such as: ERROR: Failed to connect to the robot or hanging on the logo. We're not going to talk about magic buttons or universal utilities, just the technical details with an explanation of each step.

1. Preparation: definition of the model and firmware version

Before you download the firmware, you need to accurately identify the hardware platform of your vacuum cleaner. Most Xiaomi robots fall into two groups:

  • πŸ”Ή MT7688 β€” Old models (Mi Robot) 1/1S, Viomi V2), squirt UART or Wi-Fi disassembly case.
  • πŸ”Ή STM32 + ESP8266 β€” New devices (Mi Robot 2, Viomi) SE), Requires soldering work to access contacts.
  • πŸ”Ή Rockchip RK1608 β€” Premium models (Xiaomi Mop 2 Pro), firmware is only possible through official channels.

To find out the current version of the firmware:

  1. Open the Mi Home app β†’ Go to the Devices. β†’ Vacuum cleaner settings β†’ About the device.
  2. Look for lines like Firmware: 3.5.8_003026 or: RRM1.
  3. For accurate identification of the chip, disassemble the vacuum cleaner and find the marking on the board (for example, MT7688AN).

πŸ’‘

If the Mi Home displays a firmware version older than 3.5.9, chances are Xiaomi has blocked the bootloader. UART pre-installation.

⚠️ Note: Models with prefix STYJ or SDJQR in serial number (e.g, STYJ02FM) They use a proprietary bootloader. They can't be run through a PC without being disassembled, and you'll need a soldering iron and experience with the software. JTAG.

2. firmware selection: Valetudo vs OpenMiHome vs DustBuilder

Xiaomi’s robotic vacuum cleaner firmware is divided into three main types, each with its own pros and cons:

FirmwareAdvantagesDeficienciesSupported models
ValetudoFull local control, integration with Home Assistant, no cloud dependencyComplex installation, no voice in Russian, possible bugs with the mapMi Robot 1/1S, Viomi V2/V3, Dreame D9
OpenMiHomeIt saves the original interface, adds zoning and timeline cleaningRequires binding to a Chinese server, possible account blockingMi Robot 1S, Viomi SE, Mijia 1C
DustBuilderEasy installation via Wi-Fi, support for Russian languageLimited functionality, possible problems with OTA-updateMi Robot 1, clones on MT7688

For beginners, we recommend DustBuilder - it is installed without disassembling the vacuum cleaner (via Wi-Fi), but has a minimum set of functions. Valetudo is suitable for experienced users who are ready to work with the vacuum cleaner. SSH manually.

⚠️ Attention: Firmware for Viomi V3 Mi Robot 2 and Mi Robot 2 often contain patches to bypass Secure Boot protection, and installing such firmware on an inappropriate model will result in a permanent brick (recovery is possible only through a reset. JTAG).

πŸ“Š What kind of firmware do you plan to install?
Valetudo
OpenMiHome
DustBuilder
Other (specify in the comments)

3. Necessary tools and preparation of PC

To run through the computer will require:

  • πŸ–₯️ Windows PC 10/11 Linux (or even Raspberry Pi) is suitable for DustBuilder).
  • πŸ”Œ USB-TTL adapter (recommended) CP2102 or FT232RL strained 3.3V).
  • πŸ”§ Screwdriver. T6/T8 vacuum-cleaner.
  • πŸ“‘ Router with support for 2.4 GHz (for firmware over Wi-Fi).
  • πŸ”‹ power supply 5V/2A feeding-in.

Software:

  • πŸ“ DustBuilder (for Wi-Fi firmware) - GitHub repository.
  • πŸ“ PuTTY or Screen (for working with the UART).
  • πŸ“ Python 3.8+ (for Valetudo scripts).
  • πŸ“ Drivers for USB-TTL (Download from the adapter manufacturer's website).

Before the start of the work:

  1. Disable the antivirus (it can block firmware scripts).
  2. Create a backup of the current firmware through UART (Team: Flash read 0 0x100000 backup.bin).
  3. Charge the vacuum cleaner 100% – interruption due to battery discharge is guaranteed to turn the device into a brick.

β˜‘οΈ Firmware preparation

Done: 0 / 5

4. firmware over Wi-Fi (method for DustBuilder)

This method is suitable for Mi Robot models. 1 viomi V2 original-story 3.3.9_XXXX If the version is newer, you'll need to roll back through UART.

Step-by-step:

  1. Connect the vacuum cleaner to the router in mode AP (Press and hold Home. + Spot 5 seconds).
  2. Download DustBuilder and unpack the archive into a folder without Cyrillic characters.
  3. Open the cmd in the folder with DustBuilder and execute: python mirobo.py discover Remember IP Token devices.
  4. Start the firmware with the command: python mirobo.py update --ip 192.168.8.1 --token YOUR_TOKEN --file firmware.bin
  5. Wait until the end (around) 10-15 The vacuum cleaner will reset automatically.

⚠️ Note: If the process is suspended at the Uploading firmware stage..., check it out:

  • πŸ”Œ Stability of power supply (vacuum cleaner must be on charge).
  • πŸ“Ά Wi-Fi signal (robot must be near router).
  • πŸ”’ Lack of firewall or VPN PC-only.
What if the vacuum cleaner does not respond to commands?
If the vacuum cleaner does not turn on or flashes red after firmware, try: 1. Reset settings with Home retention + Dock 10 seconds. 2. Repeat firmware through UART with another version of firmware. 3. Check the integrity of the firmware file (MD5 must be consistent with the one on the site).

5. Firmware through UART (For Valetudo and OpenMiHome)

This method requires disassembling the vacuum cleaner and connecting to contacts. TX/RX/GND For the models on the board. MT7688 contacts are usually located next to the battery connector (see diagram below).

Procedure:

  1. Disconnect the vacuum cleaner from the network and remove the battery.
  2. Connect. USB-TTL contact: TX adapter β†’ RX pay-off RX adapter β†’ TX pay-off GND β†’ GND

PuTTY

115200

U-Boot>

loady 0x80060000

Then send the file via PuTTY (Transfer menu) β†’ Send File Protocol).

sf erase 0x0 0x100000


sf write 0x80060000 0x0 0x100000

If the vacuum cleaner is not loaded after the firmware:

  • πŸ”„ Repeat the process with another version of the firmware.
  • πŸ”§ Check the quality of the soldering contacts (poor contact can lead to recording errors).
  • πŸ“‘ Try flashing over Wi-Fi (if the bootloader is not damaged).

πŸ’‘

Firmware through UART β€” The only way to restore a vacuum cleaner after a failed Wi-Fi update, however, it requires skills with a soldering iron and terminal.

6. Solving Typical Errors After Firmware

Even with a successful firmware, there can be problems, and here are the most common ways to fix them:

Mistake.Reason.Decision
The vacuum cleaner doesn't turn on, flashes redThe loader or incorrect firmware is damagedSqueeze through UART stock firmware version 3.3.9
Not connected to Mi HomeResetting a token or conflicting versionsReset the settings (Home) + Dock 10 seconds and tie back
Mistake. ERROR: Failed to connectBlocking ports with a firewallDisable Antivirus and Add an Exception for Python
The vacuum cleaner doesn't build a mapThere is no calibration of sensorsRun calibration through SSH (team: calibrate)

If the vacuum cleaner after Valetudo firmware does not display the map in the web interface:

  1. Check what is in the configuration file config.json indicated map_path.
  2. Update Valetudo to the latest version: cd /opt/valetudo git pull npm install
  3. Reboot the robot with the reboot command.

⚠️ Note: If the vacuum cleaner requires a link to a Chinese server after OpenMiHome firmware, but you can’t create an account, use the workaround:

  1. Install Mi Home version 5.4.54 (APK available on APKMirror).
  2. Select the Mainland China region when registering.
  3. Use it. VPN to Hong Kong to confirm the phone number.

7. Recovery after "brick" (complete failure)

If the vacuum cleaner doesn't show signs of life (it doesn't blink, it doesn't make sounds, it doesn't respond to buttons), it's likely that the loader is damaged. JTAG chip-swap MT7688.

To restore through JTAG need:

  • πŸ”§ Smearing station with a thin sting.
  • πŸ”Œ JTAG-Adapter (e.g. Bus Pirate or ST-Link).
  • πŸ“ Loader firmware (u-boot.bin) for your model.

Step-by-step process:

  1. Salt the wires. JTAG to contacts on the board (unfolding depends on the model).
  2. Connect the adapter to the PC and start OpenOCD:
  3. Execute commands to record the bootloader: flash write_image erase u-boot.bin 0x0
  4. Unplug the wires and try to turn on the vacuum cleaner.

⚠️ Attention: Firmware through JTAG It requires experience with a soldering iron and an understanding of low-level protocols, and a mistake at this stage can physically damage the chip, making recovery impossible.

πŸ’‘

If you're not sure about your skills, go to a service center. JTAG is 3-5 thousand rubles 2026 year).

FAQ: Frequent Firmware Questions

Can I sew the Xiaomi Mi Robot 2 vacuum cleaner without disassembly?
No, the models are on the base. STM32 + ESP8266 (including Mi Robot 2 and Viomi SE) Requires connection to contacts UART or JTAG, And the Wi-Fi firmware for these models is not possible because of the hardware protection.
How to find out the token of your vacuum cleaner for firmware through DustBuilder?
The token can be obtained in two ways: through Mi Home (requires a root on a smartphone and the Packet Capture app). UART β€” Connect to the console and execute the command: cat /mnt/default/miio/miio_key.conf ⚠️ Do not share a token in public sources – this gives you complete control over your device!
Why doesn’t a vacuum cleaner build a map after Valetudo firmware?
The reasons may be as follows: πŸ—ΊοΈ Calibration of sensors is not performed (run it through the SSH calibrate). πŸ“‘ Weak Wi-Fi signal (robot must be within 2 meters of router). πŸ”„ Older version of Valetudo (update via git pull).
Can I return the official firmware after installing the custom?
Yes, but the process depends on the current firmware: If DustBuilder is installed, go back to the stock firmware via Wi-Fi (the python mirobo.py update team) --file stock.bin). If Valetudo is installed, firmware is required through UART fully reset. ⚠️ After returning to stock firmware, the vacuum cleaner may require a binding to the Chinese Mi Home server.
Where to download the official firmware for Xiaomi Mi Robot?
Official firmware can be found: πŸ“ On the forum 4PDA (section β€œRobot vacuum cleaners"). πŸ“ In the GitHub repository (Firmware folder). πŸ“ On the MiWiFi website (enter the vacuum cleaner model in search). MD5-hash file – many firmware on third-party resources contain viruses.