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