Arch Linux Wifi – How to Connect to Wi-Fi Network in Arch Linux

arch linuxwifiwpawpa-supplicant

tl;dr After reading the Arch wiki articles on installation, wireless setup and WPA supplicant, trying the suggestions below and a host of forum threads, I'm unable to get either of the following cards to connect to my wireless network when booting the Arch Linux 2013-09-01 ISO:


Approach 1 (default):

The default way of doing this is supposed to be just systemctl stop dhcpcd.service followed by wifi-menu. It finds the network:

[SSID] + wpa 10

After a timeout it reports that the connection failed. If I run wifi-menu a second time it doesn't ask for a password, but when finished it finally gives some debug hints:

Job for netctl@wlp0s29f7u5\x2dBTHub4\x2dGRK6.service failed. See 'systemctl status netctl@wlp0s29f7u5\x2dBTHub4\x2dGRK6.service' and 'journalctl -xn' for details.

The former reports that the service is "loaded" but not "active" (literally inactive (dead)). The latter says:

WPA association/authentication failed for interface 'wlp0s29f7u5'

Does this mean the key in /etc/netctl/wlp0s29f7u5-BTHub4-GRK6 is wrong? I can't tell when programs want the actual Wi-Fi password and when they want something like the psk value from wpa_passphrase (man 5 netctl.profile doesn't say, for example).


Approach 2 (wpa_supplicant and wpa_passphrase as per deeraf and warl0ck's suggestions and the wiki page):

# echo 'ctrl_interface=/var/run/wpa_supplicant' > wifi.conf
# wpa_passphrase essid passphrase >> wifi.conf
# wpa_supplicant -B -i interface -c wifi.conf
Successfully initialized wpa_supplicant
# dhcpcd -A interface
[...]
timed out
exited

I tried connecting with iw directly, but got some strange output:

# iw dev wlp0s26f7u5 connect [SSID]
command failed: Operation not supported (-95)

Best Answer

Did you setup your passphrase with wpa_passphrase? e.g

%> wpa_passphrase SSID passphrase
network={
        ssid="SSID"
        #psk="passphrase"
        psk=28964ba6ea8b8f3a0db1c4414b327da253d0af5d4f4adccec0f8abf5b05b10f8
}

Otherwise wpa_supplicant -B -i [wireless device] -c /etc/wpa_supplicant/cli.conf won't work at all

Related Question