[a130a69] | 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
|
---|
[4c869cdd] | 8 | "http://hostap.epitest.fi/releases/wpa_supplicant-&wpa_supplicant-version;.tar.gz">
|
---|
| 9 | <!ENTITY wpa_supplicant-download-ftp " ">
|
---|
[26c1bdd] | 10 | <!ENTITY wpa_supplicant-md5sum "8650f6aa23646ef634402552d0669640">
|
---|
| 11 | <!ENTITY wpa_supplicant-size "1.9 MB">
|
---|
| 12 | <!ENTITY wpa_supplicant-buildsize "16 MB">
|
---|
[a130a69] | 13 | <!ENTITY wpa_supplicant-time "0.1 SBU">
|
---|
| 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="wpa_supplicant" xreflabel="wpa_supplicant-&wpa_supplicant-version;">
|
---|
| 17 | <?dbhtml filename="wpa_supplicant.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
[34a2d053] | 20 | <othername>$LastChangedBy$</othername>
|
---|
| 21 | <date>$Date$</date>
|
---|
[a130a69] | 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">
|
---|
[4c869cdd] | 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>
|
---|
[a130a69] | 42 |
|
---|
[48de78d] | 43 | &lfs72_checked;
|
---|
[5603a81] | 44 |
|
---|
[a130a69] | 45 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 46 | <itemizedlist spacing="compact">
|
---|
| 47 | <listitem>
|
---|
[4c869cdd] | 48 | <para>
|
---|
| 49 | Download (HTTP): <ulink url="&wpa_supplicant-download-http;"/>
|
---|
| 50 | </para>
|
---|
[a130a69] | 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
[4c869cdd] | 53 | <para>
|
---|
| 54 | Download (FTP): <ulink url="&wpa_supplicant-download-ftp;"/>
|
---|
| 55 | </para>
|
---|
[a130a69] | 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
[4c869cdd] | 58 | <para>
|
---|
| 59 | Download MD5 sum: &wpa_supplicant-md5sum;
|
---|
| 60 | </para>
|
---|
[a130a69] | 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
[4c869cdd] | 63 | <para>
|
---|
| 64 | Download size: &wpa_supplicant-size;
|
---|
| 65 | </para>
|
---|
[a130a69] | 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
[4c869cdd] | 68 | <para>
|
---|
| 69 | Estimated disk space required: &wpa_supplicant-buildsize;
|
---|
| 70 | </para>
|
---|
[a130a69] | 71 | </listitem>
|
---|
| 72 | <listitem>
|
---|
[4c869cdd] | 73 | <para>
|
---|
| 74 | Estimated build time: &wpa_supplicant-time;
|
---|
| 75 | </para>
|
---|
[a130a69] | 76 | </listitem>
|
---|
| 77 | </itemizedlist>
|
---|
[4c869cdd] | 78 |
|
---|
| 79 | <bridgehead renderas="sect3">WPA Supplicant Dependencies</bridgehead>
|
---|
| 80 |
|
---|
| 81 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 82 | <para role="recommended">
|
---|
| 83 | <xref linkend="libnl"/> and
|
---|
| 84 | <!-- From defconfig: WEXT is deprecated in the current Linux kernel
|
---|
| 85 | version and no new functionality is added to it. nl80211-based
|
---|
| 86 | interface is the new replacement for WEXT -->
|
---|
| 87 | <xref linkend="openssl"/>
|
---|
| 88 | <!-- For EAP-* Methods -->
|
---|
| 89 | </para>
|
---|
[a130a69] | 90 |
|
---|
| 91 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[26c1bdd] | 92 | <para role="optional">
|
---|
[4c869cdd] | 93 | <xref linkend="dbus"/> and
|
---|
| 94 | <xref linkend="libxml2"/>
|
---|
| 95 | <!-- D-Bus and libxml2 are required for D-Bus Interface which
|
---|
| 96 | NetworkManager uses.
|
---|
| 97 |
|
---|
| 98 | WPA Supplicant uses internal Linux specific implemenation
|
---|
| 99 | for L2_PACKET, libpcap or libdnet are only there for portability
|
---|
| 100 | with other OS'es. See README if you don't believe me. -->
|
---|
[26c1bdd] | 101 | </para>
|
---|
[a130a69] | 102 |
|
---|
[4c869cdd] | 103 | <!-- TODO: Write instructions for building wpa_gui -->
|
---|
| 104 |
|
---|
[a130a69] | 105 | <para condition="html" role="usernotes">User Notes:
|
---|
[4c869cdd] | 106 | <ulink url="&blfs-wiki;/wpa_supplicant"/>
|
---|
| 107 | </para>
|
---|
[a130a69] | 108 | </sect2>
|
---|
| 109 |
|
---|
| 110 | <sect2 role="kernel" id="wpa_supplicant-kernel">
|
---|
| 111 | <title>Kernel Configuration</title>
|
---|
| 112 |
|
---|
[4c869cdd] | 113 | <para>
|
---|
| 114 | Enable the following options in the kernel configuration
|
---|
| 115 | and recompile the kernel if necessary:
|
---|
| 116 | </para>
|
---|
[a130a69] | 117 |
|
---|
| 118 | <screen><literal>[*] Networking support --->
|
---|
| 119 | [*] Wireless --->
|
---|
| 120 | [*] cfg80211 - wireless configuration API
|
---|
| 121 | [*] cfg80211 wireless extensions compatibility
|
---|
| 122 | [*] Generic IEEE 802.11 Networking Stack (mac80211)
|
---|
| 123 |
|
---|
| 124 | Device Drivers --->
|
---|
| 125 | [*] Network device support --->
|
---|
| 126 | [*] Wireless LAN --->
|
---|
| 127 | </literal></screen>
|
---|
| 128 |
|
---|
[4c869cdd] | 129 | <para>
|
---|
| 130 | Select the options that support your hardware:
|
---|
| 131 | <command>lspci</command> from <xref linkend="pciutils"/> can be used to
|
---|
| 132 | view your hardware configuration.
|
---|
| 133 | </para>
|
---|
[a130a69] | 134 |
|
---|
| 135 | <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
|
---|
| 136 | <primary sortas="d-wpa_supplicant">wpa_supplicant</primary>
|
---|
| 137 | </indexterm>
|
---|
| 138 | </sect2>
|
---|
| 139 |
|
---|
| 140 | <sect2 role="installation">
|
---|
[4c869cdd] | 141 | <title>Installation of WPA Supplicant</title>
|
---|
| 142 |
|
---|
| 143 | <para>
|
---|
| 144 | First you will need to create an initial configuration file for the
|
---|
| 145 | build process. You can read <filename>wpa_supplicant/README</filename>
|
---|
| 146 | and <filename>wpa_supplicant/defconfig</filename> for the explanation
|
---|
| 147 | of the following options as well as other options that can be used.
|
---|
| 148 | Create a build configuration file that should work for standard WiFi
|
---|
| 149 | setups by running the following command:
|
---|
| 150 | </para>
|
---|
[a130a69] | 151 |
|
---|
[4c869cdd] | 152 | <screen><userinput>cat > wpa_supplicant/.config << "EOF"
|
---|
| 153 | CONFIG_BACKEND=file
|
---|
| 154 | CONFIG_CTRL_IFACE=y
|
---|
| 155 | CONFIG_DRIVER_NL80211=y
|
---|
[a130a69] | 156 | CONFIG_DRIVER_WEXT=y
|
---|
[4c869cdd] | 157 | CONFIG_DRIVER_WIRED=y
|
---|
[a130a69] | 158 | CONFIG_EAP_GTC=y
|
---|
| 159 | CONFIG_EAP_LEAP=y
|
---|
| 160 | CONFIG_EAP_MD5=y
|
---|
| 161 | CONFIG_EAP_MSCHAPV2=y
|
---|
| 162 | CONFIG_EAP_OTP=y
|
---|
| 163 | CONFIG_EAP_PEAP=y
|
---|
| 164 | CONFIG_EAP_TLS=y
|
---|
| 165 | CONFIG_EAP_TTLS=y
|
---|
[4c869cdd] | 166 | CONFIG_IEEE8021X_EAPOL=y
|
---|
| 167 | CONFIG_IPV6=y
|
---|
| 168 | CONFIG_LIBNL32=y
|
---|
[a130a69] | 169 | CONFIG_PEERKEY=y
|
---|
| 170 | CONFIG_PKCS12=y
|
---|
| 171 | CONFIG_READLINE=y
|
---|
[4c869cdd] | 172 | CONFIG_SMARTCARD=y
|
---|
| 173 | CONFIG_WPS=y
|
---|
[ba3aa2bc] | 174 | CFLAGS += -I/usr/include/libnl3
|
---|
[4c869cdd] | 175 | EOF</userinput></screen>
|
---|
| 176 |
|
---|
| 177 | <para>
|
---|
| 178 | If you wish to use <application>WPA Supplicant</application> with
|
---|
| 179 | <xref linkend="NetworkManager"/>, make sure that you have installed
|
---|
| 180 | <xref linkend="dbus"/> and <xref linkend="libxml2"/>, then add
|
---|
| 181 | following options to the <application>WPA Supplicant</application>
|
---|
| 182 | build configuration file by running the following command:
|
---|
| 183 | </para>
|
---|
[26c1bdd] | 184 |
|
---|
[4c869cdd] | 185 | <screen><userinput>cat >> wpa_supplicant/.config << "EOF"
|
---|
| 186 | CONFIG_CTRL_IFACE_DBUS=y
|
---|
| 187 | CONFIG_CTRL_IFACE_DBUS_NEW=y
|
---|
| 188 | CONFIG_CTRL_IFACE_DBUS_INTRO=y
|
---|
| 189 | EOF</userinput></screen>
|
---|
[a130a69] | 190 |
|
---|
[4c869cdd] | 191 | <para>
|
---|
| 192 | Install <application>WPA Supplicant</application> by running the
|
---|
| 193 | following commands:
|
---|
| 194 | </para>
|
---|
[a130a69] | 195 |
|
---|
[4c869cdd] | 196 | <screen><userinput>cd wpa_supplicant &&
|
---|
| 197 | make BINDIR=/sbin LIBDIR=/lib</userinput></screen>
|
---|
[a130a69] | 198 |
|
---|
[4c869cdd] | 199 | <para>
|
---|
| 200 | This package does not come with a test suite.
|
---|
| 201 | </para>
|
---|
[a130a69] | 202 |
|
---|
[4c869cdd] | 203 | <para>
|
---|
| 204 | Now, as the <systemitem class="username">root</systemitem>
|
---|
| 205 | user:
|
---|
| 206 | </para>
|
---|
[a130a69] | 207 |
|
---|
[4c869cdd] | 208 | <screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /sbin &&
|
---|
| 209 | install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5 &&
|
---|
| 210 | install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8</userinput></screen>
|
---|
[a130a69] | 211 |
|
---|
[4c869cdd] | 212 | <para>
|
---|
| 213 | If you have built <application>WPA Supplicant</application> with
|
---|
| 214 | <application>D-Bus</application> support, you will need to install
|
---|
| 215 | <application>D-Bus</application> configuration files. Install them
|
---|
| 216 | by running the following commands as the
|
---|
| 217 | <systemitem class="username">root</systemitem> user:
|
---|
| 218 | </para>
|
---|
[a130a69] | 219 |
|
---|
[4c869cdd] | 220 | <screen role="root"><userinput>install -v -m644 dbus/fi.{epitest.hostap.WPASupplicant,w1.wpa_supplicant1}.service \
|
---|
| 221 | /usr/share/dbus-1/system-services &&
|
---|
[3e9cedf1] | 222 | install -v -m644 dbus/dbus-wpa_supplicant.conf /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
|
---|
[a130a69] | 223 |
|
---|
[4c869cdd] | 224 | <note>
|
---|
| 225 | <para>
|
---|
[325113f8] | 226 | You will need to restart system <application>D-Bus</application> daemon
|
---|
| 227 | before you can use <application>WPA Supplicant</application>
|
---|
| 228 | <application>D-Bus</application> interface.
|
---|
[4c869cdd] | 229 | </para>
|
---|
| 230 | </note>
|
---|
[a130a69] | 231 |
|
---|
| 232 | </sect2>
|
---|
| 233 |
|
---|
| 234 | <sect2 role="configuration">
|
---|
| 235 | <title>Configuring wpa_supplicant</title>
|
---|
| 236 |
|
---|
| 237 | <sect3 id="wpa_supplicant-config">
|
---|
| 238 | <title>Config File</title>
|
---|
| 239 | <para><filename>/etc/wpa_supplicant.conf</filename></para>
|
---|
| 240 |
|
---|
| 241 | <indexterm zone="wpa_supplicant wpa_supplicant-config">
|
---|
| 242 | <primary
|
---|
| 243 | sortas="e-etc-wpa_supplicant.conf">/etc/wpa_supplicant.conf</primary>
|
---|
| 244 | </indexterm>
|
---|
| 245 | </sect3>
|
---|
| 246 |
|
---|
| 247 | <sect3>
|
---|
| 248 | <title>Configuration Information</title>
|
---|
| 249 |
|
---|
[4c869cdd] | 250 | <para>
|
---|
| 251 | To connect to an access point that uses a password you need to put
|
---|
| 252 | the pre-shared key in <filename>/etc/wpa_supplicant.conf</filename>. Use
|
---|
| 253 | <command>wpa_passphrase</command> to generate this. SSID is the string
|
---|
| 254 | that the access point/router transmits to identify itself. As the
|
---|
| 255 | <systemitem class="username">root</systemitem> user:
|
---|
| 256 | </para>
|
---|
[a130a69] | 257 |
|
---|
| 258 | <screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> > /etc/wpa_supplicant.conf</userinput></screen>
|
---|
| 259 |
|
---|
[4c869cdd] | 260 | <para>
|
---|
| 261 | <filename>/etc/wpa_supplicant.conf</filename> can hold the details of
|
---|
| 262 | several access points. When you run <command>wpa_supplicant</command>
|
---|
| 263 | it will scan for the SSIDs it can see and choose the appropriate
|
---|
| 264 | password to connect.
|
---|
| 265 | </para>
|
---|
[a130a69] | 266 |
|
---|
[4c869cdd] | 267 | <para>
|
---|
| 268 | If you want to connect to an access point that isn't password
|
---|
| 269 | protected, put an entry like this in
|
---|
| 270 | <filename>/etc/wpa_supplicant.conf</filename>. Replace
|
---|
| 271 | "Some-SSID" with the SSID of the access point/router.
|
---|
| 272 | </para>
|
---|
[a130a69] | 273 |
|
---|
| 274 | <screen>network={
|
---|
| 275 | ssid="<replaceable>Some-SSID</replaceable>"
|
---|
| 276 | key_mgmt=NONE
|
---|
| 277 | }</screen>
|
---|
| 278 |
|
---|
[4c869cdd] | 279 | <para>
|
---|
| 280 | There are many options that you could use to tweak how you connect
|
---|
| 281 | to each access point. They are described in some detail in the
|
---|
| 282 | <filename>wpa_supplicant/wpa_supplicant.conf</filename> file in the
|
---|
| 283 | source tree.
|
---|
| 284 | </para>
|
---|
[a130a69] | 285 |
|
---|
[4c869cdd] | 286 | <para>
|
---|
| 287 | To use <command>wpa_cli</command> to control the running
|
---|
| 288 | <command>>wpa_supplicant</command> daemon, add a control interface to
|
---|
| 289 | <filename>/etc/wpa_supplicant.conf</filename> as the
|
---|
| 290 | <systemitem class="username">root</systemitem> user:
|
---|
| 291 | </para>
|
---|
[a130a69] | 292 |
|
---|
| 293 | <screen role="root"><userinput>echo ctrl_interface=/run/wpa_supplicant >> /etc/wpa_supplicant.conf</userinput></screen>
|
---|
| 294 | </sect3>
|
---|
| 295 |
|
---|
| 296 | <sect3>
|
---|
| 297 | <title>Connecting to an Access Point</title>
|
---|
| 298 |
|
---|
[4c869cdd] | 299 | <para>
|
---|
| 300 | If your router/access point uses DHCP to allocate IP addresses you
|
---|
| 301 | can install <xref linkend="dhcpcd"/> and use it to connect. As the
|
---|
| 302 | <systemitem class="username">root</systemitem> user:
|
---|
| 303 | </para>
|
---|
[a130a69] | 304 |
|
---|
[325113f8] | 305 | <screen role="root"><userinput>wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
|
---|
[a130a69] | 306 | sleep 2 # let it settle
|
---|
| 307 | dhcpcd</userinput></screen>
|
---|
| 308 |
|
---|
[4c869cdd] | 309 | <para>
|
---|
| 310 | Alternatively, you can use static addresses on your local network.
|
---|
| 311 | This has the advantage that you can put the hostnames in
|
---|
| 312 | <filename>/etc/hosts</filename>. Replace 192.168.1.6 with the static
|
---|
| 313 | address you've chosen. Replace 192.168.1.1 with the local IP address of
|
---|
| 314 | the access point/router. Run the following commands as the
|
---|
| 315 | <systemitem class="username">root</systemitem> user:
|
---|
| 316 | </para>
|
---|
[a130a69] | 317 |
|
---|
| 318 | <screen role="root"><userinput>ip addr add 192.168.1.6 dev wlan0
|
---|
| 319 | ip link set wlan0 up
|
---|
[325113f8] | 320 | wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
|
---|
[a130a69] | 321 | ip route add 192.168.1.1 dev wlan0
|
---|
| 322 | ip route add default via 192.168.1.1 dev wlan0</userinput></screen>
|
---|
| 323 |
|
---|
| 324 | </sect3>
|
---|
| 325 | </sect2>
|
---|
| 326 |
|
---|
| 327 | <sect2 role="content">
|
---|
| 328 | <title>Contents</title>
|
---|
| 329 |
|
---|
| 330 | <segmentedlist>
|
---|
| 331 | <segtitle>Installed Programs</segtitle>
|
---|
[26c1bdd] | 332 | <segtitle>Installed Libraries</segtitle>
|
---|
| 333 | <segtitle>Installed Directories</segtitle>
|
---|
| 334 |
|
---|
[a130a69] | 335 | <seglistitem>
|
---|
| 336 | <seg>wpa_supplicant, wpa_passphrase and wpa_cli</seg>
|
---|
[26c1bdd] | 337 | <seg>none</seg>
|
---|
| 338 | <seg>none</seg>
|
---|
[a130a69] | 339 | </seglistitem>
|
---|
| 340 | </segmentedlist>
|
---|
| 341 |
|
---|
| 342 | <variablelist>
|
---|
| 343 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 344 | <?dbfo list-presentation="list"?>
|
---|
| 345 | <?dbhtml list-presentation="table"?>
|
---|
| 346 |
|
---|
| 347 | <varlistentry id="wpa_supplicant-prog">
|
---|
| 348 | <term><command>wpa_supplicant</command></term>
|
---|
| 349 | <listitem>
|
---|
[4c869cdd] | 350 | <para>
|
---|
| 351 | is a daemon that can connect to a password protected wireless
|
---|
| 352 | access point.
|
---|
| 353 | </para>
|
---|
[a130a69] | 354 | <indexterm zone="wpa_supplicant wpa_supplicant-prog">
|
---|
| 355 | <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
|
---|
| 356 | </indexterm>
|
---|
| 357 | </listitem>
|
---|
| 358 | </varlistentry>
|
---|
| 359 |
|
---|
| 360 | <varlistentry id="wpa_passphrase">
|
---|
| 361 | <term><command>wpa_passphrase</command></term>
|
---|
| 362 | <listitem>
|
---|
[4c869cdd] | 363 | <para>
|
---|
| 364 | takes an SSID and a password and generates a simple
|
---|
| 365 | configuration that <command>wpa_supplicant</command> can
|
---|
| 366 | understand.
|
---|
| 367 | </para>
|
---|
[a130a69] | 368 | <indexterm zone="wpa_supplicant wpa_passphrase">
|
---|
| 369 | <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
|
---|
| 370 | </indexterm>
|
---|
| 371 | </listitem>
|
---|
| 372 | </varlistentry>
|
---|
| 373 |
|
---|
| 374 | <varlistentry id="wpa_cli">
|
---|
| 375 | <term><command>wpa_cli</command></term>
|
---|
| 376 | <listitem>
|
---|
[4c869cdd] | 377 | <para>
|
---|
| 378 | is a command line interface used to control a running
|
---|
| 379 | <command>wpa_supplicant</command> daemon.
|
---|
| 380 | </para>
|
---|
[a130a69] | 381 | <indexterm zone="wpa_supplicant wpa_cli">
|
---|
| 382 | <primary sortas="b-wpa_cli">wpa_cli</primary>
|
---|
| 383 | </indexterm>
|
---|
| 384 | </listitem>
|
---|
| 385 | </varlistentry>
|
---|
[4c869cdd] | 386 |
|
---|
[a130a69] | 387 | </variablelist>
|
---|
[4c869cdd] | 388 |
|
---|
[a130a69] | 389 | </sect2>
|
---|
[4c869cdd] | 390 |
|
---|
[a130a69] | 391 | </sect1>
|
---|