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
to100
at0x0001A8C0
- Enable connections: Change values
uart_en=0
ssh_en=0
telnet_en=0
touart_en=1
ssh_en=1
telnet_en=1
at0x0001D540
- Enable bootdelay: Change bootdelay value from
- 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'
- Set
- Execute
wifi up
- Edit
- 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"