How to install the Xiaomi Mi Router router 4A: Official and Alternative Firmware

Xiaomi Mi Router router 4A (model R4A, R4AC) It remains a popular choice due to the balance of price and functionality, but the standard firmware MIUI The firmware allows not only to update the system to the current version, but also to install alternative firmware like OpenWRT or Padavan, which reveals the full potential of the hardware: support VPN, Extended QoS settings, or even repeater mode for other brands.

In this guide, we will analyze all methods of firmware - from official updates via the web interface to install custom assemblies through the Internet. SSH or UART. We'll focus on restoring the router after a failed firmware, because it's a model that tends to crash when you interrupt the recording process. If you're a beginner, start with the official method, which is the safest and doesn't require technical skills.

Preparation for firmware: what you need to know before starting

Router firmware is a process that can both improve your router's performance and render your device down. Before you start, make sure that:

  • πŸ”Œ The router is connected to an uninterruptible power supply (UPS) or a laptop with a charged battery - voltage surges during firmware writing are almost guaranteed to cause a failure.
  • πŸ“‘ You have a backup internet access point (like a mobile hotspot) as you may need to reconfigure the network after firmware is installed.
  • πŸ’Ύ Backup of current settings is made through Settings β†’ Additionally. β†’ Backup/Restore (only working on standard firmware) MIUI).
  • πŸ”§ There's a Torx screwdriver on hand. T5/T6 and USB-TTL adapter (e.g, CP2102) β€” They will need to be restored through UART, if something goes wrong.

Also check the current firmware version in the web interface (192.168.31.1) to help you choose the right file to update. MIUI OpenWRT may require a bridge-based firmware (breed bootloader).

⚠️ Attention: Firmware through SSH or UART If the router was purchased less than a year ago, the official service may refuse to repair under warranty after finding traces of interference.

πŸ“Š What kind of firmware do you plan to install?
Official MIUI
OpenWRT
Padavan
DD-WRT
Another.

Method 1: Official update via web interface

The easiest and most secure method is to upgrade through a standard web interface, which is suitable for installing official firmware from Xiaomi (for example, switching from 2.28.15 to 3.0.36).

  1. Connect to the router via cable or Wi-Fi (wired connection is recommended).
  2. Open your browser and go to 192.168.31.1 (or miwifi.com).
  3. Go to the Firmware Update section (in new versions) MIUI It may be called System Tools. β†’ Update).
  4. Click Update Check. If a new version is available, the system will prompt you to download and install it.
  5. Confirm the installation and wait for the reboot (usually takes 3-5 minutes).

If the automatic update does not find the current version, you can download the firmware manually:

  • 🌐 Download the file from the official Xiaomi Mi WiFi website (choose the Mi Router model) 4A or 4A Gigabit).
  • πŸ“ Unclose the file (usually.bin or.tar).
  • πŸ”„ In the web interface, click Select a file and specify the path to the downloaded firmware.

⚠️ Warning: Do not interrupt the upgrade process or pull the power cable - this can damage the bootloader.If the router does not respond for more than 10 minutes, try turning off the power for 30 seconds and turn on again.

Download the firmware from the official website|Connect to the router via cable|Disconnect all devices from Wi-Fi except one PC|Checking for food stability|Take screenshots of current settings-->

Method 2: Installation of custom firmware through SSH

Alternative firmware installations (such as OpenWRT or Padavan) will require access to the SSH. This method is suitable for experienced users, as it requires work with the command line.

First, turn on. SSH-router:

  1. In the web interface, go to Settings β†’ Additionally. β†’ Developer.
  2. Activate the option Enable SSH and save the settings.
  3. Connect to the router on SSH using PuTTY (Windows) or terminal (Linux/macOS): ssh root@192.168.31.1 Password: Admin (or your current password from the web interface)

Follow the instructions for your firmware, such as installing OpenWRT via breed bootloader:

  1. Download. breed-mt7628-xiaomi-r4a.bin OpenWRT firmware for Mi Router 4A (search the forums 4PDA or OpenWRT Wiki).
  2. Upload files to the router via SCP: scp breed-mt7628-xiaomi-r4a.bin root@192.168.31.1:/tmp/ scp openwrt.bin root@192.168.31.1:/tmp/
  3. Write the breed in the bootloader: mtd write /tmp/breed-mt7628-xiaomi-r4a.bin Bootloader
  4. Restart the router and log in to breed (hold the Reset button 5-7 seconds when turned on).
  5. In the breed web interface, select a file openwrt.bin and start the firmware.

Once installed successfully, the router will restart. OpenWRT can take up to 10 minutes to turn on the first time - don't interrupt the process!

What to do if the SSH is not connected?
If the router does not respond to commands SSH, Check 1. Is it on? SSH in the web interface (sometimes the option is hidden in Developer Mode). 2. Does the firewall block the connection on your PC. 3. Is the password correctly entered (the default password is often used from Wi-Fi). If nothing helps, try resetting your router to factory settings (hold the Reset button for 10 seconds).

Method 3: Firmware through UART (break-down)

If the router stopped turning on after a failed firmware ("bricked"), it can be restored through the UART-This method requires disassembling the device and connecting to the contacts on the board.

You'll need:

  • πŸ”§ Torx screwdriver T5 hull-breaker.
  • πŸ–₯️ USB-TTL adapter (e.g, CP2102 or FT232RL) wired TX, RX, GND.
  • πŸ”Œ power supply 12V/1A (You can use the original router power supply unit).
  • πŸ’» Program-terminal (PuTTY, Screen or Tera Term).

Sequence of action:

  1. Disconnect the router from power and disassemble the body, carefully slapping the latches around the perimeter.
  2. Find contacts on the board UART (usually signed as TX, RX, GND, 3.3V). For the Mi Router 4A They are located next to the memory chip.
  3. Connect the adapter to the contacts: GND β†’ GND (general) TX (router) β†’ RX (adapter) RX (router) β†’ TX (adapter)

Don't plug in. 3.3V

Connect the adapter to the PC and open the terminal at a speed of 57600 bits / s.

Put the router on the network and watch the terminal output. If the bootloader is alive, you'll see an invitation. CFE> breed>.

To restore through TFTP enter:

setenv serverip 192.168.31.100


setenv ipaddr 192.168.31.1




tftp 0x80000000 firmware.bin




erase 0x0 0x1000000




cp.b 0x80000000 0x0 0x1000000




boot

Where firmware.bin β€” name of the firmware file located in the root folder TFTP-servers (e.g., servers, Tftpd64).

Contact on the boardColor of wire (typical)Appointment
GNDBlack.Earth (common)
TXWhite/yellowTransfer of data (from router to adapter)
RXGreen.Receiving data (from adapter to router)
3.3VRed.Power only from the original PD

⚠️ Note: If you are connected to UART The terminal shows the characters, check the data rate. 4A The standard speed is 57600, but in some cases 115200 may be required.

πŸ’‘

Before rationing contacts UART Check them with a multimeter in vertebrae mode. 3.3V and GND may disable the charge!

Selection of firmware: MIUI vs OpenWRT vs Padavan

Each firmware has its pros and cons. Here's a comparison table for Xiaomi Mi Router 4A:

CharacteristicsMIUI (official)OpenWRTPadavan
Stability⭐⭐⭐⭐⭐⭐⭐⭐ (build-dependent)⭐⭐⭐⭐
FunctionalityBasic (Wi-Fi, DHCP, parental control)Expanded (VPN, AdBlock, QoS, SMB)Extended (5GHz support, USB-modems)
Support for USB supportNo.Yes (if port is available)Yes (file server, print server)
Complexity of installationSimple (web interface)Medium (requires) SSH/breed)Medium (requires) SSH)
UpdatesRegular (from Xiaomi)Handhelds (from the community)Manuals (from developers)

For most users, the official firmware MIUI It's the best choice, stable and supported by the manufacturer:

  • πŸ”’ VPN-Server (WireGuard, OpenVPN) - choose OpenWRT.
  • πŸ“Ά 5GHz support (on models with the appropriate chip) – Padavan.
  • πŸ–₯️ USB-Drives or printers – Padavan or OpenWRT.
  • πŸ›‘οΈ Blocking Advertising at Level DNS β€” OpenWRT with AdGuard Home.

Padavan is often considered the β€œmiddle ground” – it retains a friendly interface, but adds advanced settings that are not available in the app. MIUI. However, some builds can be unstable – watch out for forum reviews before installing.

