morrownr / 7612u

Linux Support for USB WiFi Adapters that are based on the MT7612U Chipset
73 stars 9 forks source link

AWUS036ACM disconnects after ~5 minutes #19

Open uros76 opened 11 months ago

uros76 commented 11 months ago

Like many, I bought a new Alfa AWUS036ACM to improve the Wi-Fi signal on my rpi 4 B. As soon as I plugged it in everything worked. Great signal and connection is better than the stock wifi module.

But, after a short while it disconnects and does not reconnect automatically. The only fix (for now) I need to reboot the rpi os or unplug/replug the stick.

I guess it must be something driver/software related. Any idea what could be wrong?

uros76 commented 11 months ago

Some details from dmesg if it helps to identify the problem:

[ 29.943780] wlan0: authenticate with xxx [ 30.997247] wlan0: send auth to xxx (try 1/3) [ 31.005241] wlan0: authenticated [ 31.009392] wlan0: associate with xxx (try 1/3) [ 31.010563] wlan0: RX AssocResp from xxx (capab=0x1011 status=0 aid=24) [ 31.016631] wlan0: associated [ 31.138868] wlan0: Limiting TX power to 23 (23 - 0) dBm as advertised by xxx [ 31.158914] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 325.055915] mt76x2u 2-1:1.0: error: mt76x02u_mcu_wait_resp failed with -110 [ 348.492029] mt76x2u 2-1:1.0: timed out waiting for pending tx [ 360.946069] mt76x2u 2-1:1.0: MAC RX failed to stop [ 675.655296] mt76x2u 2-1:1.0: MAC RX failed to stop [ 990.589242] mt76x2u 2-1:1.0: MAC RX failed to stop [ 1305.408005] mt76x2u 2-1:1.0: MAC RX failed to stop [ 1394.794887] usb 2-1: USB disconnect, device number 2 [ 1394.806891] mt76x2u 2-1:1.0: MAC error detected [ 1394.988453] mt76x2u 2-1:1.0: MAC stop failed [ 1398.059080] usb 2-1: new SuperSpeed USB device number 3 using xhci_hcd [ 1398.080903] usb 2-1: New USB device found, idVendor=0e8d, idProduct=7612, bcdDevice= 1.00 [ 1398.080922] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4 [ 1398.080930] usb 2-1: Product: Wireless [ 1398.080936] usb 2-1: Manufacturer: MediaTek Inc. [ 1398.080942] usb 2-1: SerialNumber: 000000000 [ 1398.215674] usb 2-1: reset SuperSpeed USB device number 3 using xhci_hcd [ 1398.238133] mt76x2u 2-1:1.0: ASIC revision: 76120044 [ 1398.277230] mt76x2u 2-1:1.0: ROM patch build: 20141115060606a [ 1398.441434] mt76x2u 2-1:1.0: Firmware Version: 0.0.00 [ 1398.441455] mt76x2u 2-1:1.0: Build: 1 [ 1398.441461] mt76x2u 2-1:1.0: Build Time: 201507311614____ [ 1399.242529] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht' [ 1409.401318] wlan0: authenticate with xxx [ 1410.656996] wlan0: send auth to xxx (try 1/3) [ 1410.663054] wlan0: authenticated [ 1410.670929] wlan0: associate with xxx (try 1/3) [ 1410.672635] wlan0: RX AssocResp from xxx (capab=0x1011 status=0 aid=19) [ 1410.680042] wlan0: associated [ 1410.740181] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 1410.744846] wlan0: Limiting TX power to 23 (23 - 0) dBm as advertised by xxx [ 9652.942428] mt76x2u 2-1:1.0: error: mt76x02u_mcu_wait_resp failed with -110 [ 9674.202244] mt76x2u 2-1:1.0: timed out waiting for pending tx [ 9686.589879] mt76x2u 2-1:1.0: MAC RX failed to stop [10001.449428] mt76x2u 2-1:1.0: MAC RX failed to stop [10316.183835] mt76x2u 2-1:1.0: MAC RX failed to stop [10630.717888] mt76x2u 2-1:1.0: MAC RX failed to stop

morrownr commented 11 months ago

Hi @uros76

The first thing to check in my opinion is the usb subsystem. Can you make me a list of everything that is plugged into a usb port?

Background: The usb subsystem on RasPi's is problematic for several reasons. One of the big problems is that the subsystem does not provide spec power. A subsystem with 2 usb2 ports and 2 usb 3 port should be provided with 2 x 500 + 2 x 900 = 2800 mA of power per specification but the RasPi3 and 4 only provide 1200 mA of power leaving the usb subsystem seriously under powered. To get this right, you really have to know the max amount of power each adapter needs so that you do not exceed the limit. Adapters based on mt7612u chipsets pull a maximum of 400 mA. That leaves you with 800 mA for everything else that is plugged into a usb port.

uros76 commented 11 months ago

