Skip to main content
Topic: How do I use the USB Wireless (Wi-Fi) Adapter (ath9k)? (Read 344 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How do I use the USB Wireless (Wi-Fi) Adapter (ath9k)?

Hello everyone.
Please tell me how to use the USB Wireless (Wi-Fi) Adapter correctly if I already have a network card in my laptop? When I try to turn on the USB Wireless (Wi-Fi) Adapter, do I see that two interfaces are enabled? Here are my steps:

I also wanted to see if there was a conflict between connman + connman-gtk and the USB Wireless (Wi-Fi) Adapter

I didn't find the ath9k drivers separately in the repository, but I realized they were included in the kernel.
I loaded the kernel module with the command and checked:

Code: [Select]
$ sudo modprobe ath9k
 
$ sudo modprobe -v ath9k
 
$ sudo  lsmod | grep ath

Next, I inserted the USB Wireless (Wi-Fi) Adapter and checked:
 
Code: [Select]
$ sudo dmesg | grep usb

Next, I checked the name of the USB Wireless (Wi-Fi) Adapter interface (I have it "wlan1")
 
Code: [Select]
$ ip -c a

Next, I activated the network interface "wlan1"
 
Code: [Select]
$ sudo ip link set wlan1  up

but received a message:
 
Code: [Select]
RTNETLINK answers: Operation not possible due to RF-kill

Okay, I checked if blocking the network interface with the command:
 
Code: [Select]
 $ rfkill list all 
 
phy2: Wareless LAN
 
Soft blocked: yes
Hard blocked: no

Unlock with the command:
 
Code: [Select]
 $ rfkill unblock 3   # the number 3 is my phy2 it appears when you press TAB

Let's check again:
 
Code: [Select]
$ rfkill list all
 
phy2: Wareless LAN
 
Soft blocked: no
Hard blocked: no

I try to activate the interface again:
 
Code: [Select]
$ sudo ip link set wlan1  up 
 
$ sudo ifconfig wlan1 up

 Nothing happens??
 
Okay, I'm trying to act wpa_supplicant command:
 
Code: [Select]
$ sudo rc-service wpa_supplicant start

I see an error that says there is no wpa_supplicant.conf file. Okay,
 
I've created a file like this:
 
Code: [Select]
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel 

network={
ssid="YourWiFiNetworkName"        
psk="YourWiFiPassword"             
        key_mgmt=WPA-PSK
        proto=RSN
 
}

Code: [Select]
$ sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf

 
I try to activate the interface again:
 
Code: [Select]
 $ sudo rc-service wpa_supplicant start

I see that rfkill is blocking the interface...
 

Re: How do I use the USB Wireless (Wi-Fi) Adapter (ath9k)?

Reply #1
If you have network manager installed, regardless of whether it is doing anything or in use at all, it will block operations in the terminal. At least that was always the case in the past but I haven't checked recently. Possibly other GUI managers would interfere too. Also wpa_supplicant was broken in an update and still hasn't been fixed, once you get that far you may need to use these old versions:
wpa_supplicant-2:2.10-8-x86_64.pkg.tar.zst
iproute2-6.9.0-2-x86_64.pkg.tar.zst
The current versions only connect if you are close to the router because they fail to switch to high power while searching for a connection - it was a deliberate change in wpa_supplicant to avoid interference but it doesn't work if you really need that, and they usually only release new versions every couple of years. Once the connection is established the power level is set as high as required by the card and router communicating.
I have physical wifi switches and BIOS settings which can disable wifi, that could also be worth a look.
There's some useful troubleshooting info on the Arch wiki:
https://wiki.archlinux.org/title/Network_configuration/Wireless

Re: How do I use the USB Wireless (Wi-Fi) Adapter (ath9k)?

Reply #2
If it's not a secret, what adapter are you using? Usually USB adapters use ath9k_htc instead of ath9k. Both families are completely open source, but I don't know if ath9k_htc is included in the kernel like ath9k or if I need to install a separate package.

Re: How do I use the USB Wireless (Wi-Fi) Adapter (ath9k)?

Reply #3
Dell M4500, this is a non-standard internal PCI card as all the OE options I tried had problems in Linux:
Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express)
Kernel driver in use: ath9k

Dell E7470, again an internal PCI card:
Intel Corporation Wireless 8260 (rev 3a)
Kernel driver in use: iwlwifi

I have used the M4500 with a PCMCIA card plugged in too, but then I only enable one device or the other, and never tried both together:
Network controller: Ralink corp. RT2760 Wireless 802.11n 1T/2R
Kernel driver in use: rt2800pci