Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANDDEAR MT7612U004 Adapter Issue on Raspberry Pi 4B with USB 3.0 #75

Open
amisix opened this issue May 1, 2022 · 65 comments
Open

ANDDEAR MT7612U004 Adapter Issue on Raspberry Pi 4B with USB 3.0 #75

amisix opened this issue May 1, 2022 · 65 comments

Comments

@amisix
Copy link

amisix commented May 1, 2022

@morrownr - I'm having a strange issue with the ANDDDEAR MT7612U004 adapter that I recently picked up where it won't initialize properly on the USB 3.0 bus of my Raspberry Pi 4B but it will work fine on the USB 2.0 bus (Kali 2022.2). I originally evaluated the adapter with a CM4 and had no issues because, USB 2.0. The issue occurs whether I have a single adapter or multiple adapters connected. If I take the adapter and swap it to USB 2.0, the issue disappears and the adapter works fine.

I think this may impact other users of this adapter if they choose to use it on a Raspberry Pi 4B with USB 3.0. We may need to modify or remove my review depending on the solution.

lsusb freezes/locks up & there is no output
iw dev output does not show the adapter

EDIT: This thread got really long. Here's a recap with troubleshooting and a workaround.

@morrownr
Copy link
Owner

morrownr commented May 1, 2022

Hi @amisix

Hmmm... so Kali 2022.2 on a RasPi4B only while using a USB3 port. My first thought is to say bad words about the selection of the USB3 hardward in the RasPi4B. There are probably thousands of Pi4B users that have had issues with this.

Let's do some troubleshooting:

Do you have an extra sd card that you could do a clean installation of the RasPiOS v 2022-04-04? If so, make it happen and see if you get the same problem.

Would you mind also try the ALFA ACM with the USB3 port with Kali 2022.2 to see if you have the same problem?

Have you tested the adapter in a x86/amd64 based system with Linux installed to see if you see the problem?

Hopefully that will help us narrow things down. Not long ago a patch was applied to the RasPiOS USB3 driver due to a hardware incompatibility. The problem was not in the Linux driver but was a hardware bug. I can be more specific if depending on what we find.

Regards

@amisix
Copy link
Author

amisix commented May 2, 2022

My first thought is to say bad words about the selection of the USB3 hardware in the RasPi4B. There are probably thousands of Pi4B users that have had issues with this.

Fun times. Hopefully whatever we find out can be useful.. In a previous post you had mentioned bugs in the Raspberry Pi 4B USB controller, I was thinking we might end up there with this but I'm not so sure now after testing it with the Alfa ACM.

Do you have an extra sd card that you could do a clean installation of the RasPiOS v 2022-04-04? If so, make it happen and see if you get the same problem.

Sure do - I'll do that.

Would you mind also try the ALFA ACM with the USB3 port with Kali 2022.2...

Done. I do not have the same problem with the ALFA ACM in Kali 2022.2. It initializes properly without error.

Have you tested the adapter in a x86/amd64 based system with Linux installed...

Not yet but I have a live boot Kali image ready to go. I'll run it up to see what comes of it.

Thanks.

@morrownr
Copy link
Owner

morrownr commented May 2, 2022

Fun times. Hopefully whatever we find out can be useful.. In a previous post you had mentioned bugs in the Raspberry Pi 4B USB controller, I was thinking we might end up there with this but I'm not so sure now after testing it with the Alfa ACM.

That the ALFA ACM is working is just a data point. It does not rule out the Pi4B USB3 hardware being the problem imho. The 8812au driver has worked fine on the Pi4B while the 8812bu driaver has had ongoing problems for a long time. It seems the fix that went into the Pi4B has fixed the problem with the 8812bu driver but I am not aware of that fix being upstreamed.

We will just have to search and since I don't have that adapter, all I can do forward suggestions.

Regards

@morrownr
Copy link
Owner

morrownr commented May 2, 2022

Let me be clear: The 2022-04-04 version of the RasPiOS should and does appear to have the RasPi4b USB3 fix but the version of Kali you are using most likely does not as the fix would need to work its way up into the kernel Linus maintains and then downward. That does not mean the problem you are seeing is the result of the problem that the fix addressed but the fact that it is happening only on a USB3 port makes one ponder the issue.

@amisix
Copy link
Author

amisix commented May 2, 2022

^ Understood.

The issue does occur in RasPiOS on both USB3 ports. The adapter will not initialize on USB3 Port 1 but it will initialize on USB3 Port 2 although it will not connect to any access points.
(Edited: Previously I had stated USB3 Port 2 functioned, it does not)

There is an issue with the ANDDEAR adapter in Kali on x86 hardware although it is not identical it still leads to the adapter being non-functional. I can see the adapter but it won't connect to anything then it says "network disconnected" while no longer allowing me to even attempt a connection. Is it loading the incorrect firmware - ? There's a reference to mt7662.bin (not 7612)? Line 2 and Line 5.

Errors on x86 hardware:

[ 15.069700] mt76x2u 2-3:1.0: ASIC revision: 76120044
[ 15.069796] mt76x2u 2-3:1.0: firmware: direct-loading firmware mt7662_rom_patch.bin
[ 15.069807] mt76x2u 2-3:1.0: ROM patch build: 20141115060606a
[ 15.126913] Bluetooth: hci1: RTL: fw version 0x0999646b
[ 15.201949] mt76x2u 2-3:1.0: firmware: direct-loading firmware mt7662.bin
[ 15.201958] mt76x2u 2-3:1.0: Firmware Version: 0.0.00
[ 15.201962] mt76x2u 2-3:1.0: Build: 1
[ 15.201964] mt76x2u 2-3:1.0: Build Time: 201507311614____
[ 15.928821] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 15.930020] usbcore: registered new interface driver mt76x2u
[ 18.503647] r8169 0000:03:00.0: firmware: direct-loading firmware rtl_nic/rtl8168h-2.fw
[ 18.533693] Generic FE-GE Realtek PHY r8169-0-300:00: attached PHY driver (mii_bus:phy_addr=r8169-0-300:00, irq=MAC)
[ 18.725739] r8169 0000:03:00.0 eth0: Link is Down
[ 18.741103] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[ 18.818936] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[ 18.820194] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring
[ 18.855815] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[ 18.933961] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[ 18.935387] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring
[ 20.885724] mt76x2u 2-3:1.0: mac specific condition occurred
[ 21.005747] usb 2-3: USB disconnect, device number 3
[ 21.140248] mt76x2u 2-3:1.0: mac specific condition occurred
[ 21.349695] mt76x2u 2-3:1.0: mac specific condition occurred
[ 21.453699] mt76x2u 2-3:1.0: mac specific condition occurred
[ 21.553693] mt76x2u 2-3:1.0: timed out waiting for pending tx
[ 21.885886] usb 2-3: new SuperSpeed USB device number 4 using xhci_hcd
[ 21.906677] usb 2-3: New USB device found, idVendor=0e8d, idProduct=7612, bcdDevice= 1.00
[ 21.906681] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 21.906682] usb 2-3: Product: 802.11ac WLAN
[ 21.906683] usb 2-3: Manufacturer: MediaTek Inc.
[ 21.906684] usb 2-3: SerialNumber: 000000000
[ 22.038055] usb 2-3: reset SuperSpeed USB device number 4 using xhci_hcd

@morrownr
Copy link
Owner

morrownr commented May 2, 2022

The issue does not occur whatsoever in RasPiOS - the adapter works fine on USB 3.0 - able to see and connect to access points with no errors in the logs.

Hmmm... Kali is starting to look guilty.

There is an issue with the ANDDEAR adapter in Kali on x86 hardware although it is not identical it still leads to the adapter being non-functional.

Kali is really starting to look guilty.

Are you going to be able to test a non-Kali x86 Linux distro such as Ubuntu 22.04?

I can see the adapter but it won't connect to anything then it says "network disconnected" while no longer allowing me to even attempt a connection. Is it loading the incorrect firmware - ?

It is possible that the firmware is somehow messed up in Kali.

There's a reference to mt7662.bin (not 7612)? Line 2 and Line 5.

The mt7612u chipset requires two firmware files:

mt7662u.bin
mt7662u_rom_patch.bin

My recommendation is that you see my guide:

https://github.com/morrownr/USB-WiFi/blob/main/How_to_Install_Firmware_for_Mediatek_based_USB_WiFi_adapters.md

What I think you should do at this point is download both files as instructed in the above document and then compare the files to what is in Kali. The files in Kali should be identical to what you download byte per byte. There is one thing to note, the mt7612u firmware files are usually installed in two different directories and there is a history to understand.

At one time, all firmware files were just dumped into lib/firmware but as time passed and more files were showing up, it was decided that each company have its own directory. All Mediatek firmware files are in /lib/firmware/mediatek however due to old code in the mt7612u driver, it looks in the old location which is lib/firmware. What most distros do is they put the two files in both locations so you should check the files in both locations.

The adventure continues...

@amisix
Copy link
Author

amisix commented May 2, 2022

Kali is really starting to look guilty.

We're narrowing it down... yay

Are you going to be able to test a non-Kali x86 Linux distro such as Ubuntu 22.04?

Yeah, I'll just create another live boot usb with Rufus or balena.

My recommendation is that you see my guide...

It could be the firmware? I'll follow your instructions and do a diff/hash comparison as suggested.

We shall see. Thanks for breaking it all out.

@morrownr
Copy link
Owner

morrownr commented May 3, 2022

It could be the firmware?

It could. These files get sent all over the place. One little bit gets flipped and now the file does operate as designed. Is it likely this is the problem? No, but firmware errors are what is showing up so we need to be 100% that firmware file integrity is not the problem. I am looking forward to your report from a test on an x86/amd64 system. So far, the only time we are seeing the problem is with Kali.

@amisix
Copy link
Author

amisix commented May 4, 2022

Ubuntu x86: No go, adapter not recognized at all. lsusb locks up when run, no output. iw dev shows no wireless device. dmesg showed another "mac specific condition occurred" with no additional details. I stopped there as I could go down another rabbit hole..

Ubuntu ARM/Raspberry Pi No go either. Adapter recognized by lsusb but iw dev and ifconfig shows no wireless device other than onboard. dmesg & logread show nothing of value/no visible errors.

Kali firmware:
1: Firmware content in /lib/firmware does not match firmware in /lib/firmware/mediatek.

