Xiaomi Broght out the Mi Router 4C and it was so cheap that I just hat to get it to tinker with it. I am usually just a user of OpenWRT but i'd like to make OpenWRT available for this.
From what I gathered from disassembling it it has the following specs:
A Mediatek MT7628DAN CPU/Network Controller
16MB (128Mbit) Flash Memory (W25Q128FV)
2x 100MBit LAN
1x ? WAN
I am not so sure about the CPU though. The name that was printed on the CPU was MT7628DAN but I found sources that linekd this to the MT7628AN.
I have something that looks like through holes for TTL headers (VCC,RX,GND,TX).
It seams to be a very similar device. Not the same (only have one radio 2.4Ghz), but I try to boot it up with the same flash image (used a ch341a to copy from one to another, keeping the original backups) and it boot without a problem.
I'm not finding the source in order to try and compile the code.
I manage to find out. This patch really works fine. Just need to compile the source code with the correct configuration for this model (took me a while to understand witch one is ) and add some packets to make my life easier.
I have 2 units one R4AC and another R4CM both base on RA 7628 soc and both are working 100%.
For future reference I'll leave here the images I created, may be useful for other people. @cperrin88, @Rubrex If haven't found a solution try this one:
As in per the presented patch as the instructions to install
INSTALLATION:
Connect to the serial port of the router and power it up.
If you get a prompt asking for boot-mode, go to step 3.
Unplug the router after
> Erasing SPI Flash...
> raspi_erase: offs:20000 len:10000
occurs on the serial port. Plug the router back in.
At the prompt select option 2 (Load system code then
write to Flash via TFTP.)
Enter 192.168.1.1 as the device IP and 192.168.1.2 as the
Server-IP.
Connect your computer to LAN1 and assign it as 192.168.1.2/24.
Rename the sysupgrade image to test.bin and serve it via TFTP.
Enter test.bin on the serial console and press enter.
(Remember you need to have a working tftp server on your side serving a file called test.bin (for this instructions, ofc you can change the file name)
Flash the openwrt-ramips-mt76x8-xiaomi_mir4a-100m-initramfs-kernel.bin file 1st (This is real important!)
After that you can either use the same method or flash via LUCI openwrt-ramips-mt76x8-xiaomi_mir4a-100m-squashfs-sysupgrade.bin . After this do not forget to do a factory reset!
Hi,
would it be possible to share flash image (for SPI Flah)? I have read and save original one, but forget to back it up. I did some changes in the original save, which I load to device and I am not able to revert it back. Router does not boot anymore.
Thanks
How do you get the serial to slow down enough to disconnect the power at the correct time? My router just seems to completely ignore all serial keystrokes.
You will find somewhere up this post that the original console does not wait and the serial input is disabled by default.
The trick that must be done is alter the original flash firmware and change the boot delay from off to 5s for instance. after that, you can enter tftp mode and flash openwrt to ram and after that the squashfs if you like.
The image I'm searching for @colbert (yes, I've no ideia where I did store it... :\ ) shall be already modified and ready to wait 5s on boot time for rx input from serial port.
Hello xTomax. I used your image. It working on my r4ac. But cannot save interface settings. After reboot returns to the default settings. Where could there be a mistake? Thanks and sorry for my english.
Thanks @xTomax, I've got it working. I followed the instructions to modify the flash the same as the 3Gv2 which I was doing at the same time and that worked perfectly.
That Image is from a R4AC, but as far as I can understand, may be wrong here, the internals only diff on the A(5G) chip.
Cannot save interface settings?
Any change you made is erased on every boot? Hummm, I was having a similar problem if I recall correctly, and it was one of the main reasons I wanted to flash openwrt. Didn't got the reason why. The flash it self shall be fine.