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


#32

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.


#33

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


#34

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.


#35

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


#36

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?


#37

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


#38

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.


#39

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


#40

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


#41

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.


#42

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).


#43

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


#44

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


Xiaomi Wifi Router 3G - 18.06.x / Wifi issues 2.4GHz + 5GHz
#45

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.


#46

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?


#47

I can easily reach 250/15 (my connection limits) on wired.. Can reach this with or without flow offloading. I cannot reach 250 with QOS on though, if i enable i get around 140mb so you probably have qos enabled. either

Disable QOS
or
Enable qos only on up direction (set down speed to 0 in qos)
or
Enable Software and Hardware flow offloading from firewall tab - is use this


#48

How do I remove the breed bootloader from my mi router 3g? I'm using padavan, I want to use the stock bootloader again.


split this topic #49

A post was merged into an existing topic: Xiaomi Wifi Router 3G - 18.06.x / Wifi issues 2.4GHz + 5GHz


#50

Any Idea on how I can flash breed boatload from within OpenWrt? If I try so the system tells me that the mtd Bootloader is locked ... ?!
Do I have to go back to stock first and than flash breed as bootloader?

Anny tips are highly appreciated!!!

Th.


split this topic #51

A post was merged into an existing topic: Xiaomi Wifi Router 3G - 18.06.x / Wifi issues 2.4GHz + 5GHz