1 .\" This manpage has been automatically generated by docbook2man
2 .\" from a DocBook document. This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "WPA_CLI" "8" "10 August 2008" "" ""
9 wpa_cli \- WPA command line client
12 \fBwpa_cli\fR [ \fB-p \fIpath to ctrl sockets\fB\fR ] [ \fB-i \fIifname\fB\fR ] [ \fB-hvB\fR ] [ \fB-a \fIaction file\fB\fR ] [ \fB-P \fIpid file\fB\fR ] [ \fB\fIcommand ...\fB\fR ]
16 wpa_cli is a text-based frontend program for interacting
17 with wpa_supplicant. It is used to query current status, change
18 configuration, trigger events, and request interactive user
21 wpa_cli can show the current authentication status, selected
22 security mode, dot11 and dot1x MIBs, etc. In addition, it can
23 configure some variables like EAPOL state machine parameters and
24 trigger events like reassociation and IEEE 802.1X
25 logoff/logon. wpa_cli provides a user interface to request
26 authentication information, like username and password, if these
27 are not included in the configuration. This can be used to
28 implement, e.g., one-time-passwords or generic token card
29 authentication where the authentication is based on a
30 challenge-response that uses an external device for generating the
33 The control interface of wpa_supplicant can be configured to
34 allow non-root user access (ctrl_interface GROUP= parameter in the
35 configuration file). This makes it possible to run wpa_cli with a
38 wpa_cli supports two modes: interactive and command
39 line. Both modes share the same command set and the main
40 difference is in interactive mode providing access to unsolicited
41 messages (event messages, username/password requests).
43 Interactive mode is started when wpa_cli is executed without
44 including the command as a command line parameter. Commands are
45 then entered on the wpa_cli prompt. In command line mode, the same
46 commands are entered as command line arguments for wpa_cli.
47 .SH "INTERACTIVE AUTHENTICATION PARAMETERS REQUEST"
49 When wpa_supplicant need authentication parameters, like
50 username and password, which are not present in the configuration
51 file, it sends a request message to all attached frontend programs,
52 e.g., wpa_cli in interactive mode. wpa_cli shows these requests
53 with "CTRL-REQ-<type>-<id>:<text>"
54 prefix. <type> is IDENTITY, PASSWORD, or OTP
55 (one-time-password). <id> is a unique identifier for the
56 current network. <text> is description of the request. In
57 case of OTP request, it includes the challenge from the
58 authentication server.
60 The reply to these requests can be given with
61 \fBidentity\fR, \fBpassword\fR, and
62 \fBotp\fR commands. <id> needs to be copied from
63 the matching request. \fBpassword\fR and
64 \fBotp\fR commands can be used regardless of whether
65 the request was for PASSWORD or OTP. The main difference between these
66 two commands is that values given with \fBpassword\fR are
67 remembered as long as wpa_supplicant is running whereas values given
68 with \fBotp\fR are used only once and then forgotten,
69 i.e., wpa_supplicant will ask frontend for a new value for every use.
70 This can be used to implement one-time-password lists and generic token
71 card -based authentication.
73 Example request for password and a matching reply:
78 CTRL-REQ-PASSWORD-1:Password needed for SSID foobar
79 > password 1 mysecretpassword
83 Example request for generic token card challenge-response:
88 CTRL-REQ-OTP-2:Challenge 1235663 needed for SSID foobar
92 .SH "COMMAND ARGUMENTS"
95 Change the path where control sockets should
99 Specify the interface that is being
100 configured. By default, choose the first interface found with
101 a control socket in the socket path.
104 Help. Show a usage message.
107 Show version information.
110 Run as a daemon in the background.
113 Run in daemon mode executing the action file
114 based on events from wpa_supplicant. The specified file will
115 be executed with the first argument set to interface name and
116 second to "CONNECTED" or "DISCONNECTED" depending on the event.
117 This can be used to execute networking tools required to configure
120 Additionally, three environmental variables are available to
121 the file: WPA_CTRL_DIR, WPA_ID, and WPA_ID_STR. WPA_CTRL_DIR
122 contains the absolute path to the ctrl_interface socket. WPA_ID
123 contains the unique network_id identifier assigned to the active
124 network, and WPA_ID_STR contains the content of the id_str option.
127 Set the location of the PID
131 Run a command. The available commands are
132 listed in the next section.
135 The following commands are available:
138 get current WPA/EAPOL/EAP status
141 get MIB variables (dot1x, dot11)
146 \fBinterface [ifname]\fR
147 show interfaces/select interface
149 \fBlevel <debug level>\fR
153 show full wpa_cli license
156 IEEE 802.1X EAPOL state machine logoff
159 IEEE 802.1X EAPOL state machine logon
162 set variables (shows list of variables when run without arguments)
171 force wpa_supplicant to re-read its configuration file
173 \fBpreauthenticate <BSSID>\fR
174 force preauthentication
176 \fBidentity <network id> <identity>\fR
177 configure identity for an SSID
179 \fBpassword <network id> <password>\fR
180 configure password for an SSID
182 \fBpin <network id> <pin>\fR
183 configure pin for an SSID
185 \fBotp <network id> <password>\fR
186 configure one-time-password for an SSID
188 \fBbssid <network id> <BSSID>\fR
189 set preferred BSSID for an SSID
192 list configured networks
195 terminate \fBwpa_supplicant\fR
201 \fBwpa_supplicant\fR(8)
204 wpa_supplicant is copyright (c) 2003-2007,
205 Jouni Malinen <j@w1.fi> and
209 This program is dual-licensed under both the GPL version 2
210 and BSD license. Either license may be used at your option.