Xiaomi Wifi Router 3G - 18.06.X / feedback and help


I have tried once "shutdown" from SSH and then the router didn't boot at all. I had to do full clear to get it boot again :confused: I believe the problem is that there is no (at least externally available) power button.
So I believe it's much safer to reboot and then unplug power.


Is there any guide around to install the Breed bootloader?

Regarding the LAN IP, I find that it's better to change it through SSH in /etc/config/network and then reboot, never had any problems using this way.


Follow the standard steps till you get SSH in the router.
By default, the router LAN IP should be

BACKUP the firmware, if you wish.
It's too long to write here, I assume you know how to do it.

Download the BREED firmware, I got it from
This one is Chinese version, I do't know if there is an English version.

SCP the file breed-mt7621-xiaomi-r3g.bin to the router, I put it into /tmp.

SSH to the router, and execute the command
mtd -r write /tmp/breed-mt7621-xiaomi-r3g.bin Bootloader
After it's done,

Before the power on, press and hold the reset buttom untill the light blinks stable.
If you didn't do it in time, never mind, just power off, and do it again.
Now you should able to access the BREED interface though browser


After enabling HW NAT random reboot will occur
Currently using OpenWrt SNAPSHOT r8021-9e58c20

Here's the stack trace:

[ 9226.062793] Unhandled kernel unaligned access[#1]:
[ 9226.067594] CPU: 3 PID: 72 Comm: kworker/3:1 Not tainted 4.14.68 #0
[ 9226.073883] Workqueue: events_long nf_ct_kill_acct [nf_conntrack]
[ 9226.079952] task: 8fd712c0 task.stack: 8fdea000
[ 9226.084457] $ 0   : 00000000 00000001 8e222d98 000d904e
[ 9226.089667] $ 4   : 8f0f348c 00000000 0f55bc3d 00000001
[ 9226.094880] $ 8   : 00000000 00007c00 811ca500 0001225e
[ 9226.100092] $12   : 00000000 00000000 ffffffff 00000764
[ 9226.105306] $16   : 8f0f348c 8e9b7000 8e9b7000 00000000
[ 9226.110519] $20   : 000007da 805a0000 00000019 8f0d0000
[ 9226.115729] $24   : 00000000 8f0c06bc
[ 9226.120938] $28   : 8fdea000 8fdebdc0 805c1760 8f0f0864
[ 9226.126149] Hi    : 00000b32
[ 9226.129011] Lo    : 76457000
[ 9226.131889] epc   : 8f0f086c nf_ct_nat_ext_add+0x218/0x928 [nf_nat]
[ 9226.138129] ra    : 8f0f0864 nf_ct_nat_ext_add+0x210/0x928 [nf_nat]
[ 9226.144363] Status: 11007c03 KERNEL EXL IE
[ 9226.148533] Cause : 40800014 (ExcCode 05)
[ 9226.152517] BadVA : 000d904e
[ 9226.155382] PrId  : 0001992f (MIPS 1004Kc)
[ 9226.159453] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time
[ 9226.227867] Process kworker/3:1 (pid: 72, threadinfo=8fdea000, task=8fd712c0, tls=00000000)
[ 9226.236177] Stack : 00000000 000007da 805a0000 00000019 8e9b7000 8f0d0208 8f0d021c 8f0caf28
[ 9226.244516]         8e3a82b0 00000010 00000000 8e9b7000 8e9b7000 8e9b7040 00000013 8f0c066c
[ 9226.252857]         805fedc0 805a01b8 8123fdc0 00000001 8e9b7000 8f0c1c30 8fd715d8 80490000
[ 9226.261193]         805a0000 80056a98 8f0d0000 8f0d0000 00000020 00000002 8f0d01a4 8f0cce54
[ 9226.269530]         81242a00 8fd712c0 8f0d01a4 8fd0f180 8123fa40 81242a00 00000000 00000000
[ 9226.277864]         ...
[ 9226.280314] Call Trace:
[ 9226.282764] [<8f0f086c>] nf_ct_nat_ext_add+0x218/0x928 [nf_nat]
[ 9226.288675] Code: 02002025  8e23007c  8e220078 <ac620000> 10400002  00000000  ac430004  24020200  ae22007c
[ 9226.298400]
[ 9226.300064] ---[ end trace bdd2cad862bd9103 ]---


Maybe someone can help me with one strange issue I noticing.
I have work VPN that I bringing up on my laptop.
For a few days, it works correctly. But eventually(after a few days), I start to see issues with connection to remote servers behind VPN over SSH or updating sources from Git also behind VPN.
If I execute

sudo ip li set mtu 1200 dev vpn0

on the laptop it is starting to work.
To fix this with the router I need to reboot it few times and try to enable/disable MSS Clamping in FIirewall. I still haven't discovered the correct way to fix this at the router side.


@bademux and @Maxb66

Can you both make new threads for your issues?


Hello i have a problem with my router. I flashed latest OpenWrt from stock Xiaomi FW, my router turned on but then after a couple of minutes it crashed and now is softbricked. Failsafe doesn't work.

Current state:

  1. Power on router
  2. Orange LED is flashing.
  3. Quick blue light.
  4. Router reeboots itself and starting to do the same thing.

I soldered wires to serial on MB, and trying to get SOMETHING on my Raspberry Pi, but when I plug in router to power, nothing shows on Raspberry. Wiring is okay (TX to RX and RX to TX, GND to GND). Yesterday my router didn't want to boot when Raspberry is plugged in Serial port, i have read that plug wire just after boot would help but today router is booting even with Raspberry plugged in.

Can someone help me? Maybe I missed something? Sorry for my bad English...

#edit1 Okay i think i resolved my issue. Someone who use Raspi to unbrick router this may be helpfull. I used /dev/ttyAMA0 for serial connection (many tutorials on web ;use it) and that was wrong for me. I saw that when I type "dmesg | grep tty" i have another serial "/dev/ttyS0" so i tryied that and now i have full bootlog from Mir3g.

To conclude this, if You want to unbrick router with Raspberry UART use:

"apt-get update && apt-get install screen"
"raspi-config" Enable serial and disable shell login via serial
reboot raspberry
"screen /dev/ttyAMA0 115200" (if it doesnt show anything then try "/dev/ttyS0")


I was experiencing the same random reboot issue, which definitely seems HW NAT related. Unfortunately I need HW NAT to saturate my fiber bandwidth, so the only option I had is to avoid OpenWrt while this issue gets resolved.


Hi everyone,

I got the chance to get a Mi router 3G and put OpenWRT 18.06.01 without too much effort.
I installed luci using luci-ssl package and also luci-app-wifi-schedule.

Everything was working fine for few days. I took observation of the box but one day, my equipment connected via the router lan cannot use the WAN port to access the INTERNET.

LAN, Wifi legacy or the WIFI_5G is working correctly, DHCP was OK and lan client get their IP from the router.

The strange things is that luci is not running and there is no way for me to get luci status.
I used "logread -f" and used this link:

But logread don't give me any clue about what's going on with luci.

I'm in the same position as the person in the URL. I have to identify the location of the problem but logread does not give me more information while I try to stop/start luci again using /etc/init.d/uhttpd restart.

Could you help pointing out where to look at ?
The strange thing is that I did not touch the box while everything was working and suddenly my client in router LAN are prevented to go out the LAN.

Thank you for your help !

PS: I could reset the router and restart from scratch but I would like to handle few investigation as I did not touch the box. Maybe a memory leak or a filesystem gets full. As the link above, "df -h" shows that /rom is 100% used but the rest is available at 100%.


Everyone who has problem with original OpenWrt firmware, please read this thread and my solution Xiaomi Wifi Router 3G - 18.06.x / Wifi issues 2.4GHz + 5GHz

I spent a lot of time to adapt HomeAssistant for OpenWrt. Crazy issue with USB 3.0 totally blocks all work. Padavan's firmware allows you to turn-off USB 3.0.


But please be advised that if you install Padavan you are running outdated, unsupported software.


It depends on what you need:

  • Having the latest Linux Kernel, broken 2.4 Wi-Fi and USB,
  • Having old well-tested Linux Kernel, working WiFi, USB.

Please note that you can use Entware and keep all packages up-to-date. The only one question is Linux kernel. I'm good with 3.x.


I found the issue. It seems that the router was plugged into a loose power connection. Result is that some files like uhttpd and others config file were corrupted. "logread -f " is the right tools to look at the look. I just used sysupgrade -n -v <>.bin and everything is back to normal. uhttpd config is readable again. (you can vi the file). So I recommend to avoid unplug the router directly from the power as it seems that the filesystem can be easily corrupted. I'm checking the best way to periodically restart the router "cleanly". reboot seems to be the right command but I'm not sure if using it make the system going to down to lower run level. Thanks ! Frederic


Hi All,
Today I decided it was time to update the one year old Openwrt my router. I uploaded the sysupgrade firmware in Luci and started the process. However, afterwards I could not enter the Luci interface anymore. I used telnet to enter the console and figured out that a factory reset could not harm.

However, somewhere in the process I probably ruined it and it would not boot anymore. I then booted into fail-safe mode, but I could not use SSH or Telnet here as well. I then soldered a TTL usb to the PCB and started the debricking guide on the main page of the router. Afterwards, I could boot into the xiaomi webpage which I found so annoying in the first place:p. I currently run the Xiaomi 2.25 that was linked in the guide,

Unfortunately I can not configure the router in the Xiaomi app, with a message like "this is not a valid mi router" Therefore, it not possible to generate my SSH password (my old password does not work). I feel like I am stuck in my current environment :confused: I can start U-Boot at boot, but I think that I can do nothing useful here?


OpenWrt Forum






Have you tried building your own firmware? It's not so difficult: https://openwrt.org/docs/guide-user/additional-software/beginners-build-guide

When you have set up the build environment it is trivial to turn off USB3. It's under Kernel modules / USB Support in the make menuconfig menu.

I don't know of a way to switch it off in realtime if rmmod doesn't work. My guess is that they have added the functionality themselves.




Thanks! I've just built own firmware without USB 3.0 but with USB 2.0.

  1. Yes, there is no USB 3.0 in a system now
  2. USB 2.0 does not work => unable to initialize libusb: -99
  3. Kernel log => https://pastebin.com/raw/B0bV3k4M
  4. Menuconfig => https://pastebin.com/raw/P0xKyZN9
  5. Some additional information:


unable to initialize libusb: -99

opkg list-installed | grep libusb

libusb-1.0 - 1.0.22-1


cfg80211              227028  4 mt76x2e,mt7603e,mt76,mac80211
compat                   699  2 mac80211,cfg80211
crc_ccitt               1067  1 ppp_async
crc32c_generic          1456  0
ehci_hcd               35351  1 ehci_platform
ehci_platform           4688  0
ext4                  389200  0
gpio_button_hotplug     6448  0
ip_tables              10509  4 iptable_nat,iptable_mangle,iptable_filter
ipt_MASQUERADE           752  1
ipt_REJECT              1040  2
iptable_filter           720  1
iptable_mangle           976  1
iptable_nat              784  1
jbd2                   57986  1 ext4
leds_gpio               2992  0
ledtrig_usbport         2816  0
mac80211              446911  3 mt76x2e,mt7603e,mt76
mbcache                 4046  1 ext4
mt76                   20938  2 mt76x2e,mt7603e
mt7603e                31887  0
mt76x2e                48332  0
nf_conntrack           62728 11 ipt_MASQUERADE,xt_state,xt_nat,xt_conntrack,xt_REDIRECT,nf_nat_masquerade_ipv4,nf_conntrack_ipv4,nf_nat_ipv4,nf_nat,nf_flow_table,nf_conntrack_rtcache
nf_conntrack_ipv4       4464 11
nf_conntrack_rtcache    2448  0
nf_defrag_ipv4          1078  1 nf_conntrack_ipv4
nf_flow_table          13919  2 xt_FLOWOFFLOAD,nf_flow_table_hw
nf_flow_table_hw        2336  1
nf_log_common           2767  1 nf_log_ipv4
nf_log_ipv4             3536  0
nf_nat                 13611  4 xt_nat,nf_nat_redirect,nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_nat_ipv4             3473  1 iptable_nat
nf_nat_masquerade_ipv4    1660  1 ipt_MASQUERADE
nf_nat_redirect         1531  1 xt_REDIRECT
nf_reject_ipv4          2179  1 ipt_REJECT
nls_base                5456  1 usbcore
ppp_async               7136  0
ppp_generic            23202  3 pppoe,ppp_async,pppox
pppoe                   8880  0
pppox                   1418  1 pppoe
scsi_mod               93330  2 usb_storage,sd_mod
sd_mod                 29536  0
slhc                    5275  1 ppp_generic
usb_common              2583  1 usbcore
usb_storage            39643  0
usbcore               132371  4 ledtrig_usbport,usb_storage,ehci_platform,ehci_hcd
x_tables               14159 19 iptable_mangle,iptable_filter,ipt_REJECT,ipt_MASQUERADE,ip_tables,xt_time,xt_tcpudp,xt_state,xt_nat,xt_multiport,xt_mark,xt_mac,xt_limit,xt_conntrack,xt_comment,xt_TCPMSS,xt_REDIRECT,xt_LOG,xt_FLOWOFFLOAD
xt_FLOWOFFLOAD          2848  0
xt_LOG                   752  0
xt_REDIRECT              784  0
xt_TCPMSS               2160  1
xt_comment               560 61
xt_conntrack            2384  9
xt_limit                1264  1
xt_mac                   688  0
xt_mark                  752  0
xt_multiport            1360  0
xt_nat                  1616  0
xt_state                 784  0
xt_tcpudp               1872  6
xt_time                 1840  0

opkg list-installed | grep usb

kmod-usb-core - 4.14.67-1
kmod-usb-ehci - 4.14.67-1
kmod-usb-ledtrig-usbport - 4.14.67-1
kmod-usb-storage - 4.14.67-1
kmod-usb2 - 4.14.67-1
libusb-1.0 - 1.0.22-1
usbutils - 007-8




That's unfortunate. You could try adding kmod-usb-dwc2, and possibly kmod-usb-ohci, kmod-usb-uhci, kmod-usb-ohci-pci and kmod-usb2-pci.



The same :frowning:

$ lsusb
unable to initialize libusb: -99

P.S: Do you have this device? Could you try if lsusb works for you? It seems that we can't turn off USB 3.0 kernel module :frowning:



I have one, but unfortunately I won't have access to it for a while so I can't test anything myself.




I resolved this issue with Padavan's firmware https://bitbucket.org/padavan/rt-n56u

I highly recommend everyone to try Padavan's firmware. You will never back to OpenWrt/LEDE version.
Of course, I can control USB2.0/USB3.0. Everything works great!!! No more problems!




d8:c4:6a:d6:20:71 IEEE 802.11: disassociated
Tue Sep 25 01:21:12 2018 daemon.info hostapd: wlan0: STA d8:c4:6a:d6:20:71 IEEE 802.11: authenticated
Tue Sep 25 01:21:12 2018 daemon.info hostapd: wlan0: STA d8:c4:6a:d6:20:71 IEEE 802.11: associated (aid 2)
Tue Sep 25 01:21:12 2018 daemon.notice hostapd: wlan0: AP-STA-CONNECTED d8:c4:6a:d6:20:71
Tue Sep 25 01:21:12 2018 daemon.info hostapd: wlan0: STA d8:c4:6a:d6:20:71 WPA: pairwise key handshake completed (RSN)
Tue Sep 25 01:21:12 2018 daemon.info dnsmasq-dhcp[2381]: DHCPDISCOVER(br-lan) d8:c4:6a:d6:20:71
Tue Sep 25 01:21:12 2018 daemon.info dnsmasq-dhcp[2381]: DHCPOFFER(br-lan) d8:c4:6a:d6:20:71
Tue Sep 25 01:21:12 2018 daemon.info hostapd: wlan1: STA d8:c4:6a:d6:20:71 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Sep 25 01:21:13 2018 daemon.info dnsmasq-dhcp[2381]: DHCPREQUEST(br-lan) d8:c4:6a:d6:20:71
Tue Sep 25 01:21:13 2018 daemon.info dnsmasq-dhcp[2381]: DHCPACK(br-lan) d8:c4:6a:d6:20:71 Matrix88
Tue Sep 25 01:21:29 2018 daemon.err uhttpd[1185]: luci: accepted login on / for root from
Tue Sep 25 01:24:32 2018 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED d8:c4:6a:d6:20:71
Tue Sep 25 01:24:32 2018 daemon.info hostapd: wlan0: STA d8:c4:6a:d6:20:71 IEEE 802.11: disassociated
Tue Sep 25 01:24:32 2018 daemon.info hostapd: wlan1: STA d8:c4:6a:d6:20:71 IEEE 802.11: authenticated
Tue Sep 25 01:24:32 2018 daemon.info hostapd: wlan1: STA d8:c4:6a:d6:20:71 IEEE 802.11: associated (aid 1)
Tue Sep 25 01:24:32 2018 daemon.

Always error please fix


Thanks a lot, I installed BREED and it already saved me from a soft brick.

But is there anyway to build an openwrt .bin to be flashed with BREED? Over at the 4PDA forums a guy made a custom build with a .bin flashable through BREED.

I'd prefer to use my own build, but I'm having issues with getting an external HDD recognized and I suspect that it's because sysupgrade doesn't work properly and I end with mismatching kernel modules, since I can't find the HDD as a block-device anywhere.


Sorry, I can´t help you, I don´t know how to build a firmware myself. I can only download others build.


I'm pretty sure someone over 4pda made a script to glue kernel+rootfs together in order to flash over BREED as a .bin. You can also flash the xiaomi dev firmware over both partitions 1/2 (flash over 1, don't reboot, flash over 2, reboot). There you have it back to life, then plug a usb drive loaded with miwifi_ssh.bin, login into ssh and flash openwrt-ramips-mt7621-mir3g-squashfs-kernel1.bin and openwrt-ramips-mt7621-mir3g-squashfs-rootfs0.bin, nvram set flag_try_sys1_failed=1, nvram commit. Reboot. Done.

I think it's way faster to just google for the said script. heh


Just did that yesterday, ended up with a bootloop for some reason. Maybe I'll try again later.

For now I'm going to try to figure out how to build a .bin for BREED.


Is the latest release of Openwrt safe to install now and what are the issues, I waited a lot for it. I am currently running stock+padavan(dual boot) with breed as bootloader. Few months ago I tried flashing openwrt using padavan but it never used to work(breed used to save it from getting brick).