When the Xiaomi router (such as the Redmi AC2100) fails to flash and enters a "bricked" state (unable to boot, only the power light is on, unable to access the backend), it can be "unbricked" and firmware restored via DHCP + TFTP. This article explains how to configure DHCP and TFTP services using dnsmasq on a Linux system (such as Debian/Ubuntu) to help the router automatically download the recovery firmware miwifi.bin and complete the flashing process.
1. Network Environment Preparation#
Before unbricking, you need to prepare:
- A Linux computer with a static IP configured, recommended to set as 192.168.31.2 (matching the router's default address range).
- The router connected to the computer via an Ethernet cable (preferably directly or through a switch, to avoid interference from other DHCP services).
- Download the official firmware file suitable for your device and rename it to miwifi.bin.
- Install and configure dnsmasq to provide DHCP + TFTP services.
2. dnsmasq Configuration Example#
Edit /etc/dnsmasq.conf or create a custom configuration file, such as /etc/dnsmasq.d/tftp.conf, with the following content:
port=0 # Disable DNS functionality, used only as DHCP + TFTP
interface=eno1 # Set network interface (modify according to your network card name)
bind-interfaces # Bind interface to avoid being occupied by other services
dhcp-range=192.168.31.50,192.168.31.150,12h # Allocate IP address range
dhcp-option-force=66,192.168.31.2 # Specify TFTP server IP (i.e., local IP)
dhcp-boot=miwifi.bin # Specify boot file name
enable-tftp # Enable TFTP service
tftp-root=/mnt/tftproot # TFTP root directory, firmware must be placed in this path
After configuration, restart the dnsmasq service:
sudo systemctl restart dnsmasq
⚠️ Note: The machine configured with dnsmasq must be set to an IP in the same subnet as the router, such as 192.168.31.2, otherwise the router will not be able to obtain an IP or download the firmware.
3. Prepare Firmware File#
- Go to http://miwifi.com/miwifi_download.html to download the official firmware suitable for the Redmi AC2100 (usually in .bin format).
- After extracting, rename the firmware file to miwifi.bin.
- Place it in your designated TFTP directory, such as /mnt/tftproot/.
4. Router Flashing Steps#
- Power off the router, press and hold the Reset button (using a pin to press the small hole), then plug in the power.
- Keep holding the Reset for about 5-10 seconds until the indicator light flashes quickly (indicating it has entered flashing mode).
- The router will automatically obtain an IP via DHCP and then download miwifi.bin via TFTP and flash it.
- The entire process takes about 2-5 minutes, and after flashing, the router will automatically restart, restoring the factory system.