aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/doc/docbook/wpa_supplicant.sgml
blob: d130641c8fa0f3abe10d8f5d185524a5e9ae4b83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">

<refentry>
  <refmeta>
    <refentrytitle>wpa_supplicant</refentrytitle>
    <manvolnum>8</manvolnum>
  </refmeta>
  <refnamediv>
    <refname>wpa_supplicant</refname>
    <refpurpose>Wi-Fi Protected Access client and IEEE 802.1X supplicant</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>wpa_supplicant</command>
      <arg>-BddfhKLqqtuvW</arg>
      <arg>-i<replaceable>ifname</replaceable></arg>
      <arg>-c<replaceable>config file</replaceable></arg>
      <arg>-D<replaceable>driver</replaceable></arg>
      <arg>-P<replaceable>PID_file</replaceable></arg>
      <arg>-f<replaceable>output file</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>Overview</title>

    <para>
    Wireless networks do not require physical access to the network equipment
    in the same way as wired networks. This makes it easier for unauthorized
    users to passively monitor a network and capture all transmitted frames.
    In addition, unauthorized use of the network is much easier. In many cases,
    this can happen even without user's explicit knowledge since the wireless
    LAN adapter may have been configured to automatically join any available
    network.
    </para>

    <para>
    Link-layer encryption can be used to provide a layer of security for
    wireless networks. The original wireless LAN standard, IEEE 802.11,
    included a simple encryption mechanism, WEP. However, that proved to
    be flawed in many areas and network protected with WEP cannot be consider
    secure. IEEE 802.1X authentication and frequently changed dynamic WEP keys
    can be used to improve the network security, but even that has inherited
    security issues due to the use of WEP for encryption. Wi-Fi Protected
    Access and IEEE 802.11i amendment to the wireless LAN standard introduce
    a much improvement mechanism for securing wireless networks. IEEE 802.11i
    enabled networks that are using CCMP (encryption mechanism based on strong
    cryptographic algorithm AES) can finally be called secure used for
    applications which require efficient protection against unauthorized
    access.
    </para>

    <para><command>wpa_supplicant</command> is an implementation of
    the WPA Supplicant component, i.e., the part that runs in the
    client stations. It implements WPA key negotiation with a WPA
    Authenticator and EAP authentication with Authentication
    Server. In addition, it controls the roaming and IEEE 802.11
    authentication/association of the wireless LAN driver.</para>

    <para><command>wpa_supplicant</command> is designed to be a
    "daemon" program that runs in the background and acts as the
    backend component controlling the wireless
    connection. <command>wpa_supplicant</command> supports separate
    frontend programs and an example text-based frontend,
    <command>wpa_cli</command>, is included with
    wpa_supplicant.</para>

    <para>Before wpa_supplicant can do its work, the network interface
    must be available.  That means that the physical device must be
    present and enabled, and the driver for the device must be
    loaded. The daemon will exit immediately if the device is not already
    available.</para>

    <para>After <command>wpa_supplicant</command> has configured the
    network device, higher level configuration such as DHCP may
    proceed.  There are a variety of ways to integrate wpa_supplicant
    into a machine's networking scripts, a few of which are described
    in sections below.</para>

    <para>The following steps are used when associating with an AP
    using WPA:</para>

    <itemizedlist>
      <listitem>
	<para><command>wpa_supplicant</command> requests the kernel
	driver to scan neighboring BSSes</para>
      </listitem>

      <listitem>
	<para><command>wpa_supplicant</command> selects a BSS based on
	its configuration</para>
      </listitem>

      <listitem>
	<para><command>wpa_supplicant</command> requests the kernel
        driver to associate with the chosen BSS</para>
      </listitem>

      <listitem>
	<para>If WPA-EAP: integrated IEEE 802.1X Supplicant
        completes EAP authentication with the
        authentication server (proxied by the Authenticator in the
        AP)</para>
      </listitem>

      <listitem>
	<para>If WPA-EAP: master key is received from the IEEE 802.1X
	Supplicant</para>
      </listitem>

      <listitem>
	<para>If WPA-PSK: <command>wpa_supplicant</command> uses PSK
	as the master session key</para>
      </listitem>

      <listitem>
	<para><command>wpa_supplicant</command> completes WPA 4-Way
        Handshake and Group Key Handshake with the Authenticator
        (AP)</para>
      </listitem>

      <listitem>
	<para><command>wpa_supplicant</command> configures encryption
	keys for unicast and broadcast</para>
      </listitem>

      <listitem>
	<para>normal data packets can be transmitted and received</para>
      </listitem>
    </itemizedlist>
  </refsect1>

  <refsect1>
    <title>Supported Features</title>
    <para>Supported WPA/IEEE 802.11i features:</para>
    <itemizedlist>
      <listitem>
	<para>WPA-PSK ("WPA-Personal")</para>
      </listitem>

      <listitem>
	<para>WPA with EAP (e.g., with RADIUS authentication server)
       ("WPA-Enterprise") Following authentication methods are
       supported with an integrate IEEE 802.1X Supplicant:</para>

	<itemizedlist>
	  <listitem>
	    <para>EAP-TLS</para>
	  </listitem>
	</itemizedlist>

	<itemizedlist>
	  <listitem>
	    <para>EAP-PEAP/MSCHAPv2 (both PEAPv0 and PEAPv1)</para>
	  </listitem>


	  <listitem>
	    <para>EAP-PEAP/TLS (both PEAPv0 and PEAPv1)</para>
	  </listitem>

	  <listitem>
	    <para>EAP-PEAP/GTC (both PEAPv0 and PEAPv1)</para>
	  </listitem>

	  <listitem>
	    <para>EAP-PEAP/OTP (both PEAPv0 and PEAPv1)</para>
	  </listitem>

	  <listitem>
	    <para>EAP-PEAP/MD5-Challenge (both PEAPv0 and PEAPv1)</para>
	  </listitem>

	  <listitem>
	    <para>EAP-TTLS/EAP-MD5-Challenge</para>
	  </listitem>

	  <listitem>
	    <para>EAP-TTLS/EAP-GTC</para>
	  </listitem>

          <listitem><para>EAP-TTLS/EAP-OTP</para></listitem>

          <listitem><para>EAP-TTLS/EAP-MSCHAPv2</para></listitem>

          <listitem><para>EAP-TTLS/EAP-TLS</para></listitem>

          <listitem><para>EAP-TTLS/MSCHAPv2</para></listitem>

          <listitem><para>EAP-TTLS/MSCHAP</para></listitem>

          <listitem><para>EAP-TTLS/PAP</para></listitem>

          <listitem><para>EAP-TTLS/CHAP</para></listitem>

          <listitem><para>EAP-SIM</para></listitem>

          <listitem><para>EAP-AKA</para></listitem>

          <listitem><para>EAP-PSK</para></listitem>

          <listitem><para>EAP-PAX</para></listitem>

          <listitem><para>LEAP (note: requires special support from
          the driver for IEEE 802.11 authentication)</para></listitem>

          <listitem><para>(following methods are supported, but since
          they do not generate keying material, they cannot be used
          with WPA or IEEE 802.1X WEP keying)</para></listitem>

          <listitem><para>EAP-MD5-Challenge </para></listitem>

          <listitem><para>EAP-MSCHAPv2</para></listitem>

          <listitem><para>EAP-GTC</para></listitem>

          <listitem><para>EAP-OTP</para></listitem>
	</itemizedlist>
      </listitem>

      <listitem>
	<para>key management for CCMP, TKIP, WEP104, WEP40</para>
      </listitem>

      <listitem>
	<para>RSN/WPA2 (IEEE 802.11i)</para>
	<itemizedlist>
	  <listitem>
	    <para>pre-authentication</para>
	  </listitem>

	  <listitem>
	    <para>PMKSA caching</para>
	  </listitem>
	</itemizedlist>
      </listitem>
    </itemizedlist>
  </refsect1>

  <refsect1>
    <title>Available Drivers</title>
    <para>A summary of available driver backends is below. Support for each
    of the driver backends is chosen at wpa_supplicant compile time. For a
    list of supported driver backends that may be used with the -D option on
    your system, refer to the help output of wpa_supplicant
    (<emphasis>wpa_supplicant -h</emphasis>).</para>

    <variablelist>
      <varlistentry>
	<term>hostap</term>
	<listitem>
	  <para>(default) Host AP driver (Intersil Prism2/2.5/3).
  	  (this can also be used with Linuxant DriverLoader).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>hermes</term>
	<listitem>
	  <para>Agere Systems Inc. driver (Hermes-I/Hermes-II).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>madwifi</term>
	<listitem>
	  <para>MADWIFI 802.11 support (Atheros, etc.).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>wext</term>
	<listitem>
	  <para>Linux wireless extensions (generic).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>broadcom</term>
	<listitem>
	  <para>Broadcom wl.o driver.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>wired</term>
	<listitem>
	  <para>wpa_supplicant wired Ethernet driver</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>roboswitch</term>
	<listitem>
	  <para>wpa_supplicant Broadcom switch driver</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>bsd</term>
	<listitem>
	  <para>BSD 802.11 support (Atheros, etc.).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>ndis</term>
	<listitem>
	  <para>Windows NDIS driver.</para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Command Line Options</title>
    <para>Most command line options have global scope. Some are given per
    interface, and are only valid if at least one <option>-i</option> option
    is specified, otherwise they're ignored. Option groups for different
    interfaces must be separated by <option>-N</option> option.</para>
    <variablelist>
      <varlistentry>
	<term>-b br_ifname</term>
	<listitem>
	  <para>Optional bridge interface name. (Per interface)</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-B</term>
	<listitem>
	  <para>Run daemon in the background.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-c filename</term>
	<listitem>
	  <para>Path to configuration file. (Per interface)</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-C ctrl_interface</term>
	<listitem>
	  <para>Path to ctrl_interface socket (Per interface. Only used if
		  <option>-c</option> is not).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-i ifname</term>
	<listitem>
	  <para>Interface to listen on. Multiple instances of this option can
	  be present, one per interface, separated by <option>-N</option>
	  option (see below).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-d</term>
	<listitem>
	  <para>Increase debugging verbosity (<option>-dd</option> even
		  more).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-D driver</term>
	<listitem>
	  <para>Driver to use (can be multiple drivers: nl80211,wext).
		  (Per interface, see the available options below.)</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-f output file</term>
	<listitem>
	  <para>Log output to specified file instead of stdout.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-g global ctrl_interface</term>
	<listitem>
	  <para>Path to global ctrl_interface socket. If specified, interface
	  definitions may be omitted.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-K</term>
	<listitem>
	  <para>Include keys (passwords, etc.) in debug output.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-t</term>
	<listitem>
	  <para>Include timestamp in debug messages.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-h</term>
	<listitem>
	  <para>Help.  Show a usage message.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-L</term>
	<listitem>
	  <para>Show license (BSD).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-p</term>
	<listitem>
	  <para>Driver parameters. (Per interface)</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-P PID_file</term>
	<listitem>
	  <para>Path to PID file.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-q</term>
	<listitem>
	  <para>Decrease debugging verbosity (<option>-qq</option> even
		  less).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-u</term>
	<listitem>
	  <para>Enabled DBus control interface. If enabled, interface
	  definitions may be omitted.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-v</term>
	<listitem>
	  <para>Show version.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-W</term>
	<listitem>
	  <para>Wait for a control interface monitor before starting.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-N</term>
	<listitem>
	  <para>Start describing new interface.</para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Examples</title>

    <para>In most common cases, <command>wpa_supplicant</command> is
    started with:</para>

