1

I am using: Debian Sid (kernel 4.15.0-2-amd64), and I can connect flawlessly to my wifi network using my onboard Intel 7265 and iwlwifi even with weak signal (e.g -80dBm).

However, I have recently got ALFA AWUS036NHA (Atheros 9271), and at random moments I am not able to ping my router, despite having good signal quality (-68dBm). I have tried both firmware-atheros debian package and the open source alternative, having the same result as described below:

Normally my routing table looks like:

:~$ sudo route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         speedport-entry 0.0.0.0         UG    0      0        0 wlan1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan1
192.168.71.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet8
192.168.154.0   0.0.0.0         255.255.255.0   U     0      0        0 vmnet1

At random moments the routing table becomes

:~$ sudo route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref       Use Iface
    default         _gateway        0.0.0.0         UG    0      0        0 wlan1
    192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan1
    192.168.71.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet8
        192.168.154.0   0.0.0.0         255.255.255.0   U     0      0        0 vmnet1

in which case pinging the gateway (192.168.1.1) and any other IP (e.g 8.8.8.8) hangs indefinitely. However arp works in this case, showing the rest of the connected devices, and the antenna light is blinking as expected.

The difference is in the Gateway column (_gateway vs speedport-entry). I can't observe any other peculiarity when it happens. It keeps the IP, netmask, etc:

$ ifconfig wlan1
wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.68  netmask 255.255.255.0  broadcast 192.168.1.255
        ether 00:c0:ca:97:32:3e  txqueuelen 1000  (Ethernet)
        RX packets 4102532  bytes 3990894721 (3.7 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3198872  bytes 1012818336 (965.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

SOLUTION:

The solution is either 1) to disconnect and reconnect, using Wicd (since gnome network manager's Select Network loads indefinitely), or 2) to wait (1-5 minutes) and it will fix automatically.

Some info:

$ lsmod | grep ath9k
ath9k_htc              81920  0
ath9k_common           20480  1 ath9k_htc
ath9k_hw              487424  2 ath9k_htc,ath9k_common
ath                    32768  3 ath9k_htc,ath9k_hw,ath9k_common
mac80211              798720  2 iwlmvm,ath9k_htc
cfg80211              720896  6 iwlmvm,ath9k_htc,iwlwifi,mac80211,ath,ath9k_common
usbcore               290816  11 ath9k_htc,usbhid,snd_usb_audio,usb_storage,ehci_hcd,xhci_pci,snd_usbmidi_lib,btusb,uas,xhci_hcd,ehci_pci


$ sudo lshw -c network
  *-network                 
       description: Ethernet interface
       product: Ethernet Connection (3) I218-LM
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth0
       version: 03
       serial: f8:ca:b8:37:ec:75
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.2-3 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:52 memory:f7200000-f721ffff memory:f7243000-f7243fff ioport:f080(size=32)
  *-network
       description: Wireless interface
       product: Wireless 7265
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 59
       serial: 18:5e:0f:9f:2c:61
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=4.15.0-2-amd64 firmware=29.541020.0 latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:49 memory:f7000000-f7001fff
  *-network
       description: Wireless interface
       physical id: 2
       bus info: usb@1:1
       logical name: wlan1
       serial: 00:c0:ca:97:32:3e
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=ath9k_htc driverversion=4.15.0-2-amd64 firmware=1.4 ip=192.168.1.68 link=yes multicast=yes wireless=IEEE 802.11

I can't locate any useful info during incidents, only previous/older logs:

:~$ sudo dmesg -T | grep -i ath9k
[Thu Apr 12 20:57:43 2018] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[Thu Apr 12 20:57:43 2018] usbcore: registered new interface driver ath9k_htc
[Thu Apr 12 20:57:43 2018] usb 1-1: firmware: failed to load ath9k_htc/htc_9271-1.4.0.fw (-2)
[Thu Apr 12 20:57:43 2018] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
[Thu Apr 12 20:57:43 2018] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
[Thu Apr 12 20:57:44 2018] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51008
[Thu Apr 12 20:57:44 2018] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits
[Thu Apr 12 20:57:44 2018] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.4
[Thu Apr 12 20:57:44 2018] ath9k_htc 1-1:1.0: FW RMW support: On
[Fri Apr 13 00:38:49 2018] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51008
[Fri Apr 13 00:38:49 2018] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits

The only relevant errors I have found (last three lines) ~ again these logs are previous, and not repeating at the "disconnections" that I have looked into.

:~$ sudo dmesg -T | grep -i error
[Thu Apr 12 20:57:38 2018] Error parsing PCC subspaces from PCCT
[Thu Apr 12 20:57:39 2018] i801_smbus: probe of 0000:00:1f.3 failed with error -16
[Thu Apr 12 20:57:42 2018] EXT4-fs (sdb3): re-mounted. Opts: errors=remount-ro
[Thu Apr 12 20:57:42 2018] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[Thu Apr 12 20:57:43 2018] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
[Fri Apr 13 00:38:48 2018] usb 1-1: device descriptor read/64, error -110

Any ideas how could I debug this further?

1 Answer 1

1

I have experienced the same problems with this adapter and after debugging the drivers for a long time, I did not find the problem. Then I have noticed that the same problems also exists under Windows, which were installed on the same machine (with dual boot). This would make driver problems a hell of a coincidence so I started suspecting, that the problem is with this WiFi adapter's hardware or with the USB port that serves it. Therefore, I returned the old and reordered a new ALFA AWUS036NHA WiFi adapter and installed a new PCIe card with a pair of new USB ports.

To my surprise the problems persisted ON BOTH operating systems!

Remembering, that the LED indicator light of this WiFi adapter sometimes freezes ( mostly in the OFF state ), I started suspecting that the MCU inside this WiFi adapter becomes hung or reset due to some power supply issues, so I plugged an inline USB power monitor into the Mini-B USB socket of the WiFi adapter, set it to MAX Hold display and discovered, that this adapter draws more current than the maximum allowed by the USB standard ( which is 500mA ) by intermittently drawing up to 830mA on stock settings (and up to 910mA with the increased TX power hack ).

After constructing my own 3meter long USB cable out of a 90Ω impedance shielded twisted pair cable ( S/STP with 16AWG conductors ) with one USB Mini-B jack at one end of this cable and two paralleled USB Type-A jacks at the other end of this cable for drawing the supply current from 2 host USB sockets at the same time (but the data only form one USB socket!), all of the random disconnection problems, hangs and lockup problems have disappeared.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .