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


#1

When I bought Unielec u7621 router, I thought buying something that has usb3.0 support would be better. Unfortunately I wasn't aware of the usb3.0 interference with wifi 2.4ghz band.

No matter i plug in to the usb3.0 port, my 2.4ghz wifi always goes crazy.
I tried usb2.0 devices, I tried removing kmod-usb3 package but no luck.

Last thing I didn't try was disabling usb3.0 in the driver which was explained here

https://openwrt.org/docs/guide-user/network/wifi/usb3.0-wifi-issues

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.

I don't know how to do it. Any help?


#2

There is a brief explanation here: Xiaomi Wifi Router 3G - 18.06.x / Wifi issues 2.4GHz + 5GHz

Unfortunately I think you need programming skills to make use of it. The post from the next person contained the link to a patch for disabling USB 3, but it's no longer available on the server. The code it contained was very different from what LGA1150 posted.

Your problem may be caused by something else, though. I don't think it should happen if you use a USB 2 device.


#3

I've done several tests before I got convinced that it's USB 3.0 interference.
It does cause problem even if you plug USB 2.0 device due to internal USB 3.0 hub.

I'm Python developer but the link you posted requires C and embedded hardware skills


#4

That patch "disables USB3.0 port power if usb3_disable is set", so not plugging anything in seems pretty close.

Interference of that sort is generally either due to poor chip design (including counterfeit or rejected in binning), poor layout, poor shielding, or a combination of the above. Unsurprising from a cheap board that potentially isn't FCC certified (nothing listed at wikidevi)


#5

Damn!
All I wanted was a flexible(I could replace minipcie WiFi cards) router that is openwrt compatible.
I did a lot of search and this was the only one :frowning:
I sent a message to the vendor and waiting an answer...

USB 3.0 is not essential, can I disable it and use USB 2.0 only?


#6

My guess is that it has nothing to do with the drivers and is a hardware issue.


#7

This is indeed a hardware issue.

The

usb3_disable

parameter can be passed by editing the dts. Maybe there's a better way to do this...

--- a/target/linux/ramips/dts/MIR3G.dts
+++ b/target/linux/ramips/dts/MIR3G.dts
@@ -22,7 +22,7 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyS0,115200n8";
+		bootargs = "console=ttyS0,115200n8,usb3_disable";
 	};
 
 	gpio-leds {

edit: Ignore that. That's for Padavan's firmware, not OpenWrt.


#8

The vendor responded

This board use SOC and have not external USB3.0 chip. sometimes network will be influnced when CPU access the SATA/USB device due to the performance. But I am not sure the reason of your case. We haven't heard similiar case on our board.

I'm ruling out the board for now and focusing on the USB 3.0 device I'm using...


#9

Buy a moderately long, high quality USB 3.0 cable and place the device farther away from the main routers antennas (but be sure to get that well shielded high quality cable)


#10

I have the patch. I saw no difference in performance when using the patch with the latest snapshot vs just using the latest snapshot.

--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c\
@@ -589,7 +589,8 @@
        addr = xhci_get_port_io_addr(hcd, index);
        temp = readl(addr);
        temp = xhci_port_state_to_neutral(temp);
-       if (on) {
+
+       if (on && hcd->speed < HCD_USB3) { //HACK: force usb2 https://forum.openwrt.org/t/xiaomi-wifi-router-3g-18-06-x-wifi-issues-2-4ghz-5ghz/20169/32
                /* Power on */
                writel(temp | PORT_POWER, addr);
                temp = readl(addr);

@bahtsiz_bedevi what version are you using?


#11

@fvlaicu

root@OpenWrt:~# cat /etc/*-release
NAME="OpenWrt"
VERSION="18.06.1"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 18.06.1"
VERSION_ID="18.06.1"
HOME_URL="http://openwrt.org/"
BUG_URL="http://bugs.openwrt.org/"
SUPPORT_URL="http://forum.lede-project.org/"
BUILD_ID="r7258-5eb055306f"
LEDE_BOARD="ramips/mt7621"
LEDE_ARCH="mipsel_24kc"
LEDE_TAINTS=""
LEDE_DEVICE_MANUFACTURER="OpenWrt"
LEDE_DEVICE_MANUFACTURER_URL="http://openwrt.org/"
LEDE_DEVICE_PRODUCT="Generic"
LEDE_DEVICE_REVISION="v0"
LEDE_RELEASE="OpenWrt 18.06.1 r7258-5eb055306f"

#12

Yes, I'm going to try that first


#13

Did you try using 18.06.2? there are tons of commits in the mt76 driver between august and now.