2: Firmware in /lib/firmware is named mt7662.bin & mt7662_rom_patch.bin
(missing "u" after mt7662 that's in /lib/firmware/mediatek/ filename. Example: mt7662u.bin)

3: Firmware in directory /lib/firmware/mediatek matches firmware from git (https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek)

Why the discrepancy between the firmware in /lib/firmware compared to /lib/firmware/mediatek (and git)?
I copied the firmware from git to /lib/firmware (& rebooted) and the issue persists. I'm going to do it again for good measure but need a bit more time.

@morrownr
Copy link
Owner

morrownr commented May 4, 2022

Well. Interesting.

Let me dive into the code in the mt7612u driver so that we know exactly which firmware files the driver is looking for and what their location without a doubt.

@amisix
Copy link
Author

amisix commented May 4, 2022

Let me dive into the code in the mt7612u driver so that we know exactly which firmware files the driver is looking for and what their location without a doubt.

Awesome, thanks.

@amisix
Copy link
Author

amisix commented May 5, 2022

@morrownr RE: Kali Firmware

I removed the firmware from /lib/firmware/ then copied the firmware from /lib/firmware/mediatek in its place. I renamed the two .bin files to match what was already in /lib/firmware (removed the "u" after mt7662, Example: mt7662u.bin = mt7662.bin & mt7662u_rom_patch.bin = mt7662_rom_patch.bin)

Weirdest thing, the adapter now works on one USB 3.0 port (top) without errors, but not the other USB 3.0 port (bottom). The error I receive on the bottom USB 3.0 port is the same as the previous error:

mt76x2u 2-1:1.0: error: mt76x02u_mcu_wait_resp failed with -108
mt76x2u 2-1:1.0: mac specific condition occurred

BUT, one port is now working with the firmware swap.. thoughts?

EDIT: After additional testing both USB 3.0 ports are now working without errors. Apparently swapping the firmware worked.. ?

@morrownr
Copy link
Owner

morrownr commented May 5, 2022

EDIT: After additional testing both USB 3.0 ports are now working without errors. Apparently swapping the firmware worked.. ?

I have busy since we worked on thiss yesterday. Give me a chance to read your reports and then I will try to sit aside the next hour to look at this.

@morrownr
Copy link
Owner

morrownr commented May 5, 2022

Let me throw out some info so that we are on the same sheet of music:

The Linux kernel firmware repository for Mediatek:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek

It shows the following files as available:

  91412 May  5 12:54 mt7662u.bin
  20686 May  5 13:00 mt7662u_rom_patch.bin

It does not show any files called mt7662.bin or mt7662_rom_patch.bin at all. So, we have a mystery on our hands.

Let me do the digging in the driver source that I started to do yesterday.

@morrownr
Copy link
Owner

morrownr commented May 5, 2022

While I am working, here is something for you to test:

Delete mt7662.bin and mt7662_rom_patch.bin from /lib/firmware and then reboot so as to have a clean boot and then see what happens.

@morrownr
Copy link
Owner

morrownr commented May 5, 2022

A little grepping later and this is what I have:

mt76/mt76x0/mt76x0.h:#define MT7610E_FIRMWARE		"mediatek/mt7610e.bin"
mt76/mt76x0/mt76x0.h:#define MT7650E_FIRMWARE		"mediatek/mt7650e.bin"
mt76/mt76x0/mt76x0.h:#define MT7610U_FIRMWARE	"mediatek/mt7610u.bin"
mt76/mt76x2/mt76x2.h:#define MT7662_FIRMWARE		"mt7662.bin"
mt76/mt76x2/pci.c:MODULE_FIRMWARE(MT7662_FIRMWARE);
mt76/mt76x2/pci.c:MODULE_FIRMWARE(MT7662_ROM_PATCH);
mt76/mt76x2/pci_mcu.c:	ret = request_firmware(&fw, MT7662_FIRMWARE, dev->mt76.dev);
mt76/mt76x2/usb_mcu.c:	err = request_firmware(&fw, MT7662_FIRMWARE, dev->mt76.dev);
mt76/mt76x2/usb.c:MODULE_FIRMWARE(MT7662_FIRMWARE);
mt76/mt76x2/usb.c:MODULE_FIRMWARE(MT7662_ROM_PATCH);

It appears mt7662.bin and its mate are for the PCI version of the chipset and should be in /lib/firmware whick should answer the below question you had:

Why the discrepancy between the firmware in /lib/firmware compared to /lib/firmware/mediatek (and git)?

One is for the PCI chipset and one is for the USB chipset. It is interesting how they ended up to two different places.

I am not seeing anything in the code that tells me when mt7662u.bin and its mate should be. Interesting. We will have to assume it is /lib/firmware/mediatek as I have checked multiple distros now and that it where they are.

It is interesting that you copied the files from /mediatek to /lib/firmware and removed the u and things started working. I am being to suspect a faulty part in the adapter as what you did should not have solved the problem. Is it possible that there is some dust in the ports or in the adapter?

This may be a case where putting things down for a couple of days and then start over.

@amisix
Copy link
Author

amisix commented May 5, 2022

I removed mt7662.bin and mate from /lib/firmware and the issue reappears. The adapter fails to initialize.

Error:

[ 7.329300 ] mt76x2u 2-2:1.0: Direct firmware load for mt7662_rom_patch.bin failed with error -2
[ 7.329382] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[ 7.337947] bcmgenet fd580000.ethernet eth0: Link is Down
[ 7.446507] systemd-journald[171]: Oldest entry in /var/log/journal/71f4eaa596ae498e8f46633c136a5627/system.journal is older than the configured file retention duration (1month), suggesting rotation.
[ 7.464436] systemd-journald[171]: /var/log/journal/71f4eaa596ae498e8f46633c136a5627/system.journal: Journal header limits reached or header out-of-date, rotating.
[ 8.040892] mt76x2u: probe of 2-2:1.0 failed with error -2
[ 8.048231] usbcore: registered new interface driver mt76x2u

The adapters and plugs are clean. I have a second MT7612U004 adapter I've tried it with, same behavior.

EDIT: I put mt7662.bin and mate back in /lib/firmware and the adapter starts working again.

EDIT EDIT: It fails when I connect a second adapter, whether it be an ANDDEAR or Alfa MT7612U. The first adapter that initialized fine stays functioning but the second adapter immediately starts throwing disconnect/reconnect errors repetitively every few seconds. Oh well, one works great for now.

So, there's a temporary fix - but, why? This can totally wait if you want to try again another day.

@morrownr
Copy link
Owner

morrownr commented May 6, 2022

I removed mt7662.bin and mate from /lib/firmware and the issue reappears. The adapter fails to initialize.

Error:

[ 7.329300 ] mt76x2u 2-2:1.0: Direct firmware load for mt7662_rom_patch.bin failed with error -2

This makes no sense to me. Why would a USB adapter load mt7662_rom_patch.bin?

[ 8.040892] mt76x2u: probe of 2-2:1.0 failed with error -2

?

[ 8.048231] usbcore: registered new interface driver mt76x2u

Okay

The adapters and plugs are clean. I have a second MT7612U004 adapter I've tried it with, same behavior.

EDIT: I put mt7662.bin and mate back in /lib/firmware and the adapter starts working again.

Is this mt7662.bin and mate the originals or the ones that are actually mt7662u.bin and mate but were renamed?

EDIT EDIT: It fails when I connect a second adapter, whether it be an ANDDEAR or Alfa MT7612U. The first adapter that initialized fine stays functioning but the second adapter immediately starts throwing disconnect/reconnect errors repetitively every few seconds. Oh well, one works great for now.

When I put two 7612u adapters in any system here, they both work fine but I don't have a ANDDEAR MT7612U004.

This is starting to hurt my head.

This testing needs to be done in a scientific manner. We really need a sheet where we write the exact details. I'm getting lost on which distro and which hardware and how many or which adapters you are testing.

Are you using a usb hub or direct into the port?

So, there's a temporary fix - but, why? This can totally wait if you want to try again another day.

I'll try to hang in there.

@amisix
Copy link
Author

amisix commented May 6, 2022

This makes no sense to me. Why would a USB adapter load mt7662_rom_patch.bin?

Unknown. Agreed, why?

Is this mt7662.bin and mate the originals or the ones that are actually mt7662u.bin and mate but were renamed?

*Copied from /lib/firmware/mediatek and renamed.

This is starting to hurt my head.
This testing needs to be done in a scientific manner. We really need a sheet where we write the exact details. I'm getting lost on which distro and which hardware and how many or which adapters you are testing.

Same. I'm trying my best. I can go back through the thread and compile things a bit better if need be. I only used the ALFA ACM in place of the ANDDEAR as requested in one of your tests, and once as a secondary adapter (recently) on the USB 3.0 bus - past that it's all the ANDDEAR-MT7612U004 that's throwing a fit (I have two of them on hand).

No hub, direct to the port(s). Single adapter connected unless specifically testing dual adapters to see how it responded (1 test).

Thanks..

@morrownr
Copy link
Owner

morrownr commented May 6, 2022

How about we do a short review and come up with a plan? We can contact the Mediatek kernel devs if need be but right now all we have is kind of a mess as far as something to present.

We zeroed in on checking the firmware as a possible problem. Here is how we think the firmware should be setup for mt7612u/mt7612e chipsets:

Located in /lib/firmware/mediatek:
91412 mt7662u.bin
20686 mt7662u_rom_patch.bin

Located in /lib/firmware:
81908 mt7662.bin
26350 mt7662_rom_patch.bin

I have checked the above files in multiple distros and this is what is working. Take note that the files in /lib/firmware/mediatek are different than those in /lib/firmware and the theory is that the ones without u are for the pci version of the chipset. Our look inside the code of the mt76 driver appeared to confirm that.

Assumption: If test systems have the above 4 files exactly as they are shown above, the firmware files should be the right files and in the right place. I've seen distro makers mess this up so it was worth checking.

Mt suggestion now is to take that clean sd of RasPiOS 2022-04-04 and use it in the RasPi4B to do a full checkout and save logs. You had said that the adapter was working fine with this setup so let's work this setup to confirm that it is working fine so that we can save log files that show how things should be when it is working fine.

I think it worthwhile to refresh out memories on how to clean out log files between boots so we are not confusing things.

Can I get you to run the following tests while booting in between tests? Save from log on each boot using something like...

$ dmesg | grep -i mt76

Configurations to test: (cold boot between tests)

one ANDDEAR 004 adapter in usb3 port
two ANDDEAR 004 adapters in usb3 ports
one ANDDEAR 004 adapter in usb2 port
two ANDDEAR 004 adapters in usb2 ports
two ANDDEAR 004 adapters in one of each type of port
one ANDDEAR 004 adapter in usb3 port and one ALFA ACM adapters in the other usb3 port if they both fit at the same time

Also, run the follow and save results while the ANDDEAR adapter is in a usb3 port:

$ lsusb -t

You should see something like this:

Port 2: Dev 2, If 0, Class=Vendor Specific Class, Driver=mt76x2u, 5000M

That is to make sure we are in usb3 mode. It is possible to use a usb3 capable chipset but make the adapter only usb2 capable.

Once we have a full set of good results in hand, we can then boot with Kali and run similar tests to see what the difference is. My recommendation is that the Kali bootable sd be a clean installation. The reason is that I have seen many things get messed up in Kali over time due to the rolling release. A clean, updated installation should help with any problems that could build up over time.

Regards

@amisix
Copy link
Author

amisix commented May 6, 2022

How about we do a short review and come up with a plan? We can contact the Mediatek kernel devs if need be but right now all we have is kind of a mess as far as something to present.

Sure, Ok.

We zeroed in on checking the firmware as a possible problem. Here is how we think the firmware should be setup for mt7612u/mt7612e chipsets:...

Yes, on the same page.

Assumption: If test systems have the above 4 files exactly as they are shown above, the firmware files should be the right files and in the right place.

Ok, will run through requested tests to confirm.

Can I get you to run the following tests while booting in between tests?

Of course. It will take a bit but I will get it. All previous tests have been completed with a clean, freshly imaged copy of whichever OS was requested, I will continue to do that for these tests.

Thanks much for all your efforts regarding this.

@morrownr
Copy link
Owner

morrownr commented May 6, 2022

Take your time. I enjoy solving a good mystery. It often takes time.

You may want to start a text document to put the results of your testing and you can zip it and post it here instead of having a very long report. It is also easier to add to a text document than to edit and keep up with results here. Below is an example like I might use:

RasPi4B 
RasPiOS 2022-04-04
one ANDDEAR 004 adapter in usb3 port
$ dmesg | grep -i mt76
[   11.289928] mt76x2u 2-2:1.0: ASIC revision: 76120044
[   11.332857] mt76x2u 2-2:1.0: ROM patch build: 20141115060606a
[   11.497666] mt76x2u 2-2:1.0: Firmware Version: 0.0.00
[   11.497688] mt76x2u 2-2:1.0: Build: 1
[   11.497694] mt76x2u 2-2:1.0: Build Time: 201507311614____
[   12.319504] usbcore: registered new interface driver mt76x2u
[   12.363881] mt76x2u 2-2:1.0 wlx0013ef5f0c7c: renamed from wlan0

The multiple tests with the RasPiOS hopefully will give us a baseline of tests that are successful, then the same tests with Kali on the RasPi4B can be compared.

Regards

@morrownr
Copy link
Owner

morrownr commented May 6, 2022

Can I get you to add one test to the previously posted list?

one ALFA ACM adapter in usb3 port

@amisix
Copy link
Author

amisix commented May 7, 2022

OK, 50th time is the charm. Github sure doesn't make it easy to simply upload a text file without trying to tie it to some code or a branch or some such sh*t. Here's a .zip file with the RasPiOS tests

@morrownr
Copy link
Owner

morrownr commented May 7, 2022

Thanks for giving it 50 times. I think I can show you an easier way to upload the compressed file. What OS are your trying to upload it with?

I read through the file. I saw consistent results. I took the primary error line and did some searching. Try this:

Open a terminal (Ctrl + Alt + t)

sudo nano /etc/modprobe.d/mt76_usb.conf

add:

options mt76_usb disable_usb_sg=1

Save the file: Ctrl + Alt + o, Enter, Ctrl + Alt + x

Reboot

Redo one of the tests that failed.

Results?

@amisix
Copy link
Author

amisix commented May 7, 2022

Thanks for giving it 50 times. I think I can show you an easier way to upload the compressed file. What OS are your trying to upload it with?

Please do. Windows 10 (chrome) - I thought it should have been easier, don't know what I was missing. Can run basic tests in CLI, can't upload .txt file. Hopeless.

I read through the file. I saw consistent results. I took the primary error line and did some searching. Try this (disable SG):

Consistent results, good.

I disabled USB Scatter Gather, rebooted, then confirmed it was off with the command below. I tested with a single ANDDEAR adapter on USB3 port. Unfortunately the issue persists with no change in error messages.

cat /sys/module/mt76_usb/parameters/disable_usb_sg

Thanks for searching the error further. I also completed some searching for similar error messages but almost all referred to the error "mt76x02u_mcu_wait_resp failed with -110", not the "mt76x02u_mcu_wait_resp failed with -108" I've been receiving. Although I don't know how relevant that difference is at this time.

Thanks.

@amisix
Copy link
Author

amisix commented May 8, 2022

Quick test (re-run a dozen times): Kali 32bit 2022.1
Single ANDDEAR adapter, USB3 Port 1 (top) - FAIL (same errors as in RasPiOS)
Single ANDDEAR adapter, USB3 Port 2 (bottom) - SUCCESS

Why would the adapter work on one USB3 port and not the other?

I also tested USB3 Port 1 with an Alfa ACM and the Alfa adapter works fine on that port, no errors.
Then I ran the test on a different Raspberry Pi 4 and USB3 Port 1 with the ANDDEAR adapter failed just like previous tests.

I also found another error - something related to the xhci controller itself?

xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
mt76x2u 2-2:1.0: mac specific condition occurred

USB bug?

@TurfJakkals
Copy link

Greetings! I've read through the thread of progress made regarding this issue. Now the thing is, I'm using the MT7612UN and having no luck whatsoever, either. Not sure what makes the "UN" different from the "U" or "BU" versions?

@morrownr
Copy link
Owner

morrownr commented May 9, 2022

Please do. Windows 10 (chrome) - I thought it should have been easier, don't know what I was missing. Can run basic tests in CLI, can't upload .txt file. Hopeless.

Zip the text file and the drag the zip and drop it here (actually in the window where you are replying)

I disabled USB Scatter Gather, rebooted, then confirmed it was off with the command below. I tested with a single ANDDEAR adapter on USB3 port. Unfortunately the issue persists with no change in error messages.

Well, okay. While searching I saw similar reports. I had previously only seen issues requiring that parameter in AP mode.

@morrownr
Copy link
Owner

morrownr commented May 9, 2022

Quick test (re-run a dozen times): Kali 32bit 2022.1 Single ANDDEAR adapter, USB3 Port 1 (top) - FAIL (same errors as in RasPiOS) Single ANDDEAR adapter, USB3 Port 2 (bottom) - SUCCESS

Why would the adapter work on one USB3 port and not the other?

Very good question. I don't have an answer yet.

Which revision of the RasPi4B do you have?

At this point, I'd like to see the results of testing on x86/amd64 hardware. Yes, again. The expanded version of testing like you have been doing and documenting. Please continue documenting your testing as it is the best we have right now to see something to help and if we figure out what the problem is, it will be something to send in with a report.

I have 4 different adapters based on the mt7612u chipset and I have never run into such as this. I have a RasPi4B. It is a v1.2.

I also tested USB3 Port 1 with an Alfa ACM and the Alfa adapter works fine on that port, no errors. Then I ran the test on a different Raspberry Pi 4 and USB3 Port 1 with the ANDDEAR adapter failed just like previous tests.

Are both Pi's the same version?

I also found another error - something related to the xhci controller itself?

xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
mt76x2u 2-2:1.0: mac specific condition occurred

USB bug?

Need to do some searching.

@morrownr
Copy link
Owner

This is starting to get interesting.

Question: When you say disconnect/reconnect without restart, do you mean that you pulling the adapter out of the port and then put it back in? Can you clarify what you are doing?

Another question: Are you checking with lsusb -t to see if the individual tests are resulting in USB3 (5000) or USB2 (480)?

It might be a good idea to add USB3 chipset to the header on each test. The info can be found with sudo lshw. Here is the chipset from my main dev system:

7 Series/C216 Chipset Family USB

The USB3 chipset on the RasPi4B is:

VL805

I have not reviewed the document with the full results yet but will as I have time today to see if I can pick up on anything else. This last series of tests is very interesting. I think I am going to setup to run detailed testing with the four 7612u based adapters that I have. I have a small lab with 4 systems that I use for testing and said systems span a wide range of capabilities , ages and have various distros installed. Maybe I can find information that can be of use.

Is this an issue with the adapter? Is this an issue with the 7612u driver? Is this an issue with the USB stack in Linux? Is this issue specific to certain chipsets? Many questions. The problem with difficult issues like this is knowing where to report the problem. We do not have the data yet to know where to go with a report.

Something you may want to do is contact the folks behind the below article and ask them what they are seeing:

https://wlan-pi.github.io/wlanpi-documentation/admin/cf912_issues/

The contact info is shown at the bottom of the article.

Regards

@amisix
Copy link
Author

amisix commented May 10, 2022

When you say disconnect/reconnect without restart, do you mean that you pulling the adapter out of the port and then put it back in?

Pulling the adapter out of the port and plugging it back in while the machine is on.

Are you checking with lsusb -t to see if the individual tests are resulting in USB3 (5000) or USB2 (480)?

Yes. USB3 connectivity displayed 5000Mbps and USB2 displayed 480Mbps as expected.

It might be a good idea to add USB3 chipset to the header

I'll do that. The x86 laptop has an Intel 100 Series/C230 Series Chipset. I also have an older machine with Intel 7/C210 and Intel 7/C216 Series chipsets (as you do). It also has an ASMedia ASM1042 USB3 chipset... hmmmm.

I think I am going to setup to run detailed testing with the four 7612u based adapters that I have. I have a small lab with 4 systems that I use for testing and said systems span a wide range of capabilities

Well, now it's a party. I bet your lab is fun (more details?), I'm very much looking forward to the results.

Is this an issue with the adapter? Is this an issue with the 7612u driver? Is this an issue with the USB stack in Linux? Is this issue specific to certain chipsets?

Well, we're ruling out pebkac so I'm happy.

Something you may want to do is contact the folks behind the below article and ask them what they are seeing:

Oh, that's neat. I'll reach out to them.
Thanks.

@amisix
Copy link
Author

amisix commented May 10, 2022

Quick testing with Intel 7/210 Series and ASMedia 1042 USB3 chipsets.

ANDDEAR-MT7612U004
x86 desktop / Asus P8Z77 v-pro Thunderbolt motherboard
USB Controller(s): Intel 7/210 Series & ASMedia ASM1042

Ubuntu 22.04

Test A: FAILED
ASMedia 1042, USB3 Port 1

Test B: SUCCESS
ASMedia 1042, USB3 Port 2

Test C: FAILED
Intel 7/C210 Series, USB3 Port 1

Test D: SUCCESS
Intel 7/C210 Series, USB3 Port 2

On all 4 USB 3.0 chipsets we've tested the adapter fails on USB3 Port 1 but it works on USB3 Port 2 (Kali & Ubuntu)

EDIT: In the aircrack-ng FAQ I found something that may be useful? At the bottom of the FAQ it describes a bug and I received a nearly identical error in Kali on the Raspberry Pi - "xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.". Something about it being a USB subsystem bug that affects USB 3 and kernels 4.2 and above?

@amisix
Copy link
Author

amisix commented May 11, 2022

TL;DR

Adapter: ANDDEAR-MT7612U004
Adapter Chipset: Mediatek mt7612u
Platform: Raspberry Pi 4B (Revision 1.5)

Issue: ANDDEAR-MT7612U004 wifi adapter doesn't initialize on hot or cold boot when plugged into a USB3 port.
Workaround: Try USB3 Port 2 (counting from top to bottom) or use a USB2 port.

Findings:
Other adapters based on the Mediatek mt7612u chipset do not have this issue (Alfa ACM, Netgear A6210, etc.).
32bit & 64bit distros based on Debian & Arch are affected.
The adapter doesn't function in any USB3 or USB2 ports in Ubuntu 22.04*.

USB3 Port 1: The adapter doesn't function in USB3 Port 1 in any of the Linux distros tested (Kali, RasPiOS, Ubuntu, Manjaro)
USB3 Port 2: The adapter functions intermittently in Manjaro, Kali, & RasPiOS. Remove/reinsert the adapter then delete & recreate the network connection.

USB2 Port 1: The adapter functions in Kali, RasPiOS, and Manjaro.
USB2 Port 2: The adapter functions in Kali, RasPiOS, and Manjaro.

*Neither the ANDDEAR-MT7612U004 or an Alfa AWUS036ACM worked with the Ubuntu 22.04 system image for Raspberry Pi
The ANDDEAR-MT7612U004 adapter functions in all USB3 & USB2 ports in Windows 10 (x86).

Linux distros tested:
RasPiOS 2022-04-04 (ARM 32bit, kernel 5.15.32-v7l+) | Partial Success
Ubuntu 22.04 (ARM 64bit, kernel 5.15.0-1005-raspi) | Failed
Kali 22.01 (ARM 32bit, kernel 5.4.83-Re4son-v7l+) | Partial Success
Kali 22.01 (ARM 64bit, kernel 5.4.83-Re4son-v81) | Partial Success
Kali 22.02 (ARM 32bit, kernel 5.10.103-Re4son-v7l+) | Partial Success
Manjaro 22.03 (ARM 64bit, 5.15.32-2) | Partial Success

Additional testing info:
USB3 Scatter Gather was disabled unless otherwise noted.
A fresh system image was used for all tests.
The adapter was directly connected to the USB ports with no extension cable.
An Alfa AWUS036ACM adapter was tested on all USB3 & USB2 ports and it functioned without issue (except for Ubuntu 22.04)
Some tests were run again with a different ANDDEAR-MT7612U004 adapter and the results were the same.
Some tests were run again with a different Raspberry Pi 4B (Revision 1.5) and the results were the same.

USB chipsets tested:
VL805 (Raspberry Pi 4B)
Intel 100/C230 Series (x86 Windows 10)

Additional Adapter Info:
ID 0e8d:7612 MediaTek Inc. MT7612U 802.11a/b/g/n/ac Wireless Adapter
mt76x2u 1-1.3:1.0: ASIC revision: 76120044
mt76x2u 1-1.3:1.0: ROM patch build: 20141115060606a
mt76x2u 1-1.3:1.0: Firmware Version: 0.0.00
mt76x2u 1-1.3:1.0: Build: 1
mt76x2u 1-1.3:1.0: Build Time: 201507311614____
mt76x2u 1-1.4:1.0: ASIC revision: 76120044
mt76x2u 1-1.4:1.0: ROM patch build: 20141115060606a
mt76x2u 1-1.4:1.0: Firmware Version: 0.0.00
mt76x2u 1-1.4:1.0: Build: 1
mt76x2u 1-1.4:1.0: Build Time: 201507311614____
usbcore: registered new interface driver mt76x2u

Errors encountered:

mt76x2u 2-3:1.0: MAC RX failed to stop
xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
mt76x2u: probe of 2-3:1.0 failed with error -5

usb 2-1: USB disconnect, device number 2
mt76x2u 2-1:1.0: error: mt76x02u_mcu_wait_resp failed with -108
mt76x2u 2-1:1.0: mac specific condition occurred
usb 2-1: Device not responding to setup address.

error: mt76x02u_mcu_wait_resp failed with -19
mt76x2u 2-1:1.0: mac specific condition occurred

usb 2-1: Set SEL for device-initiated U1 failed.
usb 2-1: Set SEL for device-initiated U2 failed.
usb 2-1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
mt76x2u 2-1:1.0: ASIC revision: 76120044
mt76x2u 2-1:1.0: vendor request req:06 off:0080 failed:-110
mt76x2u 2-1:1.0: vendor request req:07 off:0080 failed:-110

[ 15.069700] mt76x2u 2-3:1.0: ASIC revision: 76120044
[ 15.069796] mt76x2u 2-3:1.0: firmware: direct-loading firmware mt7662_rom_patch.bin
[ 15.069807] mt76x2u 2-3:1.0: ROM patch build: 20141115060606a
[ 15.126913] Bluetooth: hci1: RTL: fw version 0x0999646b
[ 15.201949] mt76x2u 2-3:1.0: firmware: direct-loading firmware mt7662.bin
[ 15.201958] mt76x2u 2-3:1.0: Firmware Version: 0.0.00
[ 15.201962] mt76x2u 2-3:1.0: Build: 1
[ 15.201964] mt76x2u 2-3:1.0: Build Time: 201507311614____
[ 15.928821] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 15.930020] usbcore: registered new interface driver mt76x2u
[ 18.503647] r8169 0000:03:00.0: firmware: direct-loading firmware rtl_nic/rtl8168h-2.fw
[ 18.533693] Generic FE-GE Realtek PHY r8169-0-300:00: attached PHY driver (mii_bus:phy_addr=r8169-0-300:00, irq=MAC)
[ 18.725739] r8169 0000:03:00.0 eth0: Link is Down
[ 18.741103] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[ 18.818936] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[ 18.820194] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring
[ 18.855815] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[ 18.933961] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[ 18.935387] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring
[ 20.885724] mt76x2u 2-3:1.0: mac specific condition occurred
[ 21.005747] usb 2-3: USB disconnect, device number 3
[ 21.140248] mt76x2u 2-3:1.0: mac specific condition occurred
[ 21.349695] mt76x2u 2-3:1.0: mac specific condition occurred
[ 21.453699] mt76x2u 2-3:1.0: mac specific condition occurred
[ 21.553693] mt76x2u 2-3:1.0: timed out waiting for pending tx
[ 21.885886] usb 2-3: new SuperSpeed USB device number 4 using xhci_hcd
[ 21.906677] usb 2-3: New USB device found, idVendor=0e8d, idProduct=7612, bcdDevice= 1.00
[ 21.906681] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 21.906682] usb 2-3: Product: 802.11ac WLAN
[ 21.906683] usb 2-3: Manufacturer: MediaTek Inc.
[ 21.906684] usb 2-3: SerialNumber: 000000000
[ 22.038055] usb 2-3: reset SuperSpeed USB device number 4 using xhci_hcd