<blockquote><programlisting>
wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0
</programlisting></blockquote>

    <para>This makes the process fork into background.</para>

    <para>The easiest way to debug problems, and to get debug log for
    bug reports, is to start <command>wpa_supplicant</command> on
    foreground with debugging enabled:</para>

<blockquote><programlisting>
wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d
</programlisting></blockquote>

    <para>If the specific driver wrapper is not known beforehand, it is
    possible to specify multiple comma separated driver wrappers on the command
    line. <command>wpa_supplicant</command> will use the first driver
    wrapper that is able to initialize the interface.</para>

<blockquote><programlisting>
wpa_supplicant -Dnl80211,wext -c/etc/wpa_supplicant.conf -iwlan0
</programlisting></blockquote>

    <para><command>wpa_supplicant</command> can control multiple
    interfaces (radios) either by running one process for each
    interface separately or by running just one process and list of
    options at command line. Each interface is separated with -N
    argument. As an example, following command would start
    wpa_supplicant for two interfaces:</para>

<blockquote><programlisting>
wpa_supplicant \
	-c wpa1.conf -i wlan0 -D hostap -N \
	-c wpa2.conf -i ath0 -D madwifi
</programlisting></blockquote>
  </refsect1>

  <refsect1>
    <title>OS Requirements</title>
    <para>Current hardware/software requirements:</para>

    <itemizedlist>
      <listitem>
	<para>Linux kernel 2.4.x or 2.6.x with Linux Wireless
	Extensions v15 or newer</para>
      </listitem>


      <listitem>
	<para>FreeBSD 6-CURRENT</para>
      </listitem>

      <listitem>
	<para>Microsoft Windows with WinPcap (at least WinXP, may work
	with other versions)</para>
      </listitem>
    </itemizedlist>
  </refsect1>

  <refsect1>
    <title>Supported Drivers</title>
    <variablelist>
      <varlistentry>
	<term>Host AP driver for Prism2/2.5/3 (development
	snapshot/v0.2.x)</term>
	<listitem>
	  <para> (http://hostap.epitest.fi/) Driver needs to be set in
	  Managed mode (<emphasis>iwconfig wlan0 mode managed</emphasis>).
	  Please note that station firmware version needs to be 1.7.0 or
	  newer to work in WPA mode.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Linuxant DriverLoader</term>
	<listitem>
	  <para>(http://www.linuxant.com/driverloader/)
	with Windows NDIS driver for your wlan card supporting WPA.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Agere Systems Inc. Linux Driver</term>
	<listitem>
	  <para> (http://www.agere.com/support/drivers/) Please note
	that the driver interface file (driver_hermes.c) and hardware
	specific include files are not included in the wpa_supplicant
	distribution. You will need to copy these from the source
	package of the Agere driver.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>madwifi driver for cards based on Atheros chip set (ar521x)</term>
	<listitem>
	  <para> (http://sourceforge.net/projects/madwifi/) Please
	note that you will need to modify the wpa_supplicant .config
	file to use the correct path for the madwifi driver root
	directory (CFLAGS += -I../madwifi/wpa line in example
	defconfig).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Linux ndiswrapper</term>
	<listitem>
	  <para> (http://ndiswrapper.sourceforge.net/) with Windows
	NDIS driver.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Broadcom wl.o driver</term>
	<listitem>
	  <para> This is a generic Linux driver for Broadcom IEEE
	802.11a/g cards.  However, it is proprietary driver that is
	not publicly available except for couple of exceptions, mainly
	Broadcom-based APs/wireless routers that use Linux. The driver
	binary can be downloaded, e.g., from Linksys support site
	(http://www.linksys.com/support/gpl.asp) for Linksys
	WRT54G. The GPL tarball includes cross-compiler and the needed
	header file, wlioctl.h, for compiling wpa_supplicant.  This
	driver support in wpa_supplicant is expected to work also with
	other devices based on Broadcom driver (assuming the driver
	includes client mode support).</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term> Intel ipw2100 driver</term>
	<listitem>
	  <para> (http://sourceforge.net/projects/ipw2100/)</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Intel ipw2200 driver</term>
	<listitem>
	  <para> (http://sourceforge.net/projects/ipw2200/)</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Linux wireless extensions</term>
	<listitem>
	  <para>In theory, any driver that supports Linux wireless
	extensions can be used with IEEE 802.1X (i.e., not WPA) when
	using ap_scan=0 option in configuration file.</para>
	</listitem>
      </varlistentry>
      
      <varlistentry>
	<term>Wired Ethernet drivers</term>
	<listitem>
	  <para>Use ap_scan=0.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>BSD net80211 layer (e.g., Atheros driver)</term>
	<listitem>
	  <para>At the moment, this is for FreeBSD 6-CURRENT branch.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Windows NDIS</term>
	<listitem>
	  <para>The current Windows port requires WinPcap
	(http://winpcap.polito.it/).  See README-Windows.txt for more
	information.</para>
	</listitem>
      </varlistentry>
    </variablelist>

	
    <para>wpa_supplicant was designed to be portable for different
    drivers and operating systems. Hopefully, support for more wlan
    cards and OSes will be added in the future. See developer.txt for
    more information about the design of wpa_supplicant and porting to
    other drivers. One main goal is to add full WPA/WPA2 support to
    Linux wireless extensions to allow new drivers to be supported
    without having to implement new driver-specific interface code in
    wpa_supplicant.</para>
  </refsect1>

  <refsect1>
    <title>Architecture</title> <para>The
    <command>wpa_supplicant</command> system consists of the following
    components:</para>

    <variablelist>
      <varlistentry>
	<term><filename>wpa_supplicant.conf</filename> </term>
	<listitem>
        <para>the configuration file describing all networks that the
        user wants the computer to connect to.  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><command>wpa_supplicant</command></term>
        <listitem><para>the program that directly interacts with the
        network interface.  </para></listitem>
      </varlistentry>
      <varlistentry>
	<term><command>wpa_cli</command></term> <listitem><para> the
	client program that provides a high-level interface to the
	functionality of the daemon.  </para></listitem>
      </varlistentry>
      <varlistentry>
	<term><command>wpa_passphrase</command></term>
        <listitem><para>a utility needed to construct
        <filename>wpa_supplicant.conf</filename> files that include
        encrypted passwords.</para></listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Quick Start</title>

    <para>First, make a configuration file, e.g.
    <filename>/etc/wpa_supplicant.conf</filename>, that describes the networks
    you are interested in.  See <citerefentry>
	<refentrytitle>wpa_supplicant.conf</refentrytitle>
	<manvolnum>5</manvolnum>
      </citerefentry>
    for details.</para>

    <para>Once the configuration is ready, you can test whether the
    configuration works by running <command>wpa_supplicant</command>
    with following command to start it on foreground with debugging
    enabled:</para>

    <blockquote><programlisting>
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d
    </programlisting></blockquote>

    <para>Assuming everything goes fine, you can start using following
    command to start <command>wpa_supplicant</command> on background
    without debugging:</para>

    <blockquote><programlisting>
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
    </programlisting></blockquote>

    <para>Please note that if you included more than one driver
    interface in the build time configuration (.config), you may need
    to specify which interface to use by including -D&lt;driver
    name&gt; option on the command line.</para>

    <!-- XXX at this point, the page could include a little script
         based on wpa_cli to wait for a connection and then run
         dhclient -->

  </refsect1>

  <refsect1>
    <title>Interface to pcmcia-cs/cardmrg</title>

    <para>For example, following small changes to pcmcia-cs scripts
    can be used to enable WPA support:</para>

    <para>Add MODE="Managed" and WPA="y" to the network scheme in
    <filename>/etc/pcmcia/wireless.opts</filename>.</para>

    <para>Add the following block to the end of <emphasis>start</emphasis>
    action handler in <filename>/etc/pcmcia/wireless</filename>:</para>

    <blockquote><programlisting>
if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
    /usr/local/bin/wpa_supplicant -B -c/etc/wpa_supplicant.conf -i$DEVICE
fi
    </programlisting></blockquote>


    <para>Add the following block to the end of <emphasis>stop</emphasis>
    action handler (may need to be separated from other actions) in
    <filename>/etc/pcmcia/wireless</filename>:</para>

    <blockquote><programlisting>
if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
    killall wpa_supplicant
fi
    </programlisting></blockquote>

    <para>This will make <command>cardmgr</command> start
    <command>wpa_supplicant</command> when the card is plugged
    in.</para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <citerefentry>
	<refentrytitle>wpa_background</refentrytitle>
	<manvolnum>8</manvolnum>
      </citerefentry>
      <citerefentry>
	<refentrytitle>wpa_supplicant.conf</refentrytitle>
	<manvolnum>5</manvolnum>
      </citerefentry>
      <citerefentry>
	<refentrytitle>wpa_cli</refentrytitle>
	<manvolnum>8</manvolnum>
      </citerefentry>
      <citerefentry>
	<refentrytitle>wpa_passphrase</refentrytitle>
	<manvolnum>8</manvolnum>
      </citerefentry>
    </para>
  </refsect1>
  <refsect1>
    <title>Legal</title>
    <para>wpa_supplicant is copyright (c) 2003-2012,
    Jouni Malinen <email>j@w1.fi</email> and
    contributors.
    All Rights Reserved.</para>

    <para>This program is licensed under the BSD license (the one with
    advertisement clause removed).</para>
  </refsect1>
</refentry>