Ignore:
Timestamp:
05/20/2012 10:13:27 PM (12 years ago)
Author:
Krejzi <krejzi@…>
Branches:
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
Children:
f509830a
Parents:
11f60725
Message:

Add instructions for installing WPA Supplicant D-Bus interface.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • networking/netprogs/wpa_supplicant.xml

    r11f60725 r4c869cdd  
    66
    77  <!ENTITY wpa_supplicant-download-http
    8   "http://hostap.epitest.fi/releases/wpa_supplicant-&wpa_supplicant-version;.tar.gz">
     8           "http://hostap.epitest.fi/releases/wpa_supplicant-&wpa_supplicant-version;.tar.gz">
     9  <!ENTITY wpa_supplicant-download-ftp  " ">
    910  <!ENTITY wpa_supplicant-md5sum        "8650f6aa23646ef634402552d0669640">
    1011  <!ENTITY wpa_supplicant-size          "1.9 MB">
     
    2829
    2930  <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>
     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>
    3942
    4043    &lfs71_checked;
     
    4346    <itemizedlist spacing="compact">
    4447      <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>
     48        <para>
     49          Download (HTTP): <ulink url="&wpa_supplicant-download-http;"/>
     50        </para>
     51      </listitem>
     52      <listitem>
     53        <para>
     54          Download (FTP): <ulink url="&wpa_supplicant-download-ftp;"/>
     55        </para>
     56      </listitem>
     57      <listitem>
     58        <para>
     59          Download MD5 sum: &wpa_supplicant-md5sum;
     60        </para>
     61      </listitem>
     62      <listitem>
     63        <para>
     64          Download size: &wpa_supplicant-size;
     65        </para>
     66      </listitem>
     67      <listitem>
     68        <para>
     69          Estimated disk space required: &wpa_supplicant-buildsize;
     70        </para>
     71      </listitem>
     72      <listitem>
     73        <para>
     74          Estimated build time: &wpa_supplicant-time;
     75        </para>
    5976      </listitem>
    6077    </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>
     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>
    7190
    7291    <bridgehead renderas="sect4">Optional</bridgehead>
    7392    <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>
     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. -->
     101    </para>
     102
     103    <!-- TODO: Write instructions for building wpa_gui -->
    85104
    86105    <para condition="html" role="usernotes">User Notes:
    87     <ulink url="&blfs-wiki;/wpa_supplicant"/></para>
     106      <ulink url="&blfs-wiki;/wpa_supplicant"/>
     107    </para>
    88108  </sect2>
    89109
     
    91111    <title>Kernel Configuration</title>
    92112
    93     <para>Enable the following options in the kernel configuration
    94     and recompile the kernel if necessary:</para>
     113    <para>
     114      Enable the following options in the kernel configuration
     115      and recompile the kernel if necessary:
     116    </para>
    95117
    96118<screen><literal>[*] Networking support  --->
     
    105127</literal></screen>
    106128
    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>
     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>
    110134
    111135    <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
     
    115139
    116140  <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 &amp;&amp;
    123 cat &gt; .config &lt;&lt; "HERE_DOC"
     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>
     151
     152<screen><userinput>cat &gt; wpa_supplicant/.config &lt;&lt; "EOF"
     153CONFIG_BACKEND=file
     154CONFIG_CTRL_IFACE=y
     155CONFIG_DRIVER_NL80211=y
    124156CONFIG_DRIVER_WEXT=y
    125 CONFIG_EAP_GPSK=y
    126 CONFIG_EAP_GPSK_SHA256=y
     157CONFIG_DRIVER_WIRED=y
    127158CONFIG_EAP_GTC=y
    128 CONFIG_EAP_IKEV2=y
    129159CONFIG_EAP_LEAP=y
    130160CONFIG_EAP_MD5=y
    131161CONFIG_EAP_MSCHAPV2=y
    132162CONFIG_EAP_OTP=y
    133 CONFIG_EAP_PAX=y
    134163CONFIG_EAP_PEAP=y
    135 CONFIG_EAP_PSK=y
    136164CONFIG_EAP_TLS=y
    137165CONFIG_EAP_TTLS=y
     166CONFIG_IEEE8021X_EAPOL=y
     167CONFIG_IPV6=y
     168CONFIG_LIBNL32=y
    138169CONFIG_PEERKEY=y
    139170CONFIG_PKCS12=y
    140 CONFIG_CTRL_IFACE=y
    141171CONFIG_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 &amp;&amp;
    179 cp doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5 &amp;&amp;
    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>
     172CONFIG_SMARTCARD=y
     173CONFIG_WPS=y
     174EOF</userinput></screen>
     175
     176    <para>
     177      If you wish to use <application>WPA Supplicant</application> with
     178      <xref linkend="NetworkManager"/>, make sure that you have installed
     179      <xref linkend="dbus"/> and <xref linkend="libxml2"/>, then add
     180      following options to the <application>WPA Supplicant</application>
     181      build configuration file by running the following command:
     182    </para>
     183
     184<screen><userinput>cat &gt;&gt; wpa_supplicant/.config &lt;&lt; "EOF"
     185CONFIG_CTRL_IFACE_DBUS=y
     186CONFIG_CTRL_IFACE_DBUS_NEW=y
     187CONFIG_CTRL_IFACE_DBUS_INTRO=y
     188EOF</userinput></screen>
     189
     190    <para>
     191      Install <application>WPA Supplicant</application> by running the
     192      following commands:
     193    </para>
     194
     195<screen><userinput>cd wpa_supplicant &amp;&amp;
     196make BINDIR=/sbin LIBDIR=/lib</userinput></screen>
     197
     198    <para>
     199      This package does not come with a test suite.
     200    </para>
     201
     202    <para>
     203      Now, as the <systemitem class="username">root</systemitem>
     204      user:
     205    </para>
     206
     207<screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /sbin &amp;&amp;
     208install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5 &amp;&amp;
     209install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8</userinput></screen>
     210
     211    <para>
     212      If you have built <application>WPA Supplicant</application> with
     213      <application>D-Bus</application> support, you will need to install
     214      <application>D-Bus</application> configuration files. Install them
     215      by running the following commands as the
     216      <systemitem class="username">root</systemitem> user:
     217    </para>
     218
     219<screen role="root"><userinput>install -v -m644 dbus/fi.{epitest.hostap.WPASupplicant,w1.wpa_supplicant1}.service \
     220                 /usr/share/dbus-1/system-services &amp;&amp;
     221install -v -m644 dbus/dbus-wpa_supplicant.conf /etc/dbus-1/system.d/wpa_supplicant.conf
     222</userinput></screen>
     223
     224    <note>
     225      <para>
     226        You will need to restart system <application>D-Bus</application> daemon before you
     227        can use <application>WPA Supplicant</application> <application>D-Bus</application>
     228        interface.
     229      </para>
     230    </note>
     231
    191232  </sect2>
    192233
     
    207248      <title>Configuration Information</title>
    208249
    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>
     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>
    214257
    215258<screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/wpa_supplicant.conf</userinput></screen>
    216259
    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>
     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>
     266
     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>
    225273
    226274<screen>network={
     
    229277}</screen>
    230278
    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>
     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>
     285
     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>
    240292
    241293<screen role="root"><userinput>echo ctrl_interface=/run/wpa_supplicant &gt;&gt; /etc/wpa_supplicant.conf</userinput></screen>
     
    245297      <title>Connecting to an Access Point</title>
    246298
    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>
     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>
    250304
    251305<screen role="root"><userinput>wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext
     
    253307dhcpcd</userinput></screen>
    254308
    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>
     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>
    261317
    262318<screen role="root"><userinput>ip addr add 192.168.1.6 dev wlan0
     
    292348        <term><command>wpa_supplicant</command></term>
    293349        <listitem>
    294           <para>is a daemon that can connect to a password protected wireless
    295           access point.</para>
     350          <para>
     351            is a daemon that can connect to a password protected wireless
     352            access point.
     353          </para>
    296354          <indexterm zone="wpa_supplicant wpa_supplicant-prog">
    297355            <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
     
    303361        <term><command>wpa_passphrase</command></term>
    304362        <listitem>
    305           <para>takes an SSID and a password and generates a simple
    306           configuration that <command>wpa_supplicant</command> can
    307           understand.</para>
     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>
    308368          <indexterm zone="wpa_supplicant wpa_passphrase">
    309369            <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
     
    315375        <term><command>wpa_cli</command></term>
    316376        <listitem>
    317           <para>is a command line interface to control a running wpa_supplicant
    318           daemon.</para>
     377          <para>
     378            is a command line interface used to control a running
     379            <command>wpa_supplicant</command> daemon.
     380          </para>
    319381          <indexterm zone="wpa_supplicant wpa_cli">
    320382            <primary sortas="b-wpa_cli">wpa_cli</primary>
     
    322384        </listitem>
    323385      </varlistentry>
     386
    324387    </variablelist>
    325   </sect2>
     388
     389  </sect2>
     390
    326391</sect1>
Note: See TracChangeset for help on using the changeset viewer.