Openwrt/Raspberry: lost the connection after periodic connection test through MT7612U wifi adapter

I'm developing a script that permits to connect to the internet through a Mediatek MT7612U wifi adapter (Alfa AWUS036ACM) and making some connection tests using speedtest-cli, iperf3 ...
My script is running under OpenWrt linux system. I installed Openwrt in a raspberry PI4 Model B. I plugged to the raspberry two wifi adapter (Alfa AWUS036ACM with Mediatek MT7612U chipset).
The script is running permenantly, and making periodically some connection Tests. After a period of time I lost the connection.

When I checked the system log I found this error reported by the kernel:

kern.err kernel: [ 1929.020945] mt76x2u 2-1:1.0: error: mt76x02u_mcu_wait_resp failed with -110

The issue disappear when I reboot the system. But I need to fix it without rebooting.
I tried to reset the usb device with ioctl USBDEVFS_RESET but that caused the lost of corresponding network interfaces,
I tried also to poweroff/poweron the usb device with commands like that:

echo disabled > /sys/bus/usb/devices/usb2/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup

but the issue is not fixed

I tried also to unbind/bind the usb device

echo '2-1' > /sys/bus/usb/drivers/usb/unbind
echo '2-1' > /sys/bus/usb/drivers/usb/bind

and the issue is not fixed also

Has someone an idea why I got this blocker issue. Is there an idea to fix or bypass it without the need to reboot the system.

You should mention the radio chip in your topic title, that way your thread will be found quicker. Use the </> code button to enclose commands or code for better readability please.

Googling your error message suggests a few things:

  • Using a powered USB hub
  • Disabling USB SG: echo 1 > /sys/module/mt76_usb/parameters/disable_usb_sg
2 Likes

@Borromini Thank you for your answer and advices
do you recommand a specific powered USB hub

I have no experience with them, that's what popped up googling your error message :).

1 Like

Thank you :wink: