1<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2
3<refentry>
4  <refmeta>
5    <refentrytitle>wpa_supplicant</refentrytitle>
6    <manvolnum>8</manvolnum>
7  </refmeta>
8  <refnamediv>
9    <refname>wpa_supplicant</refname>
10    <refpurpose>Wi-Fi Protected Access client and IEEE 802.1X supplicant</refpurpose>
11  </refnamediv>
12  <refsynopsisdiv>
13    <cmdsynopsis>
14      <command>wpa_supplicant</command>
15      <arg>-BddfhKLqqtuvW</arg>
16      <arg>-i<replaceable>ifname</replaceable></arg>
17      <arg>-c<replaceable>config file</replaceable></arg>
18      <arg>-D<replaceable>driver</replaceable></arg>
19      <arg>-P<replaceable>PID_file</replaceable></arg>
20      <arg>-f<replaceable>output file</replaceable></arg>
21    </cmdsynopsis>
22  </refsynopsisdiv>
23  <refsect1>
24    <title>Overview</title>
25
26    <para>
27    Wireless networks do not require physical access to the network equipment
28    in the same way as wired networks. This makes it easier for unauthorized
29    users to passively monitor a network and capture all transmitted frames.
30    In addition, unauthorized use of the network is much easier. In many cases,
31    this can happen even without user's explicit knowledge since the wireless
32    LAN adapter may have been configured to automatically join any available
33    network.
34    </para>
35
36    <para>
37    Link-layer encryption can be used to provide a layer of security for
38    wireless networks. The original wireless LAN standard, IEEE 802.11,
39    included a simple encryption mechanism, WEP. However, that proved to
40    be flawed in many areas and network protected with WEP cannot be consider
41    secure. IEEE 802.1X authentication and frequently changed dynamic WEP keys
42    can be used to improve the network security, but even that has inherited
43    security issues due to the use of WEP for encryption. Wi-Fi Protected
44    Access and IEEE 802.11i amendment to the wireless LAN standard introduce
45    a much improvement mechanism for securing wireless networks. IEEE 802.11i
46    enabled networks that are using CCMP (encryption mechanism based on strong
47    cryptographic algorithm AES) can finally be called secure used for
48    applications which require efficient protection against unauthorized
49    access.
50    </para>
51
52    <para><command>wpa_supplicant</command> is an implementation of
53    the WPA Supplicant component, i.e., the part that runs in the
54    client stations. It implements WPA key negotiation with a WPA
55    Authenticator and EAP authentication with Authentication
56    Server. In addition, it controls the roaming and IEEE 802.11
57    authentication/association of the wireless LAN driver.</para>
58
59    <para><command>wpa_supplicant</command> is designed to be a
60    "daemon" program that runs in the background and acts as the
61    backend component controlling the wireless
62    connection. <command>wpa_supplicant</command> supports separate
63    frontend programs and an example text-based frontend,
64    <command>wpa_cli</command>, is included with
65    wpa_supplicant.</para>
66
67    <para>Before wpa_supplicant can do its work, the network interface
68    must be available.  That means that the physical device must be
69    present and enabled, and the driver for the device must be
70    loaded. The daemon will exit immediately if the device is not already
71    available.</para>
72
73    <para>After <command>wpa_supplicant</command> has configured the
74    network device, higher level configuration such as DHCP may
75    proceed.  There are a variety of ways to integrate wpa_supplicant
76    into a machine's networking scripts, a few of which are described
77    in sections below.</para>
78
79    <para>The following steps are used when associating with an AP
80    using WPA:</para>
81
82    <itemizedlist>
83      <listitem>
84	<para><command>wpa_supplicant</command> requests the kernel
85	driver to scan neighboring BSSes</para>
86      </listitem>
87
88      <listitem>
89	<para><command>wpa_supplicant</command> selects a BSS based on
90	its configuration</para>
91      </listitem>
92
93      <listitem>
94	<para><command>wpa_supplicant</command> requests the kernel
95        driver to associate with the chosen BSS</para>
96      </listitem>
97
98      <listitem>
99	<para>If WPA-EAP: integrated IEEE 802.1X Supplicant
100        completes EAP authentication with the
101        authentication server (proxied by the Authenticator in the
102        AP)</para>
103      </listitem>
104
105      <listitem>
106	<para>If WPA-EAP: master key is received from the IEEE 802.1X
107	Supplicant</para>
108      </listitem>
109
110      <listitem>
111	<para>If WPA-PSK: <command>wpa_supplicant</command> uses PSK
112	as the master session key</para>
113      </listitem>
114
115      <listitem>
116	<para><command>wpa_supplicant</command> completes WPA 4-Way
117        Handshake and Group Key Handshake with the Authenticator
118        (AP)</para>
119      </listitem>
120
121      <listitem>
122	<para><command>wpa_supplicant</command> configures encryption
123	keys for unicast and broadcast</para>
124      </listitem>
125
126      <listitem>
127	<para>normal data packets can be transmitted and received</para>
128      </listitem>
129    </itemizedlist>
130  </refsect1>
131
132  <refsect1>
133    <title>Supported Features</title>
134    <para>Supported WPA/IEEE 802.11i features:</para>
135    <itemizedlist>
136      <listitem>
137	<para>WPA-PSK ("WPA-Personal")</para>
138      </listitem>
139
140      <listitem>
141	<para>WPA with EAP (e.g., with RADIUS authentication server)
142       ("WPA-Enterprise") Following authentication methods are
143       supported with an integrate IEEE 802.1X Supplicant:</para>
144
145	<itemizedlist>
146	  <listitem>
147	    <para>EAP-TLS</para>
148	  </listitem>
149	</itemizedlist>
150
151	<itemizedlist>
152	  <listitem>
153	    <para>EAP-PEAP/MSCHAPv2 (both PEAPv0 and PEAPv1)</para>
154	  </listitem>
155
156
157	  <listitem>
158	    <para>EAP-PEAP/TLS (both PEAPv0 and PEAPv1)</para>
159	  </listitem>
160
161	  <listitem>
162	    <para>EAP-PEAP/GTC (both PEAPv0 and PEAPv1)</para>
163	  </listitem>
164
165	  <listitem>
166	    <para>EAP-PEAP/OTP (both PEAPv0 and PEAPv1)</para>
167	  </listitem>
168
169	  <listitem>
170	    <para>EAP-PEAP/MD5-Challenge (both PEAPv0 and PEAPv1)</para>
171	  </listitem>
172
173	  <listitem>
174	    <para>EAP-TTLS/EAP-MD5-Challenge</para>
175	  </listitem>
176
177	  <listitem>
178	    <para>EAP-TTLS/EAP-GTC</para>
179	  </listitem>
180
181          <listitem><para>EAP-TTLS/EAP-OTP</para></listitem>
182
183          <listitem><para>EAP-TTLS/EAP-MSCHAPv2</para></listitem>
184
185          <listitem><para>EAP-TTLS/EAP-TLS</para></listitem>
186
187          <listitem><para>EAP-TTLS/MSCHAPv2</para></listitem>
188
189          <listitem><para>EAP-TTLS/MSCHAP</para></listitem>
190
191          <listitem><para>EAP-TTLS/PAP</para></listitem>
192
193          <listitem><para>EAP-TTLS/CHAP</para></listitem>
194
195          <listitem><para>EAP-SIM</para></listitem>
196
197          <listitem><para>EAP-AKA</para></listitem>
198
199          <listitem><para>EAP-PSK</para></listitem>
200
201          <listitem><para>EAP-PAX</para></listitem>
202
203          <listitem><para>LEAP (note: requires special support from
204          the driver for IEEE 802.11 authentication)</para></listitem>
205
206          <listitem><para>(following methods are supported, but since
207          they do not generate keying material, they cannot be used
208          with WPA or IEEE 802.1X WEP keying)</para></listitem>
209
210          <listitem><para>EAP-MD5-Challenge </para></listitem>
211
212          <listitem><para>EAP-MSCHAPv2</para></listitem>
213
214          <listitem><para>EAP-GTC</para></listitem>
215
216          <listitem><para>EAP-OTP</para></listitem>
217	</itemizedlist>
218      </listitem>
219
220      <listitem>
221	<para>key management for CCMP, TKIP, WEP104, WEP40</para>
222      </listitem>
223
224      <listitem>
225	<para>RSN/WPA2 (IEEE 802.11i)</para>
226	<itemizedlist>
227	  <listitem>
228	    <para>pre-authentication</para>
229	  </listitem>
230
231	  <listitem>
232	    <para>PMKSA caching</para>
233	  </listitem>
234	</itemizedlist>
235      </listitem>
236    </itemizedlist>
237  </refsect1>
238
239  <refsect1>
240    <title>Available Drivers</title>
241    <para>A summary of available driver backends is below. Support for each
242    of the driver backends is chosen at wpa_supplicant compile time. For a
243    list of supported driver backends that may be used with the -D option on
244    your system, refer to the help output of wpa_supplicant
245    (<emphasis>wpa_supplicant -h</emphasis>).</para>
246
247    <variablelist>
248      <varlistentry>
249	<term>hostap</term>
250	<listitem>
251	  <para>(default) Host AP driver (Intersil Prism2/2.5/3).
252  	  (this can also be used with Linuxant DriverLoader).</para>
253	</listitem>
254      </varlistentry>
255
256      <varlistentry>
257	<term>hermes</term>
258	<listitem>
259	  <para>Agere Systems Inc. driver (Hermes-I/Hermes-II).</para>
260	</listitem>
261      </varlistentry>
262
263      <varlistentry>
264	<term>madwifi</term>
265	<listitem>
266	  <para>MADWIFI 802.11 support (Atheros, etc.).</para>
267	</listitem>
268      </varlistentry>
269
270      <varlistentry>
271	<term>atmel</term>
272	<listitem>
273	  <para>ATMEL AT76C5XXx (USB, PCMCIA).</para>
274	</listitem>
275      </varlistentry>
276
277      <varlistentry>
278	<term>wext</term>
279	<listitem>
280	  <para>Linux wireless extensions (generic).</para>
281	</listitem>
282      </varlistentry>
283
284      <varlistentry>
285	<term>ndiswrapper</term>
286	<listitem>
287	  <para>Linux ndiswrapper.</para>
288	</listitem>
289      </varlistentry>
290
291      <varlistentry>
292	<term>broadcom</term>
293	<listitem>
294	  <para>Broadcom wl.o driver.</para>
295	</listitem>
296      </varlistentry>
297
298      <varlistentry>
299	<term>ipw</term>
300	<listitem>
301	  <para>Intel ipw2100/2200 driver.</para>
302	</listitem>
303      </varlistentry>
304
305      <varlistentry>
306	<term>wired</term>
307	<listitem>
308	  <para>wpa_supplicant wired Ethernet driver</para>
309	</listitem>
310      </varlistentry>
311
312      <varlistentry>
313	<term>roboswitch</term>
314	<listitem>
315	  <para>wpa_supplicant Broadcom switch driver</para>
316	</listitem>
317      </varlistentry>
318
319      <varlistentry>
320	<term>bsd</term>
321	<listitem>
322	  <para>BSD 802.11 support (Atheros, etc.).</para>
323	</listitem>
324      </varlistentry>
325
326      <varlistentry>
327	<term>ndis</term>
328	<listitem>
329	  <para>Windows NDIS driver.</para>
330	</listitem>
331      </varlistentry>
332    </variablelist>
333  </refsect1>
334
335  <refsect1>
336    <title>Command Line Options</title>
337    <para>Most command line options have global scope. Some are given per
338    interface, and are only valid if at least one <option>-i</option> option
339    is specified, otherwise they're ignored. Option groups for different
340    interfaces must be separated by <option>-N</option> option.</para>
341    <variablelist>
342      <varlistentry>
343	<term>-b br_ifname</term>
344	<listitem>
345	  <para>Optional bridge interface name. (Per interface)</para>
346	</listitem>
347      </varlistentry>
348
349      <varlistentry>
350	<term>-B</term>
351	<listitem>
352	  <para>Run daemon in the background.</para>
353	</listitem>
354      </varlistentry>
355
356      <varlistentry>
357	<term>-c filename</term>
358	<listitem>
359	  <para>Path to configuration file. (Per interface)</para>
360	</listitem>
361      </varlistentry>
362
363      <varlistentry>
364	<term>-C ctrl_interface</term>
365	<listitem>
366	  <para>Path to ctrl_interface socket (Per interface. Only used if
367		  <option>-c</option> is not).</para>
368	</listitem>
369      </varlistentry>
370
371      <varlistentry>
372	<term>-i ifname</term>
373	<listitem>
374	  <para>Interface to listen on. Multiple instances of this option can
375	  be present, one per interface, separated by <option>-N</option>
376	  option (see below).</para>
377	</listitem>
378      </varlistentry>
379
380      <varlistentry>
381	<term>-d</term>
382	<listitem>
383	  <para>Increase debugging verbosity (<option>-dd</option> even
384		  more).</para>
385	</listitem>
386      </varlistentry>
387
388      <varlistentry>
389	<term>-D driver</term>
390	<listitem>
391	  <para>Driver to use. (Per interface, see the available options
392		  below.)</para>
393	</listitem>
394      </varlistentry>
395
396      <varlistentry>
397	<term>-f output file</term>
398	<listitem>
399	  <para>Log output to specified file instead of stdout.</para>
400	</listitem>
401      </varlistentry>
402
403      <varlistentry>
404	<term>-g global ctrl_interface</term>
405	<listitem>
406	  <para>Path to global ctrl_interface socket. If specified, interface
407	  definitions may be omitted.</para>
408	</listitem>
409      </varlistentry>
410
411      <varlistentry>
412	<term>-K</term>
413	<listitem>
414	  <para>Include keys (passwords, etc.) in debug output.</para>
415	</listitem>
416      </varlistentry>
417
418      <varlistentry>
419	<term>-t</term>
420	<listitem>
421	  <para>Include timestamp in debug messages.</para>
422	</listitem>
423      </varlistentry>
424
425      <varlistentry>
426	<term>-h</term>
427	<listitem>
428	  <para>Help.  Show a usage message.</para>
429	</listitem>
430      </varlistentry>
431
432      <varlistentry>
433	<term>-L</term>
434	<listitem>
435	  <para>Show license (GPL and BSD).</para>
436	</listitem>
437      </varlistentry>
438
439      <varlistentry>
440	<term>-p</term>
441	<listitem>
442	  <para>Driver parameters. (Per interface)</para>
443	</listitem>
444      </varlistentry>
445
446      <varlistentry>
447	<term>-P PID_file</term>
448	<listitem>
449	  <para>Path to PID file.</para>
450	</listitem>
451      </varlistentry>
452
453      <varlistentry>
454	<term>-q</term>
455	<listitem>
456	  <para>Decrease debugging verbosity (<option>-qq</option> even
457		  less).</para>
458	</listitem>
459      </varlistentry>
460
461      <varlistentry>
462	<term>-u</term>
463	<listitem>
464	  <para>Enabled DBus control interface. If enabled, interface
465	  definitions may be omitted.</para>
466	</listitem>
467      </varlistentry>
468
469      <varlistentry>
470	<term>-v</term>
471	<listitem>
472	  <para>Show version.</para>
473	</listitem>
474      </varlistentry>
475
476      <varlistentry>
477	<term>-W</term>
478	<listitem>
479	  <para>Wait for a control interface monitor before starting.</para>
480	</listitem>
481      </varlistentry>
482
483      <varlistentry>
484	<term>-N</term>
485	<listitem>
486	  <para>Start describing new interface.</para>
487	</listitem>
488      </varlistentry>
489    </variablelist>
490  </refsect1>
491
492  <refsect1>
493    <title>Examples</title>
494
495    <para>In most common cases, <command>wpa_supplicant</command> is
496    started with:</para>
497
498<blockquote><programlisting>
499wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0
500</programlisting></blockquote>
501
502    <para>This makes the process fork into background.</para>
503
504    <para>The easiest way to debug problems, and to get debug log for
505    bug reports, is to start <command>wpa_supplicant</command> on
506    foreground with debugging enabled:</para>
507
508<blockquote><programlisting>
509wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d
510</programlisting></blockquote>
511
512    <para><command>wpa_supplicant</command> can control multiple
513    interfaces (radios) either by running one process for each
514    interface separately or by running just one process and list of
515    options at command line. Each interface is separated with -N
516    argument. As an example, following command would start
517    wpa_supplicant for two interfaces:</para>
518
519<blockquote><programlisting>
520wpa_supplicant \
521	-c wpa1.conf -i wlan0 -D hostap -N \
522	-c wpa2.conf -i ath0 -D madwifi
523</programlisting></blockquote>
524  </refsect1>
525
526  <refsect1>
527    <title>OS Requirements</title>
528    <para>Current hardware/software requirements:</para>
529
530    <itemizedlist>
531      <listitem>
532	<para>Linux kernel 2.4.x or 2.6.x with Linux Wireless
533	Extensions v15 or newer</para>
534      </listitem>
535
536
537      <listitem>
538	<para>FreeBSD 6-CURRENT</para>
539      </listitem>
540
541      <listitem>
542	<para>Microsoft Windows with WinPcap (at least WinXP, may work
543	with other versions)</para>
544      </listitem>
545    </itemizedlist>
546  </refsect1>
547
548  <refsect1>
549    <title>Supported Drivers</title>
550    <variablelist>
551      <varlistentry>
552	<term>Host AP driver for Prism2/2.5/3 (development
553	snapshot/v0.2.x)</term>
554	<listitem>
555	  <para> (http://hostap.epitest.fi/) Driver needs to be set in
556	  Managed mode (<emphasis>iwconfig wlan0 mode managed</emphasis>).
557	  Please note that station firmware version needs to be 1.7.0 or
558	  newer to work in WPA mode.</para>
559	</listitem>
560      </varlistentry>
561
562      <varlistentry>
563	<term>Linuxant DriverLoader</term>
564	<listitem>
565	  <para>(http://www.linuxant.com/driverloader/)
566	with Windows NDIS driver for your wlan card supporting WPA.</para>
567	</listitem>
568      </varlistentry>
569
570      <varlistentry>
571	<term>Agere Systems Inc. Linux Driver</term>
572	<listitem>
573	  <para> (http://www.agere.com/support/drivers/) Please note
574	that the driver interface file (driver_hermes.c) and hardware
575	specific include files are not included in the wpa_supplicant
576	distribution. You will need to copy these from the source
577	package of the Agere driver.</para>
578	</listitem>
579      </varlistentry>
580
581      <varlistentry>
582	<term>madwifi driver for cards based on Atheros chip set (ar521x)</term>
583	<listitem>
584	  <para> (http://sourceforge.net/projects/madwifi/) Please
585	note that you will need to modify the wpa_supplicant .config
586	file to use the correct path for the madwifi driver root
587	directory (CFLAGS += -I../madwifi/wpa line in example
588	defconfig).</para>
589	</listitem>
590      </varlistentry>
591
592      <varlistentry>
593	<term>ATMEL AT76C5XXx driver for USB and PCMCIA cards</term>
594	<listitem>
595	  <para> (http://atmelwlandriver.sourceforge.net/).</para>
596	</listitem>
597      </varlistentry>
598
599      <varlistentry>
600	<term>Linux ndiswrapper</term>
601	<listitem>
602	  <para> (http://ndiswrapper.sourceforge.net/) with Windows
603	NDIS driver.</para>
604	</listitem>
605      </varlistentry>
606
607      <varlistentry>
608	<term>Broadcom wl.o driver</term>
609	<listitem>
610	  <para> This is a generic Linux driver for Broadcom IEEE
611	802.11a/g cards.  However, it is proprietary driver that is
612	not publicly available except for couple of exceptions, mainly
613	Broadcom-based APs/wireless routers that use Linux. The driver
614	binary can be downloaded, e.g., from Linksys support site
615	(http://www.linksys.com/support/gpl.asp) for Linksys
616	WRT54G. The GPL tarball includes cross-compiler and the needed
617	header file, wlioctl.h, for compiling wpa_supplicant.  This
618	driver support in wpa_supplicant is expected to work also with
619	other devices based on Broadcom driver (assuming the driver
620	includes client mode support).</para>
621	</listitem>
622      </varlistentry>
623
624      <varlistentry>
625	<term> Intel ipw2100 driver</term>
626	<listitem>
627	  <para> (http://sourceforge.net/projects/ipw2100/)</para>
628	</listitem>
629      </varlistentry>
630
631      <varlistentry>
632	<term>Intel ipw2200 driver</term>
633	<listitem>
634	  <para> (http://sourceforge.net/projects/ipw2200/)</para>
635	</listitem>
636      </varlistentry>
637
638      <varlistentry>
639	<term>Linux wireless extensions</term>
640	<listitem>
641	  <para>In theory, any driver that supports Linux wireless
642	extensions can be used with IEEE 802.1X (i.e., not WPA) when
643	using ap_scan=0 option in configuration file.</para>
644	</listitem>
645      </varlistentry>
646
647      <varlistentry>
648	<term>Wired Ethernet drivers</term>
649	<listitem>
650	  <para>Use ap_scan=0.</para>
651	</listitem>
652      </varlistentry>
653
654      <varlistentry>
655	<term>BSD net80211 layer (e.g., Atheros driver)</term>
656	<listitem>
657	  <para>At the moment, this is for FreeBSD 6-CURRENT branch.</para>
658	</listitem>
659      </varlistentry>
660
661      <varlistentry>
662	<term>Windows NDIS</term>
663	<listitem>
664	  <para>The current Windows port requires WinPcap
665	(http://winpcap.polito.it/).  See README-Windows.txt for more
666	information.</para>
667	</listitem>
668      </varlistentry>
669    </variablelist>
670
671
672    <para>wpa_supplicant was designed to be portable for different
673    drivers and operating systems. Hopefully, support for more wlan
674    cards and OSes will be added in the future. See developer.txt for
675    more information about the design of wpa_supplicant and porting to
676    other drivers. One main goal is to add full WPA/WPA2 support to
677    Linux wireless extensions to allow new drivers to be supported
678    without having to implement new driver-specific interface code in
679    wpa_supplicant.</para>
680  </refsect1>
681
682  <refsect1>
683    <title>Architecture</title> <para>The
684    <command>wpa_supplicant</command> system consists of the following
685    components:</para>
686
687    <variablelist>
688      <varlistentry>
689	<term><filename>wpa_supplicant.conf</filename> </term>
690	<listitem>
691        <para>the configuration file describing all networks that the
692        user wants the computer to connect to.  </para>
693	</listitem>
694      </varlistentry>
695      <varlistentry>
696	<term><command>wpa_supplicant</command></term>
697        <listitem><para>the program that directly interacts with the
698        network interface.  </para></listitem>
699      </varlistentry>
700      <varlistentry>
701	<term><command>wpa_cli</command></term> <listitem><para> the
702	client program that provides a high-level interface to the
703	functionality of the daemon.  </para></listitem>
704      </varlistentry>
705      <varlistentry>
706	<term><command>wpa_passphrase</command></term>
707        <listitem><para>a utility needed to construct
708        <filename>wpa_supplicant.conf</filename> files that include
709        encrypted passwords.</para></listitem>
710      </varlistentry>
711    </variablelist>
712  </refsect1>
713
714  <refsect1>
715    <title>Quick Start</title>
716
717    <para>First, make a configuration file, e.g.
718    <filename>/etc/wpa_supplicant.conf</filename>, that describes the networks
719    you are interested in.  See <citerefentry>
720	<refentrytitle>wpa_supplicant.conf</refentrytitle>
721	<manvolnum>5</manvolnum>
722      </citerefentry>
723    for details.</para>
724
725    <para>Once the configuration is ready, you can test whether the
726    configuration works by running <command>wpa_supplicant</command>
727    with following command to start it on foreground with debugging
728    enabled:</para>
729
730    <blockquote><programlisting>
731wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d
732    </programlisting></blockquote>
733
734    <para>Assuming everything goes fine, you can start using following
735    command to start <command>wpa_supplicant</command> on background
736    without debugging:</para>
737
738    <blockquote><programlisting>
739wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
740    </programlisting></blockquote>
741
742    <para>Please note that if you included more than one driver
743    interface in the build time configuration (.config), you may need
744    to specify which interface to use by including -D&lt;driver
745    name&gt; option on the command line.</para>
746
747    <!-- XXX at this point, the page could include a little script
748         based on wpa_cli to wait for a connection and then run
749         dhclient -->
750
751  </refsect1>
752
753  <refsect1>
754    <title>Interface to pcmcia-cs/cardmrg</title>
755
756    <para>For example, following small changes to pcmcia-cs scripts
757    can be used to enable WPA support:</para>
758
759    <para>Add MODE="Managed" and WPA="y" to the network scheme in
760    <filename>/etc/pcmcia/wireless.opts</filename>.</para>
761
762    <para>Add the following block to the end of <emphasis>start</emphasis>
763    action handler in <filename>/etc/pcmcia/wireless</filename>:</para>
764
765    <blockquote><programlisting>
766if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
767    /usr/local/bin/wpa_supplicant -B -c/etc/wpa_supplicant.conf -i$DEVICE
768fi
769    </programlisting></blockquote>
770
771
772    <para>Add the following block to the end of <emphasis>stop</emphasis>
773    action handler (may need to be separated from other actions) in
774    <filename>/etc/pcmcia/wireless</filename>:</para>
775
776    <blockquote><programlisting>
777if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
778    killall wpa_supplicant
779fi
780    </programlisting></blockquote>
781
782    <para>This will make <command>cardmgr</command> start
783    <command>wpa_supplicant</command> when the card is plugged
784    in.</para>
785  </refsect1>
786
787  <refsect1>
788    <title>See Also</title>
789    <para>
790      <citerefentry>
791	<refentrytitle>wpa_background</refentrytitle>
792	<manvolnum>8</manvolnum>
793      </citerefentry>
794      <citerefentry>
795	<refentrytitle>wpa_supplicant.conf</refentrytitle>
796	<manvolnum>5</manvolnum>
797      </citerefentry>
798      <citerefentry>
799	<refentrytitle>wpa_cli</refentrytitle>
800	<manvolnum>8</manvolnum>
801      </citerefentry>
802      <citerefentry>
803	<refentrytitle>wpa_passphrase</refentrytitle>
804	<manvolnum>8</manvolnum>
805      </citerefentry>
806    </para>
807  </refsect1>
808  <refsect1>
809    <title>Legal</title>
810    <para>wpa_supplicant is copyright (c) 2003-2007,
811    Jouni Malinen <email>j@w1.fi</email> and
812    contributors.
813    All Rights Reserved.</para>
814
815    <para>This program is dual-licensed under both the GPL version 2
816    and BSD license. Either license may be used at your option.</para>
817  </refsect1>
818</refentry>
819