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