You are not logged in.
Pages: 1
I just finished installing Arch Linux but I am unable to get a working wireless network connection. I've already determined that my wireless adapter, a TP-Link WN722N, does not require firmware. I started on the beginners guide and attempted to establish a connection with wifi-menu from netctl. Upon entering in my wifi password, wifi-menu would immediately say connection failed. Oh and some additional info, I manually configured my netctl profile to obtain (I don't quite know how to use the code brackets that put code in a little box, sorry):
Description='A simple WPA encrypted wireless connection'
Interface=wlp0s20u14
Connection=wireless
Security=wpa
IP=dhcp
ESSID='att440'
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='***************'
# Uncomment this if your ssid is hidden
#Hidden=yes
Because wifi-menu didn't work, I then moved on to set up the connection without wifi-menu:
[root@arch arch]# iw dev
phy#0
Interface wlp0s20u14
ifindex 3
wdev 0x1
addr f8:1a:67:0f:9f:b4
type managed
[root@arch arch]# iw link show wlp0s20u14
3: wlp0s20u14: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether f8:1a:67:0f:9f:b4 brd ff:ff:ff:ff:ff:ff
I then continued and connected with my network, att440, and then attempted to get an ip address with dhcpcd:
[root@arch arch]# dhcpcd wlp0s20u14
dhcpcd[582]: version 6.4.0 starting
dhcpcd[582]: DUID 00:01:00:01:1b:54:5d:0a:f8:1a:67:0f:9f:b4
dhcpcd[582]: wlp0s20u14: IAID 67:0f:9f:b4
dhcpcd[582]: wlp0s20u14: soliciting a DHCP lease
dhcpcd[582]: wlp0s20u14: soliciting an IPv6 router
dhcpcd[582]: wlp0s20u14: no IPv6 Routers available
dhcpcd[582]: timed out
dhcpcd[582]: exited
And there seems to be the problem. dhcpcd is attempting to get an IPv6 address and just seems to give on getting an IPv4 address. As that didn't work, I issued the following commands.
[root@arch arch]# echo 'ctrl_interface=DIR=/run/wpa_supplicant' > /etc/wpa_supplicant.conf
[root@arch arch]# wpa_passphrase att440 passphrase >> /etc/wpa_supplicant.conf
[root@arch arch]# ip link set wlp0s20u14e up
[root@arch arch]# wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlp0s20u14
[root@arch arch]# dhcpcd -A wlp0s20u14
dhcpcd -A wlp0s20u14 returned the following:
dhcpcd[582]: version 6.4.0 starting
dhcpcd[582]: wlp0s20u14: waiting for carrier
dhcpcd[582]: timed out
dhcpcd[582]: exited
I tried the command again and successfully found the carrier but lost it after soliciting a DHCP lease. Because the beginners guide's method didn't work, I thought I might be able to find a solution on the Wireless Network Configuration wiki page.
First I checked that my driver loaded with the following:
[root@arch arch]# lsusb -v
And found the following for my wifi card in a usb port:
Bus 001 Device 005: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 64
idVendor 0x0cf3 Atheros Communications, Inc.
idProduct 0x9271 AR9271 802.11n
bcdDevice 1.08
iManufacturer 16 ATHEROS
iProduct 32 USB2.0 WLAN
iSerial 48 12345
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 60
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 6
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
I believe this uses the Ath9k_htc driver.
[root@arch arch]# dmesg | grep usbcore
[ 2.982719] usbcore: registered new interface driver ath9k_htc
I continued on to connect to att440 with wpa_supplicant. After I connected, I verified the connection with "iw dev wlp0s20u14 link" which returned:
Connected to 7c:bf:b1:33:c3:c0 (on wlp0s20u14)
SSID: att440
freq: 2412
RX: 30831 bytes (251 packets)
TX: 472 bytes (5 packets)
signal: -41 dBm
tx bitrate: 43.3 MBit/s MCS 4 short GI
bss flags: short-preamble short-slot-time
dtim period: 0
beacon int: 100
Finally, I attempted to get a static ip address with the following commands:
[root@arch arch]# ip addr add 192.168.1.130/24 dev wlp0s20u14
[root@arch arch]# ip route add default via 192.168.1.254
At this point, ping www.google.com returns "ping: unknown host www.google.com" I attempted to ping my router at 192.168.1.254 with only to be warned that the destination is unreachable. Could someone help with getting a persistant wifi connection at bootup? If you need any more info or logs, just let me know. Thank you.
Last edited by Firephyz (2014-07-19 20:05:26)
Offline
Offline
Please edit your post.
When posting configs, code or command output, please use [ code ] tags https://bbs.archlinux.org/help.php#bbcode
like thisIt makes the code more readable and - in case of longer listings - more convenient to scroll through.
Offline
Okay. I got the code blocks working now, thanks. Finally, I am able to establish a connection with netctl's wifi-menu. I had to input the following commands from the thread you showed me before it would work however.
$ modprobe -r ath9k_htc
$ modprobe ath9k_htc nohwcrypt=1Sardina also said that there is a patch here: http://blog.gmane.org/gmane.linux.kerne … ss.general
But that appears to be only for the ath10k. I would like to find a solution that allows arch linux to automatically connect to my network on boot up.
Additional note: Since I disable hardware encryption, my console randomly gets the following error or ones similar to it.
[root@arch arch]# [ 359.955849] usb 3-12: 5:0: cannot get min/max values for control 2 (id 5)
[360.760278] INFO: task systemd-udevd :607 blocked for more than 120 seconds.
[360.760282] Not tainted 3.15.5-1-ARCH #1
[360.760285] "echo 0" > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[395.007053] usbhid 3-12:1.3: can't add hid device: -110The first time the error happened, only this showed:
usb 3-12: 2:0: cannot get min/max values for control 2 (id 2)or
usb 3-12: 5:0: cannot get min/max values for control 2 (id 5)I followed what the error message said and entered
echo 0" > /proc/sys/kernel/hung_task_timeout_secsand the messages stopped. I still don't know why the error would happen in the first place anyway.
Offline
Setting_module_options to set the option for when the module is loaded at boot
Offline
So I created a configuration file in /etc/modprobe.d/newfile.conf
In this file, I typed the following lines:
modprobe -r ath9k_htc
modprobe ath9k_htc nohwcrypt=1I also tried putting just this in:
ath9k_htc nohwcrypt=1I saved the file and attempted to reboot but again, wifi-menu didn't work and reported
Job for netctl@wlp0s20u14\x2datt440.service failed. See 'systemctl status netctl@wlp0s20u14\x2datt440.service' and 'journalctl -xn' for details.I followed the error's advice and retrieved the following logs:
systemctl:
● netctl@wlp0s20u14x2datt440.service - Networking for netctl profile wlp0s20u14x2datt440
Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
Active: inactive (dead)
Docs: man:netctl.profile(5)journalctl:
-- Logs begin at Sat 2014-07-12 16:54:29 EDT, end at Mon 2014-07-14 11:53:16 EDT. --
Jul 14 11:52:53 arch kernel: usb-storage 3-13:1.0: USB Mass Storage device detected
Jul 14 11:52:53 arch kernel: scsi9 : usb-storage 3-13:1.0
Jul 14 11:52:54 arch kernel: scsi 9:0:0:0: Direct-Access PMAP PQ: 0 ANSI: 6
Jul 14 11:52:54 arch kernel: sd 9:0:0:0: [sdd] 60566016 512-byte logical blocks: (31.0 GB/28.8 GiB)
Jul 14 11:52:54 arch kernel: sd 9:0:0:0: [sdd] Write Protect is off
Jul 14 11:52:54 arch kernel: sd 9:0:0:0: [sdd] Mode Sense: 2b 00 00 08
Jul 14 11:52:54 arch kernel: sd 9:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Jul 14 11:52:54 arch kernel: sdd: sdd1
Jul 14 11:52:54 arch kernel: sd 9:0:0:0: [sdd] Attached SCSI removable disk
Jul 14 11:53:16 arch kernel: FAT-fs (sdd1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.Offline
options ath9khtc nohwcrpt=1Offline
Yes! Thank you. That works perfectly. I have one more question though. At this point, that module allows my adapter to be able to get an ip. I still don't have it set up to actually get that ip address on startup. I went here: Manual wireless connection at boot using systemd and dhcpcd
I successfully created a wpa_supplicant configuration file and went on to create a systemd unit. I wasn't quite sure how to create a systemd unit and couldn't find much on the systemd wiki page so I just used
nano /etc/systemd/system/network-wireless@.servicewhich I would save later after I was done editing the unit. I typed the following into the unit file:
[Unit]
Description=Wireless network connectivity (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/ip link set dev %i up
ExecStart=/usr/bin/wpa_supplicant -B -i %i -c /etc/wpa_supplicant/wpa_supplicant.conf
ExecStart=/usr/bin/dhcpcd %i
ExecStop=/usr/bin/ip link set dev %i down
[Install]
WantedBy=multi-user.targetand put my wireless interface, wlp0s20u14, in wherever there was a "%i". I enabled the unit with
systemctl enable network-wireless@wlan0.serviceand rebooted the computer. After checking the connection and my wireless interface, I don't think my method worked at the interface isn't even up.
Offline
I think the "%i" should have stayed and in the systemctl enable command you should have replaced wlan0 with your adaptors name but its probably easier to use netctl
sudo cp /etc/netctl/examples/wireless-wpa /etc/netctl/wirepessEdit /etc/netctl/wireless to use your adaptors name , ssid and key
sudo systemctl enable netctl@wireless.service
sudo systemctl start netctl@wireless.serviceOffline
I already have a netctl configuration file for my network at /etc/netctl.
systemctl enable netctl@wireless.servicefailed to be enabled because that service, for some reason, doesn't exist in the /etc/systemd/system directory. I have a
netctl@my\x2dnetwork.servicebut it's an empty file.
Concerning my attempt at using wpa_supplicant and dhcpcd, I have successfully created a service
network-wireless@wlp0s20u14.servicewhich contains
[Unit]
Description=Wireless network connectivity (wlp0s20u14)
Wants=network.target
Before=network.target
Bindsto=sys-subsystem-net-devices-wlp0s20u14.device
After=sys-subsystem-net-devices-wlp0s20u14.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/ip link set dev wlp0s20u14 up
ExecStart=/usr/bin/wpa_supplicant -B -i wlp0s20u14 -c /etc/wpa_supplicant/wpa_supplicant.conf
ExecStart=/usr/bin/dhcpcd wlp0s20u14
ExecStop=/usr/bin/ip link set dev wlp0s20u14 down
[Install]
WantedBy=multi-user.targetWith this service, using
systemctl enable network-wireless@wlp0s20u14.servicesuccessfully establishes an internet connection and I can ping outside servers. I still, however, fails to start on boot. When issuing
systemctl status network-wireless@wlp0s20u14.servicethe following message appears
● network-wireless@wlp0s20u14.service - Wireless network connectivity (wlp0s20u14)
Loaded: loaded (/etc/systemd/system/network-wireless@wlp0s20u14.service; enabled)
Active: failed (Result: exit-code) since Mon 2014-07-14 20:00:00 EDT; 31s ago
Process: 208 ExecStart=/usr/bin/ip link set dev wlp0s20u14 up (code=exited, status=1/FAILURE)
Main PID: 208 (code=exited, status=1/FAILURE)
Jul 14 20:00:00 arch systemd[1]: network-wireless@wlp0s20u14.service: main process exited, code=exited, status=1/FAILURE
Jul 14 20:00:00 arch systemd[1]: Failed to start Wireless network connectivity (wlp0s20u14).
Jul 14 20:00:00 arch systemd[1]: Unit network-wireless@wlp0s20u14.service entered failed state.
Jul 14 20:00:00 arch ip[208]: Cannot find device "wlp0s20u14"I'm so close to getting this to work. The service is just failing to start on boot because it appears as if it can't find my wireless interface. Maybe this service is attempting to run before the interface has been identified?
Offline
I already have a netctl configuration file for my network at /etc/netctl.
systemctl enable netctl@wireless.servicefailed to be enabled because that service, for some reason, doesn't exist in the /etc/systemd/system directory.
It wants /etc/netctl/wireless
If you were following my example I misstyped turrned wireless into wirepess
edit:
After=sys-subsystem-net-devices-wlp0s20u14.deviceShould order the unit so that the device exists so I do not understand the failure either.
Last edited by loqs (2014-07-15 10:30:11)
Offline
I finally got everything to work and I have internet connection after boot up. The problem with the systemd unit was that the "BindsTo" parameter was misstyped as "Bindsto".
systemctl status network-wireless@wlp0su20u14.servicewhich originally gave me a list of errors complaining about how it couldn't find "wlp0s20u14" also told me that "bindsto" wasn't a valid parameter or something like that. Anyway, thanks for all your help.
Offline
Be sure to edit your first post and prepend [SOLVED] to the thread title
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Pages: 1