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


Did you try compiling without USB3 support like Carp did earlier in this thread? Unfortunately he was not successful in using other USB drivers instead.


I don't use the 2.4GHz band, so i didn't care that much about USB. Out of curiosity i decided to omit usb all together from the kernel. The results strangely enough got worst.drop_packages_bo_usb
Now i loose packages constantly, have lower speeds and still have disconnects, less frequent though. That was weird enough to got me revert to the previous firmware so i could eliminated the environment factor.drop_packages_with_usb
So reverting i got the old behavior. Im not convinced that the usb have such a dramatic effect, yet is the only thing i changed. Hmmm ....



I suggest always to go to Stock before chaning to Padvan/OpenWrt/Pandora.
OpenWrt -> Stock -> Pandora

When i was on OpenWrt i first updated the "bootloader" to "breed". This then makes it easy to go to Padvan/OpenWrt/Pandora/Stock. Search the Web for instrunctions on Breed

To update "bootloader" while i was on "OpenWrt" i did as below.
Connect via ssh to the router:

cd /tmp
mtd_write unlock Bootloader
wget --no-check-certificate https://breed.hackpascal.net/breed-mt7621-xiaomi-r3g.bin
mtd_write write breed-mt7621-xiaomi-r3g.bin Bootloader
mtd_write verify breed-mt7621-xiaomi-r3g.bin Bootloader

If you miss mtd_write then you can:
SSH to the router, and execute the command:

opkg update
opkg install kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1
mtd unlock /dev/mtd0
mtd -r write /tmp/breed-mt7621-xiaomi-r3g.bin Bootloader

To flash with "Breed":
Before the power on, press and hold the reset buttom until the light blinks stable.
Now you should able to access the BREED interface though browser




Why are not there any developers fixing 2.4 g wi-fi in this modem? It is always connected and can not be reconnected if the legacy rate is only 10 megabits per second


Can not customize the Tx power option 2.4ghz


I am using the test and quality 2.4G wifi extremely bad, 20mhz is 6 Mb, 40mhz is 54Mb, wifi always disconnected automatically, too disappointed :frowning:

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

I just saw an update for mt76xx,
But there is no improvement in the 2.4ghz band :disappointed_relieved: :sleepy:



Please note that MT7621 doesn't come with either EHCI or OHCI controller, both USB2.0 and USB3.0 are controlled by its XHCI. Thus if you disable XHCI you disable USB completely.
If you want to force USB2.0 mode, just plug your USB3.0 device halfway into the USB port at some point where USB2.0 pins are connected while USB3.0 pins are disconnected.


Interesting, but then how does the Padavan firmware force USB2 mode?


It's a parameter passed into the XHCI driver module

At trunk/linux-3.4.x/drivers/usb/host/xhci.c line 49:

int usb3_disable = 0;
module_param(usb3_disable, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(usb3_disable, "Disable USB3 interface");

And it disables USB3.0 port power if usb3_disable is set
At trunk/linux-3.4.x/drivers/usb/host/xhci-hub.c line 838:

			if (usb3_disable && hcd->speed == HCD_USB3)
				xhci_writel(xhci, temp & ~PORT_POWER, port_array[wIndex]);
				xhci_writel(xhci, temp | PORT_POWER, port_array[wIndex]);

How to disable usb 3.0 in driver to avoid 2.4GHz interference?

Here, I made a patch to force USB2. It's very basic and can't be configured. Someone more experienced should mainline this.

How to, by building your own image:

USB and 2.4Ghz works fine for me now !
Thanks to LGA1150 for the detailed info :slight_smile:

[xiaomi R3G] SSD USB3 driver not working

Also see this link:
I find it much easier to understand.


I am experiencing severe problems with wireless. 5GHz can't be searched by win10 laptop, but my Mi 5 can (not stable).

Xiaomi Wifi Router 3G - 18.06.X / feedback and help
split this topic #37

A post was merged into an existing topic: Xiaomi Wifi Router 3G - 18.06.X / feedback and help


after install snapshot ( 17.12.18 ) wifi and usb not work


use different channel


I may consider to buy this device.
So there are only problems, if I use USB 3.0 and 2.4GHz at the same time?
Do I need to disable USB 3.0 drivers for stable 2.4GHz wifi even if I don't use the USB port?
Please tell me If I understood something wrong.

And by the way thanks for sharing your solution.


I use your advice, everything works for me usb and 2.4Ghz, thank you everyone!


I've been playing around with this device. What I've noticed so far is that using this patch to disable usb3 doesn't do that much to improve wifi speeds. I think the most impact has the fact that folks have been working on the opensource driver:

If you're following LucyLight's advice you will indeed get the latest drivers in - however the same can be done by flashing the latest snapshot.

I've done some tests (not conclusive might i add) with the latest "official" snapshot and a snapshot with USB3 disables using the patch.

The only difference i noticed was that usb3 was disabled :). That and the fact that when i plugged a usb3 harddrive the router died the first time and then i saw weird errors:

[   93.472005] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
[   93.506434] scsi host0: uas
[   93.510324] xhci-mtk 1e1c0000.xhci: ERROR Transfer event for unknown stream ring slot 1 ep 4
[   93.518763] xhci-mtk 1e1c0000.xhci: @000000000f7ca170 0dc18000 00000000 05000000 01058001
[   93.526908] xhci-mtk 1e1c0000.xhci: ERROR Transfer event for unknown stream ring slot 1 ep 6
[   93.535314] xhci-mtk 1e1c0000.xhci: @000000000f7ca180 0dc18100 00000000 05000000 01078001
[  114.461636] scsi 0:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[  114.469204] scsi 0:0:0:0: tag#0 CDB: opcode=0x12 12 00 00 00 24 00
[  114.475520] xhci-mtk 1e1c0000.xhci: Mismatch between completed Set TR Deq Ptr command & xHCI internal state.
[  114.485307] xhci-mtk 1e1c0000.xhci: ep deq seg = 8dc01200, deq ptr = aead8010
[  115.551601] scsi host0: uas_eh_device_reset_handler FAILED to get lock err -16

Mind you this is from the stock snapshot.

With the patch that disables USB3 the drive connects properly:

[  762.864874] usb 1-1: new high-speed USB device number 4 using xhci-mtk
[  763.058565] scsi host0: uas
[  763.062822] scsi 0:0:0:0: Direct-Access     Seagate  Expansion        0708 PQ: 0 ANSI: 6
[  764.866108] sd 0:0:0:0: [sda] 1953525167 512-byte logical blocks: (1.00 TB/932 GiB)
[  764.873767] sd 0:0:0:0: [sda] 4096-byte physical blocks
[  764.879344] sd 0:0:0:0: [sda] Write Protect is off
[  764.884133] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[  764.884573] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  764.991112]  sda: sda1 sda2 sda3 sda4
[  764.998675] sd 0:0:0:0: [sda] Attached SCSI disk

But at usb2 speeds as expected.

TLDR: Just flash the latest snapshot.


Sorry to be a pest, but I'm stuck.

I have recently installed openwrt[1] on a xiaomi 3rg, aka mir3g. The 5G wireless isn't working and I need advise about how to diagnose what's wrong.

  • Thanks for any help! - ben


When enabled the GUI shows the radio as 0%.
I can scan for access points, i can even attach to one of them.
Things that don't change the situation:

  1. restarting the radio
  2. changing the channel, ssid, encryption.
  3. changing the number of wifi-iface.
  4. restoring a config from backup.
  5. rebooting, of course

This is my config, radio1 is the problem.

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
	option htmode 'HT20'
	option country '00'
	option legacy_rates '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option encryption 'psk2'
	option key 'secretsanta'
	option ssid 'wireless@cozy.org'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:01.0/0000:02:00.0'
	option htmode 'VHT80'
	option country '00'
	option legacy_rates '1'
	option channel '112'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option encryption 'psk2'
	option key 'secretsanta'
	option ssid 'wireless-5g-new@cozy.org'

[1] OpenWrt 18.06.1 r7258-5eb055306f / LuCI openwrt-18.06 branch (git-18.228.31946-f64b152)