Hi @morrownr and thanks for a quick reply. I have in fact just this wifi stick and a small wireless stick for the keyboard. That keyboard stick is not consuming a lot, I would say far less than the wifi stick. Here is output when I run lsusb:

Bus 002 Device 005: ID 0e8d:7612 MediaTek Inc. MT7612U 802.11a/b/g/n/ac Wireless Adapter Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 1997:2433 Shenzhen Riitek Technology Co., Ltd wireless mini keyboard with touchpad Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

As you can see I have wifi stick plugged to usb 3.0 port on rpi and the keyboard stick on usb 2.0 port. I am not sure if the power usage is the problem here. Everything else works fine as before. And I do use official rpi power supply.

morrownr commented 11 months ago

Do you have a wired keyboard you could test with temporarily?

Have you tried the adapter in a usb2 port?

Which release of the RasPiOS are you using? 2023-05-03

uros76 commented 11 months ago

I will actually take out the keyboard dongle over night and see what happens.

It's on bullseye and I did a full update earlier today just in case.

PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)"

uros76 commented 11 months ago

Nope, that didn't help. Error resurfaced and wifi dropped overnight at some point with a long list of repeating error messages... I checked the power supply and it has 3.1A output. I am out of ideas 😒

[35157.602886] mt76x2u 2-1:1.0: error: mt76x02u_mcu_wait_resp failed with -110 [35180.302568] mt76x2u 2-1:1.0: timed out waiting for pending tx [35192.696044] mt76x2u 2-1:1.0: MAC RX failed to stop [35507.162121] mt76x2u 2-1:1.0: MAC RX failed to stop [35821.851060] mt76x2u 2-1:1.0: MAC RX failed to stop [36136.519052] mt76x2u 2-1:1.0: MAC RX failed to stop [36451.137611] mt76x2u 2-1:1.0: MAC RX failed to stop [36765.793456] mt76x2u 2-1:1.0: MAC RX failed to stop [37080.552470] mt76x2u 2-1:1.0: MAC RX failed to stop [37395.168292] mt76x2u 2-1:1.0: MAC RX failed to stop [37709.803377] mt76x2u 2-1:1.0: MAC RX failed to stop [38024.487354] mt76x2u 2-1:1.0: MAC RX failed to stop [38338.885551] mt76x2u 2-1:1.0: MAC RX failed to stop [38653.587236] mt76x2u 2-1:1.0: MAC RX failed to stop [38968.187764] mt76x2u 2-1:1.0: MAC RX failed to stop [39282.865343] mt76x2u 2-1:1.0: MAC RX failed to stop [39597.524844] mt76x2u 2-1:1.0: MAC RX failed to stop [39912.179977] mt76x2u 2-1:1.0: MAC RX failed to stop [40226.835073] mt76x2u 2-1:1.0: MAC RX failed to stop [40541.512561] mt76x2u 2-1:1.0: MAC RX failed to stop [40856.184284] mt76x2u 2-1:1.0: MAC RX failed to stop [41170.903534] mt76x2u 2-1:1.0: MAC RX failed to stop [41485.559404] mt76x2u 2-1:1.0: MAC RX failed to stop [41800.158704] mt76x2u 2-1:1.0: MAC RX failed to stop [42114.738227] mt76x2u 2-1:1.0: MAC RX failed to stop

morrownr commented 11 months ago

Hmmm...

I checked the power supply and it has 3.1A output.

Do you have another cable you can try? The power supplyt may be in good shape but is the cable?

Do you have another computer that you can use to test the adapter? It can be a Windows machine. This adapter is plug and play on Windows 10 and 11. I'm trying to rule out manufacturing problem. It happens.

Another thing to try: If you have an extra sd card that you could do a clean burn of the 2023-05-03 version of RasPiOS, you could see if something is wrong with your current setup that could be contributing to the problem.

uros76 commented 11 months ago

I tried different USB cable, same problem. I will try on diferent pc to rule out hardware issue. The rpi is integrated in a smart mirror system. Hard to get sd card out at the moment.

As a temporary solution that works, I use Tplink re200 extender which can take the wifi signal and turn it into a lan port. Then I just use a good old reliable lan cable on rpi lan port.

morrownr commented 11 months ago

I will try on diferent pc to rule out hardware issue.

Good.

Another thing to try: The usb subsystem of the Pi4 is not good but one thing that comes up is the usb3 hub chipset. It has problems that have not been resolved by working on the driver so it may be a silicone issue. Try the ACM in a usb2 port. You will get slower speeds but that may not be important to you.

callegar commented 7 months ago

Similar issue here. On a Haswell laptop. Also occasionally having the usb wifi interface stopping. At the same time I also see the: error: mt76x02u_mcu_wait_resp failed with -110 This is followed by error: MCU resp evt:0 seq:a-f In my case, the card is able to recover, though, which typically happens in 2-3 min.

morrownr commented 7 months ago

My first guess would be a port problem. Have you tried other usb ports?