source: networking/netprogs/wpa_supplicant.xml@ 5603a81

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 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 5603a81 was 5603a81, checked in by Andrew Benton <andy@…>, 12 years ago

Added some checked tags

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@10151 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 11.6 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-md5sum "f516f191384a9a546e3f5145c08addda">
10 <!ENTITY wpa_supplicant-size "1.6 MB">
11 <!ENTITY wpa_supplicant-buildsize "15 MB">
12 <!ENTITY wpa_supplicant-time "0.1 SBU">
13]>
14
15<sect1 id="wpa_supplicant" xreflabel="wpa_supplicant-&wpa_supplicant-version;">
16 <?dbhtml filename="wpa_supplicant.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
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><application>wpa_supplicant</application> is a Wi-Fi Protected Access
33 (WPA) client and IEEE 802.1X supplicant. It implements WPA key negotiation
34 with a WPA Authenticator and Extensible Authentication Protocol (EAP)
35 authentication with an Authentication Server. In addition, it controls the
36 roaming and IEEE 802.11 authentication/association of the wireless LAN
37 driver. This is useful for connecting to a password protected wireless
38 access point.</para>
39
40 &lfs71_checked;
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>Download (HTTP):
46 <ulink url="&wpa_supplicant-download-http;"/></para>
47 </listitem>
48 <listitem>
49 <para>Download MD5 sum: &wpa_supplicant-md5sum;</para>
50 </listitem>
51 <listitem>
52 <para>Download size: &wpa_supplicant-size;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated disk space required: &wpa_supplicant-buildsize;</para>
56 </listitem>
57 <listitem>
58 <para>Estimated build time: &wpa_supplicant-time;</para>
59 </listitem>
60 </itemizedlist>
61
62 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
63 <itemizedlist spacing="compact">
64 <listitem>
65 <para>Required patch: <ulink
66 url="&patch-root;/wpa_supplicant-&wpa_supplicant-version;-libnl-3-fixes-1.patch"/></para>
67 </listitem>
68 </itemizedlist>
69
70 <bridgehead renderas="sect3">wpa_supplicant Dependencies</bridgehead>
71
72 <bridgehead renderas="sect4">Recommended</bridgehead>
73 <para role="recommended"><xref linkend="libnl"/> (required to use the
74 nl80211 kernel interface. Using <application>wpa_supplicant</application>
75 without <application>libnl</application> has not been tested).</para>
76
77 <bridgehead renderas="sect4">Optional</bridgehead>
78 <para role="optional"><xref linkend="openssl"/>,
79 <!-- using CONFIG_TLS=gnutls fails as
80 src/crypto/tls_gnutls.c uses functions like gnutls_session_get_client_random
81 and gnutls_session_get_server_random which have been removed from current
82 <xref linkend="gnutls"/> -->
83 <ulink url="http://libtom.org/">libtommath</ulink>,
84 <xref linkend="libpcap"/>,
85 <ulink url="http://libdnet.sourceforge.net/">libdnet</ulink>
86 and <xref linkend="dbus"/>.</para>
87
88 <para condition="html" role="usernotes">User Notes:
89 <ulink url="&blfs-wiki;/wpa_supplicant"/></para>
90 </sect2>
91
92 <sect2 role="kernel" id="wpa_supplicant-kernel">
93 <title>Kernel Configuration</title>
94
95 <para>Enable the following options in the kernel configuration
96 and recompile the kernel if necessary:</para>
97
98<screen><literal>[*] Networking support --->
99 [*] Wireless --->
100 [*] cfg80211 - wireless configuration API
101 [*] cfg80211 wireless extensions compatibility
102 [*] Generic IEEE 802.11 Networking Stack (mac80211)
103
104Device Drivers --->
105 [*] Network device support --->
106 [*] Wireless LAN --->
107</literal></screen>
108
109 <para>Select the options that support your hardware:
110 <command>lspci</command> from <xref linkend="pciutils"/> is your friend
111 ;)</para>
112
113 <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
114 <primary sortas="d-wpa_supplicant">wpa_supplicant</primary>
115 </indexterm>
116 </sect2>
117
118 <sect2 role="installation">
119 <title>Installation of wpa_supplicant</title>
120
121 <para>Install <application>wpa_supplicant</application> by running the
122 following commands:</para>
123
124<screen><userinput>patch -p1 &lt; ../wpa_supplicant-0.7.3-libnl-3-fixes-1.patch &amp;&amp;
125cd wpa_supplicant &amp;&amp;
126cat &gt; .config &lt;&lt; "HERE_DOC" &amp;&amp;
127CONFIG_DRIVER_WEXT=y
128CONFIG_EAP_GPSK=y
129CONFIG_EAP_GPSK_SHA256=y
130CONFIG_EAP_GTC=y
131CONFIG_EAP_IKEV2=y
132CONFIG_EAP_LEAP=y
133CONFIG_EAP_MD5=y
134CONFIG_EAP_MSCHAPV2=y
135CONFIG_EAP_OTP=y
136CONFIG_EAP_PAX=y
137CONFIG_EAP_PEAP=y
138CONFIG_EAP_PSK=y
139CONFIG_EAP_TLS=y
140CONFIG_EAP_TTLS=y
141CONFIG_PEERKEY=y
142CONFIG_PKCS12=y
143CONFIG_CTRL_IFACE=y
144CONFIG_READLINE=y
145CONFIG_IPV6=y
146CONFIG_LIBNL20=y
147CONFIG_DRIVER_NL80211=y
148CFLAGS += -I/usr/include/libnl3
149
150# If you have not installed openssl, uncomment the next line:
151# CONFIG_TLS=internal
152
153# If you want to use the internal TLS and have
154# not installed libtommath, uncomment the next line:
155# CONFIG_INTERNAL_LIBTOMMATH=y
156
157# Uncomment the next line if you have a ralink chipset:
158# CONFIG_DRIVER_RALINK=y
159
160# Uncomment the next line if you have an Agere Hermes chipset:
161# CONFIG_DRIVER_HERMES=y
162
163# Uncomment the next line if you have an Atmel chipset:
164# CONFIG_DRIVER_ATMEL=y
165
166# Uncomment the next line if you've installed dbus:
167# CONFIG_CTRL_IFACE_DBUS_NEW=y
168
169# Uncomment the next line if you've installed libpcap and libdnet:
170# CONFIG_L2_PACKET=pcap
171HERE_DOC
172make</userinput></screen>
173
174 <para>This package does not come with a test suite.</para>
175
176 <para>Now, as the <systemitem class="username">root</systemitem>
177 user:</para>
178
179<screen role="root"><userinput>cp wpa_{cli,passphrase,supplicant} /sbin &amp;&amp;
180cp doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5 &amp;&amp;
181cp doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8</userinput></screen>
182 </sect2>
183
184 <sect2 role="commands">
185 <title>Command Explanations</title>
186
187 <para><command>cat > .config ...</command>: This creates a default
188 configuration that should work in most situations. It uses the WEXT kernel
189 driver which most wireless cards seem to use. For an explanation of these
190 options (and to see what other options you could choose) read the
191 <filename>wpa_supplicant/defconfig</filename> file in the source.</para>
192 </sect2>
193
194 <sect2 role="configuration">
195 <title>Configuring wpa_supplicant</title>
196
197 <sect3 id="wpa_supplicant-config">
198 <title>Config File</title>
199 <para><filename>/etc/wpa_supplicant.conf</filename></para>
200
201 <indexterm zone="wpa_supplicant wpa_supplicant-config">
202 <primary
203 sortas="e-etc-wpa_supplicant.conf">/etc/wpa_supplicant.conf</primary>
204 </indexterm>
205 </sect3>
206
207 <sect3>
208 <title>Configuration Information</title>
209
210 <para>To connect to an access point that uses a password you need to put
211 the pre-shared key in <filename>/etc/wpa_supplicant.conf</filename>. Use
212 <command>wpa_passphrase</command> to generate this. SSID is the string
213 that the access point/router transmits to identify itself. As the
214 <systemitem class="username">root</systemitem> user:</para>
215
216<screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/wpa_supplicant.conf</userinput></screen>
217
218 <para>/etc/wpa_supplicant.conf can hold the details of several access
219 points. When you run wpa_supplicant it will scan for the SSIDs it can see
220 and choose the appropriate password to connect.</para>
221
222 <para>If you want to connect to an access point that isn't password
223 protected, put an entry like this in
224 <filename>/etc/wpa_supplicant.conf</filename>. Replace
225 "Some-SSID" with the SSID of the access point/router.</para>
226
227<screen>network={
228 ssid="<replaceable>Some-SSID</replaceable>"
229 key_mgmt=NONE
230}</screen>
231
232 <para>There are many options that you could use to tweak how you connect
233 to each access point. They are described in some detail in the
234 <filename>wpa_supplicant/wpa_supplicant.conf</filename> file in the
235 source.</para>
236
237 <para>To use <command>wpa_cli</command> to control the running
238 wpa_supplicant daemon, add a control interface to
239 <filename>/etc/wpa_supplicant.conf</filename>. As the
240 <systemitem class="username">root</systemitem> user:</para>
241
242<screen role="root"><userinput>echo ctrl_interface=/run/wpa_supplicant &gt;&gt; /etc/wpa_supplicant.conf</userinput></screen>
243 </sect3>
244
245 <sect3>
246 <title>Connecting to an Access Point</title>
247
248 <para>If your router/access point uses DHCP to allocate IP addresses you
249 can install <xref linkend="dhcpcd"/> and use it to connect. As the
250 <systemitem class="username">root</systemitem> user:</para>
251
252<screen role="root"><userinput>wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext
253sleep 2 # let it settle
254dhcpcd</userinput></screen>
255
256 <para>Alternatively, you can use static addresses on your local network.
257 This has the advantage that you can put the hostnames in
258 <filename>/etc/hosts</filename>. Replace 192.168.1.6 with the static
259 address you've chosen. Replace 192.168.1.1 with the local IP address of
260 the access point/router. As the
261 <systemitem class="username">root</systemitem> user:</para>
262
263<screen role="root"><userinput>ip addr add 192.168.1.6 dev wlan0
264ip link set wlan0 up
265wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext
266ip route add 192.168.1.1 dev wlan0
267ip route add default via 192.168.1.1 dev wlan0</userinput></screen>
268
269 <para>Writing a boot script that automates bringing up the network
270 connection is left as an exercise for the reader ;).</para>
271 </sect3>
272 </sect2>
273
274 <sect2 role="content">
275 <title>Contents</title>
276
277 <segmentedlist>
278 <segtitle>Installed Programs</segtitle>
279
280 <seglistitem>
281 <seg>wpa_supplicant, wpa_passphrase and wpa_cli</seg>
282 </seglistitem>
283 </segmentedlist>
284
285 <variablelist>
286 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
287 <?dbfo list-presentation="list"?>
288 <?dbhtml list-presentation="table"?>
289
290 <varlistentry id="wpa_supplicant-prog">
291 <term><command>wpa_supplicant</command></term>
292 <listitem>
293 <para>is a daemon that can connect to a password protected wireless
294 access point.</para>
295 <indexterm zone="wpa_supplicant wpa_supplicant-prog">
296 <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
297 </indexterm>
298 </listitem>
299 </varlistentry>
300
301 <varlistentry id="wpa_passphrase">
302 <term><command>wpa_passphrase</command></term>
303 <listitem>
304 <para>takes an SSID and a password and generates a simple
305 configuration that <command>wpa_supplicant</command> can
306 understand</para>
307 <indexterm zone="wpa_supplicant wpa_passphrase">
308 <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
313 <varlistentry id="wpa_cli">
314 <term><command>wpa_cli</command></term>
315 <listitem>
316 <para>is a command line interface to control a running wpa_supplicant
317 daemon</para>
318 <indexterm zone="wpa_supplicant wpa_cli">
319 <primary sortas="b-wpa_cli">wpa_cli</primary>
320 </indexterm>
321 </listitem>
322 </varlistentry>
323 </variablelist>
324 </sect2>
325</sect1>
Note: See TracBrowser for help on using the repository browser.