wpa_supplicant.sgml 22 KB

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