mt76x2u 2-1:1.0: mac specific condition occurred
[ 268.341160] mt76x2u 2-1:1.0: vendor request req:07 off:1004 failed:-71
[ 269.135832] xhci_hcd 0000:01:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 0 comp_code 4
[ 269.135860] xhci_hcd 0000:01:00.0: Looking for event-dma 000000041ad45520 trb-start 000000041ad45540 trb-end 000000041ad45590 seg-start 000000041ad45000 seg-end 000000041ad45ff0
[ 269.338837] usb 2-1: USB disconnect, device number 22
[ 269.388858] wlan1: deauthenticating from 00:c0:ca:b0:20:7d by local choice (Reason: 3=DEAUTH_LEAVING)
[ 269.559587] mt76x2u 2-1:1.0: mac specific condition occurred
[ 269.779417] mt76x2u 2-1:1.0: mac specific condition occurred
[ 269.888844] mt76x2u 2-1:1.0: mac specific condition occurred
[ 269.988872] mt76x2u 2-1:1.0: timed out waiting for pending tx
[ 270.439110] usb 2-1: new SuperSpeed USB device number 23 using xhci_hcd
[ 270.470157] usb 2-1: device descriptor read/all, error -71
[ 270.699097] usb 2-1: new SuperSpeed USB device number 24 using xhci_hcd
[ 270.730189] usb 2-1: device descriptor read/all, error -71
[ 270.738569] usb usb2-port1: attempt power cycle
[ 271.519263] usb 2-1: new SuperSpeed USB device number 25 using xhci_hcd
[ 271.550620] usb 2-1: device descriptor read/all, error -71
[ 271.789261] usb 2-1: new SuperSpeed USB device number 26 using xhci_hcd
[ 271.820527] usb 2-1: device descriptor read/all, error -71
[ 271.829283] usb usb2-port1: unable to enumerate USB device

Logs (additional logs will be posted once complete):
ANDDEAR-MT7612U004 Testing - RasPiOS 2022-04-04 ARM 32Bit.txt
ANDDEAR-MT7612U004 Testing - Kali 22.02 ARM 32bit.txt
ANDDEAR-MT7612U004 Testing - Manjaro 22.05 ARM 64bit.txt

@morrownr
Copy link
Owner

Good report. It could use a little editing before we get to the point that we submit it. After a few years of taking bug reports from users of the Realtek drivers I have up, I have a good feel for what should be included and what not. I can do a little editing as an example if you do not mind?

Status from my perspective:

Problem: USB WiFi adapter will not successfully come up on hot or cold boot if plugged into USB3, port 1.

Operates normally if plugged into USB3 ports 2+ or if plugged into any USB2 port.

Hardware: ANDDEAR MT7612U004 (URL: ? )

Adapter chipset: MT7612u

USB3 chipsets tested:

VL805 (RasPi4B)
Intel 7/210 Series
Intel 100/230 Series
ASMedia 1042 (powered USB3 external hub)

Linux distros tested:

Ubuntu 22.04 (kernel 5.15) (x86_64)
Kali 22.1 (kernel ?) (32 bit ARM)
RasPiOS 2022-04-04 (kernel 5.15) (32 bit ARM)

Log: to be added.


Thoughts:

I took a look at the bug you pointed me to regarding xhci. Wow. That thread is longer than this one. I need time to digest.

In looking at the distros and hardware you have tested with, two things in common stick out: All distros are Debian based and all use systemd. I'm pondering if testing with Manjaro (Arch based) or Fedora would show anything. I'm also wondering if finding a distro that does not use systemd would be of any help.

I started setting up yesterday to test my adapters to see what I see in the logs. I have four USB3, mt7612u based adapters and various test systems so I will take a look as I have time. Hopefully today.

What do I think the problem is at this point?

We are closer than we were. Why would this only show up on USB3 port 1? Maybe something during the boot process is happening in the wrong order initially? Maybe it is a timing issue and something is not ready for port 1? The xhci usb3 driver could be the guilty party. Time for more research and reading. I'll report back as able.

Regards

@morrownr
Copy link
Owner

Oh, nearly forgot this minor detail: When you talk about the ports in the RasPi4b, you say top and bottom ports. Well, I run my Pi's up side down. My opinion is that many things work better that way. We can discuss at some point if you want but my point is just say port 1 and port2 because my top and bottom are different than yours. Cheers.

@amisix
Copy link
Author

amisix commented May 11, 2022

I will edit as you've suggested and change the verbiage regarding port numbers. I need a short break tho, too. much. data.

I took a look at the bug you pointed me to regarding xhci. Wow. That thread is longer than this one. I need time to digest.

Yeah, I dunno - it's not an exact fit but it's close. I found a couple others but need to read up more on them.

In looking at the distros and hardware you have tested with, two things in common stick out: All distros are Debian based and all use systemd. I'm pondering if testing with Manjaro (Arch based) or Fedora would show anything.

I'll test with fedora.

I started setting up yesterday to test my adapters to see what I see in the logs. I have four USB3, mt7612u based adapters and various test systems so I will take a look as I have time.

Thanks, I know it can be tedious, I appreciate the effort. I don't think you're going to have a single issue. Can you get your hands on one of these ANDDEAR adapters? I'll buy you a few pints of beer to cover things.

I'm glad we're closer, maybe? So much data to parse that its become convoluted and difficult to follow, making me feel we're farther away. The damn thing keeps throwing different, obscure errors with behavior differing from port to port, what a mess.

Thanks.

@amisix
Copy link
Author

amisix commented May 12, 2022

Fedora does not work either (Workstation 36, x86 64bit). Same exact errors as on the other distros.
Also, while troubleshooting one time (in Ubuntu, x86) the adapter was somehow set to USB2 protocol while plugged into a USB3 port. And it worked fine as if it was in a USB2 port.

I don't think I can recommend this adapter. lol

@morrownr
Copy link
Owner

Can you get your hands on one of these ANDDEAR adapters?

