source: networking/netprogs/wpa_supplicant.xml@ 08de396

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 08de396 was 08de396, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Synchronize D-Bus with LFS.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@13003 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 "e96b8db5a8171cd17a5b2012d6ad7cc7">
11 <!ENTITY wpa_supplicant-size "2.2 MB">
12 <!ENTITY wpa_supplicant-buildsize "28 MB">
13 <!ENTITY wpa_supplicant-time "0.3 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 &lfs75_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="libxml2"/> and
90 <xref linkend="qt4"/>
91 </para>
92
93 <para condition="html" role="usernotes">User Notes:
94 <ulink url="&blfs-wiki;/wpa_supplicant"/>
95 </para>
96
97 </sect2>
98
99 <sect2 role="kernel" id="wpa_supplicant-kernel">
100 <title>Kernel Configuration</title>
101
102 <para>
103 Enable the following options in the kernel configuration as well as
104 specific device drivers for your hardware and recompile the kernel if
105 necessary:
106 </para>
107
108<screen><literal>Networking support --->
109 Wireless --->
110 cfg80211 - wireless configuration API: Y or M
111 cfg80211 wireless extensions compatibility: Y
112 Generic IEEE 802.11 Networking Stack (mac80211): Y or M
113Device Drivers --->
114 Network device support --->
115 Wireless LAN ---></literal></screen>
116
117 <para>
118 Select the options that support your hardware:
119 <command>lspci</command> from <xref linkend="pciutils"/> can be used to
120 view your hardware configuration.
121 </para>
122
123 <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
124 <primary sortas="d-wpa_supplicant">wpa_supplicant</primary>
125 </indexterm>
126 </sect2>
127
128 <sect2 role="installation">
129 <title>Installation of WPA Supplicant</title>
130
131 <para>
132 First you will need to create an initial configuration file for the
133 build process. You can read <filename>wpa_supplicant/README</filename>
134 and <filename>wpa_supplicant/defconfig</filename> for the explanation
135 of the following options as well as other options that can be used.
136 Create a build configuration file that should work for standard WiFi
137 setups by running the following command:
138 </para>
139
140<screen><userinput>cat &gt; wpa_supplicant/.config &lt;&lt; "EOF"
141<literal>CONFIG_BACKEND=file
142CONFIG_CTRL_IFACE=y
143CONFIG_DEBUG_FILE=y
144CONFIG_DEBUG_SYSLOG=y
145CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
146CONFIG_DRIVER_NL80211=y
147CONFIG_DRIVER_WEXT=y
148CONFIG_DRIVER_WIRED=y
149CONFIG_EAP_GTC=y
150CONFIG_EAP_LEAP=y
151CONFIG_EAP_MD5=y
152CONFIG_EAP_MSCHAPV2=y
153CONFIG_EAP_OTP=y
154CONFIG_EAP_PEAP=y
155CONFIG_EAP_TLS=y
156CONFIG_EAP_TTLS=y
157CONFIG_IEEE8021X_EAPOL=y
158CONFIG_IPV6=y
159CONFIG_LIBNL32=y
160CONFIG_PEERKEY=y
161CONFIG_PKCS12=y
162CONFIG_READLINE=y
163CONFIG_SMARTCARD=y
164CONFIG_WPS=y
165CFLAGS += -I/usr/include/libnl3</literal>
166EOF</userinput></screen>
167
168 <para>
169 If you wish to use <application>WPA Supplicant</application> with
170 <xref linkend="NetworkManager"/>, make sure that you have installed
171 <xref linkend="libxml2"/>, then add the
172 following options to the <application>WPA Supplicant</application>
173 build configuration file by running the following command:
174 </para>
175
176<screen><userinput>cat &gt;&gt; wpa_supplicant/.config &lt;&lt; "EOF"
177<literal>CONFIG_CTRL_IFACE_DBUS=y
178CONFIG_CTRL_IFACE_DBUS_NEW=y
179CONFIG_CTRL_IFACE_DBUS_INTRO=y</literal>
180EOF</userinput></screen>
181
182 <para>
183 Install <application>WPA Supplicant</application> by running the
184 following commands:
185 </para>
186
187<screen><userinput>cd wpa_supplicant &amp;&amp;
188make BINDIR=/sbin LIBDIR=/lib</userinput></screen>
189
190 <para>
191 If you have installed <xref linkend="qt4"/> and wish to build
192 the <application>WPA Supplicant</application> GUI program, run
193 the following commands:
194 </para>
195
196<screen><userinput>pushd wpa_gui-qt4 &amp;&amp;
197qmake wpa_gui.pro &amp;&amp;
198make &amp;&amp;
199popd</userinput></screen>
200
201 <para>
202 This package does not come with a test suite.
203 </para>
204
205 <para>
206 Now, as the <systemitem class="username">root</systemitem> user:
207 </para>
208
209<screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /sbin/ &amp;&amp;
210install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ &amp;&amp;
211install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/</userinput></screen>
212
213 <para>
214 If you have built <application>WPA Supplicant</application> with
215 <application>D-Bus</application> support, you will need to install
216 <application>D-Bus</application> configuration files. Install them
217 by running the following commands as the
218 <systemitem class="username">root</systemitem> user:
219 </para>
220
221<screen role="root"><userinput>install -v -m644 dbus/fi.{epitest.hostap.WPASupplicant,w1.wpa_supplicant1}.service \
222 /usr/share/dbus-1/system-services/ &amp;&amp;
223install -v -m644 dbus/dbus-wpa_supplicant.conf \
224 /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
225
226 <para>
227 If you have built the <application>WPA Supplicant</application> GUI
228 program, install it by running the following commands as the
229 <systemitem class="username">root</systemitem> user:
230 </para>
231
232<screen role="root"><userinput>install -v -m755 wpa_gui-qt4/wpa_gui /usr/bin/ &amp;&amp;
233install -v -m644 doc/docbook/wpa_gui.8 /usr/share/man/man8/ &amp;&amp;
234install -v -m644 wpa_gui-qt4/wpa_gui.desktop /usr/share/applications/ &amp;&amp;
235install -v -m644 wpa_gui-qt4/icons/wpa_gui.svg /usr/share/pixmaps/</userinput></screen>
236
237 <note>
238 <para>
239 You will need to restart the system <application>D-Bus</application> daemon
240 before you can use the <application>WPA Supplicant</application>
241 <application>D-Bus</application> interface.
242 </para>
243 </note>
244
245 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
246 href="../../xincludes/update-desktop-database.xml"/>
247
248 </sect2>
249
250 <sect2 role="configuration">
251 <title>Configuring wpa_supplicant</title>
252
253 <sect3 id="wpa_supplicant-config">
254 <title>Config File</title>
255
256 <para>
257 <filename>/etc/sysconfig/wpa_supplicant-*.conf</filename>
258 </para>
259
260 <indexterm zone="wpa_supplicant wpa_supplicant-config">
261 <primary
262 sortas="e-etc-sysconfig-wpa_supplicant-star.conf">/etc/sysconfig/wpa_supplicant-*.conf</primary>
263 </indexterm>
264
265 </sect3>
266
267 <sect3>
268 <title>Configuration Information</title>
269
270 <para>
271 To connect to an access point that uses a password, you need to put
272 the pre-shared key in <filename>
273 /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
274 SSID is the string that the access point/router transmits to
275 identify itself. Run the following command as the
276 <systemitem class="username">root</systemitem> user:
277 </para>
278
279<screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
280
281 <para>
282 <filename>/etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
283 </filename> can hold the details of several access points. When
284 <command>wpa_supplicant</command> is started, it will scan for the
285 SSIDs it can see and choose the appropriate password to connect.
286 </para>
287
288 <para>
289 If you want to connect to an access point that isn't password
290 protected, put an entry like this in <filename>
291 /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
292 Replace "Some-SSID" with the SSID of the access point/router.
293 </para>
294
295<screen>network={
296 ssid="<replaceable>Some-SSID</replaceable>"
297 key_mgmt=NONE
298}</screen>
299
300 <para>
301 There are many options that you could use to tweak how you connect
302 to each access point. They are described in some detail in the
303 <filename>wpa_supplicant/wpa_supplicant.conf</filename> file in the
304 source tree.
305 </para>
306
307 </sect3>
308
309 <sect3>
310 <title>Connecting to an Access Point</title>
311
312 <para id="wpa-service">
313 If you want to configure network interfaces at boot using
314 <command>wpa_supplicant</command>, you need to install the
315 <filename>/lib/services/wpa</filename> script
316 included in <xref linkend="bootscripts"/> package:
317 </para>
318
319<screen role="root"><userinput>make install-service-wpa</userinput></screen>
320
321 <indexterm zone="wpa_supplicant wpa-service">
322 <primary sortas="f-wpa">wpa</primary>
323 </indexterm>
324
325 <para>
326 If your router/access point uses DHCP to allocate IP addresses, you
327 can install <xref linkend="dhcp"/> client and use it to
328 automatically obtain network addresses. Create the
329 <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
330 </filename> by running the following command as the
331 <systemitem class="username">root</systemitem> user:
332 </para>
333
334<screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
335<literal>ONBOOT="yes"
336IFACE="<replaceable>wlan0</replaceable>"
337SERVICE="wpa"
338
339# Additional arguments to wpa_supplicant
340WPA_ARGS=""
341
342WPA_SERVICE="dhclient"
343DHCP_START=""
344DHCP_STOP=""
345
346# Set PRINTIP="yes" to have the script print
347# the DHCP assigned IP address
348PRINTIP="no"
349
350# Set PRINTALL="yes" to print the DHCP assigned values for
351# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
352PRINTALL="no"</literal>
353EOF</userinput></screen>
354
355 <para>
356 If you prefer <xref linkend="dhcpcd"/> instead of
357 <xref linkend="dhcp"/> client, then create the
358 <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
359 </filename> by running the following command as the
360 <systemitem class="username">root</systemitem> user:
361 </para>
362
363<screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
364<literal>ONBOOT="yes"
365IFACE="<replaceable>wlan0</replaceable>"
366SERVICE="wpa"
367
368# Additional arguments to wpa_supplicant
369WPA_ARGS=""
370
371WPA_SERVICE="dhcpcd"
372DHCP_START="-b -q <replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
373DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"</literal>
374EOF</userinput></screen>
375
376 <para>
377 Alternatively, if you use static addresses on your local network,
378 then create the
379 <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
380 </filename> by running the following command as the
381 <systemitem class="username">root</systemitem> user:
382 </para>
383
384<screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
385<literal>ONBOOT="yes"
386IFACE="<replaceable>wlan0</replaceable>"
387SERVICE="wpa"
388
389# Additional arguments to wpa_supplicant
390WPA_ARGS=""
391
392WPA_SERVICE="ipv4-static"
393IP="192.168.1.1"
394GATEWAY="192.168.1.2"
395PREFIX="24"
396BROADCAST="192.168.1.255"</literal>
397EOF</userinput></screen>
398
399 <para>
400 You can connect to the wireless access point by
401 running the following command as the
402 <systemitem class="username">root</systemitem> user:
403 </para>
404
405<screen role="root"><userinput>ifup <replaceable>wifi0</replaceable></userinput></screen>
406
407 <para>
408 Replace <replaceable>wlan0</replaceable> with the correct
409 wireless interface and <replaceable>wifi0</replaceable>
410 with desired name for the configuration file. Please note
411 that <filename>wpa_supplicant-*.conf</filename> and
412 <filename>ifconfig.*</filename> configuration files need
413 to have identical names, ie both contain
414 <replaceable>wifi0</replaceable> in their name.
415 </para>
416
417 </sect3>
418
419 </sect2>
420
421 <sect2 role="content">
422 <title>Contents</title>
423
424 <segmentedlist>
425 <segtitle>Installed Programs</segtitle>
426 <segtitle>Installed Libraries</segtitle>
427 <segtitle>Installed Directories</segtitle>
428
429 <seglistitem>
430 <seg>
431 wpa_gui, wpa_supplicant, wpa_passphrase and wpa_cli
432 </seg>
433 <seg>
434 None
435 </seg>
436 <seg>
437 None
438 </seg>
439 </seglistitem>
440 </segmentedlist>
441
442 <variablelist>
443 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
444 <?dbfo list-presentation="list"?>
445 <?dbhtml list-presentation="table"?>
446
447 <varlistentry id="wpa_gui">
448 <term><command>wpa_gui</command></term>
449 <listitem>
450 <para>
451 is a graphical frontend program for interacting with
452 <application>wpa_supplicant</application>.
453 </para>
454 <indexterm zone="wpa_supplicant wpa_gui">
455 <primary sortas="b-wpa_gui">wpa_gui</primary>
456 </indexterm>
457 </listitem>
458 </varlistentry>
459
460 <varlistentry id="wpa_supplicant-prog">
461 <term><command>wpa_supplicant</command></term>
462 <listitem>
463 <para>
464 is a daemon that can connect to a password protected wireless
465 access point.
466 </para>
467 <indexterm zone="wpa_supplicant wpa_supplicant-prog">
468 <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
469 </indexterm>
470 </listitem>
471 </varlistentry>
472
473 <varlistentry id="wpa_passphrase">
474 <term><command>wpa_passphrase</command></term>
475 <listitem>
476 <para>
477 takes an SSID and a password and generates a simple
478 configuration that <command>wpa_supplicant</command> can
479 understand.
480 </para>
481 <indexterm zone="wpa_supplicant wpa_passphrase">
482 <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
483 </indexterm>
484 </listitem>
485 </varlistentry>
486
487 <varlistentry id="wpa_cli">
488 <term><command>wpa_cli</command></term>
489 <listitem>
490 <para>
491 is a command line interface used to control a running
492 <command>wpa_supplicant</command> daemon.
493 </para>
494 <indexterm zone="wpa_supplicant wpa_cli">
495 <primary sortas="b-wpa_cli">wpa_cli</primary>
496 </indexterm>
497 </listitem>
498 </varlistentry>
499
500 </variablelist>
501
502 </sect2>
503
504</sect1>
Note: See TracBrowser for help on using the repository browser.