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