I have investigated this. I can't get one currently without international shipping being involved. I have tried international shipped twice in the last two years and it did not turn out well either time so I would like to avoid that which leaves me without a good option.

Fedora does not work either (Workstation 36, x86 64bit). Same exact errors as on the other distros.

Understand.

I need a short break tho, too. much. data.

I very much understand this. I need a break also. When troubleshooting, it can be good to take a few days off and then come back to the master document to start fresh. I've had to do this hundreds of times over the last years as I try to support those that use the Realtek drivers. I've grown to very much dislike the company Realtek in that their drivers are missing many features you see in the Mediatek drivers and because there is no way to work issues with Realtek. I am very much looking forward to the new generation of Mediatek USB WiFi adapters based on the mt7921u driver.

I don't think I can recommend this adapter. lol

I've already pulled the listing and review. Before writing this replay, I did a quick review of this thread and while we are making progress that could eventually lead to code modifications that could help with this issue and others that are similar, it is beginning to look like there is something specific to this adapter that is problematic.

https://wlan-pi.github.io/wlanpi-documentation/admin/cf912_issues/

Have you had time to contact the folks from the above article? There are several folks there that have this adapter and can test to see if they have any luck with USB3 port 1.

I know it can be tedious,

I started testing my adapters with mt7612u chipsets yesterday. I started testing on a very modern laptop that has three USB 3.1 (3.0) ports and one USB 3.2 port. The system is running Ubuntu 22.04 (not my favorite distro but it will do until the next release of Mint is available). Anyway, I test my ALFA ACM, Netgear A6210 and TEROW ROW02CD. I also have a COMFAST CF-WU785AC and I need to include it as well. I tested each on all 4 ports. I have a little converter for the USB 3,2 USB-C port. I decided to start with WPA3, DFS channel on my router and anything else I could think of to make it hard. Result: No operational problems at all. I tested and pushed them with iperf3 and all I could see was smooth sailing. I had never tested USB-C 3.2 before so a good test was a good thing to see. I did capture mt76 and usb log entries to files and I will look at them today to see what came up.

At this point, I am beginning to suspect a manufacturing abnormality in the ANDDEAR adapter could be the cause. Have you tested with Windows or OSX?

I think we probably have enough data at this point and maybe we should slow down some and look at doing more research.

Regards

@amisix
Copy link
Author

amisix commented May 12, 2022

I have tried international shipping twice in the last two years and it did not turn out well either time so I would like to avoid that...

Yeah, that's no good. I have an "extra" one that I can mail to you if you'd be amenable to that.

I very much understand this. I need a break also. When troubleshooting, it can be good to take a few days off and then come back...

Agreed. Start seeing double and dyslexia kicks in, not too good for things like mt7612u & mt7621u etc.

I've grown to very much dislike the company Realtek in that their drivers are missing many features you see in the Mediatek drivers and because there is no way to work issues with Realtek.

Realtek sounds like monsters, flooding the market with sh*t chipsets & code. But... consumers would never know because: Windows. Seems like their primary market is naive users who never look under the hood because they wouldn't know how to fix it if they tried. Then a bunch of linux aficionados come along and are like... hey... that's a nice chipset you have there, it would be a shame if we made it do things you didn't design it to do... and it just spirals from there.

I too am looking very much forward to the upcoming release of the mt7621u chipset despite not having an AX capable rout... oh, yeah, "If you build it, wifi will come".

I've already pulled the listing and review. (of the ANDDEAR adapter)

Thank you. This thread is more like an anti-review, unfortunately.

Before writing this reply, I did a quick review of this thread and while we are making progress that could eventually lead to code modifications that could help with this issue and others that are similar, it is beginning to look like there is something specific to this adapter that is problematic.

Awesome, you work fast. Having some eyes on it that know what they're doing is very much appreciated. Looking forward to hopefully determining a resolution that doesn't involve percussive maintenance. and a shot glass.

Have you had time to contact the folks from the above article?

Not yet as their contact link goes to an error 404 page. But I found their repository and am still trying to determine the best way to reach out (It's not really geared towards Q&A, more like feedback). Their input may be invaluable though imo. Interestingly... they have a system image that runs on Raspberry Pi 4 that supposedly uses this adapter - is a functioning driver baked into their image or...? We shall see when I download and try it out.

Result: No operational problems at all. I tested and pushed them with iperf3 and all I could see was smooth sailing...

Yeah, there we go, a bunch of testing to show the ANDDEAR adapter does not function in the same environment as other mt7612u adapters. I mean.. it's a USB adapter based on an exceptional chipset - is there a hardware difference compared to other mt7612u adapters? Is there some kind of memory addressing issue or is it a power management issue that resets the adapter? Or is it a multi-layered issue that's compounding the problem? Just postulating a bit - I'll wait for more info from you while I do a bit of searching.

Have you tested with Windows or OSX

Yup, Windows 10, It works - I've actually been using one of them as my 2nd wifi adapter part of the time.

Thanks.

@morrownr
Copy link
Owner

I too am looking very much forward to the upcoming release of the mt7621u chipset despite not having an AX capable rout... oh, yeah, "If you build it, wifi will come".

Ah, you don't need an AX capable router. You just need 2 mt7921u wifi adapters. My router is an AC2600 device with a USB3 port and a USB2 port. I have tested my ALFA ACM in the USB3 port as a second 5 GHz radio and it works very well. I use OpenWRT. You can run OpenWRT on many routers AND on a RasPi4B. I can show you how with one of your Pi's if interested. You could learn with the ALFA ACM and then you are ready to go when we actually have adapters that we can buy.

Yup, Windows 10, It works...

Well, it seems this problem is specific to Linux but not specific to Debian which makes it look like something between power on and interface creation is fouled up. Since we are looking at many other mt7612u adapters that are not having the problem, it very well could be something in this specific adapter. Adapter makers buy the chipset from the chipset maker and then add antennas, amps and the various other things that make up an adapter. This really does not seem to be a chipset problem but rather something ANDDEAR has added may have messed up the timing.

Regarding the WLAN Pi...

I think the default hardware they use only has one USB2 port so they may not be aware of the USB3 problem. But, of course, they should have adapters that they can test in USB3 porrts so if you can get in touch with of them and ask them to test, that could be very useful and it is something they probably need to know and warn people about.

I have an "extra" one that I can mail to you if you'd be amenable to that.

I'm fine with that. Now if we had a good way to exchange private email addresses so that we aren't broadcasting them to the world. I'm sure there is a way, I just haven't run into this situation before.

Regards

@amisix
Copy link
Author

amisix commented May 13, 2022

Ah, you don't need an AX capable router. You just need 2 mt7921u wifi adapters...

Exactly where I was going with that. Just an excuse to build another WiPi hotspot! I built one that's been running nicely for a couple months now as my only router. It's a RPi 3B with OpenWrt and an Alfa ACM along with two Realtek 8153 USB ethernet adapters. Learning OpenWrt while at the same time figuring out the Pi atmosphere has been challenging and fun.

I can show you how with one of your Pi's if interested. You could learn with the ALFA ACM and then you are ready to go when we actually have adapters that we can buy.

lol, similar thinking, I like it. If it's not wasting your time I'll take you up on that offer. I'd like to do antenna and system optimization (DFS channels? why irqbalance? who cares about jitter?) with what I have now but it's my edge router so let's build something with Openwrt that I can break.

I think the default hardware they use only has one USB2 port so they may not be aware of the USB3 problem. But, of course, they should have adapters that they can test in USB3 ports

Yeah, USB 2.0 on the CM4 version.. I downloaded the wlanpi system image for the Raspberry Pi 4B and the ANDDEAR adapter initialized fine with no errors (dmesg is clear, ifconfig shows adapter). So I put another one in the other USB3 port and it initialized fine with no errors. Then I checked it with iwlist scanning and both adapters function. lsusb shows both adapters at 5000Mbps on the 3.0 bus. Rebooted a few times and repeated. Ran airodump-ng scans and they work..

Also, I reached out to ANDDEAR and they sent me these drivers that should come on a CD with the adapter. They're 6 years old. The documentation makes reference to the Ralink/Mediatek RT2870 chipset? But there are .bin files related to mt7612 and mt7662. This looks like a nightmare to implement given their "instructions" - what to do?

Are these drivers included in the wlanpi system image or is it something else? dmesg | grep -i mt76 info displayed is identical to other builds we've tested (because it's polling the adapter, not the driver?).

mt76x2u 1-1.3:1.0: ASIC revision: 76120044
mt76x2u 1-1.3:1.0: ROM patch build: 20141115060606a
mt76x2u 1-1.3:1.0: Firmware Version: 0.0.00
mt76x2u 1-1.3:1.0: Build: 1
mt76x2u 1-1.3:1.0: Build Time: 201507311614____
mt76x2u 1-1.4:1.0: ASIC revision: 76120044
mt76x2u 1-1.4:1.0: ROM patch build: 20141115060606a
mt76x2u 1-1.4:1.0: Firmware Version: 0.0.00
mt76x2u 1-1.4:1.0: Build: 1
mt76x2u 1-1.4:1.0: Build Time: 201507311614____
usbcore: registered new interface driver mt76x2u

@amisix
Copy link
Author

amisix commented May 13, 2022

@morrownr Got a new error message this morning. ERROR Transfer event..?

xhci_hcd 0000:01:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 0 comp_code 4
xhci_hcd 0000:01:00.0: Looking for event-dma 000000041ad45520 trb-start 000000041ad45540 trb-end 000000041ad45590 seg-start 000000041ad45000 seg-end 000000041ad45ff0
usb 2-1: USB disconnect, device number 22

It happened shortly after I received this error:

xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

@morrownr
Copy link
Owner

Hi @amisix

I've been sick so am behind on everything I am working on.

I tried the temp email in your link but it came back saying no address exists.

Also, I reached out to ANDDEAR and they sent me these drivers that should come on a CD with the adapter. They're 6 years old. The documentation makes reference to the Ralink/Mediatek RT2870 chipset? But there are .bin files related to mt7612 and mt7662. This looks like a nightmare to implement given their "instructions" - what to do?

Those drivers are a waste of time. They are from a time right after Mediatek bought Ralink and they seemed to have thought doing what Realtek was doing was a good idea. They then learned it was not a good idea and started working with the kernel devs to make good in-kernel drivers.

I'll have to defer answering other issues until I feel a little better.

Regards

@amisix
Copy link
Author

amisix commented May 14, 2022

I'll have to defer answering other issues until I feel a little better.

Hope you feel better. We kinda need you

Those drivers are a waste of time. They are from a time right after Mediatek bought Ralink and they seemed to have thought doing what Realtek was doing was a good idea.

Yeah... For ANDDEAR to even suggest that path was ridiculous imo. So, no real support path, the only path I had to them was through the chat on Ali Express and there was clearly a language barrier which meant no troubleshooting.

I'd like to hear more about Ralink & Mediatek history, please share when able. I have an old Alfa AWUS036NH that kinda got me into this stuff.

Thanks.

@jclark
Copy link

jclark commented Jun 3, 2022

I tried the ANDEAR adapter with Ubuntu 22.04 on a x86 mini PC using an N5105 (not sure about MB chipset) and I got similar results: works fine on USB 3.0 port 2 but is unreliable on USB 3.0 port 1.

Disappointing because apart from that it's a nice small adapter.

@amisix
Copy link
Author

amisix commented Jun 8, 2022

@jclark Thanks for testing that. So odd, that it doesn't function in a specific port despite differing OS and USB chipsets. I do also really like the adapter because of its size. I would have thought that the adapter only functioning on 50% of onboard USB3 ports would be considered faulty but apparently the vendor thinks otherwise. The guys over at WLAN-Pi also confirmed the issue recently and have updated their documentation accordingly.

@Snuupy
Copy link

Snuupy commented Aug 28, 2022

Hi, I have 2 of these adapters. I ran into a similar problem as you, then I upgraded to master kernel 5.15 on openwrt for the rpi and did not run into any issues.

I am able to get both usb adapters working in AP mode on 5ghz with a custom compiled openwrt (with a patch that enables DFS) on usb3 ports 1 and 2.

It's a long thread so give me some time to read up on the logs.

Edit: If you give me some time I will find my openwrt build/mods and write down documentation so you guys can flash it. There's quite a few steps but I will dig it up again, it's been several months since I've worked on this project (mostly that I got it working and then my curiosity was satisfied). Do you want me to upload/document this somewhere?

What tests do you want me to run to show you it is working on both usb3 ports?

Can you guys confirm you guys have this patch in your kernels raspberrypi/linux@a538fd2 ?

@amisix
Copy link
Author

amisix commented Aug 28, 2022

@Snuupy Your efforts are very much appreciated - looks like you've gotten real far with this adapter. Yes, anything you can compile regarding your solution and necessary resources would be awesome. I think the most common test @morrownr runs is sustained iperf3 tests (15+ minutes). It usually drops out after 5 minutes if you get it to function at all. The WLAN-Pi guys recommended this to show the adapter is plugged into the problematic port (USB3 Port1). iperf3 tests on both USB3 ports would be great though because of how it functions/fails on Port 2 also. Thanks!

grep '7612' /sys/bus/usb/devices/2-1/idProduct

@Snuupy
Copy link

Snuupy commented Aug 28, 2022

It's possible the adapter overheats too. I ran some benchmarks on it a few months ago and it got really hot. Do you have a preferred iperf command you run?

@Snuupy
Copy link

Snuupy commented Aug 28, 2022

openwrt-bcm27xx-bcm2711-rpi-4.zip

Try this

  • you will need to connect to pi using ethernet cable to set up the SSIDs
  • then install the ipks to get mt7612u working, then reboot
  • then try your benchmarks

some notes

@Snuupy
Copy link

Snuupy commented Aug 28, 2022

tl;dr:

I got it working on usb3 port 1!!! I knew II had previously fucked around enough with this dongle, rpi4, and openwrt to get it working.

Instructions to reproduce:

  1. install the build I linked in above comment
  2. install the ipks to get mt76 usb drivers, the other ipk if you want DFS
  3. plug in the adapter in usb3 port1, try to start AP, it will not work and I do not expect it to (system logs should show wlan0 or wlan1)
  4. unplug the adapter, plug it in again, this time it SHOULD work (system logs should show wlan1 or wlan2 depending on which one you started with, it should increment by 1)
  5. start the AP again, this time it should work.

Explanation

on openwrt, if you unplug and re-plug the same adapter into the same USB port, it will assign it a new wlan ID (ex. 1st plug is wlan0, 2nd plug is wlan1, 3rd plug is wlan2, etc.)

I got this to work when I plugged the adapter in twice, so it was assigned a different wlan ID than the 1st one, despite being in usb3 port 1. I confirmed this by running

root@OpenWrt:/sys/bus/usb/devices# grep '7612' /sys/bus/usb/devices/2-1/idProduct
7612

