TWiki
>
Linux Web
>
UseDrivers
>
WPASupplicant
(revision 3) (raw view)
Edit
Attach
---++ WPA Supplicant The WPA supplicant can be configured to control the roaming and IEEE 802.11 authentication/association of the owl device. The configuration is usually performed in a configuration file, e.g. /etc/wpa_supplicant.conf. It is also possible to directly issue commands to the WPA Supplicant, using a dedicated shell command, wpa_cli. The usage of wpa_cli is out of the scope of this document, but is described in detail in the WPA supplicant documentation http://hostap.epitest.fi/wpa_supplicant/. This section will show examples of how to perform the following operations using WPA Supplicant. %TOC% All the steps and expected output is provided in detail below. See the end of this section for a complete list of supported configurations. For complete documentation on WPA Supplicant, see the WPA Supplicant documentation http://hostap.epitest.fi/wpa_supplicant/. ---+++ Connect to an unencrypted network To simply instruct the WPA Supplicant to connect to any unencrypted network with ssid hdwireless, the following configuration file should be enough: <verbatim>ctrl_interface=/var/run/wpa_supplicant network={ ssid="hdwireless" key_mgmt=NONE }</verbatim> The path to the configuration file and the interface name (owl0) should then be passed as parameters when starting the WPA Supplicant: <verbatim>$ wpa_supplicant -Dwext -iowl0 -c /etc/wpa_supplicant.conf -B</verbatim> The paramater -Dwext informs the WPA Supplicant that the standard Wireless Extensions interface should be used to control the network interface. For detailed information on how to configure and run the WPA supplicant, see the WPA supplicant documentation http://hostap.epitest.fi/wpa_supplicant/. The WPA Supplicant will now periodically scan for networks until one that matches the configuration is found. Once found, a connection will be established. The WPA Supplicant will also handle reconnect if the connection is lost. Therefore, opposed to Wirieless Tools, when using the WPA Supplicant, it is not necessary to perform manual scanning and network selection. Note that the WPA Supplicant configuration can hold several networks and the WPA Supplicant will choose and roam amongst them. However, most importantly, the WPA supplicant implements the key negotiation with a WPA Authenticators. ---+++ Connect to a WPA protected network that uses TKIP encryption To connect to a network using WPA key management and TKIP encryption, the following network configuration can be specified in the configuration file: <verbatim>ctrl_interface=/var/run/wpa_supplicant network={ ssid="hdwireless" key_mgmt=WPA-PSK group=TKIP pairwise=TKIP proto=WPA psk="hdwirelesskey" }</verbatim> The key configured on the access point should be "hdwirelesskey". To force the WPA Supplicant to re-read its configuration file wpa_cli can be used <verbatim>$ wpa_cli reconfigure</verbatim> One should remember that all wireless operations performed by both the WPA supplicant and Wireless Tools are done through the same Wireless Extensions API. This means that it will still be possible to e.g. check the connection status with iwconfig: <verbatim>$ iwconfig owl0 IEEE 802.11bg ESSID:"angr" Mode:Managed Frequency:2.422 GHz Access Point:68:7F:74:10:5B:4C Bit Rate=54 Mb/s Encryption key:472A-7E38-C465-D4EB-6DA7-BAE6-4700-0960-EDB1-40DE- 18CC-5A02-4AE1-EA96-F3EE-142A Security mode:open Power Management timeout:10 Link Quality=24/30 Signal level=-20 dBm Noise level=-44 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0</verbatim> Once connected, it is possible to obtain an ip address and perform the ping test: <verbatim>$ udhcpc -i owl0 Sending discover... Sending select for 192.168.2.102... Lease of 192.168.2.102 obtained, lease time 172800 adding dns 192.168.2.1 $ ping -c 3 192.168.2.1 ...</verbatim> ---+++ Connect to a WPA2 enabled network that uses CCMP encryption To connect to a network using the WPA2 protocol and CCMP encryption, the following network configuration can be specified in the configuration file: <verbatim>ctrl_interface=/var/run/wpa_supplicant network={ ssid="hdwireless" key_mgmt=WPA-PSK group=CCMP pairwise=CCMP proto=WPA2 psk="hdwirelesskey" }</verbatim> Connect to a network that uses any WPA/WPA2 protocol and TKIP/CCMP encryption. Note that several encryption parameters can be specified on a single line, allowing connections to a specific ssid using a range of encryption methods. The configuration file below should allow connections to the hdwireless access point regardless of whether the WPA or WPA2 protocol is used or whether CCMP or TKIP is used for pairwise and group key encryption. The actual encryption method used will be the most secure one that is supported by the access point. <verbatim>ctrl_interface=/var/run/wpa_supplicant network={ ssid="hdwireless" key_mgmt=WPA-PSK group=TKIP CCMP pairwise=TKIP CCMP proto=WPA WPA2 psk="hdwirelesskey" }</verbatim> ---+++ List of supported WPA Supplicant network options Key management (key_mgmt): WPA-PSK, NONE<br />Group key encryption (group): CCMP, TKIP<br />Pairwise key encryption (pairwise): CCMP, TKIP<br />Protocol (proto): WPA, WPA2
Edit
|
Attach
|
P
rint version
|
H
istory
:
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r3 - 2011-02-24 - 11:12:06 -
AndersGrahn
Linux
Log In
(Admin Only)
Getting Started
Download
Build
Use
Wireless Tools
WPA Supplicant
Throughput Test
Roaming
Ifup and ifdown
Platforms
Atmel SAM9
Demo Images
Atmel SAM9
HDG200
Platforms
Download and Build
Demo Images
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback