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