Reflashing of the robot vacuum cleaner Xiaomi Mi Robot Vacuum Mop on alternative firmware MAT (Mi Home Alternative Tool provides access to advanced features: removing regional restrictions, Russifying the interface, configuring cleaning areas without Xiaomi cloud servers. However, the process requires care - a bug in the firmware stage can turn the device into a "brick". In this article, we will analyze the step-by-step algorithm taking into account the specifics of the models. STYJ02YM, STYTJ01ZHM and similar, and also consider the unique risks when working with memory chips GD25Q127C, which are used in these vacuum cleaners.
Before you start, make sure your model is supported. MAT. Firmware is suitable for most Xiaomi vacuum cleaners based on the Rockchip platform RK1608, but not compatible with new devices on MT7688 (If you are not sure about the chip model or firmware version, use the MiHome-Binary-Parser utility to analyze the memory dump - this will help avoid conflicts.
1. Why. MAT Better than standard Xiaomi firmware?
Xiaomiβs standard software has a number of limitations that MAT pass:
- π Removing regional locks: the ability to use the vacuum cleaner in any country without being tied to Xiaomi servers (relevant for models purchased in China).
- π§ Full control of maps: edit cleaning areas, virtual walls and no-go zones right in the application without cloud synchronization.
- π± Local management: working over a local network without the need to connect to the Internet (important for users with limited traffic or problems with the Internet) VPN).
- π Updates without dependencies: MAT Updated regardless of official Xiaomi releases, often adding features earlier than the manufacturer.
Besides, MAT Supports integration with Home Assistant and other smart home systems through the protocol MQTT, For example, you can set up automatic cleaning when you open a window (through sensors) or synchronize the vacuum cleaner with a robot washer.
β οΈ Attention: Firmware MAT If the device is warranty-free, consider alternatives such as using Valetudo (for open vacuum cleaners). API) or purchase of an international version of the vacuum cleaner.
2. Preparation for firmware: what will be needed
Before starting the process, collect everything you need:
- π₯οΈ Computer on Windows 10/11 Linux (macOS is not supported due to driver issues) CH340).
- π USB-cable with data transmission support (not all charging cables are suitable!).
- π§ Screwdriver. T5 to disassemble the vacuum cleaner (needed to connect to the contacts) UART).
- π Firmware files: the latest version MAT For your model (download only from the official repository).
- π οΈ Programs: MiHome-Binary-Parser, Flash_Download_Tools (for Rockchip, Putty (for Rockchip) UART-monitoring).
Pay special attention to the versions of the memory chip. In vacuum cleaners Xiaomi Mi Robot Vacuum Mop used:
| Model chip. | Memory volume | Compatibility with MAT | Notes |
|---|---|---|---|
| GD25Q127C | 16 MB | Yes. | The most common option. It requires a patch to work properly with the cards. |
| GD25Q128C | 16 MB | Yes. | Analogue GD25Q127C, But with another contact wiring, check the datasheet before rationing. |
| MX25L12835F | 16 MB | Partially. | May require manual editing of the configuration file config.json. |
| W25Q128JV | 16 MB | No. | Not supported MAT Because of the controller, the risk of bricks. ~70%. |
To find out the chip model, take the vacuum cleaner apart and find the markings on the board. UART execute:
cat /proc/mtdThe answer will be a line with the name of the chip, for example: mtd0: 00100000 00020000"GD25Q127C".
3. Disassembly of the vacuum cleaner and connection to UART
For firmware through UART (recommended method) access to the contacts on the motherboard:
- Turn the vacuum cleaner off the net and turn it over.
- Remove the bottom cover by unscrewing 4 screws T5 (Two hidden under stickers!).
- Disconnect the battery (required!) to avoid short circuit.
- Find a connector on the board. J3 (These are contacts, usually near a memory chip. UART:
- GND β earth).
- TX β Data transmission (white/yellow wire).
- RX β data reception (green wire).
- 3.3V β Power (red wire, not necessarily connected).
Connect the wires to USB-UART adapter (e.g., adapter, CP2102 or CH340) Install the adapter drivers (download from the chip manufacturer's website).
β οΈ Attention: Low-quality adapters CH340 They can give out unstable voltages, which will damage the board. Use adapters that are surge-proof (e.g., surge-proof adapters, FTDI FT232RL).
After connecting, open Putty or Screen (for Linux) with settings:
- Speed: 115,200 baht.
- Data bits: 8.
- Stop-bits: 1.
- Parity control: None.
If the connection is successful, when you turn on the vacuum cleaner, the loading log will appear in the terminal. If instead of the log you see characters or debris, check the connection is correct. TX/RX (smack them up!).
Battery's off.|The wires are connected to the correct contacts (GND, TX, RX)|Drivers installed for USB-UART adapter|Terminal (Putty/Screen) tuned 115200 baud|Firmware downloaded MAT for your model-->
4. Step-by-step instructions for firmware
The firmware process consists of three stages: creation of a backup, recording MAT And check the performance.
Step 1: Create a backup copy of stock firmware
This is a must-do step, because without a backup, it's impossible to restore the device if you make an error. Flash_Download_Tools (Windows).
For Linux, do the following in the terminal:
sudo flashrom -p ch341a_spi -r backup.binWhere:
- ch341a_spi β The driver for the programmer (if you use it) CH341A).
- backup.bin β backup filename.
For Windows:
- Open up. Flash_Download_Tools.
- Select a memory chip from the list (for example, GD25Q127C).
- Press Read and save the dump as backup.bin.
β οΈ Note: The backup file should weigh exactly 16MB (16,777,216 bytes). If the size is different, repeat the procedure until you get the correct dump.
Stage 2: Recording firmware MAT
Download the latest version MAT GitHub, there'll be files in the archive:
- mat_vacuum_mop.bin β firmware.
- config.json β Configuration file (may require editing).
- Readme.md is a guide for your model.
For firmware through Flash_Download_Tools:
- Download. mat_vacuum_mop.bin programmatically.
- Enter the address of the beginning of the recording: 0x000000.
- Press Erase, then Write.
- Wait until the end (around) 5-7 minute).
For firmware through UART (alternative):
sudo flashrom -p ch341a_spi -w mat_vacuum_mop.binAfter recording, turn off the programmer, collect the vacuum cleaner and turn it on. The first turn on after the firmware can take up to 3 minutes - this is normal.
Stage 3: Set-up MAT post-fix
Connect the vacuum cleaner to Wi-Fi via the Mi Home app (use the "Add Device Manual" mode).
- Go to Settings β About the device β Software version.
- Click on the firmware version 5 times and the developer menu will open.
- Enable the Local Control option and MQTT (If you plan to integrate with Home Assistant).
- Reset the device.
π‘
After the firmware MAT The vacuum cleaner will be defined in Mi Home as "Unknown Device." That's OK -- control it through a web interface. IP-address (e.g, http://192.168.1.100).
Possible errors and their solutions
Even with the exact following of the instructions, there can be problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| The vacuum cleaner does not turn on after firmware | Incompatible version MAT damper | Restore the backup through Flash_Download_Tools. If it doesnβt help, check the contact ratio. |
| The red light is always flashing. | Checksum error (CRC) | Check it out. MAT with Verify disabled in the programmer settings. |
| No room maps are retained | Wrong. config.json for your model | Download the current one. config.json for your memory chip from the repository. |
| The vacuum cleaner does not connect to Wi-Fi | Resetting network settings after firmware | Press the Reset button for 10 seconds, then reset the connection. |
If the vacuum cleaner is getting stuck during the loading stage (the white indicator burns, but does not respond to buttons), try to reset it to the factory settings through the window. UART:
echo"reset_to_factory" > /tmp/factory_reset
rebootIf this does not help, you will have to re-stitch the device from scratch using a backup.
What to do if the vacuum cleaner has turned into a brick?
6 Integration with Home Assistant and other systems
One of the key advantages MAT Local control is possible through the protocol MQTT. Integration with Home Assistant:
- Install Mosquitto broker in Home Assistant.
- In the settings MAT (config.json) specify:
"mqtt": {
"enabled": true,
"host": "192.168.1.10", // IP of your Home Assistant
"port": 1883,
"user":"your_username",
"pass":"your_password",
"topic_prefix":"vacuum"
}- Add to configuration.yaml Home Assistant:
vacuum:
- platform: mqtt
name:"Xiaomi Vacuum"
command_topic:"vacuum/command"
state_topic:"vacuum/state"
schema:"state"After the Home Assistant reboot, the vacuum cleaner will appear in the list of devices.
- π Start cleaning on schedule.
- π Set up cleaning areas through YAML-configuration.
- π Monitor battery status and operating time.
To integrate with Google Assistant or Alice, use the HASS-Agent or Node-RED plugin.
π‘
If the vacuum cleaner does not respond to commands MQTT, Check if port 1883 is open in router settings and if firewall blocks it.
7.Update MAT and rollback to stock firmware
Firmware MAT Updated through the web interface of the vacuum cleaner:
- Open it in your browser. http://[IP_vacuumer]/update.
- Download the new version of.bin.
- Press Update and wait for the reboot.
To return to the stock firmware Xiaomi:
- Download the original dump for your model (for example, with Xiaomi Firmware Updater).
- Squeeze it through. Flash_Download_Tools (similarly MAT).
- Reset the settings through UART:
echo"restore_stock" > /tmp/restore
rebootβ οΈ Warning: After returning to stock firmware, the vacuum cleaner may lock if previously linked to a Chinese Xiaomi account. IMEI through the engineering menu (team) AT+EGMR=1,7,"NEW_IMEI").
8. Alternatives MAT: Valetudo and other firmware
If MAT For some reason, it is not appropriate, consider alternatives:
- π§Ή Valetudo: open firmware with a web interface, but requires root access (suitable for vacuum cleaners on the Internet) MT7688).
- π OpenMiHome: fork MAT Supports more models, but less stable.
- π± DustBuilder: firmware for vacuum cleaners with LiDAR, allows you to adjust the speed of rotation of the brush.
Comparison MAT Valetudo:
| Function | MAT | Valetudo |
|---|---|---|
| Xiaomi Mi Robot Vacuum Mop | Yes. | Partially (requires patches) |
| Local control | Yes. | Yes. |
| Integration with Home Assistant | MQTT | MQTT + REST API |
| Russification of the interface | Yes. | No (English only) |
| Support for cleaning areas | Yes. | Yes (via plugins) |
Valetudo is more difficult to set up, but offers more customization options. MAT It is easier for beginners and better optimized for Russian users (there is Russification and support for Yandex Alice).
π‘
If your model of vacuum cleaner is not supported MAT, Try Valetudo, but be prepared for manual editing of configuration files and possible bugs with room maps.