Xiaomi WiFi Router 3G

This is how I got LEDE installed. Some of the steps can be done differently. I used this for inspiration https://www.youtube.com/watch?v=CSHNyo5QxaQ

  1. Unbox router
  2. Connect to the router using WiFi
  3. Goto http://192.168.31.1
  4. Go through the wizard to set passwords for the router + wifi
  5. Reconnect to the router using WiFi
  6. Goto http://192.168.31.1
  7. Logon and find the page where you can upgrade the firmware look for a big yellow dot with an "i" inside. You will see the version number of the router and there is a button below where you can browse for a file. Flash miwifi_r3g_firmware_c2175_2.25.122.bin (developer firmware) and wait a few minutes.
  8. Download https://play.google.com/store/apps/details?id=com.xiaomi.router to your phone/tablet (there is also an iOS app)
  9. Open "Mi Wi-Fi" app (and sign-up) and sign-in to your account. Router will be detected and added to your account (assuming you are connected to the WiFi on the router and the routers WAN port is connected to Internet).
  10. On a PC, visit http://d.miwifi.com/rom/ssh and sign-in to you account. You will get to a page that should display your router, the root password and a download button. Hit the button to get miwifi_ssh.bin
  11. Format USB drive using FAT32 and copy miwifi_ssh.bin, lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin to the USB drive
  12. Cut the power the router, put the USB drive in the router, press and hold "reset" button (with a paper-clip), power on the router (while holding reset). When the router starts flashing yellow release the reset button. Wait until router has rebooted and you should (finally...) have SSH access.
  13. Login to the router using SSH using the "root" as username and the (root) "password" from http://d.miwifi.com/rom/ssh
  14. In SSH console
    cd /extdisks/sda1 (can be different if you remove and reinsert the usb stick)
    mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
    mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
    nvram set flag_last_success=1
    nvram commit
    reboot
  15. LEDE should be installed and available at 192.168.1.1 (with WiFi disabled I assume)
  16. Upgrading to a newer snapshot can be done using the regular methods (from the command-line using sysupgrade or through LuCI) using lede-ramips-mt7621-mir3g-squashfs-sysupgrade.tar

Thanks @dissent1 for adding the router to LEDE. Both WiFi radios seems to work (2.4Ghz on 20Mhz, 5Ghz on 80MHz) and I have also tested USB3 port with success. I have not tested 40MHz for 2.4Ghz as it does not make sense for me (very crowded WiFi). 5Ghz radio does not seem to like DFS channels (I get "DFS start_dfs_cac() failed, -1" in the log). The channels seems to work nicely when disabling DFS (by removing the requirement from regdb.txt for the selected country before building firmware) so this is likely "just" a DFS issue.
I can't say anything about stability yet. I'll probably try to replace my TP-Link Archer C5 with the Xiaomi router within the next week and then I will have to see how well it performs and how stable it is.

5 Likes