πŸ’‘

For Xiaomi Router models 4A Gigabit Edition (with a yellow sticker) is suitable only special version of Padavan - standard firmware for the use of the software. R4A never start!

Frequent mistakes and their solutions

Even with strict adherence to the instructions, problems can arise, and here are the most common mistakes and ways to correct them:

  • πŸ”΄ The router does not turn on after the firmware: Reason: Damaged bootloader or incompatible firmware. Solution: Restore through UART (See Method 3 or contact the service center.
  • πŸ”Œ The orange light flashes all the time: Reason: Failure to record firmware or power failure. Solution: Turn off power for 30 seconds, then repeat the firmware. If it doesn't work, run through the breed.
  • πŸ“‘ Wi-Fi doesn’t work after OpenWRT installation: Reason: There are no drivers for your chipset (MT7628). Solution: Install the package kmod-mt76x8 opkg: opkg update opkg install kmod-mt76x8
  • πŸ”’ Can't connect to the SSH After the firmware: Reason: New firmware is disabled SSH Solution: Check the settings in the web interface or reset the router to the factory settings.

If the router does not respond to the Reset button at all, try the β€œemergency reset”:

  1. Shut down the power.
  2. Press the Reset button and, without letting it go, connect the power.
  3. Hold the button for 15-20 seconds until the indicators start flashing in an unusual rhythm.
  4. Release the button and wait for the reboot (can take up to 5 minutes).

Security after firmware: what to do first

After successful firmware (especially custom firmware), several steps must be taken to protect the router:

  1. Change the default login and password. OpenWRT has no root password by default, and Padavan uses root passwords. admin/admin. Set a complex password: passwd
  2. Turn off remote access (if not needed). In the web interface, look for Remote Management options or WAN Access and deactivate them.
  3. Update packages (for OpenWRT): opkg update & & opkg upgrade
  4. Set up a firewall. OpenWRT has a firewall on by default, but you can strengthen the rules by blocking unused ports.
  5. Create a backup of settings via web interface or command: sysupgrade --create-backup /tmp/backup.tar.gz

If you have installed OpenWRT, it is also recommended that:

  • πŸ”„ Install luci (web interface): opkg install luci.
  • πŸ›‘οΈ Activate fail2ban Protection against brute force attacks: opkg install fail2ban.
  • πŸ“Š Set up traffic monitoring with vnstat or nlbwmon.

⚠️ Attention: Once custom firmware is installed, the router may start to warm up more than the standard one. Watch the temperature of the chipset (in OpenWRT you can install lm-sensors) and ensure good ventilation if the router is running under high load (for example, as a torrent client).

FAQ: Answers to Frequent Questions

Can I use the Xiaomi Router? 4A hullless?
Yes, if you install the official firmware through a web interface or custom firmware through SSH (provided that SSH Disassembly is only required for firmware through UART or if the router is "bricked".
Which firmware is better to choose for gaming purposes (low ping)?summary> To minimize ping, Padavan is recommended with QoS (Quality of Service) settings. In QoS settings, prioritize traffic for gaming ports (for example, for gaming ports, UDP 3074 Xbox, TCP/UDP 27000-27030 Steam. Also disable Hardware. NAT, If you play on Wi-Fi, it will reduce delays.
How to return a standard firmware MIUI post-openwrt?
To return to MIUI: Download the official firmware from Xiaomi's website (.bin file). If you have a breed bootloader installed, download it (hold Reset when turned on) and swipe the file. MIUI If there is no breed, please go through the web. MIUI through UART (See method 3. After the return to MIUI All the settings will be dropped to the factory.
Why does Padavan not have 5GHz Wi-Fi after firmware?
Probably your Xiaomi Router model. 4A Does not support 5GHz at the hardware level (chip) MT7628 It only works in the 2.4GHz range. Check the sticker on the case: If specified 2.4G β€” 5GHz won't work on any firmware. If you're told Dual Band, try another Padavan build (like hanwckf).
Where to download the latest firmware for Xiaomi Router 4A?
Official firmware: Xiaomi site (choose the Mi Router model) 4A). OpenWRT: OpenWRT Wiki. Padavan: forums 4PDA (Look for themes from hanwckf or padavanonly. Before downloading, check user reviews about build stability!