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

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?

1 Like

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:
https://forum.openwrt.org/t/solved-luci-wont-start-unable-to-find-logs-or-other-clues/15824

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

16

/

16

Per

17d

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.

Carp

1

17d

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:

lsusb

unable to initialize libusb: -99

opkg list-installed | grep libusb

libusb-1.0 - 1.0.22-1

lsmod

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

1

Per

17d

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.

Carp

17d

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:

Per

17d

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

13 DAYS LATER

Carp

3d

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!

04

9000000

1m

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) 192.168.6.245 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) 192.168.6.245 d8:c4:6a:d6:20:71
Tue Sep 25 01:21:13 2018 daemon.info dnsmasq-dhcp[2381]: DHCPACK(br-lan) 192.168.6.245 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 192.168.6.245
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).

I would wait for 18.06.2. Current 18.06.1 still has bugs.

1 Like

Can you provide link to PandoraBox for Xiaomi Wifi Router 3G and instruction how to flash from OpenWrt to PandoraBox?

Make mistake and buy Xiaomi router 4. Playing around. Boot initramfs from 3G version with looks ok, eth ports mistmatched. Mtd write kernel1 and rootfs0 finished without errors, but trying boot after fails on checksum mismatch from uboot. setenv verify=no, has no effect. Should i replace uboot with custom uboot build ?
Can provide boot log from original firmware, or from initramfs 3G if interested and hardware photos.

Hi guys, I installed Openwrt version 18.06.1, I own an internet fiber of 200 / 30mb. Direct on the fiber converter, via cable, I get the maximum band of 200/30. But when passing through my Mi3G, I get at most 140/30, with no plugin installed (qos, sqm ... etc) either via cable when on 5ghz. Anyone with internet speed up, can you reach the maximum speed higher than that? Did you make any further adjustments to that?