So guys please try my openwrt build, plug and unplug the adapter in usb3 port1, and try to start an AP. You should see the wlanX (where X is the wlan ID) increment in the system logs, and then it should work "as normal" 😂 Then let me know if this can be reproduced on your end or not.

Questions

  1. I have no idea who to talk to in order to get this bug resolved, maybe the adapter needs a firmware update or something. What should happen next?
  2. Has anyone reached out to ANDDEAR?
  3. Will a firmware update change anything? Is there a way to flash these usb adapters?

iperf3 logs

dropdown

setup

  • laptop -> ethernet -> rpi4 -> wifi -> phone
  • iperf3 server running on phone via termux
  • iperf3 client running on laptop on windows
λ iperf3.exe -R -c ONEPLUS-A5000.lan -t 600
Connecting to host ONEPLUS-A5000.lan, port 5201
Reverse mode, remote host ONEPLUS-A5000.lan is sending
[  4] local 10.68.197.128 port 27690 connected to 10.68.197.218 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.02   sec  29.3 MBytes   242 Mbits/sec
[  4]   1.02-2.01   sec  11.3 MBytes  95.4 Mbits/sec
[  4]   2.01-3.00   sec  6.05 MBytes  51.4 Mbits/sec
[  4]   3.00-4.00   sec  12.0 MBytes   101 Mbits/sec
[  4]   4.00-5.00   sec  36.4 MBytes   305 Mbits/sec
[  4]   5.00-6.00   sec  36.5 MBytes   306 Mbits/sec
[  4]   6.00-7.00   sec  39.3 MBytes   330 Mbits/sec
[  4]   7.00-8.00   sec  34.4 MBytes   289 Mbits/sec
[  4]   8.00-9.00   sec  38.4 MBytes   322 Mbits/sec
[  4]   9.00-10.00  sec  36.7 MBytes   308 Mbits/sec
[  4]  10.00-11.00  sec  36.5 MBytes   306 Mbits/sec
[  4]  11.00-12.00  sec  38.7 MBytes   325 Mbits/sec
[  4]  12.00-13.00  sec  39.5 MBytes   332 Mbits/sec
[  4]  13.00-14.00  sec  38.7 MBytes   324 Mbits/sec
[  4]  14.00-15.00  sec  39.1 MBytes   327 Mbits/sec
[  4]  15.00-16.00  sec  39.7 MBytes   334 Mbits/sec
[  4]  16.00-17.00  sec  36.2 MBytes   303 Mbits/sec
[  4]  17.00-18.00  sec  36.3 MBytes   304 Mbits/sec
[  4]  18.00-19.00  sec  34.0 MBytes   285 Mbits/sec
[  4]  19.00-20.00  sec  37.5 MBytes   314 Mbits/sec
[  4]  20.00-21.00  sec  34.6 MBytes   290 Mbits/sec
[  4]  21.00-22.00  sec  38.6 MBytes   324 Mbits/sec
[  4]  22.00-23.00  sec  36.4 MBytes   305 Mbits/sec
[  4]  23.00-24.00  sec  38.0 MBytes   319 Mbits/sec
[  4]  24.00-25.00  sec  38.1 MBytes   320 Mbits/sec
[  4]  25.00-26.00  sec  39.7 MBytes   333 Mbits/sec
[  4]  26.00-27.00  sec  39.0 MBytes   328 Mbits/sec
[  4]  27.00-28.00  sec  36.4 MBytes   305 Mbits/sec
[  4]  28.00-29.00  sec  39.8 MBytes   334 Mbits/sec
[  4]  29.00-30.00  sec  37.4 MBytes   314 Mbits/sec
[  4]  30.00-31.00  sec  37.7 MBytes   316 Mbits/sec
[  4]  31.00-32.00  sec  36.8 MBytes   309 Mbits/sec
[  4]  32.00-33.00  sec  37.1 MBytes   311 Mbits/sec
[  4]  33.00-34.00  sec  37.3 MBytes   313 Mbits/sec
[  4]  34.00-35.00  sec  40.3 MBytes   338 Mbits/sec
[  4]  35.00-36.00  sec  37.1 MBytes   311 Mbits/sec
[  4]  36.00-37.00  sec  35.4 MBytes   297 Mbits/sec
[  4]  37.00-38.00  sec  38.2 MBytes   321 Mbits/sec
[  4]  38.00-39.00  sec  35.8 MBytes   300 Mbits/sec
[  4]  39.00-40.00  sec  36.6 MBytes   306 Mbits/sec
[  4]  40.00-41.00  sec  38.1 MBytes   321 Mbits/sec
[  4]  41.00-42.00  sec  36.9 MBytes   310 Mbits/sec
[  4]  42.00-43.00  sec  36.2 MBytes   304 Mbits/sec
[  4]  43.00-44.00  sec  34.9 MBytes   293 Mbits/sec
[  4]  44.00-45.00  sec  33.3 MBytes   280 Mbits/sec
[  4]  45.00-46.00  sec  35.7 MBytes   300 Mbits/sec
[  4]  46.00-47.00  sec  35.2 MBytes   295 Mbits/sec
[  4]  47.00-48.00  sec  38.4 MBytes   322 Mbits/sec
[  4]  48.00-49.00  sec  36.3 MBytes   304 Mbits/sec
[  4]  49.00-50.00  sec  39.0 MBytes   327 Mbits/sec
[  4]  50.00-51.00  sec  35.1 MBytes   294 Mbits/sec
[  4]  51.00-52.00  sec  35.2 MBytes   295 Mbits/sec
[  4]  52.00-53.00  sec  37.1 MBytes   312 Mbits/sec
[  4]  53.00-54.00  sec  37.4 MBytes   314 Mbits/sec
[  4]  54.00-55.00  sec  36.0 MBytes   302 Mbits/sec
[  4]  55.00-56.00  sec  36.0 MBytes   302 Mbits/sec
[  4]  56.00-57.00  sec  36.2 MBytes   304 Mbits/sec
[  4]  57.00-58.00  sec  36.5 MBytes   306 Mbits/sec
[  4]  58.00-59.00  sec  36.0 MBytes   302 Mbits/sec
[  4]  59.00-60.00  sec  35.5 MBytes   298 Mbits/sec
[  4]  60.00-61.00  sec  38.9 MBytes   327 Mbits/sec
[  4]  61.00-62.00  sec  33.9 MBytes   284 Mbits/sec
[  4]  62.00-63.00  sec  37.3 MBytes   313 Mbits/sec
[  4]  63.00-64.00  sec  39.1 MBytes   328 Mbits/sec
[  4]  64.00-65.00  sec  41.0 MBytes   344 Mbits/sec
[  4]  65.00-66.00  sec  40.2 MBytes   337 Mbits/sec
[  4]  66.00-67.00  sec  39.5 MBytes   331 Mbits/sec
[  4]  67.00-68.00  sec  40.6 MBytes   341 Mbits/sec
[  4]  68.00-69.00  sec  34.9 MBytes   293 Mbits/sec
[  4]  69.00-70.00  sec  38.2 MBytes   321 Mbits/sec
[  4]  70.00-71.00  sec  39.6 MBytes   332 Mbits/sec
[  4]  71.00-72.00  sec  39.5 MBytes   331 Mbits/sec
[  4]  72.00-73.00  sec  39.1 MBytes   327 Mbits/sec
[  4]  73.00-74.00  sec  39.2 MBytes   329 Mbits/sec
[  4]  74.00-75.00  sec  35.6 MBytes   298 Mbits/sec
[  4]  75.00-76.00  sec  40.5 MBytes   340 Mbits/sec
[  4]  76.00-77.00  sec  41.0 MBytes   344 Mbits/sec
[  4]  77.00-78.00  sec  37.6 MBytes   316 Mbits/sec
[  4]  78.00-79.00  sec  36.9 MBytes   310 Mbits/sec
[  4]  79.00-80.00  sec  40.4 MBytes   339 Mbits/sec
[  4]  80.00-81.00  sec  39.2 MBytes   329 Mbits/sec
[  4]  81.00-82.00  sec  40.3 MBytes   338 Mbits/sec
[  4]  82.00-83.00  sec  39.3 MBytes   330 Mbits/sec
[  4]  83.00-84.00  sec  37.4 MBytes   313 Mbits/sec
[  4]  84.00-85.00  sec  41.0 MBytes   344 Mbits/sec
[  4]  85.00-86.00  sec  37.5 MBytes   315 Mbits/sec
[  4]  86.00-87.00  sec  39.8 MBytes   334 Mbits/sec
[  4]  87.00-88.00  sec  37.8 MBytes   317 Mbits/sec
[  4]  88.00-89.00  sec  37.3 MBytes   313 Mbits/sec
[  4]  89.00-90.00  sec  35.5 MBytes   297 Mbits/sec
[  4]  90.00-91.00  sec  39.5 MBytes   332 Mbits/sec
[  4]  91.00-92.00  sec  36.8 MBytes   309 Mbits/sec
[  4]  92.00-93.00  sec  39.3 MBytes   330 Mbits/sec
[  4]  93.00-94.00  sec  38.2 MBytes   320 Mbits/sec
[  4]  94.00-95.00  sec  40.0 MBytes   336 Mbits/sec
[  4]  95.00-96.00  sec  40.4 MBytes   339 Mbits/sec
[  4]  96.00-97.00  sec  38.8 MBytes   326 Mbits/sec
[  4]  97.00-98.00  sec  44.1 MBytes   370 Mbits/sec
[  4]  98.00-99.00  sec  34.8 MBytes   292 Mbits/sec
[  4]  99.00-100.01 sec  39.8 MBytes   331 Mbits/sec
[  4] 100.01-101.00 sec  40.2 MBytes   340 Mbits/sec
[  4] 101.00-102.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 102.00-103.00 sec  38.8 MBytes   325 Mbits/sec
[  4] 103.00-104.00 sec  41.1 MBytes   344 Mbits/sec
[  4] 104.00-105.00 sec  38.9 MBytes   327 Mbits/sec
[  4] 105.00-106.00 sec  38.9 MBytes   326 Mbits/sec
[  4] 106.00-107.00 sec  38.2 MBytes   321 Mbits/sec
[  4] 107.00-108.00 sec  39.0 MBytes   327 Mbits/sec
[  4] 108.00-109.00 sec  39.8 MBytes   334 Mbits/sec
[  4] 109.00-110.00 sec  34.8 MBytes   292 Mbits/sec
[  4] 110.00-111.00 sec  35.9 MBytes   301 Mbits/sec
[  4] 111.00-112.00 sec  34.0 MBytes   284 Mbits/sec
[  4] 112.00-113.00 sec  37.2 MBytes   313 Mbits/sec
[  4] 113.00-114.00 sec  33.9 MBytes   284 Mbits/sec
[  4] 114.00-115.00 sec  39.5 MBytes   331 Mbits/sec
[  4] 115.00-116.00 sec  35.1 MBytes   295 Mbits/sec
[  4] 116.00-117.00 sec  39.9 MBytes   335 Mbits/sec
[  4] 117.00-118.00 sec  38.7 MBytes   324 Mbits/sec
[  4] 118.00-119.00 sec  42.0 MBytes   353 Mbits/sec
[  4] 119.00-120.00 sec  41.3 MBytes   347 Mbits/sec
[  4] 120.00-121.00 sec  40.9 MBytes   343 Mbits/sec
[  4] 121.00-122.00 sec  40.7 MBytes   342 Mbits/sec
[  4] 122.00-123.00 sec  38.3 MBytes   321 Mbits/sec
[  4] 123.00-124.01 sec  38.8 MBytes   323 Mbits/sec
[  4] 124.01-125.00 sec  35.0 MBytes   296 Mbits/sec
[  4] 125.00-126.00 sec  36.4 MBytes   305 Mbits/sec
[  4] 126.00-127.00 sec  33.5 MBytes   281 Mbits/sec
[  4] 127.00-128.00 sec  39.6 MBytes   332 Mbits/sec
[  4] 128.00-129.00 sec  39.5 MBytes   331 Mbits/sec
[  4] 129.00-130.00 sec  38.6 MBytes   324 Mbits/sec
[  4] 130.00-131.00 sec  36.1 MBytes   302 Mbits/sec
[  4] 131.00-132.00 sec  36.5 MBytes   307 Mbits/sec
[  4] 132.00-133.00 sec  33.3 MBytes   279 Mbits/sec
[  4] 133.00-134.00 sec  38.0 MBytes   319 Mbits/sec
[  4] 134.00-135.00 sec  40.8 MBytes   342 Mbits/sec
[  4] 135.00-136.01 sec  40.1 MBytes   334 Mbits/sec
[  4] 136.01-137.00 sec  41.2 MBytes   348 Mbits/sec
[  4] 137.00-138.00 sec  37.0 MBytes   310 Mbits/sec
[  4] 138.00-139.00 sec  37.3 MBytes   313 Mbits/sec
[  4] 139.00-140.00 sec  36.5 MBytes   306 Mbits/sec
[  4] 140.00-141.00 sec  38.9 MBytes   326 Mbits/sec
[  4] 141.00-142.00 sec  35.7 MBytes   299 Mbits/sec
[  4] 142.00-143.00 sec  38.2 MBytes   321 Mbits/sec
[  4] 143.00-144.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 144.00-145.00 sec  42.8 MBytes   359 Mbits/sec
[  4] 145.00-146.00 sec  38.0 MBytes   318 Mbits/sec
[  4] 146.00-147.00 sec  37.5 MBytes   314 Mbits/sec
[  4] 147.00-148.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 148.00-149.00 sec  38.3 MBytes   321 Mbits/sec
[  4] 149.00-150.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 150.00-151.00 sec  33.7 MBytes   283 Mbits/sec
[  4] 151.00-152.00 sec  38.1 MBytes   320 Mbits/sec
[  4] 152.00-153.00 sec  35.3 MBytes   296 Mbits/sec
[  4] 153.00-154.00 sec  36.4 MBytes   305 Mbits/sec
[  4] 154.00-155.00 sec  37.3 MBytes   313 Mbits/sec
[  4] 155.00-156.00 sec  36.5 MBytes   306 Mbits/sec
[  4] 156.00-157.00 sec  39.5 MBytes   331 Mbits/sec
[  4] 157.00-158.00 sec  39.2 MBytes   329 Mbits/sec
[  4] 158.00-159.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 159.00-160.00 sec  40.2 MBytes   336 Mbits/sec
[  4] 160.00-161.00 sec  36.7 MBytes   309 Mbits/sec
[  4] 161.00-162.00 sec  38.6 MBytes   324 Mbits/sec
[  4] 162.00-163.00 sec  38.9 MBytes   326 Mbits/sec
[  4] 163.00-164.00 sec  36.5 MBytes   306 Mbits/sec
[  4] 164.00-165.00 sec  38.3 MBytes   322 Mbits/sec
[  4] 165.00-166.00 sec  36.8 MBytes   308 Mbits/sec
[  4] 166.00-167.00 sec  40.2 MBytes   337 Mbits/sec
[  4] 167.00-168.00 sec  34.3 MBytes   288 Mbits/sec
[  4] 168.00-169.00 sec  38.0 MBytes   319 Mbits/sec
[  4] 169.00-170.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 170.00-171.00 sec  38.8 MBytes   326 Mbits/sec
[  4] 171.00-172.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 172.00-173.00 sec  36.1 MBytes   303 Mbits/sec
[  4] 173.00-174.00 sec  33.2 MBytes   279 Mbits/sec
[  4] 174.00-175.00 sec  37.1 MBytes   311 Mbits/sec
[  4] 175.00-176.00 sec  36.3 MBytes   304 Mbits/sec
[  4] 176.00-177.00 sec  34.0 MBytes   285 Mbits/sec
[  4] 177.00-178.00 sec  35.4 MBytes   296 Mbits/sec
[  4] 178.00-179.00 sec  33.5 MBytes   281 Mbits/sec
[  4] 179.00-180.00 sec  39.9 MBytes   335 Mbits/sec
[  4] 180.00-181.00 sec  37.4 MBytes   314 Mbits/sec
[  4] 181.00-182.00 sec  37.1 MBytes   311 Mbits/sec
[  4] 182.00-183.00 sec  38.2 MBytes   320 Mbits/sec
[  4] 183.00-184.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 184.00-185.00 sec  36.9 MBytes   310 Mbits/sec
[  4] 185.00-186.00 sec  39.0 MBytes   327 Mbits/sec
[  4] 186.00-187.00 sec  37.2 MBytes   311 Mbits/sec
[  4] 187.00-188.00 sec  37.9 MBytes   319 Mbits/sec
[  4] 188.00-189.00 sec  39.2 MBytes   329 Mbits/sec
[  4] 189.00-190.00 sec  34.9 MBytes   292 Mbits/sec
[  4] 190.00-191.00 sec  39.0 MBytes   328 Mbits/sec
[  4] 191.00-192.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 192.00-193.00 sec  39.2 MBytes   329 Mbits/sec
[  4] 193.00-194.00 sec  37.2 MBytes   311 Mbits/sec
[  4] 194.00-195.00 sec  36.9 MBytes   310 Mbits/sec
[  4] 195.00-196.01 sec  37.6 MBytes   313 Mbits/sec
[  4] 196.01-197.00 sec  39.5 MBytes   334 Mbits/sec
[  4] 197.00-198.00 sec  36.8 MBytes   308 Mbits/sec
[  4] 198.00-199.00 sec  38.9 MBytes   326 Mbits/sec
[  4] 199.00-200.00 sec  28.1 MBytes   236 Mbits/sec
[  4] 200.00-201.00 sec  38.8 MBytes   325 Mbits/sec
[  4] 201.00-202.00 sec  36.4 MBytes   304 Mbits/sec
[  4] 202.00-203.00 sec  37.6 MBytes   317 Mbits/sec
[  4] 203.00-204.00 sec  39.0 MBytes   327 Mbits/sec
[  4] 204.00-205.00 sec  35.6 MBytes   299 Mbits/sec
[  4] 205.00-206.00 sec  37.2 MBytes   313 Mbits/sec
[  4] 206.00-207.00 sec  35.5 MBytes   297 Mbits/sec
[  4] 207.00-208.00 sec  39.5 MBytes   331 Mbits/sec
[  4] 208.00-209.00 sec  32.2 MBytes   270 Mbits/sec
[  4] 209.00-210.00 sec  39.8 MBytes   334 Mbits/sec
[  4] 210.00-211.00 sec  38.8 MBytes   326 Mbits/sec
[  4] 211.00-212.00 sec  35.1 MBytes   294 Mbits/sec
[  4] 212.00-213.00 sec  35.7 MBytes   300 Mbits/sec
[  4] 213.00-214.01 sec  38.6 MBytes   322 Mbits/sec
[  4] 214.01-215.00 sec  36.4 MBytes   306 Mbits/sec
[  4] 215.00-216.00 sec  37.5 MBytes   315 Mbits/sec
[  4] 216.00-217.00 sec  35.5 MBytes   297 Mbits/sec
[  4] 217.00-218.00 sec  34.5 MBytes   289 Mbits/sec
[  4] 218.00-219.00 sec  36.5 MBytes   306 Mbits/sec
[  4] 219.00-220.00 sec  37.1 MBytes   311 Mbits/sec
[  4] 220.00-221.00 sec  39.3 MBytes   329 Mbits/sec
[  4] 221.00-222.00 sec  33.3 MBytes   279 Mbits/sec
[  4] 222.00-223.00 sec  36.5 MBytes   306 Mbits/sec
[  4] 223.00-224.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 224.00-225.00 sec  39.3 MBytes   330 Mbits/sec
[  4] 225.00-226.00 sec  34.9 MBytes   293 Mbits/sec
[  4] 226.00-227.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 227.00-228.00 sec  36.3 MBytes   305 Mbits/sec
[  4] 228.00-229.00 sec  36.0 MBytes   302 Mbits/sec
[  4] 229.00-230.00 sec  37.9 MBytes   318 Mbits/sec
[  4] 230.00-231.00 sec  33.1 MBytes   278 Mbits/sec
[  4] 231.00-232.01 sec  37.2 MBytes   309 Mbits/sec
[  4] 232.01-233.00 sec  35.6 MBytes   302 Mbits/sec
[  4] 233.00-234.00 sec  33.7 MBytes   283 Mbits/sec
[  4] 234.00-235.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 235.00-236.00 sec  39.9 MBytes   334 Mbits/sec
[  4] 236.00-237.00 sec  35.9 MBytes   301 Mbits/sec
[  4] 237.00-238.01 sec  37.9 MBytes   315 Mbits/sec
[  4] 238.01-239.00 sec  35.6 MBytes   301 Mbits/sec
[  4] 239.00-240.00 sec  36.3 MBytes   305 Mbits/sec
[  4] 240.00-241.00 sec  40.8 MBytes   342 Mbits/sec
[  4] 241.00-242.00 sec  39.4 MBytes   331 Mbits/sec
[  4] 242.00-243.00 sec  39.7 MBytes   333 Mbits/sec
[  4] 243.00-244.01 sec  38.8 MBytes   324 Mbits/sec
[  4] 244.01-245.00 sec  40.4 MBytes   341 Mbits/sec
[  4] 245.00-246.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 246.00-247.00 sec  37.4 MBytes   313 Mbits/sec
[  4] 247.00-248.00 sec  34.0 MBytes   285 Mbits/sec
[  4] 248.00-249.00 sec  38.9 MBytes   326 Mbits/sec
[  4] 249.00-250.01 sec  39.1 MBytes   326 Mbits/sec
[  4] 250.01-251.00 sec  40.1 MBytes   339 Mbits/sec
[  4] 251.00-252.00 sec  36.8 MBytes   309 Mbits/sec
[  4] 252.00-253.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 253.00-254.00 sec  35.0 MBytes   294 Mbits/sec
[  4] 254.00-255.00 sec  39.8 MBytes   334 Mbits/sec
[  4] 255.00-256.00 sec  38.9 MBytes   325 Mbits/sec
[  4] 256.00-257.00 sec  39.4 MBytes   332 Mbits/sec
[  4] 257.00-258.00 sec  40.3 MBytes   338 Mbits/sec
[  4] 258.00-259.00 sec  38.2 MBytes   321 Mbits/sec
[  4] 259.00-260.00 sec  39.1 MBytes   328 Mbits/sec
[  4] 260.00-261.00 sec  41.0 MBytes   343 Mbits/sec
[  4] 261.00-262.00 sec  39.8 MBytes   333 Mbits/sec
[  4] 262.00-263.00 sec  37.9 MBytes   319 Mbits/sec
[  4] 263.00-264.00 sec  40.2 MBytes   337 Mbits/sec
[  4] 264.00-265.00 sec  38.3 MBytes   321 Mbits/sec
[  4] 265.00-266.00 sec  40.9 MBytes   343 Mbits/sec
[  4] 266.00-267.00 sec  39.7 MBytes   333 Mbits/sec
[  4] 267.00-268.01 sec  39.7 MBytes   329 Mbits/sec
[  4] 268.01-269.00 sec  37.7 MBytes   319 Mbits/sec
[  4] 269.00-270.00 sec  41.0 MBytes   344 Mbits/sec
[  4] 270.00-271.00 sec  41.1 MBytes   345 Mbits/sec
[  4] 271.00-272.00 sec  39.3 MBytes   330 Mbits/sec
[  4] 272.00-273.00 sec  37.9 MBytes   317 Mbits/sec
[  4] 273.00-274.01 sec  39.8 MBytes   330 Mbits/sec
[  4] 274.01-275.00 sec  37.2 MBytes   314 Mbits/sec
[  4] 275.00-276.00 sec  40.9 MBytes   344 Mbits/sec
[  4] 276.00-277.00 sec  40.3 MBytes   338 Mbits/sec
[  4] 277.00-278.00 sec  37.8 MBytes   317 Mbits/sec
[  4] 278.00-279.00 sec  40.4 MBytes   339 Mbits/sec
[  4] 279.00-280.00 sec  36.3 MBytes   304 Mbits/sec
[  4] 280.00-281.00 sec  39.1 MBytes   328 Mbits/sec
[  4] 281.00-282.00 sec  35.4 MBytes   297 Mbits/sec
[  4] 282.00-283.00 sec  37.7 MBytes   316 Mbits/sec
[  4] 283.00-284.00 sec  33.4 MBytes   280 Mbits/sec
[  4] 284.00-285.00 sec  38.5 MBytes   323 Mbits/sec
[  4] 285.00-286.00 sec  40.7 MBytes   340 Mbits/sec
[  4] 286.00-287.00 sec  35.5 MBytes   298 Mbits/sec
[  4] 287.00-288.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 288.00-289.00 sec  35.2 MBytes   295 Mbits/sec
[  4] 289.00-290.01 sec  37.2 MBytes   310 Mbits/sec
[  4] 290.01-291.00 sec  35.0 MBytes   296 Mbits/sec
[  4] 291.00-292.01 sec  35.9 MBytes   299 Mbits/sec
[  4] 292.01-293.00 sec  32.9 MBytes   278 Mbits/sec
[  4] 293.00-294.00 sec  37.0 MBytes   310 Mbits/sec
[  4] 294.00-295.00 sec  34.6 MBytes   290 Mbits/sec
[  4] 295.00-296.00 sec  36.6 MBytes   307 Mbits/sec
[  4] 296.00-297.00 sec  35.3 MBytes   297 Mbits/sec
[  4] 297.00-298.01 sec  36.4 MBytes   302 Mbits/sec
[  4] 298.01-299.00 sec  35.4 MBytes   300 Mbits/sec
[  4] 299.00-300.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 300.00-301.00 sec  36.8 MBytes   309 Mbits/sec
[  4] 301.00-302.00 sec  32.2 MBytes   270 Mbits/sec
[  4] 302.00-303.00 sec  36.4 MBytes   305 Mbits/sec
[  4] 303.00-304.01 sec  34.0 MBytes   284 Mbits/sec
[  4] 304.01-305.00 sec  34.4 MBytes   291 Mbits/sec
[  4] 305.00-306.00 sec  36.4 MBytes   305 Mbits/sec
[  4] 306.00-307.00 sec  32.5 MBytes   272 Mbits/sec
[  4] 307.00-308.00 sec  30.3 MBytes   255 Mbits/sec
[  4] 308.00-309.00 sec  36.3 MBytes   304 Mbits/sec
[  4] 309.00-310.00 sec  33.3 MBytes   280 Mbits/sec
[  4] 310.00-311.00 sec  37.5 MBytes   315 Mbits/sec
[  4] 311.00-312.00 sec  35.5 MBytes   298 Mbits/sec
[  4] 312.00-313.00 sec  34.0 MBytes   285 Mbits/sec
[  4] 313.00-314.00 sec  33.3 MBytes   280 Mbits/sec
[  4] 314.00-315.00 sec  35.7 MBytes   299 Mbits/sec
[  4] 315.00-316.00 sec  36.8 MBytes   308 Mbits/sec
[  4] 316.00-317.00 sec  35.9 MBytes   301 Mbits/sec
[  4] 317.00-318.00 sec  35.7 MBytes   299 Mbits/sec
[  4] 318.00-319.00 sec  35.3 MBytes   296 Mbits/sec
[  4] 319.00-320.01 sec  34.2 MBytes   286 Mbits/sec
[  4] 320.01-321.00 sec  38.6 MBytes   326 Mbits/sec
[  4] 321.00-322.00 sec  35.1 MBytes   294 Mbits/sec
[  4] 322.00-323.00 sec  33.0 MBytes   276 Mbits/sec
[  4] 323.00-324.00 sec  32.6 MBytes   274 Mbits/sec
[  4] 324.00-325.00 sec  35.2 MBytes   295 Mbits/sec
[  4] 325.00-326.00 sec  32.9 MBytes   276 Mbits/sec
[  4] 326.00-327.00 sec  37.1 MBytes   311 Mbits/sec
[  4] 327.00-328.01 sec  34.6 MBytes   288 Mbits/sec
[  4] 328.01-329.00 sec  37.6 MBytes   317 Mbits/sec
[  4] 329.00-330.00 sec  31.8 MBytes   267 Mbits/sec
[  4] 330.00-331.00 sec  36.1 MBytes   303 Mbits/sec
[  4] 331.00-332.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 332.00-333.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 333.00-334.00 sec  37.4 MBytes   314 Mbits/sec
[  4] 334.00-335.00 sec  33.2 MBytes   278 Mbits/sec
[  4] 335.00-336.00 sec  33.9 MBytes   285 Mbits/sec
[  4] 336.00-337.00 sec  36.3 MBytes   305 Mbits/sec
[  4] 337.00-338.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 338.00-339.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 339.00-340.00 sec  36.8 MBytes   309 Mbits/sec
[  4] 340.00-341.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 341.00-342.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 342.00-343.00 sec  38.3 MBytes   321 Mbits/sec
[  4] 343.00-344.00 sec  35.6 MBytes   298 Mbits/sec
[  4] 344.00-345.01 sec  36.7 MBytes   307 Mbits/sec
[  4] 345.01-346.00 sec  36.8 MBytes   311 Mbits/sec
[  4] 346.00-347.00 sec  37.9 MBytes   318 Mbits/sec
[  4] 347.00-348.00 sec  35.5 MBytes   298 Mbits/sec
[  4] 348.00-349.00 sec  34.1 MBytes   286 Mbits/sec
[  4] 349.00-350.00 sec  36.3 MBytes   305 Mbits/sec
[  4] 350.00-351.01 sec  36.1 MBytes   301 Mbits/sec
[  4] 351.01-352.00 sec  35.0 MBytes   295 Mbits/sec
[  4] 352.00-353.01 sec  37.2 MBytes   310 Mbits/sec
[  4] 353.01-354.00 sec  36.0 MBytes   304 Mbits/sec
[  4] 354.00-355.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 355.00-356.00 sec  35.6 MBytes   298 Mbits/sec
[  4] 356.00-357.00 sec  35.4 MBytes   297 Mbits/sec
[  4] 357.00-358.00 sec  32.4 MBytes   272 Mbits/sec
[  4] 358.00-359.00 sec  34.2 MBytes   286 Mbits/sec
[  4] 359.00-360.00 sec  32.0 MBytes   268 Mbits/sec
[  4] 360.00-361.00 sec  36.6 MBytes   308 Mbits/sec
[  4] 361.00-362.00 sec  32.8 MBytes   275 Mbits/sec
[  4] 362.00-363.00 sec  35.9 MBytes   301 Mbits/sec
[  4] 363.00-364.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 364.00-365.00 sec  37.1 MBytes   311 Mbits/sec
[  4] 365.00-366.00 sec  37.8 MBytes   317 Mbits/sec
[  4] 366.00-367.00 sec  37.3 MBytes   313 Mbits/sec
[  4] 367.00-368.00 sec  35.8 MBytes   300 Mbits/sec
[  4] 368.00-369.00 sec  34.1 MBytes   286 Mbits/sec
[  4] 369.00-370.00 sec  35.6 MBytes   299 Mbits/sec
[  4] 370.00-371.00 sec  35.1 MBytes   295 Mbits/sec
[  4] 371.00-372.00 sec  32.9 MBytes   276 Mbits/sec
[  4] 372.00-373.00 sec  31.5 MBytes   264 Mbits/sec
[  4] 373.00-374.00 sec  37.4 MBytes   314 Mbits/sec
[  4] 374.00-375.00 sec  33.5 MBytes   281 Mbits/sec
[  4] 375.00-376.00 sec  35.1 MBytes   295 Mbits/sec
[  4] 376.00-377.00 sec  35.5 MBytes   296 Mbits/sec
[  4] 377.00-378.00 sec  36.8 MBytes   310 Mbits/sec
[  4] 378.00-379.00 sec  35.5 MBytes   298 Mbits/sec
[  4] 379.00-380.00 sec  32.6 MBytes   274 Mbits/sec
[  4] 380.00-381.00 sec  36.1 MBytes   303 Mbits/sec
[  4] 381.00-382.00 sec  34.6 MBytes   290 Mbits/sec
[  4] 382.00-383.00 sec  36.6 MBytes   307 Mbits/sec
[  4] 383.00-384.00 sec  34.1 MBytes   286 Mbits/sec
[  4] 384.00-385.00 sec  34.6 MBytes   290 Mbits/sec
[  4] 385.00-386.00 sec  34.3 MBytes   287 Mbits/sec
[  4] 386.00-387.00 sec  38.2 MBytes   320 Mbits/sec
[  4] 387.00-388.00 sec  34.7 MBytes   292 Mbits/sec
[  4] 388.00-389.00 sec  36.2 MBytes   303 Mbits/sec
[  4] 389.00-390.00 sec  34.2 MBytes   287 Mbits/sec
[  4] 390.00-391.00 sec  36.4 MBytes   305 Mbits/sec
[  4] 391.00-392.00 sec  36.4 MBytes   305 Mbits/sec
[  4] 392.00-393.00 sec  32.9 MBytes   276 Mbits/sec
[  4] 393.00-394.00 sec  36.1 MBytes   303 Mbits/sec
[  4] 394.00-395.00 sec  32.4 MBytes   272 Mbits/sec
[  4] 395.00-396.00 sec  37.3 MBytes   313 Mbits/sec
[  4] 396.00-397.00 sec  35.1 MBytes   295 Mbits/sec
[  4] 397.00-398.00 sec  37.6 MBytes   315 Mbits/sec
[  4] 398.00-399.00 sec  34.8 MBytes   292 Mbits/sec
[  4] 399.00-400.00 sec  34.9 MBytes   293 Mbits/sec
[  4] 400.00-401.00 sec  33.9 MBytes   283 Mbits/sec
[  4] 401.00-402.00 sec  36.4 MBytes   306 Mbits/sec
[  4] 402.00-403.00 sec  34.6 MBytes   290 Mbits/sec
[  4] 403.00-404.00 sec  38.4 MBytes   322 Mbits/sec
[  4] 404.00-405.00 sec  35.6 MBytes   298 Mbits/sec
[  4] 405.00-406.00 sec  34.3 MBytes   288 Mbits/sec
[  4] 406.00-407.00 sec  37.1 MBytes   312 Mbits/sec
[  4] 407.00-408.00 sec  30.5 MBytes   256 Mbits/sec
[  4] 408.00-409.00 sec  35.7 MBytes   299 Mbits/sec
[  4] 409.00-410.00 sec  32.8 MBytes   275 Mbits/sec
[  4] 410.00-411.00 sec  37.7 MBytes   316 Mbits/sec
[  4] 411.00-412.00 sec  37.1 MBytes   311 Mbits/sec
[  4] 412.00-413.00 sec  37.8 MBytes   317 Mbits/sec
[  4] 413.00-414.00 sec  33.6 MBytes   282 Mbits/sec
[  4] 414.00-415.00 sec  37.0 MBytes   310 Mbits/sec
[  4] 415.00-416.00 sec  33.3 MBytes   279 Mbits/sec
[  4] 416.00-417.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 417.00-418.00 sec  35.9 MBytes   301 Mbits/sec
[  4] 418.00-419.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 419.00-420.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 420.00-421.00 sec  34.8 MBytes   292 Mbits/sec
[  4] 421.00-422.00 sec  37.3 MBytes   313 Mbits/sec
[  4] 422.00-423.00 sec  32.1 MBytes   269 Mbits/sec
[  4] 423.00-424.00 sec  35.3 MBytes   296 Mbits/sec
[  4] 424.00-425.01 sec  37.0 MBytes   308 Mbits/sec
[  4] 425.01-426.00 sec  34.9 MBytes   295 Mbits/sec
[  4] 426.00-427.00 sec  34.1 MBytes   286 Mbits/sec
[  4] 427.00-428.00 sec  37.0 MBytes   311 Mbits/sec
[  4] 428.00-429.00 sec  31.5 MBytes   264 Mbits/sec
[  4] 429.00-430.00 sec  36.9 MBytes   310 Mbits/sec
[  4] 430.00-431.00 sec  32.7 MBytes   275 Mbits/sec
[  4] 431.00-432.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 432.00-433.00 sec  35.0 MBytes   293 Mbits/sec
[  4] 433.00-434.00 sec  31.0 MBytes   261 Mbits/sec
[  4] 434.00-435.00 sec  34.4 MBytes   289 Mbits/sec
[  4] 435.00-436.00 sec  32.4 MBytes   272 Mbits/sec
[  4] 436.00-437.01 sec  36.2 MBytes   302 Mbits/sec
[  4] 437.01-438.00 sec  33.1 MBytes   279 Mbits/sec
[  4] 438.00-439.00 sec  33.5 MBytes   281 Mbits/sec
[  4] 439.00-440.00 sec  34.5 MBytes   289 Mbits/sec
[  4] 440.00-441.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 441.00-442.00 sec  35.2 MBytes   295 Mbits/sec
[  4] 442.00-443.00 sec  37.5 MBytes   314 Mbits/sec
[  4] 443.00-444.00 sec  35.4 MBytes   297 Mbits/sec
[  4] 444.00-445.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 445.00-446.00 sec  36.8 MBytes   309 Mbits/sec
[  4] 446.00-447.00 sec  31.5 MBytes   264 Mbits/sec
[  4] 447.00-448.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 448.00-449.01 sec  35.1 MBytes   292 Mbits/sec
[  4] 449.01-450.00 sec  34.3 MBytes   289 Mbits/sec
[  4] 450.00-451.00 sec  29.6 MBytes   249 Mbits/sec
[  4] 451.00-452.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 452.00-453.00 sec  34.3 MBytes   288 Mbits/sec
[  4] 453.00-454.00 sec  36.8 MBytes   308 Mbits/sec
[  4] 454.00-455.00 sec  36.7 MBytes   306 Mbits/sec
[  4] 455.00-456.00 sec  35.5 MBytes   299 Mbits/sec
[  4] 456.00-457.00 sec  35.0 MBytes   293 Mbits/sec
[  4] 457.00-458.00 sec  36.0 MBytes   303 Mbits/sec
[  4] 458.00-459.00 sec  33.6 MBytes   282 Mbits/sec
[  4] 459.00-460.00 sec  37.1 MBytes   310 Mbits/sec
[  4] 460.00-461.00 sec  31.8 MBytes   268 Mbits/sec
[  4] 461.00-462.00 sec  36.9 MBytes   310 Mbits/sec
[  4] 462.00-463.00 sec  35.5 MBytes   298 Mbits/sec
[  4] 463.00-464.00 sec  35.0 MBytes   294 Mbits/sec
[  4] 464.00-465.00 sec  35.6 MBytes   299 Mbits/sec
[  4] 465.00-466.00 sec  30.6 MBytes   256 Mbits/sec
[  4] 466.00-467.00 sec  35.5 MBytes   298 Mbits/sec
[  4] 467.00-468.01 sec  35.0 MBytes   292 Mbits/sec
[  4] 468.01-469.00 sec  35.0 MBytes   295 Mbits/sec
[  4] 469.00-470.00 sec  35.1 MBytes   294 Mbits/sec
[  4] 470.00-471.00 sec  35.2 MBytes   295 Mbits/sec
[  4] 471.00-472.00 sec  37.4 MBytes   314 Mbits/sec
[  4] 472.00-473.00 sec  36.6 MBytes   307 Mbits/sec
[  4] 473.00-474.00 sec  37.1 MBytes   312 Mbits/sec
[  4] 474.00-475.00 sec  34.2 MBytes   287 Mbits/sec
[  4] 475.00-476.00 sec  36.6 MBytes   307 Mbits/sec
[  4] 476.00-477.00 sec  32.4 MBytes   271 Mbits/sec
[  4] 477.00-478.00 sec  37.6 MBytes   317 Mbits/sec
[  4] 478.00-479.00 sec  31.6 MBytes   265 Mbits/sec
[  4] 479.00-480.00 sec  35.6 MBytes   298 Mbits/sec
[  4] 480.00-481.00 sec  33.1 MBytes   278 Mbits/sec
[  4] 481.00-482.00 sec  30.9 MBytes   260 Mbits/sec
[  4] 482.00-483.00 sec  35.0 MBytes   293 Mbits/sec
[  4] 483.00-484.00 sec  36.6 MBytes   308 Mbits/sec
[  4] 484.00-485.00 sec  30.0 MBytes   252 Mbits/sec
[  4] 485.00-486.00 sec  34.7 MBytes   290 Mbits/sec
[  4] 486.00-487.01 sec  37.4 MBytes   313 Mbits/sec
[  4] 487.01-488.00 sec  32.6 MBytes   275 Mbits/sec
[  4] 488.00-489.00 sec  34.9 MBytes   293 Mbits/sec
[  4] 489.00-490.00 sec  35.8 MBytes   301 Mbits/sec
[  4] 490.00-491.01 sec  35.7 MBytes   297 Mbits/sec
[  4] 491.01-492.00 sec  35.7 MBytes   302 Mbits/sec
[  4] 492.00-493.00 sec  35.9 MBytes   301 Mbits/sec
[  4] 493.00-494.00 sec  29.2 MBytes   246 Mbits/sec
[  4] 494.00-495.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 495.00-496.00 sec  30.2 MBytes   253 Mbits/sec
[  4] 496.00-497.00 sec  35.5 MBytes   298 Mbits/sec
[  4] 497.00-498.00 sec  35.4 MBytes   297 Mbits/sec
[  4] 498.00-499.00 sec  37.4 MBytes   314 Mbits/sec
[  4] 499.00-500.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 500.00-501.00 sec  37.0 MBytes   310 Mbits/sec
[  4] 501.00-502.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 502.00-503.00 sec  36.9 MBytes   310 Mbits/sec
[  4] 503.00-504.00 sec  33.2 MBytes   278 Mbits/sec
[  4] 504.00-505.00 sec  35.7 MBytes   300 Mbits/sec
[  4] 505.00-506.00 sec  37.4 MBytes   313 Mbits/sec
[  4] 506.00-507.00 sec  34.0 MBytes   285 Mbits/sec
[  4] 507.00-508.00 sec  37.6 MBytes   317 Mbits/sec
[  4] 508.00-509.00 sec  33.5 MBytes   281 Mbits/sec
[  4] 509.00-510.01 sec  36.0 MBytes   300 Mbits/sec
[  4] 510.01-511.00 sec  34.7 MBytes   292 Mbits/sec
[  4] 511.00-512.00 sec  36.6 MBytes   307 Mbits/sec
[  4] 512.00-513.00 sec  36.6 MBytes   307 Mbits/sec
[  4] 513.00-514.00 sec  35.3 MBytes   297 Mbits/sec
[  4] 514.00-515.00 sec  35.8 MBytes   300 Mbits/sec
[  4] 515.00-516.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 516.00-517.00 sec  35.9 MBytes   301 Mbits/sec
[  4] 517.00-518.00 sec  36.3 MBytes   305 Mbits/sec
[  4] 518.00-519.00 sec  34.6 MBytes   291 Mbits/sec
[  4] 519.00-520.01 sec  33.7 MBytes   281 Mbits/sec
[  4] 520.01-521.01 sec  10.6 MBytes  88.9 Mbits/sec
[  4] 521.01-522.01 sec  0.00 Bytes  0.00 bits/sec
[  4] 522.01-523.00 sec  0.00 Bytes  0.00 bits/sec
[  4] 523.00-524.00 sec  0.00 Bytes  0.00 bits/sec
[  4] 524.00-525.00 sec  0.00 Bytes  0.00 bits/sec
[  4] 525.00-526.00 sec  14.0 MBytes   118 Mbits/sec
[  4] 526.00-527.00 sec  35.0 MBytes   292 Mbits/sec
[  4] 527.00-528.00 sec  35.7 MBytes   300 Mbits/sec
[  4] 528.00-529.00 sec  31.5 MBytes   264 Mbits/sec
[  4] 529.00-530.00 sec  36.5 MBytes   307 Mbits/sec
[  4] 530.00-531.00 sec  36.9 MBytes   309 Mbits/sec
[  4] 531.00-532.00 sec  33.7 MBytes   283 Mbits/sec
[  4] 532.00-533.00 sec  35.1 MBytes   295 Mbits/sec
[  4] 533.00-534.00 sec  34.4 MBytes   289 Mbits/sec
[  4] 534.00-535.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 535.00-536.00 sec  39.2 MBytes   329 Mbits/sec
[  4] 536.00-537.00 sec  29.6 MBytes   249 Mbits/sec
[  4] 537.00-538.01 sec  30.9 MBytes   258 Mbits/sec
[  4] 538.01-539.01 sec  34.9 MBytes   292 Mbits/sec
[  4] 539.01-540.00 sec  36.6 MBytes   309 Mbits/sec
[  4] 540.00-541.00 sec  37.0 MBytes   312 Mbits/sec
[  4] 541.00-542.00 sec  33.8 MBytes   284 Mbits/sec
[  4] 542.00-543.00 sec  37.1 MBytes   311 Mbits/sec
[  4] 543.00-544.00 sec  37.6 MBytes   316 Mbits/sec
[  4] 544.00-545.00 sec  34.9 MBytes   293 Mbits/sec
[  4] 545.00-546.00 sec  34.7 MBytes   291 Mbits/sec
[  4] 546.00-547.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 547.00-548.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 548.00-549.00 sec  35.3 MBytes   296 Mbits/sec
[  4] 549.00-550.00 sec  33.5 MBytes   281 Mbits/sec
[  4] 550.00-551.00 sec  36.6 MBytes   306 Mbits/sec
[  4] 551.00-552.00 sec  34.5 MBytes   290 Mbits/sec
[  4] 552.00-553.00 sec  36.8 MBytes   309 Mbits/sec
[  4] 553.00-554.00 sec  36.8 MBytes   309 Mbits/sec
[  4] 554.00-555.00 sec  36.3 MBytes   304 Mbits/sec
[  4] 555.00-556.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 556.00-557.00 sec  30.2 MBytes   253 Mbits/sec
[  4] 557.00-558.00 sec  35.9 MBytes   301 Mbits/sec
[  4] 558.00-559.00 sec  33.7 MBytes   283 Mbits/sec
[  4] 559.00-560.00 sec  36.5 MBytes   306 Mbits/sec
[  4] 560.00-561.00 sec  31.3 MBytes   263 Mbits/sec
[  4] 561.00-562.00 sec  36.7 MBytes   308 Mbits/sec
[  4] 562.00-563.00 sec  33.8 MBytes   283 Mbits/sec
[  4] 563.00-564.00 sec  35.5 MBytes   298 Mbits/sec
[  4] 564.00-565.00 sec  33.0 MBytes   276 Mbits/sec
[  4] 565.00-566.00 sec  36.2 MBytes   303 Mbits/sec
[  4] 566.00-567.00 sec  37.8 MBytes   317 Mbits/sec
[  4] 567.00-568.00 sec  36.7 MBytes   306 Mbits/sec
[  4] 568.00-569.00 sec  36.3 MBytes   306 Mbits/sec
[  4] 569.00-570.00 sec  29.7 MBytes   249 Mbits/sec
[  4] 570.00-571.00 sec  35.3 MBytes   296 Mbits/sec
[  4] 571.00-572.00 sec  35.0 MBytes   293 Mbits/sec
[  4] 572.00-573.00 sec  36.4 MBytes   306 Mbits/sec
[  4] 573.00-574.00 sec  32.2 MBytes   270 Mbits/sec
[  4] 574.00-575.00 sec  35.7 MBytes   300 Mbits/sec
[  4] 575.00-576.00 sec  33.8 MBytes   284 Mbits/sec
[  4] 576.00-577.00 sec  37.2 MBytes   312 Mbits/sec
[  4] 577.00-578.00 sec  33.9 MBytes   285 Mbits/sec
[  4] 578.00-579.00 sec  35.5 MBytes   298 Mbits/sec
[  4] 579.00-580.01 sec  31.1 MBytes   259 Mbits/sec
[  4] 580.01-581.00 sec  35.9 MBytes   304 Mbits/sec
[  4] 581.00-582.00 sec  35.8 MBytes   300 Mbits/sec
[  4] 582.00-583.00 sec  40.3 MBytes   338 Mbits/sec
[  4] 583.00-584.00 sec  36.0 MBytes   303 Mbits/sec
[  4] 584.00-585.00 sec  36.8 MBytes   309 Mbits/sec
[  4] 585.00-586.00 sec  35.0 MBytes   293 Mbits/sec
[  4] 586.00-587.00 sec  36.2 MBytes   303 Mbits/sec
[  4] 587.00-588.00 sec  36.2 MBytes   303 Mbits/sec
[  4] 588.00-589.00 sec  33.7 MBytes   283 Mbits/sec
[  4] 589.00-590.00 sec  32.0 MBytes   268 Mbits/sec
[  4] 590.00-591.00 sec  36.2 MBytes   304 Mbits/sec
[  4] 591.00-592.00 sec  37.0 MBytes   310 Mbits/sec
[  4] 592.00-593.00 sec  37.4 MBytes   314 Mbits/sec
[  4] 593.00-594.00 sec  35.3 MBytes   296 Mbits/sec
[  4] 594.00-595.00 sec  35.0 MBytes   293 Mbits/sec
[  4] 595.00-596.00 sec  34.5 MBytes   289 Mbits/sec
[  4] 596.00-597.00 sec  33.6 MBytes   280 Mbits/sec
[  4] 597.00-598.00 sec  34.8 MBytes   293 Mbits/sec
[  4] 598.00-599.00 sec  35.9 MBytes   300 Mbits/sec
[  4] 599.00-600.00 sec  33.5 MBytes   282 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-600.00 sec  21.0 GBytes   301 Mbits/sec   36             sender
[  4]   0.00-600.00 sec  21.0 GBytes   301 Mbits/sec                  receiver

