source: networking/netprogs/wpa_supplicant-systemd.xml@ 99673f0

systemd-13485
Last change on this file since 99673f0 was cf193634, checked in by Douglas R. Reno <renodr@…>, 9 years ago

Update to libxcb-1.11.1
Update to dhcpcd-6.9.3
Update to wpa_supplicant-2.5
Update to SQLite-3.9.2
Tags

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16650 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 16.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY wpa_supplicant-download-http
8 "http://hostap.epitest.fi/releases/wpa_supplicant-&wpa_supplicant-version;.tar.gz">
9 <!ENTITY wpa_supplicant-download-ftp " ">
10 <!ENTITY wpa_supplicant-md5sum "96ff75c3a514f1f324560a2376f1337">
11 <!ENTITY wpa_supplicant-size "2.5 MB">
12 <!ENTITY wpa_supplicant-buildsize "35 MB">
13 <!ENTITY wpa_supplicant-time "0.2 SBU">
14]>
15
16<sect1 id="wpa_supplicant" xreflabel="wpa_supplicant-&wpa_supplicant-version;">
17 <?dbhtml filename="wpa_supplicant.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>wpa_supplicant-&wpa_supplicant-version;</title>
25
26 <indexterm zone="wpa_supplicant">
27 <primary sortas="a-wpa_supplicant">wpa_supplicant</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to WPA Supplicant</title>
32
33 <para>
34 <application>WPA Supplicant</application> is a Wi-Fi Protected Access
35 (WPA) client and IEEE 802.1X supplicant. It implements WPA key negotiation
36 with a WPA Authenticator and Extensible Authentication Protocol (EAP)
37 authentication with an Authentication Server. In addition, it controls the
38 roaming and IEEE 802.11 authentication/association of the wireless LAN
39 driver. This is useful for connecting to a password protected wireless
40 access point.
41 </para>
42
43 &lfs78_checked;
44
45 <bridgehead renderas="sect3">Package Information</bridgehead>
46 <itemizedlist spacing="compact">
47 <listitem>
48 <para>
49 Download (HTTP): <ulink url="&wpa_supplicant-download-http;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download (FTP): <ulink url="&wpa_supplicant-download-ftp;"/>
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download MD5 sum: &wpa_supplicant-md5sum;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Download size: &wpa_supplicant-size;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated disk space required: &wpa_supplicant-buildsize;
70 </para>
71 </listitem>
72 <listitem>
73 <para>
74 Estimated build time: &wpa_supplicant-time;
75 </para>
76 </listitem>
77 </itemizedlist>
78
79 <bridgehead renderas="sect3">WPA Supplicant Dependencies</bridgehead>
80
81 <bridgehead renderas="sect4">Recommended</bridgehead>
82 <para role="recommended">
83 <xref linkend="libnl"/> and
84 <xref linkend="openssl"/>
85 </para>
86
87 <bridgehead renderas="sect4">Optional</bridgehead>
88 <para role="optional">
89 <xref linkend="qt4"/>
90 </para>
91
92 <para condition="html" role="usernotes">User Notes:
93 <ulink url="&blfs-wiki;/wpa_supplicant"/>
94 </para>
95
96 </sect2>
97
98 <sect2 role="kernel" id="wpa_supplicant-kernel">
99 <title>Kernel Configuration</title>
100
101 <para>
102 Enable the following options in the kernel configuration as well as
103 specific device drivers for your hardware and recompile the kernel if
104 necessary:
105 </para>
106
107<screen><literal>[*] Networking support ---&gt; [CONFIG_NET]
108 [*] Wireless ---&gt; [CONFIG_WIRELESS]
109 &lt;*/M&gt; cfg80211 - wireless configuration API [CONFIG_CFG80211]
110 [*] cfg80211 wireless extensions compatibility [CONFIG_CFG80211_WEXT]
111 &lt;*/M&gt; Generic IEEE 802.11 Networking Stack (mac80211) [CONFIG_MAC80211]
112Device Drivers ---&gt;
113 [*] Network device support ---&gt; [CONFIG_NETDEVICES]
114 [*] Wireless LAN ---&gt; [CONFIG_WLAN]</literal></screen>
115
116 <para>
117 Open the submenu and select the options that support your hardware:
118 <command>lspci</command> from <xref linkend="pciutils"/> can be used to
119 view your hardware configuration.
120 </para>
121
122 <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
123 <primary sortas="d-wpa_supplicant">wpa_supplicant</primary>
124 </indexterm>
125 </sect2>
126
127 <sect2 role="installation">
128 <title>Installation of WPA Supplicant</title>
129
130 <para>
131 First you will need to create an initial configuration file for the
132 build process. You can read <filename>wpa_supplicant/README</filename>
133 and <filename>wpa_supplicant/defconfig</filename> for the explanation
134 of the following options as well as other options that can be used.
135 Create a build configuration file that should work for standard WiFi
136 setups by running the following command:
137 </para>
138
139<screen><userinput>cat &gt; wpa_supplicant/.config &lt;&lt; "EOF"
140<literal>CONFIG_BACKEND=file
141CONFIG_CTRL_IFACE=y
142CONFIG_DEBUG_FILE=y
143CONFIG_DEBUG_SYSLOG=y
144CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
145CONFIG_DRIVER_NL80211=y
146CONFIG_DRIVER_WEXT=y
147CONFIG_DRIVER_WIRED=y
148CONFIG_EAP_GTC=y
149CONFIG_EAP_LEAP=y
150CONFIG_EAP_MD5=y
151CONFIG_EAP_MSCHAPV2=y
152CONFIG_EAP_OTP=y
153CONFIG_EAP_PEAP=y
154CONFIG_EAP_TLS=y
155CONFIG_EAP_TTLS=y
156CONFIG_IEEE8021X_EAPOL=y
157CONFIG_IPV6=y
158CONFIG_LIBNL32=y
159CONFIG_PEERKEY=y
160CONFIG_PKCS12=y
161CONFIG_READLINE=y
162CONFIG_SMARTCARD=y
163CONFIG_WPS=y
164CFLAGS += -I/usr/include/libnl3</literal>
165EOF</userinput></screen>
166
167 <para>
168 If you wish to use <application>WPA Supplicant</application> with
169 <xref linkend="NetworkManager"/>, add the required options to
170 the <application>WPA Supplicant</application> build configuration
171 file by running the following command:
172 </para>
173
174<screen><userinput>cat &gt;&gt; wpa_supplicant/.config &lt;&lt; "EOF"
175<literal>CONFIG_CTRL_IFACE_DBUS=y
176CONFIG_CTRL_IFACE_DBUS_NEW=y
177CONFIG_CTRL_IFACE_DBUS_INTRO=y</literal>
178EOF</userinput></screen>
179
180 <para>
181 First, fix expand the list of parameters that are passed to the
182 <command>wpa_supplicant</command> when started as a
183 <application>D-Bus</application> service:
184 </para>
185
186<screen><userinput>sed -e "s@wpa_supplicant -u@&amp; -s -O /var/run/wpa_supplicant@g" -i wpa_supplicant/dbus/*.service.in &amp;&amp;
187sed -e "s@wpa_supplicant -u@&amp; -s -O /var/run/wpa_supplicant@g" -i wpa_supplicant/systemd/wpa_supplicant.service.in</userinput></screen>
188
189 <para>
190 Install <application>WPA Supplicant</application> by running the
191 following commands:
192 </para>
193
194<screen><userinput>cd wpa_supplicant &amp;&amp;
195make BINDIR=/sbin LIBDIR=/lib</userinput></screen>
196
197 <para>
198 If you have installed <xref linkend="qt4"/> and wish to build
199 the <application>WPA Supplicant</application> GUI program, run
200 the following commands:
201 </para>
202
203<screen><userinput>pushd wpa_gui-qt4 &amp;&amp;
204qmake-qt4 wpa_gui.pro &amp;&amp;
205make &amp;&amp;
206popd</userinput></screen>
207
208 <para>
209 This package does not come with a test suite.
210 </para>
211
212 <para>
213 Now, as the <systemitem class="username">root</systemitem> user:
214 </para>
215
216<screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /sbin/ &amp;&amp;
217install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ &amp;&amp;
218install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/</userinput></screen>
219
220 <para>
221 Install the <application>systemd</application> support files by
222 running the following command as the <systemitem
223 class="username">root</systemitem> user:
224 </para>
225
226<screen role="root"><userinput>install -v -m644 systemd/*.service /lib/systemd/system/</userinput></screen>
227
228 <para>
229 If you have built <application>WPA Supplicant</application> with
230 <application>D-Bus</application> support, you will need to install
231 <application>D-Bus</application> configuration files. Install them
232 by running the following commands as the
233 <systemitem class="username">root</systemitem> user:
234 </para>
235
236<screen role="root"><userinput>install -v -m644 dbus/fi.{epitest.hostap.WPASupplicant,w1.wpa_supplicant1}.service \
237 /usr/share/dbus-1/system-services/ &amp;&amp;
238install -v -m644 dbus/dbus-wpa_supplicant.conf \
239 /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
240
241 <para>
242 Additionally, enable the <filename>wpa_supplicant.service</filename> so that
243 <application>systemd</application> can properly activate the
244 <application>D-Bus</application> service. Note that the
245 per-connection service and the D-Bus service cannot be enabled
246 at the same time. Run the following command as the
247 <systemitem class="username">root</systemitem> user:
248 </para>
249
250<screen role="root"><userinput>systemctl enable wpa_supplicant</userinput></screen>
251
252 <para>
253 If you have built the <application>WPA Supplicant</application> GUI
254 program, install it by running the following commands as the
255 <systemitem class="username">root</systemitem> user:
256 </para>
257
258<screen role="root"><userinput>install -v -m755 wpa_gui-qt4/wpa_gui /usr/bin/ &amp;&amp;
259install -v -m644 doc/docbook/wpa_gui.8 /usr/share/man/man8/ &amp;&amp;
260install -v -m644 wpa_gui-qt4/wpa_gui.desktop /usr/share/applications/ &amp;&amp;
261install -v -m644 wpa_gui-qt4/icons/wpa_gui.svg /usr/share/pixmaps/</userinput></screen>
262
263 <note>
264 <para>
265 You will need to restart the system <application>D-Bus</application> daemon
266 before you can use the <application>WPA Supplicant</application>
267 <application>D-Bus</application> interface.
268 </para>
269 </note>
270
271 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
272 href="../../xincludes/update-desktop-database.xml"/>
273
274 </sect2>
275
276 <sect2 role="configuration">
277 <title>Configuring wpa_supplicant</title>
278
279 <sect3 id="wpa_supplicant-config">
280 <title>Config File</title>
281
282 <para>
283 <filename>/etc/wpa_supplicant/wpa_supplicant-*.conf</filename>
284 </para>
285
286 <indexterm zone="wpa_supplicant wpa_supplicant-config">
287 <primary
288 sortas="e-etc-wpa_supplicant-wpa_supplicant-star.conf">/etc/wpa_supplicant/wpa_supplicant-*.conf</primary>
289 </indexterm>
290
291 </sect3>
292
293 <sect3>
294 <title>Configuration Information</title>
295
296 <warning>
297 <para>
298 You need to replace <replaceable>wlan0</replaceable> with
299 the correct wireless interface name in the commands below.
300 </para>
301 </warning>
302
303 <para>
304 To connect to an access point that uses a password, you need to put
305 the pre-shared key in <filename>
306 /etc/wpa_supplicant/wpa_supplicant-<replaceable>wlan0</replaceable>.conf</filename>.
307 SSID is the string that the access point/router transmits to
308 identify itself. Run the following command as the
309 <systemitem class="username">root</systemitem> user:
310 </para>
311
312<screen role="root"><userinput>install -v -dm755 /etc/wpa_supplicant &amp;&amp;
313wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/wpa_supplicant/wpa_supplicant-<replaceable>wlan0</replaceable>.conf</userinput></screen>
314
315 <para>
316 <filename>/etc/wpa_supplicant/wpa_supplicant-<replaceable>wlan0</replaceable>.conf
317 </filename> can hold the details of several access points. When
318 <command>wpa_supplicant</command> is started, it will scan for the
319 SSIDs it can see and choose the appropriate password to connect.
320 </para>
321
322 <para>
323 If you want to connect to an access point that isn't password
324 protected, put an entry like this in <filename>
325 /etc/wpa_supplicant/wpa_supplicant-<replaceable>wlan0</replaceable>.conf</filename>.
326 Replace "Some-SSID" with the SSID of the access point/router.
327 </para>
328
329<screen>network={
330 ssid="<replaceable>Some-SSID</replaceable>"
331 key_mgmt=NONE
332}</screen>
333
334 <para>
335 There are many options that you could use to tweak how you connect
336 to each access point. They are described in some detail in the
337 <filename>wpa_supplicant/wpa_supplicant.conf</filename> file in the
338 source tree.
339 </para>
340
341 </sect3>
342
343 <sect3>
344 <title>Connecting to an Access Point</title>
345
346 <para>
347 There are 3 types of <application>systemd</application> units
348 that were installed:
349 </para>
350
351 <itemizedlist spacing="compact">
352 <listitem>
353 <para>
354 wpa_supplicant@.service
355 </para>
356 </listitem>
357 <listitem>
358 <para>
359 wpa_supplicant-nl80211@.service
360 </para>
361 </listitem>
362 <listitem>
363 <para>
364 wpa_supplicant-wired@.service
365 </para>
366 </listitem>
367 </itemizedlist>
368
369 <para>
370 The only difference between 3 of them is what driver
371 is used for connecting (-D option). The first one uses
372 the default driver, the second one uses the nl80211
373 driver and the third one uses the wired driver.
374 </para>
375
376 <para>
377 You can connect to the wireless access point by
378 running the following command as the
379 <systemitem class="username">root</systemitem> user:
380 </para>
381
382<screen role="root"><userinput>systemctl start wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
383
384 <para>
385 To connect to the wireless access point at
386 boot, simply enable the appropriate
387 <command>wpa_supplicant</command> service
388 by running the following command as the
389 <systemitem class="username">root</systemitem> user:
390 </para>
391
392<screen role="root"><userinput>systemctl enable wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
393
394 <para>
395 Depending on your setup, you can replace the
396 <filename>wpa_supplicant@.service</filename>
397 with any other listed above.
398 </para>
399
400 <para>
401 To assign a network address to your wireless interface,
402 consult the <ulink
403 url="&lfs-root;/chapter07/network.html">General Network Configuration</ulink>
404 page in LFS.
405 </para>
406
407 </sect3>
408
409 </sect2>
410
411 <sect2 role="content">
412 <title>Contents</title>
413
414 <segmentedlist>
415 <segtitle>Installed Programs</segtitle>
416 <segtitle>Installed Libraries</segtitle>
417 <segtitle>Installed Directories</segtitle>
418
419 <seglistitem>
420 <seg>
421 wpa_gui,
422 wpa_supplicant,
423 wpa_passphrase,
424 and wpa_cli
425 </seg>
426 <seg>
427 None
428 </seg>
429 <seg>
430 None
431 </seg>
432 </seglistitem>
433 </segmentedlist>
434
435 <variablelist>
436 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
437 <?dbfo list-presentation="list"?>
438 <?dbhtml list-presentation="table"?>
439
440 <varlistentry id="wpa_gui">
441 <term><command>wpa_gui</command></term>
442 <listitem>
443 <para>
444 is a graphical frontend program for interacting with
445 <application>wpa_supplicant</application>.
446 </para>
447 <indexterm zone="wpa_supplicant wpa_gui">
448 <primary sortas="b-wpa_gui">wpa_gui</primary>
449 </indexterm>
450 </listitem>
451 </varlistentry>
452
453 <varlistentry id="wpa_supplicant-prog">
454 <term><command>wpa_supplicant</command></term>
455 <listitem>
456 <para>
457 is a daemon that can connect to a password protected wireless
458 access point.
459 </para>
460 <indexterm zone="wpa_supplicant wpa_supplicant-prog">
461 <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
462 </indexterm>
463 </listitem>
464 </varlistentry>
465
466 <varlistentry id="wpa_passphrase">
467 <term><command>wpa_passphrase</command></term>
468 <listitem>
469 <para>
470 takes an SSID and a password and generates a simple
471 configuration that <command>wpa_supplicant</command> can
472 understand.
473 </para>
474 <indexterm zone="wpa_supplicant wpa_passphrase">
475 <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
476 </indexterm>
477 </listitem>
478 </varlistentry>
479
480 <varlistentry id="wpa_cli">
481 <term><command>wpa_cli</command></term>
482 <listitem>
483 <para>
484 is a command line interface used to control a running
485 <command>wpa_supplicant</command> daemon.
486 </para>
487 <indexterm zone="wpa_supplicant wpa_cli">
488 <primary sortas="b-wpa_cli">wpa_cli</primary>
489 </indexterm>
490 </listitem>
491 </varlistentry>
492
493 </variablelist>
494
495 </sect2>
496
497</sect1>
Note: See TracBrowser for help on using the repository browser.