Problem in Linux with Alfa AWUS036ACHM where the device appears not to be initialized correctly on a reboot
Brett Bergquist
bbergquist at epc-instore.com
Thu Jan 2 10:43:40 PST 2025
Trying to poke this again if possible and an update.
I have been able to replicate the same issue on straight Ubuntu 24.04
and with multiple units so the problem is real. Basically the problem
seems to be that the USB unit does not get completely reset at start
up.
For example, right now, I have a unit in my lab that after a reboot,
the unit has limited network connectivity. For example, ICMP echo can
work, but SSH does not. On a hunch I turned down the MTU size on my
laptop trying to access the system with the Alfa unit to 256 bytes,
and I am actually then able to access through the network. This
further indicates an internal issue with something not being reset on
the Alfa unit when the drive was loaded.
If there is any register map, programmer guide, anything for the chip
that is being used would be useful. I think I did find the datasheet
with the pin out, but not much else.
On Tue, Dec 10, 2024 at 8:15 AM Brett Bergquist
<bbergquist at epc-instore.com> wrote:
>
> I am going to try to patch the driver. My first cut will be to use
> debugfs to see if I can do something that would reset the hardware as
> if it was from a power on. Anyone know of a datasheet or reference
> manual for the Mediatek MT7610UN chip? The chip is labeled
>
> MEDIATEK
> MT7610UN
> 2131-AMAL
> FTPAR540
>
>
> On Sat, Dec 7, 2024 at 1:59 PM Brett Bergquist
> <bbergquist at epc-instore.com> wrote:
> >
> > I have a product that is built using Yocto Kirkstone release (Kernel
> > version 5.15) that uses the Alfa AWUS036ACHM product. It is working
> > most of the time but I have a strange situation. If I reboot the
> > system, there will come a time where the device is detected but it
> > does not work. This is using systemd-networkd for networking and
> > using wpa_supplicant.
> >
> > To stress the system, I am externally logging into the system and
> > rebooting. This might be successful for a number of iterations, I
> > have seen 30 reboots. Eventually however the networking will fail
> > with wpa_supplicant not progressing at all. I connect a console cable
> > to observe what I see.
> >
> > When in this state, the USB device is seen, the modules loaded look like
> > >
> > > root at 9998:~# lsmod
> > > Module Size Used by
> > > mt76x0u 16384 0
> > > mt76x0_common 40960 1 mt76x0u
> > > mt76x02_usb 20480 1 mt76x0u
> > > mt76_usb 28672 2 mt76x02_usb,mt76x0u
> > > mt76x02_lib 61440 3 mt76x02_usb,mt76x0_common,mt76x0u
> > > mt76 57344 5 mt76_usb,mt76x02_lib,mt76x02_usb,mt76x0_common,mt76x0u
> >
> > Everything looks normal. However the wifi does not work. Using "iw
> > dev wlan0 station dump" and nothing is seen. I have so far found
> > nothing that I can do in software that will reliably get wifi out of
> > this state. I have tried
> >
> > delaying starting wpa_supplicant for a bit (30 seconds) after boot on
> > the theory to let the USB bits in the kernel settle
> > reset the USB port and restart the wpa_supplicant
> > unbind and rebind the USB device and restart the wpa_supplicant
> > unload the driver kernel module and reload the driver kernel module
> > and restart the wpa_supplicant
> >
> > Even a reboot of the system will not recover once in this state. I
> > can recover by unplugging the wifi device USB connection and replug it
> > back in and then restart wpa_supplicant and the networking comes right
> > up. A reboot likely does not cause loss of power to the wifi device.
> > I can also recover by a complete power off/power on of the system.
> >
> > It is as if the wifi device gets into some state that is not good and
> > cannot be cleared in software. I have also seen the device get into a
> > state where it appears connected but only partially in that I can pass
> > things such as ICMP ECHO to and from the system, but I cannot pass
> > data, as an example SSH into our out of the system starts but hangs.
> > Using Wireshark I can see the TCP connection being established with
> > the SYN, SYN/ACK, ACK handshake but then start of the SSH setup fails
> > and times out. Again, simply unplug and replug the wifi device and
> > it works.
> >
> > Note that this occurs on multiple wifi devices which I have used with
> > the same system and also the same wifi device on a different system.
> > After a number of reboots I can get into this state.
> >
> > So my question is if that type of thing has been seen and possibly
> > corrected in a later kernel version. I would then attempt to backport
> > changes as needed.
> >
> >
> > --
> > Brett M. Bergquist
> > Distinguished Member Technical Staff
> > EntryPoint Communications LLC
> > 30 Waterside Drive, Suite 100
> > Farmington, CT 06032
> >
> > Phone: (203) 206 3542
> > Email: bbergquist at epc-instore.com
> >
> > CONFIDENTIALITY NOTICE
> > This message (including any attachments) contains information that may
> > be confidential. If you are the intended recipient, and the message
> > is marked confidential, by opening the message, you accept
> > responsibility for treating the message and information contained in
> > the message as confidential, including not distributing or disclosing
> > its contents to any third party without the express written consent of
> > the sender. If you are not the intended recipient, you may not read,
> > print, retain, use, copy, distribute or disclose to anyone the message
> > or any information contained in the message, and such conduct is
> > prohibited. If you have received this message in error, please advise
> > the sender by reply e-mail, and destroy all copies of the original
> > message (including any attachments). Sender reserves all rights of
> > confidentiality and privilege, and nothing regarding this e-mail or
> > its transmission is intended to be a waiver thereof.
More information about the Linux-mediatek
mailing list