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

Hello guys, i just recently installed OpenWRT on my 3G Router.
Currently i'm running OpenWrt SNAPSHOT r7964-23366b6dc6

I'm facing issue with 5Ghz wireless, everything else works really well.

image

The SSID simply wont show up and i'm not sure if the radio is activated properly

Here's my iwinfo
https://pastebin.com/CHNtFexM

and iw phy phy1 info
https://pastebin.com/B7pmeuHE

Log excerpt when i restarted the 5G / AC wireless
https://pastebin.com/7eNhEKtj

I've tried various frequency / channel and earlier OpenWRT builds but still no go :frowning_face:

Any idea how to fix this? Thanks a lot!

1 Like

is 2.4Ghz stable now? to me everything is good except for the mt7603e 2.4Ghz is too bad for any serious usage on this device, so far it seems there is no cure

Hi all,

My brand new 3G turned up this morning, so I went straight in with the official build. The biggest issue with installing is getting the ssh working, because the download link (http://d.miwifi.com/rom/ssh) is https://, and it continually redirects to the http:// site - so it looks like the Xiaomi download site is down. So be sure to change the text in the URL bar to https:// AT LEAST twice through the process.

I now have an out-of-the-box, powered up with factory firmware once and then installed a fresh build using the new stable OpenWrt 18.06.1 r7258-5eb055306f (https://downloads.openwrt.org/releases/18.06.1/targets/ramips/mt7621/mir3g-squashfs-kernel1.bin and rootfs0.bin, dated August 17 2018).

Once up and running, it lasted three reboots before LuCI no longer worked. I could ssh in, and discovered /etc/config/uhttpd was corrupted and full of null bytes. Restored it with opkg update; opkg install uhttpd --force-reinstall.

LuCI login screen appeared, but would not accept my password (which I used to ssh with so knew it was good!). Another corrupted file; /etc/config/rpcd - also all full of null bytes. I recreated this by hand:

config login
option username 'root'
option password '$p$root'
list read ''
list write '
'
and after restarting rpcd I had full access into LuCI again. I made no changes to anything that should have touched those files - so, be warned, something isn't quite right with how it is writing to flash or surviving power shutdowns. Maybe the hardware, maybe the software - I'll keep experimenting and report any further breakages. I have yet to find any other corrupted files; just those two.

Performance-wise, it is rock solid so far running 2.4 and 5g with 4 SSID, fairly restrictive firewalling between three zones, and trunking the VLANs off the switch into my NAS. If it hadn't had config file corruption so early, I'd say this device is five star; but I'll hold back for a bit on my overall opinion.

Hope my experience helps someone else if they run into something similar.

1 Like

@rian You should create a new topic because it isn't wifi issue (butI have the same issue on my R3G and the last release)

@adityajiwap Did you try with last release and not snapshot ?

yes, tried both but no avail. now i'm back to stock FW since i need the 5ghz.

any other ideas?

Official documentation USB 3.0 and WiFi problems:

or disable the USB3 driver to force fallback to USB2.0. Many current LEDE devices aren't even noticably faster on USB3.0 data transfers compared to 2.0.

Could someone point me how to disable USB3 driver? It seems that USB 3.0 is compiled into the kernel. Removing of kmod-usb3 package does not help. The same with rmmod xhci-hcd.

So, I see a ton of complaints that 2.4 WiFi does not work in pair with OpenWrt if you have connected USB device. Of course, I have external USB card-reader + microSD card.

The same configuration works excellent with stock firmware. But! There is the one significant NOTE! Xiaomi DISABLES USB 3.0 by default in their stock firmware. They even write in GUI that enabling USB 3.0 will gift you a ton of problems for 2.4Gz.

Configuration

Stable 18.06.1

$ lsmod | grep xhci
usbcore               128400  8 ledtrig_usbport,usb_storage,ehci_platform,ehci_hcd,xhci_mtk,xhci_plat_hcd,xhci_pci,xhci_hcd
xhci_hcd               89360  3 xhci_mtk,xhci_plat_hcd,xhci_pci
xhci_mtk                4864  0
xhci_pci                2752  0
xhci_plat_hcd           5632  0

$ opkg list-installed | grep usb3
kmod-usb3 - 4.14.63-1

# check USB 2.0 loaded module
$ lsmod | grep ehci
ehci_hcd               35120  1 ehci_platform
ehci_platform           4832  0
usbcore               128400  8 ledtrig_usbport,usb_storage,ehci_platform,ehci_hcd,xhci_mtk,xhci_plat_hcd,xhci_pci,xhci_hcd

$  lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 14cd:125c Super Top SD card reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/1p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M
    |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M

As you can see, Driver=xhci-mtk, USB 3.0.


Why we can't resolve this issue finally and make people happy with OpenWrt? Why should all people move back to stock?

Thanks in advance!

1 Like

Have you tested if it works better if you disconnect the USB3 peripherals? I don't think everyone who had problems with 2.4 GHz were using the USB port.

So, I removed my card reader from USB and everything works well. Using 5Ghz is not a solution, not all devices at my home support this frequency.

I'm really interested in the solution by Xiaomi. How do they switch between USB 2.0 & 3.0 programmatically? They have a check box in UI.


Hi @nbd, it was nice to meet you at Prague at OpenWrt Summit 2017. Do you have any hints on how could we force USB 2.0 drivers for Xiaomi 3G?

Thanks in advance!

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:

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 Like

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!

04

2 Likes
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

Hi,

I have then tried PandoraBox. Well wifi is better than Padavan and better than OpenWrt.

I have also a Xiaomi 3, i changed that to PandoraBox due to use of propietary drivers.

It's a pitty OpenWrt can not use those drivers as it has the best support/plugins.

Ciao
Attaros

Hey,
can you tell us how to install PandoraBox? Which version do I have to install and how does it work? Via sysupgrade or is there anything else I have to do?

Does anyone have the same Problem as me?
After flasing OpenWRT and connecting my routers lan to the wan port of the mi wifi3g I can activate Wifi and its working. But when I turn off the power and turn it back on I cant get internet access over Wifi anymore and it never comes back. I am trying since 10 hours and I really do not know what to do anymore.

Start by posting the system and kernel log after a reboot. My first thought is that there's a problem with the flash memory, resulting in a broken config file. That has caused several similar problems on this router.