Installation on Xiaomi Mi 4A 100M

Hi,
There seem to be different versions of the R4AC 100M available e.g., R4AC or MIR4A.

The label of the one I have is similar to MIR4A but the installation procedure did not work, also not this one or that one, both suggesting to go back to earlier stock firmware.

Following steps worked for the Xiaomi Mi 4A 100M model: R4AC bought in June 22.

1. Modify the ROM

Modify the ROM in a similar way as described here

  • Download the flash memory (make a backup)
  • Change a couple of values
    • Enable bootdelay: Change bootdelay value from Off to 100 at 0x0001A8C0
    • Enable connections: Change values uart_en=0 ssh_en=0 telnet_en=0 to uart_en=1 ssh_en=1 telnet_en=1 at 0x0001D540
  • Write the modified image back to the flash chip
2. Install Openwrt

The procedure follows generic flashing

  • Attach a serial console to the router and start the serial monitor
  • Connect ethernet from router port to your computer
  • Boot the router and select 1 (option to install flash image from tftp)
  • Confirm the device IP 192.168.31.1
  • Confirm the server IP e.g. IP 192.168.31.100
  • Configure ethernet of your computer to static IP 192.168.31.100
  • Start TFTP server on your computer (e.g. tftpd64)
  • Set server IP of TFTP server to 192.168.31.100
  • Serve the openwrt initramfs-kernel image, rename the downloaded file to test.bin
  • Confirm the file name in serial console (test.bin)
  • The router copies the image file via tftp and boots into openwrt
3. Setup Openwrt
  • Start wifi
    • Edit /etc/config/wireless
      • Set option wireless disabled '0'
      • Set option encryption 'psk2'
      • Set option key 'yourwifipassword'
    • Execute wifi up
  • Disconnect ethernet between router and computer
  • Connect computer to wifi from router
  • Copy the sysupgrade image to the router
    • scp /path/to/downloaded-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/.
  • Flash the image and reboot
    • mtd -e firmware -r write /tmp/downloaded-squashfs-sysupgrade.bin firmware

This is the flash layout after OpenWrt was installed
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00010000 "bootloader"
mtd1: 00010000 00010000 "config"
mtd2: 00010000 00010000 "factory"
mtd3: 00010000 00010000 "crash"
mtd4: 00010000 00010000 "cfg_bak"
mtd5: 00100000 00010000 "overlay"
mtd6: 00ea0000 00010000 "firmware"
mtd7: 00218a72 00010000 "kernel"
mtd8: 00c8758e 00010000 "rootfs"
mtd9: 008f0000 00010000 "rootfs_data"

Was the original Xiaomi firmware in chinese or English?

Was the original cardboard box for your R4AC in black/orange/white colour scheme, with all writing in English to indicate it is the global edition, or perhaps a white box with all writing in Chinese?

The link to the image of the back of the router you posted appears to be from the wiki page for the original chinese version of the 4AC 100m model.
https://openwrt.org/toh/xiaomi/mi_router_4a_mir4a_100m

However, I suspect the image in the wiki page is incorrect. The chinese models of Xiaomi routers usually have chinese writing on the label for the local market. I suspect the image on the wiki page is for the global model, such as the one shown below:

The label originally shown in the new wiki page for the 4A 100m International model, was in fact the label attached to the cardboard shipping box. I've corrected the page:
https://openwrt.org/inbox/toh/xiaomi/r4ac

1 Like

Was the original Xiaomi firmware in chinese or English?

It was in English.

Was the original cardboard box for your R4AC in black/orange/white colour scheme, with all writing in English to indicate it is the global edition, or perhaps a white box with all writing in Chinese?

It is black/orange/white colour scheme.

The link to the image of the back of the router you posted appears to be from the wiki page for the original chinese version of the 4AC 100m model.
https://openwrt.org/toh/xiaomi/mi_router_4a_mir4a_100m

Yes, the label on the back of my router matches to the one from the image in the wiki.

The label originally shown in the new wiki page for the 4A 100m International model, was in fact the label attached to the cardboard shipping box. I've corrected the page:
https://openwrt.org/inbox/toh/xiaomi/r4ac

I can confirm same label on the shipping box. Just the production date is a bit different.

1 Like

Thank you for confirming the details.

It would appear you have the Global model, and the wiki instructions for flashing the chinese model would have failed as you discovered.

I have understood that you call this one the global model and that one the chinese model.

Both have the same hardware, their installation descriptions did not work successfully here.

The solution was to enable bootdelay and follow the installation instructions for TFTP.

The working image on my router is openwrt-ramips-mt76x8-xiaomi_mi-router-4a-100m-squashfs-sysupgrade.bin, not the global one (i.e. unlike reported here).

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.