OpenWrt for Xiaomi Mi Router 4C

Why use a new uboot? the Xiaomi factory uboot not good?

Hello guys, I hope you can help me with this error i already install docker.io and docker on ubuntu during on my first step i got this error and i cant proceed with the next step

And this is my MI firmware verion 3.0.23

hello
anyone knows what is the maximum tx-power (dbm) in mi router c4 original firmware?

Less work, backup, and repartition. mtd1 uboot, then config, vendor and rest. But im searching for a sdk, now trying use mainstream uboot.
Unfortunately only affordable are mediateks with the "famous" mt76 driver?
Its really neccessary push the kernel so high, and mostly increase hw demands? What we get for this price. I have compile kernel because i want ipv6 free which looks impossible.

Thank you for your post, it has worked for me on several "Xiaomi Mi Router 4C".

I've reduced it to a few "shell only" commands.

Declaimer: No warranty! You could brick your device! Be aware of your local wifi regulations!

ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@192.168.1.1

opkg update
opkg install kmod-mtd-rw
insmod mtd-rw.ko i_want_a_brick=1
dd if=/dev/mtd2 of=/tmp/mtd2.bin
printf '\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' |dd of=/tmp/mtd2.bin bs=1 seek=160 count=14 conv=notrunc
mtd write /tmp/mtd2.bin factory
reboot

As a one liner:

ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@192.168.1.1 "opkg update && opkg install kmod-mtd-rw && insmod mtd-rw.ko i_want_a_brick=1 || true && dd if=/dev/mtd2 of=/tmp/mtd2.bin && printf '\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' |dd of=/tmp/mtd2.bin bs=1 seek=160 count=14 conv=notrunc && mtd write /tmp/mtd2.bin factory && reboot"

Feel free to write a more fault tolerant script :wink:

3 Likes

Thanks, this is great!

On first test with speedtest.net, speeds were much higher, but the router wifi shut off half way through and needed a reset - so maybe 20dBm is stretching the router when pushing the load. Since then, it hasn't shut off, so maybe just a one off.

Wifi on this router is shocking with OpenWrt installed, random cut-offs and connection drops, especially with multiple connections. Anecdotally, it seems a lot better after boosting to 20dBm.

Luckily, I didn't buy for wifi but it is good to know it's there if I need it. Best value seems to be Netgear wax202 for those that need wifi.

This router has 12v and 5v power brick variants. This "mod" may not work well with all of them.

You could try following instructions at this thread.

2 Likes

Do you have SPI 16MB dump firmware on GD25Q128C and EN25QX128A for Xiaomi 4c