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