sudo wpa_supplicant [-BddfhKLqqsTtuvW] [-i ifname] [-c config_file]
[-D driver]
[-P PID_file] [-f output_file]
Start with sudo head -30 /etc/wpa_supplicant/wpa_supplicant
Some options have global scope.
Option groups for different interfaces must be separated by -N
filenames should be full ie not relative.
-W |
Driver backends that may be used with -D (driver) see wpa_supplicant -h.
wext Linux wireless extensions (generic).
wired wpa_supplicant wired Ethernet driver
roboswitch wpa_supplicant Broadcom switch driver
bsd BSD 802.11 support (Atheros, etc.).
ndis Windows NDIS driver.
> cat /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service [Unit] Description=WPA supplicant Before=network.target After=dbus.service Wants=network.target [Service] Type=dbus BusName=fi.w1.wpa_supplicant1 ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant maybe add -d # Enable DBus -^ ^ ^--Override the ctrl_interface # '-- syslog [Install] WantedBy=multi-user.target Alias=dbus-fi.w1.wpa_supplicant1.service > sudo ls /run/wpa_supplicant p2p-dev-wlan0 wlan0The only syslog message is :
daemon.notice wpa_supplicant[304]: Successfully initialized wpa_supplicant
sudo wpa_supplicant -B -c/etc/wpa_supplicant.conf -i wlan0 # fork to background.Start on foreground with debugging :
log=/tmp/wpa.`date +%y%m%d.%H%M`.log sudo wpa_supplicant -d -c/etc/wpa_supplicant/wpa_supplicant.conf -i wlan0 > $logIf the specific driver wrapper is not known beforehand, it is possible to specify multiple comma separated driver wrappers on the the first driver wrapper that is able to initialize the interface.
sudo wpa_supplicant -Dnl80211,wext -c/etc/wpa_supplicant.conf -iwlan0Control multiple interfaces (radios) by running one process for each interface or
-N. Example:
sudo wpa_supplicant \ -c wpa1.conf -i wlan0 -D nl80211 \ -N \ -c wpa2.conf -i ath0 -D wext
wpa_supplicant program that interacts with the network interface.
wpa_supplicant.conf configuration file
wpa_cli client program that provides a high-level interface to daemon.
wpa_passphrase utility to construct wpa_supplicant.conf files including encrypted passwords.
wpa_supplicant.conf
# ANY error here will prevent the wifi network from starting
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="piland"
psk="secretPassword"
}
network={
ssid="homeRouter"
psk="verizonpass"
}
sudo wpa_supplicant -i wlan0 -c/etc/wpa_supplicant.conf -dexample output
sudo wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -d
sudo wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
.config), specify which interface to use by including -Ddriver name.
MODE="Managed" and WPA="y" to the network scheme in /etc/pcmcia/wireless.opts.
/etc/pcmcia/wireless:
if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
/usr/local/bin/wpa_supplicant -B -c/etc/wpa_supplicant.conf -i$DEVICE
fi
/etc/pcmcia/wireless:
if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
killall wpa_supplicant
fi
wpa_supplicant when the card is plugged in.
Unauthorized use of the network is much easier.
Unauthorized users can passively monitor a wireless network and capture all transmitted frames.
sudo wpa_cli [-p path to ctrl sockets] [-g path to global ctrl_interface socket] [-i ifname]
[ -hvB] [-a actionfile] [-P
pid file] [-G ping interval] [ command … ]
Interacts with wpa_supplicant to query status, change configuration, trigger events and request interactive user input.
Shows the authentication status, selected security mode, dot11 and dot1x MIBs, etc.
Configure variables like EAPOL and trigger events like reassociation and IEEE 802.1X logoff/logon.
Request authentication information, like username and password, if these are not included in the configuration.
Implement, one-time-passwords or generic token card authentication where the authentication is based on a challenge-response that uses an external device for generating the response.
Configure to allow non-root user access (ctrl_interface GROUP= in configuration file).
Interactive mode is started when invoked without command
type is IDENTITY, PASSWORD, or OTP (one-time-password)
id is a unique identifier for the current network.
text is description of the request. OTP request, it includes the challenge from the authentication server.
The reply to these requests can be given with identity, password, and otp commands.id needs to be copied from the matching request.
password and otp commands can be used regardless of whether the request was for PASSWORD or OTP.
The difference is that values given with password are remembered as long as wpa_supplicant is running whereas values
given with otp are used only once and then forgotten, i.e., wpa_supplicant will ask frontend for a new value for every use. This
can be used to implement one-time-password lists and generic token card -based authentication.
Example request for password and a matching reply:
CTRL-REQ-PASSWORD-1:Password needed for SSID foobar > password 1 mysecretpasswordExample request for generic token card challenge-response:
CTRL-REQ-OTP-2:Challenge 1235663 needed for SSID foobar > otp 2 9876
-p path |
list_networks |
Host Access Point configuration at hostapd.conf
Minimalyinterface=wlan0
driver=nl80211
ssid=RuuviCollector 1.1
channel=1
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=ruuvibe***