|/
|\ISS

*ARCHIVED*
OFFICIAL SITE

News
Blog

Wiki

Install KISS
FAQ

Package System
Package Manager
Software

Guidestones

Testimonials
Screenshots
Team

Contact
Donate
Website
IRC

GitHub
Git (mirror)
ML (archive)



wiki / software / wpa_supplicant                                  Edit this page

Edited (8a55f77) at 2021-07-02 by Dilyn Corner


WPA_SUPPLICANT [0]
________________________________________________________________________________

wpa_supplicant is a cross-platform supplicant with support for WEP, WPA and WPA2
(IEEE 802.11i). It is suitable for desktops, laptops and embedded systems. It is
the IEEE 802.1X/WPA component that is used in the client stations. It implements
key negotiation with a WPA authenticator and it controls the roaming and IEEE
802.11 authentication/association of the wireless driver.


Configuration
________________________________________________________________________________

Begin by first verifying that you have wpa_supplicant installed:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ kiss b wpa_supplicant && kiss i wpa_supplicant                           |
|                                                                              |
+------------------------------------------------------------------------------+

At this point, you will want to create a wpa_supplicant file to store your
wireless network information and credentials:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ mkdir -p /etc/wpa_supplicant                                             |
|   $ touch /etc/wpa_supplicant/wpa_supplicant.conf                            |
|                                                                              |
+------------------------------------------------------------------------------+

The following wpa_supplicant.conf can be used as a *starter* configuration
file. Remember to replace the BSSID and PASSWORD with your actual wireless
network credentials.

+------------------------------------------------------------------------------+
|                                                                              |
|   # Allow users in the 'wheel' group to control wpa_supplicant               |
|   ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel                     |
|                                                                              |
|   # Make this file writable for wpa_gui / wpa_cli                            |
|   update_config=1                                                            |
|                                                                              |
|   network={                                                                  |
|          ssid="BSSID"                                                        |
|          psk="PASSWORD"                                                      |
|   }                                                                          |
|                                                                              |
+------------------------------------------------------------------------------+

For additional network requirements, refer to the "wpa_supplicant" Arch Linux
Wiki page [0].


Generating a Passphrase
________________________________________________________________________________

NOTE: This section is not required but HIGHLY recommended since storing your
      password in clear text is not good practice.

To allow for quicker connections to a network whose BSSID is already known, we
can make use of wpa_passphrase, a command line tool which generates the minimal
configuration needed by wpa_supplicant:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ wpa_passphrase BSSID PASSWORD                                            |
|                                                                              |
+------------------------------------------------------------------------------+

Replace BSSID and PASSWORD with your actual wireless network credentials. The
output of this command can then be used to replace the network section of the
wpa_supplicant.conf file created in the previous section (just remember to
delete the line containing your password in clear text).


Manual Wireless Connection
________________________________________________________________________________

A new wireless connection can be manually started with the following command:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ wpa_supplicant -B -i INTERFACE \                                         |
|                       -c /etc/wpa_supplicant/wpa_supplicant.conf             |
|                                                                              |
+------------------------------------------------------------------------------+

Replace INTERFACE with your appropriate wireless LAN interface name. After,
use your preferred method to manually obtain an IP address. For example, when
using dhcpcd, run the following:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ dhcpcd INTERFACE                                                         |
|                                                                              |
+------------------------------------------------------------------------------+

The wireless status connection can be verified by reviewing the output of the
following command:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ ifconfig                                                                 |
|                                                                              |
+------------------------------------------------------------------------------+


Managed Wireless Connection via dhcpcd
________________________________________________________________________________

Assuming that dhcpcd is already installed, busybox's runsv can be used to create
new managed services for wpa_supplicant and dhcpcd:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant \                        |
|           /usr/lib/dhcpcd/dhcpcd-hooks/                                      |
|   $ ln -s /etc/sv/dhcpcd/ /var/service                                       |
|                                                                              |
+------------------------------------------------------------------------------+


Tips and Tricks
________________________________________________________________________________

* A list of possible INTERFACE names can be obtained by running the following:

  +----------------------------------------------------------------------------+
  |                                                                            |
  |   $ ls /sys/class/net                                                      |
  |                                                                            |
  +----------------------------------------------------------------------------+

* While testing arguments/configuration it may be helpful to launch
  wpa_supplicant in the foreground (i.e. without the -B option) for better
  debugging messages.


References
________________________________________________________________________________

[0] https://wiki.archlinux.org/index.php/wpa_supplicant


________________________________________________________________________________

This site is an archive of a previous version of KISS's website. The current
version can be found at https://kisslinux.org/.

Dylan Araps    (C) 2019-2020
kiss-community (C) 2020-2021
Dilyn Corner   (C) 2021

Linux(R) is the registered trademark of Linus Torvalds in the U.S. and
other countries.