OLD EDITS ENCLOSED/jumbled thoughts/testing, I have kept it for documentation purposes

dropdown

Actually, I think you're all right and I misremembered, I get these in my logs on openwrt:

Thu Jun  2 10:12:14 2022 kern.err kernel: [   77.122591] mt76x2u 2-2:1.0: MAC error detected
Thu Jun  2 10:12:15 2022 kern.err kernel: [   78.238714] mt76x2u 2-2:1.0: MAC error detected
Thu Jun  2 10:12:16 2022 kern.err kernel: [   79.488679] mt76x2u 2-2:1.0: MAC error detected
Thu Jun  2 10:12:17 2022 kern.err kernel: [   80.718591] mt76x2u 2-2:1.0: MAC error detected

maybe that's why I had the other adapter in the usb2 port. My bad.

Looks like it does not work on usb3 port 1.

Edit: I unplugged the usb wifi adapter on usb3 port 2 and port1 started working again. I forgot to install iperf3 on my rpi when I built openwrt, so I have to connect a 2nd device on the ethernet port to host the iperf3 server.

Edit 2: By "working" I mean that it doesn't disassociate and I can send ping packets through. However, throughput is abysmal (I didn't have a 2nd laptop/linux box conveniently with me so I had to host librespeed on my laptop connected to the rpi through ethernet and my phone was using the rpi wifi network).

