Replacing the firmware
This document describes how to install Mudfish Firmware on the genuine "Xiaomi Mi Wi-Fi Nano / Youth (R1CL)" router.
This document is based on the assumption that you are familiar with using the console / terminal / command prompt.
Prepare
-
Buy "Xiaomi Mi Wi-Fi Nano / Youth (R1CL)" router at online shopping malls.
-
Connect the power to the router. Then connect the computer to LAN port (not WAN port)
-
Download 'official developer ROM' of Mi Wi-FI project. The available links are available in here(1) and here(2).
-
For Windows users, prepare curl and putty.
-
The following link provides a preliminary zip file containing curl and putty commands.
https://mudfish.net/releases/openwrt/tools/mr_fwc_prepare.zip
-
You can download the binary package for the curl command directly from https://curl.haxx.se/download.html link.
-
You can directly download the binaries for putty and prepare for SSH connections. You can download it from the link below.
https://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
-
Install official developer ROM
Now when you are ready, you need to install the official developer ROM on the genuine "Xiaomi Mi Wi-Fi Nano / Youth (R1CL)" router.
-
Connect the power to Xiaomi router. Connect the computer to work on LAN port (one of two white ports). WAN port (blue port) connects to the router which the Internet is connected.
-
Verify that the ping is successfully delivered to the 192.168.31.1 IP at the terminal or command prompt.
-
After confirming the ping works fine, please login at http://192.168.31.1 The first time you log in, there are some user password settings, Wi-Fi SSID settings. Please set it as simple as possible because it is supposed to overwrite again anyway.
-
Go to the Updating menu on the upper right, select Firmware and specify how to update. If there is a warning message for downgrading, ignore it.
Under "Check for updates" section, there is a button called "Update manually" which you can click on to upload.
-
Now wait five to seven minutes. Verify that the ping is successfully delivered to the 192.168.31.1 IP at the terminal or command prompt.
SSH login
If it is replaced properly with the developer ROM, you should log in to SSH and connect to the router.
-
If you ping the router after replacing the firmware, you will now need to set the root password to log in to SSH.
-
Please login to http://192.168.31.1/ using your browser and enter the user password you set before to login.
-
If you look at the URL after logging in, you will see "stok" at URL, please copy this part and replace it with the following command.
# curl -d "oldPwd=your_admin_pass&newPwd=desired_root_pass" \
"http://192.168.31.1/cgi-bin/luci/;stok=<stok from browser url>/api/xqsystem/set_name_password"If it runs properly, you should get
{"code":0}
response. -
Now connect to the router with the ssh command or putty.
# ssh [email protected]
-
If you can not connect to the router with SSH, you can enable telnet instead of SSH by using the following command.
# curl http://192.168.31.1/cgi-bin/luci/;stok=<stok from browser url>/api/xqnetwork/set_wifi_ap?ssid=tianbao&encryption=NONE&enctype=NONE&channel=1%3B%2Fusr%2Fsbin%2Ftelnetd
{"msg":"未能连接到指定WiFi(Connecting)","code":1616}After connecting to Telnet (port 23) to 192.168.31.1, please try to work on SSH connection by entering the following commands in order.
# sed -i ":x;N;s/if [.\; then\n.return 0\n.*fi/#tb/;b x" /etc/init.d/dropbear
# /etc/init.d/dropbear start
# nvram set ssh_en=1
# nvram commit
Install OpenWRT
You are now ready to install OpenWRT.
-
Use the following command to download the OpenWRT firmware image to the
/tmp
directory.# cd /tmp
# wget http://downloads.openwrt.org/releases/18.06.1/targets/ramips/mt76x8/openwrt-18.06.1-ramips-mt76x8-miwifi-nano-squashfs-sysupgrade.bin -
When the download is complete, flash the image.
# mtd -r write /tmp/openwrt-18.06.1-ramips-mt76x8-miwifi-nano-squashfs-sysupgrade.bin firmware
-
Wait 5 to 7 minutes for the image to flash and reboot. When the installation is completed, the router will be automatically rebooted.
Unplug and plug the cable which connected with the computer Of course you have to plug in white LAN port. Not to blue LAN port.
-
Now verify that the ping is properly delivered to the 192.168.1.1 IP at the terminal or command prompt. 192.168.31.1 IP is no longer used.
-
Now connect to the router with the ssh command or putty.
# ssh [email protected]
Install Mudfish
Now is the time to install the Mudfish package. For detailed installation instructions, please refer to Installing Mudfish section.