Difference between revisions of "WPA supplicant"

From ArmadeusWiki
Jump to: navigation, search
m (Links)
(Usage)
Line 23: Line 23:
 
==Usage==
 
==Usage==
 
wpa_supplicant needs a configuration file in ''/etc/wpa_supplicant.conf''.
 
wpa_supplicant needs a configuration file in ''/etc/wpa_supplicant.conf''.
Here is an example:
+
Here is an example (WPA pre-shared key (TKIP)):
 +
<pre class="host">
 
  ctrl_interface=/var/run/wpa_supplicant
 
  ctrl_interface=/var/run/wpa_supplicant
 
  ctrl_interface_group=wheel
 
  ctrl_interface_group=wheel
 +
 
  network={
 
  network={
ssid="''SSID''"
+
    ssid="''SSID''"
scan_ssid=1
+
    scan_ssid=1
proto=WPA
+
    proto=WPA
key_mgmt=WPA-PSK
+
    key_mgmt=WPA-PSK
pairwise=TKIP
+
    pairwise=TKIP
psk="''PASSPHRASE''"
+
    psk="''PASSPHRASE''"
 
  }
 
  }
 +
</pre>
  
Then you can create the Wifi connexion with WPA Supplicant:
+
Then you can create the Wi-Fi connection with WPA Supplicant:
 
<pre class="apf">
 
<pre class="apf">
 
  # ifconfig wlan0 up
 
  # ifconfig wlan0 up

Revision as of 17:22, 4 March 2013

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)):

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

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

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

Stop it

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

 # wpa_cli terminate

Links