Xiaomi Router 4A (including 4A Gigabit and 4A 100M) remains a popular home networking solution due to its price-to-feature balance. However, over time, standard firmware from the manufacturer may become obsolete, as vulnerabilities appear, slow down Wi-Fi or lack advanced settings. Flashing allows you to install the latest version of the software, add support for new features (such as WireGuard or AdGuard Home), or even switch to alternative firmware like OpenWRT.
In this article, we'll look at all the steps of the process, from preparing the device to recovering from a failed firmware. We'll focus on the risks that the wrong actions can turn the router into a brick, so every step is accompanied by warnings and diagnostic tips. If you're a beginner, we recommend starting with official firmware through the web interface. For experienced users, we'll need to use the section about installing OpenWRT via SSH.
1. Preparation for flashing: what to do before the start
Before you start upgrading, make sure your router is ready for the procedure.Neglect of preparation is the main cause of failures.
First, check the current firmware version.
- Connect to the router network via cable or Wi-Fi.
- Open your browser and go to 192.168.31.1 (or miwifi.com).
- Log in (the default login and password is usually the admin/password combination from the sticker on the router).
- Go to Status β Device β there is a version of the software.
Second, download the correct firmware. For the Xiaomi Router 4A, the official files are available on the MiWiFi website.
- πΉ Model router: R4A, R4AC (Chinese version) or R4AG (Gigabit).
- πΉ Region: Firmware for global and Chinese versions incompatible!
- πΉ File type:.bin for web interface,.tar.gz for OpenWRT.
Download firmware for your model | Check the version of the current software | Connect the router to the UPS or laptop (not to the socket) | Disable all devices from Wi-Fi except one PC | Make backup settings (if there is important data)
-->
The third critical point is the power supply, and the flashing is interrupted when the power is out, so:
- π Connect the router to an uninterruptible power supply (UPS) or laptop via USB (If the model supports the food supply USB).
- β‘ Avoid using extension cords or tees - they can cause voltage drawdown.
π‘
If you have a Chinese version of the router (R4AC), For firmware of the global version, it may be necessary to first install an intermediate firmware-bridge (for example, miwifi_r4ac_firmware_*.bin).
2. Official method: Update via web interface
The safest way is to use a built-in update tool, which is suitable for installing official firmware from Xiaomi and does not require technical skills.
Instructions:
- Connect to the router via cable (Wi-Fi may shut down during the process).
- Open the control panel at 192.168.31.1.
- Go to Update. β Manual update.
- Click βSelect Fileβ and specify the path to the downloaded firmware (.bin format).
- Confirm the start of the process with the βUpdateβ button.
It takes 3-5 minutes. The router will reboot automatically. Don't turn off power or press buttons! The completion is signaled by a flashing yellow indicator, which then turns blue (normal mode).
What to do if the update is suspended?
Official firmware has limitations:
- π No support. VPN-servers (such as OpenVPN or WireGuard).
- π΅ There is no flexible QoS (traffic prioritization) setting).
- π‘οΈ There is no built-in ad blocker (like AdGuard Home).
Official from Xiaomi|OpenWRT|Padavan|DD-WRT|Other (I will write in the comments)
-->
3. Alternative firmware: OpenWRT and Padavan
If standard firmware features aren't enough, you can install custom. Popular options for Xiaomi Router 4A:
| Firmware | Advantages | Deficiencies | Complexity of installation |
|---|---|---|---|
| OpenWRT | Maximum flexibility, support for thousands of packages, regular updates | Difficult setup for beginners, can brake on a weak gland | ββββ |
| Padavan | Simple interface, optimized for home use, support for Russian language | Fewer features than OpenWRT, updates less often | βββ |
| DD-WRT | Good documentation, stable work | Not all features work on Xiaomi 4A, an outdated interface | ββββ |
To install OpenWRT, you will need:
- Turn on SSH-Access in router settings (Additional) β SSH).
- Connect via SSH (for example, via PuTTY) with root login and password from the sticker.
- Execute the command to unlock the bootloader: nvram set flag_try_sys1_failed=1 nvram set flag_try_sys2_failed=1 nvram commit reboot
- After restarting, download the firmware via SCP or TFTP.
π‘
Installing alternative firmware will void Xiaomiβs warranty and may cause the device to run unstable, and we recommend testing the firmware on a backup router first.
Important: Xiaomi Router 4A Gigabit (R4AG) models require a special version of OpenWRT with support for the MT7621 chip.
4.Recovery after a failed firmware
If the router stopped responding after the update (the indicator does not burn, the web interface does not open), do not panic. In 90% of cases, it can be restored.
Recovery methods:
- π§ Hardware reset: Press the Reset button for 10-15 seconds (before the indicator flashes).
- π» MiWiFi Repair Tool: a utility from Xiaomi for emergency firmware via Ethernet.
- π UART: Connecting to the console through a connector on the board (requires a soldering iron and USB-TTL adapter).
Instructions for MiWiFi Repair Tool:
- Download the utility from the official website.
- Connect the router to the PC via Ethernet (LAN1 port).
- Run MiWiFiRepairTool.exe on behalf of the administrator.
- Select the downloaded firmware file (.bin) and click βStartβ.
- Wait until the process is completed (up to 10 minutes).
1. Use another Ethernet cable (preferably Cat5e or higher).
2. disable Windows Firewall and Antivirus.
3. Reconnect the router to another port on the PC.-->
If neither method works, you have to sell your flash memory or go to a service center, and the cost of repairing it often exceeds the cost of a new router.
5. Set up router after firmware
Once you've successfully upgraded, you need to reconfigure the network, and even if you've done a backup, some of the parameters can reset.
Basic steps:
- Connect to the router at 192.168.31.1 (or 192.168.1.1 for OpenWRT).
- Set a new administrator password (often empty or admin by default).
- Set up an Internet connection: π For PPPoE (e.g. Rostelecom): specify the login/password from the provider. π‘ For dynamic IP (For example, Beeline: select the mode DHCP.
- Set up Wi-Fi: π Choose. WPA2-PSK or WPA3 safe. πΆ Set the channel manually (e.g. 6 or 11 for 2.4 GHz) to avoid interference.
For OpenWRT, additional recommendations:
- π¦ Install packets via opkg: opkg update opkg install luci-app-wireguard
- π§ Set up. fail2ban Protection against brute force attacks: opkg install fail2ban
6. Frequent errors and their solutions
Even if you follow the instructions, you can have problems.
Error 1: The router does not turn on after the firmware
- π‘ Reason: Incompatible firmware or interrupted process.
- π§ Solution: Try recovering through the MiWiFi Repair Tool. If it doesn't work, check the power supply (possibly the power supply burned).
Error 2: The web interface is not open
- π‘ Reason: discharge IP-Addresses or conflicts with browser cache.
- π§ Solution: Clear the browser cache or try another (like Firefox). IP-router address via arp command -a into CMD. Reset settings with the Reset button.
Mistake 3: Wi-Fi is not stable
- π‘ Reason: Incorrect channel settings or network congestion.
- π§ Solution: Set a fixed channel (e.g. 1 or 11 for 2.4 GHz). 802.11r (fast roaming) in Wi-Fi settings. Reduce transmission power by up to 50% if the router overheats.
π‘
If the Internet goes missing after OpenWRT firmware, check the LAN/WAN settings at /etc/config/network. Often LAN1βLAN3 ports need to be manually reassigned.
7.Safety after flashing
New firmware is not only new features, but also potential vulnerabilities.
1. Update your passwords:
- π Change the administrator password to a complex one (for example, Xk9#pL2!qR4$).
- πΆ Set separate passwords for 2.4 GHz and 5 GHz networks.
2. Set up the firewall:
- π‘οΈ In OpenWRT, activate firewall and close unnecessary ports.
- π Disable remote access (WAN β Administration if not required.
3. Regularly update the software:
- π For OpenWRT, use the commands: opkg update opkg upgrade
- π Set up automatic firmware updates (if supported).