WPA supplicant

From ArmadeusWiki
Revision as of 13:22, 7 March 2013 by Jorasse (Talk | contribs) (Usage)

Jump to: navigation, search

When dealing with "strong" encryption of WiFi networks, you have to setup a WPA or WPA2 configuration. To handle the requirements of these protocols during association, a userspace daemon is needed: it is called a WPA supplicant. The most used one on Linux is wpa_supplicant; we will see here how to install and configure it.

Note Note: wpa_supplicant is also able to handle WEP connections


Installation

$ make menuconfig
Package Selection for the target  --->
    Networking  --->
        [*]   wpa_supplicant
        [ ]     Enable WPA with EAP
        [*]     Install wpa_cli binary
        [*]     Install wpa_passphrase binary

EAP is only needed if you plan to use WPA in Enterprise mode == with a Radius server.

Usage

wpa_supplicant needs a configuration file in /etc/wpa_supplicant.conf. Here is an example (WPA pre-shared key (TKIP)) and for your convience a generic wpa_supplicant.conf is already installed in the Armadeus BSP for releases > 5.2  :

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1
network={
	ssid="''SSID''"
	scan_ssid=1
	proto=WPA
	key_mgmt=WPA-PSK
	pairwise=TKIP
	psk="''PASSPHRASE''"
}

You can adapt wpa_supplicant.conf manually or use the wpa_passphrase tool to add your network (SSID/PASSPHRASE) automatically:

 # wpa_passphrase "mynetworkSSID" "mynetworkPASSPHRASE" >> /etc/wpa_supplicant.conf

Be sure to have your Wi-Fi chipset driver loaded:

 # modprobe libertas_sdio
or
 # modprobe rt73usb
 # modprobe rt2800_usb
 # modprobe zd1211rw
 # modprobe rtl8187
 # modprobe r8712u
...

Then you can create the Wi-Fi connection with WPA Supplicant:

 # ifconfig wlan0 up
 # wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B

Stop it

To stop WPA Supplicant daemon and switch off the connexion, you can use this command:

 # wpa_cli terminate

Links