Slackware WPA

Hardware Software Description

This is how to configure WPA-PSK with wpa_supplicant against a Netgear WG302 in "Enhanced RF Security" Mode. The configuration would be nearly the same for any access point. The main issue with the Netgear in this mode is that the AP hides the SSID.

Basics First

Before trying WPA at all, make sure "Open System" mode works. This requires the Wireless Extensions and drivers in your kernel. You should be able to do something like this:

iwconfig eth0 ssid your-ssid channel n
If all is well, you'll be able to associate with the AP, and use ifconfig to assign an IP.

Configure the Access Point

Enable WPA-PSK on the AP first. The settings of interest:

Configure wpa_supplicant

The Slackware 10 rc scripts expect:

A basic wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=1

ap_scan=1
fast_reauth=1

network={
        ssid="your-ssid"
        scan_ssid=1
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        psk="your-passphrase"
}
You can test the configuration:
wpa_supplicant -c/etc/wpa_supplicant.conf -ieth0 -Dwext -d
If this successfully talks to the AP, you can use ifconfig to assign an IP. At this point, your communication between your system and the AP are encrypted.

Hidden SSIDs

wpa_supplicant successfully scans for matching SSIDs when the AP does not hide them. But if the AP is not broadcasting it's SSID, iwconfig must be used to set the essid before running wpa_supplicant. This will probably be fixed as various bits of software improve over time, but for now, we have to work around the issue.

Make it Work on Boot

Add something like the following to /etc/rc.d/rc.inet1.conf:

WLAN_ESSID[0]="your-ssid"
WLAN_WPA[0]=wpa_supplicant
WLAN_WPADRIVER[0]=wext

/etc/rc.d/rc.wireless.conf needs some minor changes:

The modification to the case statement is a kludge to force the essid to be set before wpa_supplicant is run. You don't have to do this if your AP doesn't hide the SSID.

At this point you should be able to bring the interface up and down:

# /etc/rc.d/rc.inet1 eth0_start
and
# /etc/rc.d/rc.inet1 eth0_stop
And the interface should come up properly at boot.


This page is http://perfec.to/wifi/slackware-wpa.html.

$Id$