Xiaomi Router 3G questions

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.

Lets check if i good understand everything, first unlock ssh, and do everything until i go there:

Then i back usb from router to pc, and put openwrt-ramips-mt7621-mir3g-squashfs-kernel1.bin and openwrt-ramips-mt7621-mir3g-squashfs-rootfs0.bin USB drive and back to router

Then just type /extdisks/sda1/
Type mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
Type mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
Type nvram set flag_try_sys1_failed=1
Type nvram commit
Type reboot

Then type my ip to browser and configure everything.
Is that it?

My english is not my nature language so sorry for a lot of questions :frowning:

Install Breed initially.
See output of

cd /extdisks/sda1
ls

Current version is 18.06.5, so correct names of files.

just after get SSH acces to install breed?
should i need to type all
cd /tmp?
Or dont type tmp?
I am not sure where is /tmp filesystem of router

Yes, install Breed just after SSH.
Read it firstly: https://www.ubuntupit.com/the-50-best-linux-commands-to-run-in-the-terminal/

Please, ask question one time.

See again:

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

There is precise command, don't ask stupid questions like

cd /tmp?
Or dont type tmp?

@ulmwind

There's one thing I don't understand, he has ssh access with the stock firmware ? (no ssh if I remember correctly)

Where did he install the developer firmware ? With this procedure :

By going through breed, it avoids the procedure of going through an xiaomi account and app?

I didn't know breed, thank you for enlightening me.

Where did he install the developer firmware?

Setup the router and install a dev firmware...

It is needed to get SSH access to the router. Or do you have SSH access without any manipulation?

The process of going through mi account and app serves to get SSH access.

So I repeat my question, do you have SSH access without any manipulation?

No, that's what I was just asking you.

When I installed openwrt on my router (it's been a while already), I followed this instruction: fake xiaomi account + app for linked my router, then deleted the router from the app afterwards, forced to go through there to get ssh access.

So @stefs has already done this step, but what I was asking you is what is the difference between Breed and the classic installation I mentioned above?

I installed dev filmware earlier.
I am not sure where is /tmp filesystem of router?
Can i just put this to usb drive?
What to type then?

Type the command :

cd /
ls

Do you see the /tmp folder?

Breed is bootloader, it is not firmware itself. So 'os of router' consists of bootloader and firmware itself. Breed is good bootloader for number of router, it has emergency recovery function. Stock bootloader maybe also have, but it should be studied in concrete case.

Last question, please, explain about 'fake' mi account.

I see tmp, thats ok.
But i am not sure, when i download files, its all go to download folder.
Where to find temporary files folder to put Breed?

I did it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :star_struck: :smirk:

Thanks to all for patience for my english, i have a lot of questions but now when i did it feeling soo good.
I install from usb, i dont install Breed, i wasn"t sure about that but i lose my nerve so i hurry but everything is ok.
Can someone explain me more how to install Luci, and what i will get if i install it?
Also, i will send some images with some questions so please if someone is willing to explain me.
My first question is about SMBV3, how to configure, should i configure anything or thats it ,...
My other questions is on images, click on image to see question.
Now i have connected two phones and this pc.




An account that only serves to activate the ssh and nothing else, with fake information, then once the activation is done, I delete it from the account. To see the router in the app, you have to choose the Chinese country.

The file will be downloaded by default to the folder where you are located.

cd /tmp # you are in the folder tmp
wget X # you download X into the tmp folder
ls #you see all the files in the tmp folder

You will see X in the tmp folder.

@ulmwind : The option is not recognized, I don't know if it's the same for @stefs

root@OpenWrt:/tmp# wget --no-check-certificate https://breed.hackpascal.net/breed-mt7621-xiaomi-r3g.
bin
wget: unrecognized option '--no-check-certificate'
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.