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 | "https://w1.fi/releases/wpa_supplicant-&wpa_supplicant-version;.tar.gz">
|
---|
9 | <!ENTITY wpa_supplicant-download-ftp " ">
|
---|
10 | <!ENTITY wpa_supplicant-md5sum "d26797fcb002898d4ee989179346e1cc">
|
---|
11 | <!ENTITY wpa_supplicant-size "3.4 MB">
|
---|
12 | <!ENTITY wpa_supplicant-buildsize "37 MB">
|
---|
13 | <!ENTITY wpa_supplicant-time "0.5 SBU (with optional gui)">
|
---|
14 | ]>
|
---|
15 |
|
---|
16 | <sect1 id="wpa_supplicant" xreflabel="wpa_supplicant-&wpa_supplicant-version;">
|
---|
17 | <?dbhtml filename="wpa_supplicant.html"?>
|
---|
18 |
|
---|
19 | <sect1info>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>wpa_supplicant-&wpa_supplicant-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="wpa_supplicant">
|
---|
26 | <primary sortas="a-wpa_supplicant">wpa_supplicant</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to WPA Supplicant</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | <application>WPA Supplicant</application> is a Wi-Fi Protected Access
|
---|
34 | (WPA) client and IEEE 802.1X supplicant. It implements WPA key negotiation
|
---|
35 | with a WPA Authenticator and Extensible Authentication Protocol (EAP)
|
---|
36 | authentication with an Authentication Server. In addition, it controls the
|
---|
37 | roaming and IEEE 802.11 authentication/association of the wireless LAN
|
---|
38 | driver. This is useful for connecting to a password protected wireless
|
---|
39 | access point.
|
---|
40 | </para>
|
---|
41 |
|
---|
42 | &lfs111_checked;
|
---|
43 |
|
---|
44 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
45 | <itemizedlist spacing="compact">
|
---|
46 | <listitem>
|
---|
47 | <para>
|
---|
48 | Download (HTTP): <ulink url="&wpa_supplicant-download-http;"/>
|
---|
49 | </para>
|
---|
50 | </listitem>
|
---|
51 | <listitem>
|
---|
52 | <para>
|
---|
53 | Download (FTP): <ulink url="&wpa_supplicant-download-ftp;"/>
|
---|
54 | </para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>
|
---|
58 | Download MD5 sum: &wpa_supplicant-md5sum;
|
---|
59 | </para>
|
---|
60 | </listitem>
|
---|
61 | <listitem>
|
---|
62 | <para>
|
---|
63 | Download size: &wpa_supplicant-size;
|
---|
64 | </para>
|
---|
65 | </listitem>
|
---|
66 | <listitem>
|
---|
67 | <para>
|
---|
68 | Estimated disk space required: &wpa_supplicant-buildsize;
|
---|
69 | </para>
|
---|
70 | </listitem>
|
---|
71 | <listitem>
|
---|
72 | <para>
|
---|
73 | Estimated build time: &wpa_supplicant-time;
|
---|
74 | </para>
|
---|
75 | </listitem>
|
---|
76 | </itemizedlist>
|
---|
77 |
|
---|
78 | <bridgehead renderas="sect3">WPA Supplicant Dependencies</bridgehead>
|
---|
79 |
|
---|
80 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
81 | <para role="recommended">
|
---|
82 | <xref linkend="desktop-file-utils"/> (for running
|
---|
83 | <command>update-desktop-database</command>) and
|
---|
84 | <xref linkend="libnl"/>
|
---|
85 | </para>
|
---|
86 |
|
---|
87 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
88 | <para role="optional">
|
---|
89 | <phrase revision="sysv"><xref linkend="dbus"/>,</phrase>
|
---|
90 | <xref linkend="libxml2"/>, and
|
---|
91 | <xref linkend="qt5"/>
|
---|
92 | </para>
|
---|
93 |
|
---|
94 | <para condition="html" role="usernotes">User Notes:
|
---|
95 | <ulink url="&blfs-wiki;/wpa_supplicant"/>
|
---|
96 | </para>
|
---|
97 |
|
---|
98 | </sect2>
|
---|
99 |
|
---|
100 | <sect2 role="kernel" id="wpa_supplicant-kernel">
|
---|
101 | <title>Kernel Configuration</title>
|
---|
102 |
|
---|
103 | <para>
|
---|
104 | Enable the following options in the kernel configuration as well as
|
---|
105 | specific device drivers for your hardware and recompile the kernel if
|
---|
106 | necessary:
|
---|
107 | </para>
|
---|
108 |
|
---|
109 | <screen><literal>[*] Networking support ---> [CONFIG_NET]
|
---|
110 | [*] Wireless ---> [CONFIG_WIRELESS]
|
---|
111 | <*/M> cfg80211 - wireless configuration API [CONFIG_CFG80211]
|
---|
112 | [*] cfg80211 wireless extensions compatibility [CONFIG_CFG80211_WEXT]
|
---|
113 | <*/M> Generic IEEE 802.11 Networking Stack (mac80211) [CONFIG_MAC80211]
|
---|
114 | Device Drivers --->
|
---|
115 | [*] Network device support ---> [CONFIG_NETDEVICES]
|
---|
116 | [*] Wireless LAN ---> [CONFIG_WLAN]</literal></screen>
|
---|
117 |
|
---|
118 | <para>
|
---|
119 | Open the submenu and select the options that support your hardware:
|
---|
120 | <command>lspci</command> from <xref linkend="pciutils"/> can be used to
|
---|
121 | view your hardware configuration.
|
---|
122 | </para>
|
---|
123 |
|
---|
124 | <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
|
---|
125 | <primary sortas="d-wpa_supplicant">wpa_supplicant</primary>
|
---|
126 | </indexterm>
|
---|
127 | </sect2>
|
---|
128 |
|
---|
129 | <sect2 role="installation">
|
---|
130 | <title>Installation of WPA Supplicant</title>
|
---|
131 |
|
---|
132 | <para>
|
---|
133 | First you will need to create an initial configuration file for the
|
---|
134 | build process. You can read <filename>wpa_supplicant/README</filename>
|
---|
135 | and <filename>wpa_supplicant/defconfig</filename> for the explanation
|
---|
136 | of the following options as well as other options that can be used.
|
---|
137 | Create a build configuration file that should work for standard WiFi
|
---|
138 | setups by running the following command:
|
---|
139 | </para>
|
---|
140 |
|
---|
141 | <screen><userinput>cat > wpa_supplicant/.config << "EOF"
|
---|
142 | <literal>CONFIG_BACKEND=file
|
---|
143 | CONFIG_CTRL_IFACE=y
|
---|
144 | CONFIG_DEBUG_FILE=y
|
---|
145 | CONFIG_DEBUG_SYSLOG=y
|
---|
146 | CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
|
---|
147 | CONFIG_DRIVER_NL80211=y
|
---|
148 | CONFIG_DRIVER_WEXT=y
|
---|
149 | CONFIG_DRIVER_WIRED=y
|
---|
150 | CONFIG_EAP_GTC=y
|
---|
151 | CONFIG_EAP_LEAP=y
|
---|
152 | CONFIG_EAP_MD5=y
|
---|
153 | CONFIG_EAP_MSCHAPV2=y
|
---|
154 | CONFIG_EAP_OTP=y
|
---|
155 | CONFIG_EAP_PEAP=y
|
---|
156 | CONFIG_EAP_TLS=y
|
---|
157 | CONFIG_EAP_TTLS=y
|
---|
158 | CONFIG_IEEE8021X_EAPOL=y
|
---|
159 | CONFIG_IPV6=y
|
---|
160 | CONFIG_LIBNL32=y
|
---|
161 | CONFIG_PEERKEY=y
|
---|
162 | CONFIG_PKCS12=y
|
---|
163 | CONFIG_READLINE=y
|
---|
164 | CONFIG_SMARTCARD=y
|
---|
165 | CONFIG_WPS=y
|
---|
166 | CFLAGS += -I/usr/include/libnl3</literal>
|
---|
167 | EOF</userinput></screen>
|
---|
168 |
|
---|
169 | <para>
|
---|
170 | If you wish to use <application>WPA Supplicant</application> with
|
---|
171 | <xref linkend="NetworkManager"/>, make sure that you have installed
|
---|
172 | <xref linkend="dbus"/> and <xref linkend="libxml2"/>, then add the
|
---|
173 | following options to the <application>WPA Supplicant</application>
|
---|
174 | build configuration file by running the following command:
|
---|
175 | </para>
|
---|
176 |
|
---|
177 | <screen><userinput>cat >> wpa_supplicant/.config << "EOF"
|
---|
178 | <literal>CONFIG_CTRL_IFACE_DBUS=y
|
---|
179 | CONFIG_CTRL_IFACE_DBUS_NEW=y
|
---|
180 | CONFIG_CTRL_IFACE_DBUS_INTRO=y</literal>
|
---|
181 | EOF</userinput></screen>
|
---|
182 |
|
---|
183 | <screen><userinput>cd wpa_supplicant &&
|
---|
184 | make BINDIR=/usr/sbin LIBDIR=/usr/lib</userinput></screen>
|
---|
185 |
|
---|
186 | <para>
|
---|
187 | If you have installed <xref linkend="qt5"/> and wish to build
|
---|
188 | the <application>WPA Supplicant</application> GUI program, run
|
---|
189 | the following commands:
|
---|
190 | </para>
|
---|
191 |
|
---|
192 | <note>
|
---|
193 | <para>
|
---|
194 | The following directory name is labelled qt4, but
|
---|
195 | is compatible with <xref linkend="qt5"/>.
|
---|
196 | </para>
|
---|
197 | </note>
|
---|
198 |
|
---|
199 | <screen><userinput>pushd wpa_gui-qt4 &&
|
---|
200 | qmake wpa_gui.pro &&
|
---|
201 | make &&
|
---|
202 | popd</userinput></screen>
|
---|
203 |
|
---|
204 | <para>
|
---|
205 | This package does not come with a test suite.
|
---|
206 | </para>
|
---|
207 |
|
---|
208 | <para>
|
---|
209 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
210 | </para>
|
---|
211 |
|
---|
212 | <screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /usr/sbin/ &&
|
---|
213 | install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ &&
|
---|
214 | install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/</userinput></screen>
|
---|
215 |
|
---|
216 | <para revision="systemd">
|
---|
217 | Install the <application>systemd</application> support files by
|
---|
218 | running the following command as the <systemitem
|
---|
219 | class="username">root</systemitem> user:
|
---|
220 | </para>
|
---|
221 |
|
---|
222 | <screen role="root" revision="systemd"><userinput>install -v -m644 systemd/*.service /usr/lib/systemd/system/</userinput></screen>
|
---|
223 |
|
---|
224 | <para>
|
---|
225 | If you have built <application>WPA Supplicant</application> with
|
---|
226 | <application>D-Bus</application> support, you will need to install
|
---|
227 | <application>D-Bus</application> configuration files. Install them
|
---|
228 | by running the following commands as the
|
---|
229 | <systemitem class="username">root</systemitem> user:
|
---|
230 | </para>
|
---|
231 |
|
---|
232 | <screen role="root"><userinput>install -v -m644 dbus/fi.w1.wpa_supplicant1.service \
|
---|
233 | /usr/share/dbus-1/system-services/ &&
|
---|
234 | install -v -d -m755 /etc/dbus-1/system.d &&
|
---|
235 | install -v -m644 dbus/dbus-wpa_supplicant.conf \
|
---|
236 | /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
|
---|
237 |
|
---|
238 | <para revision="systemd">
|
---|
239 | Additionally, enable the <filename>wpa_supplicant.service</filename>
|
---|
240 | so that <application>systemd</application> can properly activate the
|
---|
241 | <application>D-Bus</application> service. Note that the
|
---|
242 | per-connection service and the D-Bus service cannot be enabled
|
---|
243 | at the same time. Run the following command as the
|
---|
244 | <systemitem class="username">root</systemitem> user:
|
---|
245 | </para>
|
---|
246 |
|
---|
247 | <screen role="root" revision="systemd"><userinput>systemctl enable wpa_supplicant</userinput></screen>
|
---|
248 |
|
---|
249 | <para>
|
---|
250 | If you have built the <application>WPA Supplicant</application> GUI
|
---|
251 | program, install it by running the following commands as the
|
---|
252 | <systemitem class="username">root</systemitem> user:
|
---|
253 | </para>
|
---|
254 |
|
---|
255 | <screen role="root"><userinput>install -v -m755 wpa_gui-qt4/wpa_gui /usr/bin/ &&
|
---|
256 | install -v -m644 doc/docbook/wpa_gui.8 /usr/share/man/man8/ &&
|
---|
257 | install -v -m644 wpa_gui-qt4/wpa_gui.desktop /usr/share/applications/ &&
|
---|
258 | install -v -m644 wpa_gui-qt4/icons/wpa_gui.svg /usr/share/pixmaps/</userinput></screen>
|
---|
259 |
|
---|
260 | <note>
|
---|
261 | <para>
|
---|
262 | You will need to restart the system <application>D-Bus</application> daemon
|
---|
263 | before you can use the <application>WPA Supplicant</application>
|
---|
264 | <application>D-Bus</application> interface.
|
---|
265 | </para>
|
---|
266 | </note>
|
---|
267 |
|
---|
268 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
269 | href="../../xincludes/update-desktop-database.xml"/>
|
---|
270 |
|
---|
271 | </sect2>
|
---|
272 |
|
---|
273 | <sect2 role="configuration">
|
---|
274 | <title>Configuring wpa_supplicant</title>
|
---|
275 |
|
---|
276 | <sect3 id="wpa_supplicant-config">
|
---|
277 | <title>Config File</title>
|
---|
278 |
|
---|
279 | <para revision="sysv">
|
---|
280 | <filename>/etc/sysconfig/wpa_supplicant-*.conf</filename>
|
---|
281 | </para>
|
---|
282 |
|
---|
283 | <para revision="systemd">
|
---|
284 | <filename>/etc/wpa_supplicant/wpa_supplicant-*.conf</filename>
|
---|
285 | </para>
|
---|
286 |
|
---|
287 | <indexterm zone="wpa_supplicant wpa_supplicant-config" revision="sysv">
|
---|
288 | <primary
|
---|
289 | sortas="e-etc-sysconfig-wpa_supplicant-star.conf">/etc/sysconfig/wpa_supplicant-*.conf</primary>
|
---|
290 | </indexterm>
|
---|
291 |
|
---|
292 | <indexterm zone="wpa_supplicant wpa_supplicant-config" revision="systemd">
|
---|
293 | <primary
|
---|
294 | sortas="e-etc-wpa_supplicant-wpa_supplicant-star.conf">/etc/wpa_supplicant/wpa_supplicant-*.conf</primary>
|
---|
295 | </indexterm>
|
---|
296 |
|
---|
297 | </sect3>
|
---|
298 |
|
---|
299 | <sect3>
|
---|
300 | <title>Configuration Information</title>
|
---|
301 |
|
---|
302 | <para>
|
---|
303 | To connect to an access point that uses a password, you need to put
|
---|
304 | the pre-shared key in
|
---|
305 | <phrase revision="sysv">
|
---|
306 | <filename>
|
---|
307 | /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
|
---|
308 | </phrase>
|
---|
309 | <phrase revision="systemd">
|
---|
310 | <filename>
|
---|
311 | /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
|
---|
312 | </phrase>
|
---|
313 | SSID is the string that the access point/router transmits to
|
---|
314 | identify itself. Run the following command as the
|
---|
315 | <systemitem class="username">root</systemitem> user:
|
---|
316 | </para>
|
---|
317 |
|
---|
318 | <screen role="nodump" revision="sysv"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> > /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
|
---|
319 |
|
---|
320 | <screen role="nodump" revision="systemd"><userinput>install -v -dm755 /etc/wpa_supplicant &&
|
---|
321 | wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> > /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
|
---|
322 |
|
---|
323 | <para>
|
---|
324 | <phrase revision="sysv">
|
---|
325 | <filename>
|
---|
326 | /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
|
---|
327 | </filename>
|
---|
328 | </phrase>
|
---|
329 | <phrase revision="systemd">
|
---|
330 | <filename>
|
---|
331 | /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
|
---|
332 | </filename>
|
---|
333 | </phrase>
|
---|
334 | can hold the details of several access points. When
|
---|
335 | <command>wpa_supplicant</command> is started, it will scan for the
|
---|
336 | SSIDs it can see and choose the appropriate password to connect.
|
---|
337 | </para>
|
---|
338 |
|
---|
339 | <para>
|
---|
340 | If you want to connect to an access point that isn't password
|
---|
341 | protected, put an entry like this in
|
---|
342 | <phrase revision="sysv">
|
---|
343 | <filename>
|
---|
344 | /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
|
---|
345 | </phrase>
|
---|
346 | <phrase revision="systemd">
|
---|
347 | <filename>
|
---|
348 | /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
|
---|
349 | </phrase>
|
---|
350 | Replace "Some-SSID" with the SSID of the access point/router.
|
---|
351 | </para>
|
---|
352 |
|
---|
353 | <screen>network={
|
---|
354 | ssid="<replaceable>Some-SSID</replaceable>"
|
---|
355 | key_mgmt=NONE
|
---|
356 | }</screen>
|
---|
357 |
|
---|
358 | <para>
|
---|
359 | Connecting to a new access point that is not in the configuration
|
---|
360 | file can be accomplished manually via the command line or GUI, but it
|
---|
361 | must be done via a privileged user. To do that, add the following to
|
---|
362 | the configuration file:
|
---|
363 | </para>
|
---|
364 |
|
---|
365 | <screen>ctrl_interface=DIR=/run/wpa_supplicant GROUP=<privileged group>
|
---|
366 | update_config=1</screen>
|
---|
367 |
|
---|
368 | <para>
|
---|
369 | Replace the <privileged group> above with a system group where
|
---|
370 | members have the ability to connect to a wireless access point.
|
---|
371 | </para>
|
---|
372 |
|
---|
373 | <para>
|
---|
374 | There are many options that you could use to tweak how you connect
|
---|
375 | to each access point. They are described in some detail in the
|
---|
376 | <filename>wpa_supplicant/wpa_supplicant.conf</filename> file in the
|
---|
377 | source tree.
|
---|
378 | </para>
|
---|
379 |
|
---|
380 | </sect3>
|
---|
381 |
|
---|
382 | <sect3>
|
---|
383 | <title>Connecting to an Access Point</title>
|
---|
384 |
|
---|
385 | <para id="wpa-service" revision="sysv">
|
---|
386 | If you want to configure network interfaces at boot using
|
---|
387 | <command>wpa_supplicant</command>, you need to install the
|
---|
388 | <filename>/lib/services/wpa</filename> script
|
---|
389 | included in <xref linkend="bootscripts"/> package:
|
---|
390 | </para>
|
---|
391 |
|
---|
392 | <screen role="root" revision="sysv"><userinput>make install-service-wpa</userinput></screen>
|
---|
393 |
|
---|
394 | <indexterm zone="wpa_supplicant wpa-service" revision="sysv">
|
---|
395 | <primary sortas="f-wpa">wpa</primary>
|
---|
396 | </indexterm>
|
---|
397 |
|
---|
398 | <para revision="sysv">
|
---|
399 | If your router/access point uses DHCP to allocate IP addresses, you
|
---|
400 | can install <xref linkend="dhcp"/> client and use it to
|
---|
401 | automatically obtain network addresses. Create the
|
---|
402 | <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
|
---|
403 | </filename> by running the following command as the
|
---|
404 | <systemitem class="username">root</systemitem> user:
|
---|
405 | </para>
|
---|
406 |
|
---|
407 | <screen role="root" revision="sysv"><userinput>cat > /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> << "EOF"
|
---|
408 | <literal>ONBOOT="yes"
|
---|
409 | IFACE="<replaceable>wlan0</replaceable>"
|
---|
410 | SERVICE="wpa"
|
---|
411 |
|
---|
412 | # Additional arguments to wpa_supplicant
|
---|
413 | WPA_ARGS=""
|
---|
414 |
|
---|
415 | WPA_SERVICE="dhclient"
|
---|
416 | DHCP_START=""
|
---|
417 | DHCP_STOP=""
|
---|
418 |
|
---|
419 | # Set PRINTIP="yes" to have the script print
|
---|
420 | # the DHCP assigned IP address
|
---|
421 | PRINTIP="no"
|
---|
422 |
|
---|
423 | # Set PRINTALL="yes" to print the DHCP assigned values for
|
---|
424 | # IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
|
---|
425 | PRINTALL="no"</literal>
|
---|
426 | EOF</userinput></screen>
|
---|
427 |
|
---|
428 | <para revision="sysv">
|
---|
429 | If you prefer <xref linkend="dhcpcd"/> instead of
|
---|
430 | <xref linkend="dhcp"/> client, then create the
|
---|
431 | <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
|
---|
432 | </filename> by running the following command as the
|
---|
433 | <systemitem class="username">root</systemitem> user:
|
---|
434 | </para>
|
---|
435 |
|
---|
436 | <screen role="root" revision="sysv"><userinput>cat > /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> << "EOF"
|
---|
437 | <literal>ONBOOT="yes"
|
---|
438 | IFACE="<replaceable>wlan0</replaceable>"
|
---|
439 | SERVICE="wpa"
|
---|
440 |
|
---|
441 | # Additional arguments to wpa_supplicant
|
---|
442 | WPA_ARGS=""
|
---|
443 |
|
---|
444 | WPA_SERVICE="dhcpcd"
|
---|
445 | DHCP_START="-b -q <replaceable><insert appropriate start options here></replaceable>"
|
---|
446 | DHCP_STOP="-k <replaceable><insert additional stop options here></replaceable>"</literal>
|
---|
447 | EOF</userinput></screen>
|
---|
448 |
|
---|
449 | <para revision="sysv">
|
---|
450 | Alternatively, if you use static addresses on your local network,
|
---|
451 | then create the
|
---|
452 | <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
|
---|
453 | </filename> by running the following command as the
|
---|
454 | <systemitem class="username">root</systemitem> user:
|
---|
455 | </para>
|
---|
456 |
|
---|
457 | <screen role="root" revision="sysv"><userinput>cat > /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> << "EOF"
|
---|
458 | <literal>ONBOOT="yes"
|
---|
459 | IFACE="<replaceable>wlan0</replaceable>"
|
---|
460 | SERVICE="wpa"
|
---|
461 |
|
---|
462 | # Additional arguments to wpa_supplicant
|
---|
463 | WPA_ARGS=""
|
---|
464 |
|
---|
465 | WPA_SERVICE="ipv4-static"
|
---|
466 | IP="192.168.1.1"
|
---|
467 | GATEWAY="192.168.1.2"
|
---|
468 | PREFIX="24"
|
---|
469 | BROADCAST="192.168.1.255"</literal>
|
---|
470 | EOF</userinput></screen>
|
---|
471 |
|
---|
472 | <para revision="systemd">
|
---|
473 | There are 3 types of <application>systemd</application> units
|
---|
474 | that were installed:
|
---|
475 | </para>
|
---|
476 |
|
---|
477 | <itemizedlist spacing="compact" revision="systemd">
|
---|
478 | <listitem>
|
---|
479 | <para>
|
---|
480 | wpa_supplicant@.service
|
---|
481 | </para>
|
---|
482 | </listitem>
|
---|
483 | <listitem>
|
---|
484 | <para>
|
---|
485 | wpa_supplicant-nl80211@.service
|
---|
486 | </para>
|
---|
487 | </listitem>
|
---|
488 | <listitem>
|
---|
489 | <para>
|
---|
490 | wpa_supplicant-wired@.service
|
---|
491 | </para>
|
---|
492 | </listitem>
|
---|
493 | </itemizedlist>
|
---|
494 |
|
---|
495 | <para revision="systemd">
|
---|
496 | The only difference between 3 of them is what driver
|
---|
497 | is used for connecting (-D option). The first one uses
|
---|
498 | the default driver, the second one uses the nl80211
|
---|
499 | driver and the third one uses the wired driver.
|
---|
500 | </para>
|
---|
501 |
|
---|
502 | <para>
|
---|
503 | You can connect to the wireless access point by
|
---|
504 | running the following command as the
|
---|
505 | <systemitem class="username">root</systemitem> user:
|
---|
506 | </para>
|
---|
507 |
|
---|
508 | <screen role="root" revision="sysv"><userinput>ifup <replaceable>wifi0</replaceable></userinput></screen>
|
---|
509 |
|
---|
510 | <para revision="sysv">
|
---|
511 | Replace <replaceable>wlan0</replaceable> with the correct
|
---|
512 | wireless interface and <replaceable>wifi0</replaceable>
|
---|
513 | with desired name for the configuration file. Please note
|
---|
514 | that <filename>wpa_supplicant-*.conf</filename> and
|
---|
515 | <filename>ifconfig.*</filename> configuration files need
|
---|
516 | to have identical names, ie both contain
|
---|
517 | <replaceable>wifi0</replaceable> in their name.
|
---|
518 | </para>
|
---|
519 |
|
---|
520 | <screen role="root" revision="systemd"><userinput>systemctl start wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
|
---|
521 |
|
---|
522 | <para revision="systemd">
|
---|
523 | To connect to the wireless access point at
|
---|
524 | boot, simply enable the appropriate
|
---|
525 | <command>wpa_supplicant</command> service
|
---|
526 | by running the following command as the
|
---|
527 | <systemitem class="username">root</systemitem> user:
|
---|
528 | </para>
|
---|
529 |
|
---|
530 | <screen role="root" revision="systemd"><userinput>systemctl enable wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
|
---|
531 |
|
---|
532 | <para revision="systemd">
|
---|
533 | Depending on your setup, you can replace the
|
---|
534 | <filename>wpa_supplicant@.service</filename>
|
---|
535 | with any other listed above.
|
---|
536 | </para>
|
---|
537 |
|
---|
538 | <para revision="systemd">
|
---|
539 | To assign a network address to your wireless interface, consult the
|
---|
540 | <ulink url="&lfs-root;/chapter09/network.html">General Network Configuration</ulink>
|
---|
541 | page in LFS.
|
---|
542 | </para>
|
---|
543 |
|
---|
544 | </sect3>
|
---|
545 |
|
---|
546 | </sect2>
|
---|
547 |
|
---|
548 | <sect2 role="content">
|
---|
549 | <title>Contents</title>
|
---|
550 |
|
---|
551 | <segmentedlist>
|
---|
552 | <segtitle>Installed Programs</segtitle>
|
---|
553 | <segtitle>Installed Libraries</segtitle>
|
---|
554 | <segtitle>Installed Directories</segtitle>
|
---|
555 |
|
---|
556 | <seglistitem>
|
---|
557 | <seg>
|
---|
558 | wpa_gui, wpa_supplicant, wpa_passphrase and wpa_cli
|
---|
559 | </seg>
|
---|
560 | <seg>
|
---|
561 | None
|
---|
562 | </seg>
|
---|
563 | <seg>
|
---|
564 | None
|
---|
565 | </seg>
|
---|
566 | </seglistitem>
|
---|
567 | </segmentedlist>
|
---|
568 |
|
---|
569 | <variablelist>
|
---|
570 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
571 | <?dbfo list-presentation="list"?>
|
---|
572 | <?dbhtml list-presentation="table"?>
|
---|
573 |
|
---|
574 | <varlistentry id="wpa_gui">
|
---|
575 | <term><command>wpa_gui</command></term>
|
---|
576 | <listitem>
|
---|
577 | <para>
|
---|
578 | is a graphical frontend program for interacting with
|
---|
579 | <application>wpa_supplicant</application>
|
---|
580 | </para>
|
---|
581 | <indexterm zone="wpa_supplicant wpa_gui">
|
---|
582 | <primary sortas="b-wpa_gui">wpa_gui</primary>
|
---|
583 | </indexterm>
|
---|
584 | </listitem>
|
---|
585 | </varlistentry>
|
---|
586 |
|
---|
587 | <varlistentry id="wpa_supplicant-prog">
|
---|
588 | <term><command>wpa_supplicant</command></term>
|
---|
589 | <listitem>
|
---|
590 | <para>
|
---|
591 | is a daemon that can connect to a password protected wireless
|
---|
592 | access point
|
---|
593 | </para>
|
---|
594 | <indexterm zone="wpa_supplicant wpa_supplicant-prog">
|
---|
595 | <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
|
---|
596 | </indexterm>
|
---|
597 | </listitem>
|
---|
598 | </varlistentry>
|
---|
599 |
|
---|
600 | <varlistentry id="wpa_passphrase">
|
---|
601 | <term><command>wpa_passphrase</command></term>
|
---|
602 | <listitem>
|
---|
603 | <para>
|
---|
604 | takes an SSID and a password and generates a simple
|
---|
605 | configuration that <command>wpa_supplicant</command> can
|
---|
606 | understand
|
---|
607 | </para>
|
---|
608 | <indexterm zone="wpa_supplicant wpa_passphrase">
|
---|
609 | <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
|
---|
610 | </indexterm>
|
---|
611 | </listitem>
|
---|
612 | </varlistentry>
|
---|
613 |
|
---|
614 | <varlistentry id="wpa_cli">
|
---|
615 | <term><command>wpa_cli</command></term>
|
---|
616 | <listitem>
|
---|
617 | <para>
|
---|
618 | is a command line interface used to control a running
|
---|
619 | <command>wpa_supplicant</command> daemon
|
---|
620 | </para>
|
---|
621 | <indexterm zone="wpa_supplicant wpa_cli">
|
---|
622 | <primary sortas="b-wpa_cli">wpa_cli</primary>
|
---|
623 | </indexterm>
|
---|
624 | </listitem>
|
---|
625 | </varlistentry>
|
---|
626 |
|
---|
627 | </variablelist>
|
---|
628 |
|
---|
629 | </sect2>
|
---|
630 |
|
---|
631 | </sect1>
|
---|