USB3 port 1: I got 0.03mbps down/1.54 mbps up, 69ms ping, 107ms jitter. No error notable error logs in openwrt except for earlier, which mysteriously does not show up now. Something is definitely going on breaking usb3 port 1 even if it doesn't completely drop from the system.

Removed usb dongle from USB3 port 1, plugged into USB3 port 2 without rebooting. Got a bunch of

Thu Jun  2 11:10:51 2022 kern.err kernel: [ 3594.368685] mt76x2u 2-2:1.0: MAC error detected
Thu Jun  2 11:10:52 2022 kern.err kernel: [ 3595.488720] mt76x2u 2-2:1.0: MAC error detected
Thu Jun  2 11:10:53 2022 kern.err kernel: [ 3596.638649] mt76x2u 2-2:1.0: MAC error detected
Thu Jun  2 11:10:54 2022 kern.err kernel: [ 3597.758674] mt76x2u 2-2:1.0: MAC error detected
Thu Jun  2 11:10:56 2022 kern.err kernel: [ 3599.008685] mt76x2u 2-2:1.0: MAC error detected
Thu Jun  2 11:10:57 2022 kern.err kernel: [ 3600.188644] mt76x2u 2-2:1.0: MAC error detected

logs.

I guess it doesn't like it when you unplug the dongle from usb3 port 1 into usb3 port 2. I tried a reboot and tested again, with dongle still plugged into usb3 port 2. Still the same MAC error detected message. I plugged usb dongle 2 into usb3 port 2 just to see what would happen, ssh'd into openwrt, rebooted. Still the same MAC error detected message.

I plugged dongle into usb2 port 1, got 11ms ping, 1.9 ms jitter, 101 mbps down, 247 mbps up.
I plugged dongle into usb2 port 2, got 10ms ping, 2.38 ms jitter, 104 mbps down, 249 mbps up.

Definitely something wrong going on with the usb3 ports, the adapter, or a combination of the 2.

At this point, it is not sufficient to see if the adapter connects and disconnects to the adapter/AP, you must check throughput as well to see if something strange is going on. To me, it looks like anything connected to usb3 on that adapter does not work and it only works on usb2. How strange. Has anyone messaged ANDDEAR to see what their response is?

Edit 3:

Okay, now this is hilarious. I plugged the same usb dongle back into usb3 port1, and openwrt registered the dongle as a completely new adapter:

Thu Jun  2 11:24:32 2022 daemon.notice netifd: Network device 'wlan5' link is up
Thu Jun  2 11:24:32 2022 daemon.notice hostapd: wlan5: interface state HT_SCAN->ENABLED
Thu Jun  2 11:24:32 2022 daemon.notice hostapd: wlan5: AP-ENABLED
Thu Jun  2 11:24:48 2022 daemon.info hostapd: wlan5: STA 86:d3:95:01:51:54 IEEE 802.11: authenticated
Thu Jun  2 11:24:48 2022 daemon.notice hostapd: wlan5: STA-OPMODE-N_SS-CHANGED 86:d3:95:01:51:54 2
Thu Jun  2 11:24:49 2022 daemon.info hostapd: wlan5: STA 86:d3:95:01:51:54 IEEE 802.11: associated (aid 1)
Thu Jun  2 11:24:49 2022 daemon.notice hostapd: wlan5: AP-STA-CONNECTED 86:d3:95:01:51:54
Thu Jun  2 11:24:49 2022 daemon.info hostapd: wlan5: STA 86:d3:95:01:51:54 WPA: pairwise key handshake completed (RSN)

I got 9ms ping, 3.43 jitter, 332 down, 404 up. Now it is working as intended, on usb3 port 1. This must be how I got this dongle working on plug 1, by unplugging it and plugging it back in again where it registers as a completely different adapter 😂 Note how it says wlan5, the previous 4 slots were wlan1-4. Since it registers as wlan5 something must have changed and now I spamming speedtests and it works perfectly.

Edit 4: I have now been spamming speedtests for ~10 minutes and it has not crashed while doing expected (300/400mbps down/up) performance, normal ping times. So the hilarious solution/workaround is to use an OS where each re-plug of the adapter makes the system assign a different WLAN/USB number to it, and then you will have worked around the wlan1 slot so it will work.

Edit 5: After some more testing, I get this log and the adapter crashes. To start it back up again, I have to unplug/replug, which creates wlan6 (also on usb3 port 1). Maybe it overheated?

Thu Jun  2 11:44:30 2022 kern.err kernel: [ 2226.676678] mt76x2u 2-1:1.0: error: mt76x02u_mcu_wait_resp failed with -110

Edit 6: After replugging the adapter (wlan6) I was not able to get it to crash, but the adapter is hot to the touch after many consecutive speedtests. I am getting 250-400 down, 350-500 up consistently. Maybe just my noisy neighbors. Tested on channel 36 because I didn't want to wait for DFS scan time every time I unplugged/replugged.

@Snuupy
Copy link

Snuupy commented Aug 30, 2022

Ok I made a bunch of edits and notes in the previous comment, please test and let me know. @amisix

@morrownr
Copy link
Owner

@Snuupy

My to-do list is too full to take another look at this right now. I'm not aware of any adapters that have flashable firmware. I'm pretty sure the firmware inside the adapters is small and not something that would be subject to errors for the most part. The external firmware is changable but that would be the Mediatek kernel devs that would work it but they may not have the adapter. This could be a hard nut to crack.

I tested at length against other adapters with mt7812u chipsets. This adapter is the only one showing the problem so it seems there is something specific to this adapter. Exactly what is causing the problem is still a mystery. Depending on how a person uses the adapter, putting it in a USB2 port works everytime and is fast enough for most uses.

Nick

@Snuupy
Copy link

Snuupy commented Aug 30, 2022

No worries, thank you for setting up this repo @morrownr. We wouldn't be here if it weren't for your docs!

One limitation of the usb2 bus is if want to set up a wireless repeater with 2 adapters. For instance, 300 send +300 receive = 600mbps, which is already greater than the 480mbps limit on the usb2 bus (as it is shared on the rpi4) so one would be limited to 240mbps instead. And sometimes I can even hit 400mbps on a single adapter.

This adapter is also the cheapest (even shipping included) so it'd be really nice to find a way to get this working. I think I bought 2 for 36usd (so $18 each) and the others on the list are slightly more, none with the same slim form factor where I can comfortably fit 2 of these adapters right next to each other. With the other adapters it's likely I would also need to buy right angled (90 degree) usb3 adapters as well.

I have yet to test it on usb3 port 2 as I was going to run some benchmarks today to test stability after keeping it running for 1-2 days but I suspect results will be the same: unplug/replug to get a new wlanID as a workaround temporarily. I'll report back when I have tested that.

@morrownr
Copy link
Owner

@Snuupy

I get what you are saying about USB2 limiting the stream. I wish was not a problem. @amisix is actually the one who discovered the problem. I'm glad he did as I try to do a good job of only putting good adapters on the in-kernel list. Sometimes something slips by for a while.

Give it a try in port 2 and see what you get. This is a strange problem. Let us know what you find out.

Nick

@amisix
Copy link
Author

amisix commented Aug 30, 2022

@Snuupy
I hear ya - I also like this adapter very much (when it works). Perfect size, awesome chipset... It's a shame.
Thanks much for uploading the OpenWRT image and doing your troubleshooting. I too am quite busy this week so will not have a chance to do anything until the weekend. Yeah, try it in port 2 with an extended iperf3 test (default settings). It failed after roughly 5 minutes for @morrownr (if I remember correctly). Others have had it work but may not/have not run extended iperf3 tests.

Has anyone reached out to ANDDEAR?

I contacted them via AliExpress online chat. They were responsive but uncaring. There was a language barrier which added an additional layer of complexity. I referenced this thread. I was told to use the drivers that come on CD with the adapter (that are 6+ years old). I tried looking around for a contact outside of AliExpress but was unable to find anything.

@morrownr
Copy link
Owner

I was told to use the drivers that come on CD with the adapter (that are 6+ years old).

When you hear or read this line, you know you are dealing with someone who knows absolutely nothing about Linux. To help correct the situation we really need to support those who support us. That will channel money to those who are doing the better job and it will move the market and make things better for all of us.

Right now, the only retailer that I am aware of that does a good job with their Linux customers is Rokland. The only maker that does a reasonably good job is ALFA. Panda used to do a good job of making adapters that use in-kernel drivers available but they are not making any modern adapters in this day in time. I don't know what is going on there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants