xmin

明茶xmin

Use dnsmasq to configure DHCP + TFTP to rescue the Xiaomi Router Redmi AC2100.

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, and unable to access the backend), you can "unbrick" it and restore the firmware using 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 configured with a static IP, recommended to set it to 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. Example dnsmasq Configuration#

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 for DHCP + TFTP
interface=eno1                          # Set the network interface (modify according to your network card name)
bind-interfaces                         # Bind the 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 the boot file name
enable-tftp                             # Enable TFTP service
tftp-root=/mnt/tftproot                 # TFTP root directory, place the firmware 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 the Firmware File#

  • Go to http://miwifi.com/miwifi_download.html to download the official firmware for the Redmi AC2100 (usually in .bin format).
  • After extracting, rename the firmware file to miwifi.bin.
  • Place it in the TFTP directory you set, 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, after which the router will automatically restart and restore the factory system.

5. References#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.