Xiaomi Router 3G questions

https://openwrt.org/docs/guide-user/services/nas/samba_configuration

1 Like

Thanks.
I read some posts but i am confused, it looks very complicated.
How to start, where to start?
I probably wont need usb3.0, for now i will be very satisfied with 2.0

You should read OpenWRT-page: https://openwrt.org/toh/xiaomi/mir3g However I don't like this router due to the fact, that to install OpenWRT you should create account on Xiaomi, connect router to it... I can only recommend you to install Breed.

1 Like

Thanks.
Can you explain me why to install Breed?
I read link you post but i still confused :frowning:.

It is modern loader with simple recovery function in case troubles with firmware.

1 Like

I read this tut: https://openwrt.org/toh/xiaomi/mir3g
And if i am not wrong, i should do this to install openwrt()my english is not perfect so sorry for a lot of questions:

Summary

For installation via ssh, it needs to be enabled first. The following steps are based on this forum post and this post from Reddit.

  1. Setup the router and install a dev firmware, for example http://bigota.miwifi.com/xiaoqiang/rom/r3g/miwifi_r3g_firmware_c2175_2.25.122.bin
  2. Install the Mi Wi-Fi app on a phone or tablet. (Android | there is also an iOS app)
  3. Open the app and connect your router. Also sign in to link that router to your account. The router should be detected assuming you are connected to its WiFi and the router is connected to the internet. It might also work without that. You also might get an error message when trying to connect the router stating that the device is no Mi Router. In that case using an older version of the app from pages like https://apkmirror.com will probably help.
  4. On a PC, visit https://d.miwifi.com/rom/ssh and sign-in to your account. It is important to have the https version. It might get switched to http and show an error. Changing that to https again should make the page load again. This is also the case for all clicks on that website, for example the download link will also probably only work if changing manually to https after getting an error.
  5. After login, a page with your router, root password for SSH access and a download button should be displayed. Press the download button to download the miwifi_ssh.bin file.
  6. Format a USB drive with FAT / FAT32 and copy the downloaded miwifi_ssh.bin to it.
  7. Shut down the router (unplug it) and put the USB drive in. Now you have to hold down the reset button of the router (use a paper-clip for example) while powering the router on (plugging the power cable in). Continue holding the button until you see the yellow LED start to flash. This might take a while (about 15 seconds). Now you can release the button. The router will reboot soon. Afterwards you should have SSH access.
  8. Login to the router using SSH with root as username and the root password that is displayed on https://d.miwifi.com/rom/ssh.

Actual installation via SSH:

  1. Copy openwrt-ramips-mt7621-mir3g-squashfs-kernel1.bin and openwrt-ramips-mt7621-mir3g-squashfs-rootfs0.bin optained from the OpenWrt download site to a USB drive or wget it directly via SSH to a location ( /tmp for example) on the router
  2. Switch to /extdisks/sda1/ (if copied to an USB drive) or to the folder on the router like /tmp if downloaded directly on the router
  3. Run mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
  4. Run mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
  5. Run nvram set flag_try_sys1_failed=1
  6. Run nvram commit
  7. Run reboot

But i am not sure about this part:

  1. Login to the router using SSH with root as username and the root password that is displayed on https://d.miwifi.com/rom/ssh.

Where to login?

You should get password on mi site. Login to router by SSH. Have you understood, that you should link your router to mi site?

1 Like

To login on app for pc? Or browser?
I try both but dont work.
Again, sorry for my non perfect english.

See manual by your link. You should install app on your phone, connect phone by WiFi to Mi-router, connected to Internet.

  • Setup the router and install a dev firmware, for example http://bigota.miwifi.com/xiaoqiang/rom/r3g/miwifi_r3g_firmware_c2175_2.25.122.bin

  • Install the Mi Wi-Fi app on a phone or tablet. (Android | there is also an iOS app)

  • Open the app and connect your router. Also sign in to link that router to your account. The router should be detected assuming you are connected to its WiFi and the router is connected to the internet. It might also work without that. You also might get an error message when trying to connect the router stating that the device is no Mi Router. In that case using an older version of the app from pages like https://apkmirror.com will probably help.

1 Like

See https://openwrt.org/docs/guide-quick-start/sshadministration

1 Like

I use Windows Powershell.
I get something different, is this ok?
te

You should use PuTTY. Have you installed app?

I try putty right now and i get same results.

What result? Have you followed manual?

This:
te
I am afraid to continue until someone can told me that this is ok, also, if i install this, how can i back to stock if i do something wrong?
Also, will i get wifi automatically turned on or i must do something to turn on wifi?

Also, on this tut:

Summary

Actual installation via SSH:

  1. Copy openwrt-ramips-mt7621-mir3g-squashfs-kernel1.bin and openwrt-ramips-mt7621-mir3g-squashfs-rootfs0.bin optained from the OpenWrt download site to a USB drive or wget it directly via SSH to a location ( /tmp for example) on the router
  2. Switch to /extdisks/sda1/ (if copied to an USB drive) or to the folder on the router like /tmp if downloaded directly on the router
  3. Run mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
  4. Run mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
  5. Run nvram set flag_try_sys1_failed=1
  6. Run nvram commit
  7. Run reboot

I go there and find for files and download? http://downloads.openwrt.org/releases/18.06.5/targets/

Again, sorry for my non perfect english so i must ask more times to be sure.
Thanks

Hello, what is your nationality?

If you are french, I have a very well detailed tutorial to install openwrt on the mi routeur 3G.

In this case, since you have access in ssh :

#Download the kernel1 and rootfs0 images to a FAT32 USB drive and connect the USB drive to the router. The following have been confirmed to work:

https://downloads.openwrt.org/releases/18.06.5/targets/ramips/mt7621/openwrt-18.06.5-ramips-mt7621-mir3g-squashfs-kernel1.bin

https://downloads.openwrt.org/releases/18.06.5/targets/ramips/mt7621/openwrt-18.06.5-ramips-mt7621-mir3g-squashfs-rootfs0.bin

  • On the firmware run `cd /extdisks/sdax (x = the number of usb drive)

  • Run: mtd write openwrt-18.06.5-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1

  • Run: mtd write penwrt-18.06.5-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0

  • Run: nvram set flag_try_sys1_failed=1

  • Run: nvram commit

  • Run: reboot

  • The router should now boot to OpenWrt

Be careful not to conflict with the ip of the internet box, openwrt by default uses ip 192.168.1.1, I configured my internet box on ip 192.168.10.1

In ssh, install Luci (webui) : opkg update && opkg install luci

Download : https://downloads.openwrt.org/releases/18.06.5/targets/ramips/mt7621/openwrt-18.06.5-ramips-mt7621-mir3g-squashfs-sysupgrade.tar

Go to : http://192.168.1.1/cgi-bin/luci/admin/system/flash and update with the file downloaded above.

More infos : https://openwrt.org/toh/xiaomi/mir3g

1 Like

I recommend you to install Breed: https://breed.hackpascal.net/breed-mt7621-xiaomi-r3g.bin Install it now, in stock firmware with SSH access, download to /tmp dir with wget:

cd /tmp
wget --no-check-certificate https://breed.hackpascal.net/breed-mt7621-xiaomi-r3g.bin

Check md5sum:

md5sum /tmp/breed-mt7621-xiaomi-r3g.bin

Now flash Bootloader:

mtd write /tmp/breed-mt7621-xiaomi-r3g.bin Bootloader

OK, now as @Zeymon:
Actual installation via SSH:

  1. Copy openwrt-ramips-mt7621-mir3g-squashfs-kernel1.bin and openwrt-ramips-mt7621-mir3g-squashfs-rootfs0.bin optained from the OpenWrt download site to a USB drive or wget it directly via SSH to a location ( /tmp for example) on the router

  2. Switch to /extdisks/sda1/ (if copied to an USB drive) or to the folder on the router like /tmp if downloaded directly on the router

  3. Run mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1

  4. Run mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0

  5. Run nvram set flag_try_sys1_failed=1

  6. Run nvram commit

  7. Run reboot

See manual:

Recovery to stock for R3G

Assuming you used the above installation instructions you will have a stock kernel image in system 1. If it can be booted then it may be used to perform a stock firmware recovery, thus erasing OpenWrt completely. From a 'working' OpenWrt state (even failsafe)

1 Like

Many times easier like that, I hadn't thought of it :slight_smile:

I corrected the error, I had copied it without paying attention, thanks for the fix.

1 Like

Thanks everyone from willing to help me. I am from Eastern Europe.
When i get ssh, can i delete this and in that usb put kernel1 and rootfs0 and than back to router?

How to Switch to `/extdisks/sda1/?
Just to type on putty that?
What is /tmp?
What is breed, what is differences if i install this or not?
If i install now, do i automatically get enabled wifi or i must do something else to enabled it?

I don't understand your question.

cd /extdisks/sda1
pwd

/tmp - is just folder in filesystem of router, it is located in RAM. For your purpose it is just place for downloading firmware.

Breed has good function of emergency firmware recovery.

You can configure WiFi, as any other features of OpenWRT.