wpa_supplicant

用法

wpa_supplicant [-BhKLNptuvW] [-b br_ifname]
[-C ctrl_interface] [-c config file] [-d[d]]
[-f output_file] [-g global ctrl_interface]
[-i ifname] [-P file] [-q[q]]

-B
Run as a daemon in the background.
-b br_ifname
Optional bridge interface name. (Per interface)
-C ctrl_interface
The path to the ctrl_interface socket. (Per interface; used only if -c is not).
-c filename
Path to configuration file. (Per interface)
-d
Increase debugging verbosity (specify -dd for even more).
-f output_file
Send the output to the specified file, instead of to standard output.
-g global ctrl_interface
The path to the global ctrl_interface socket. If you specify this option, you can omit the interface definitions.
-h
Help; display a usage message.
-i ifname
The interface to listen on. Multiple instances of this option can be present, one per interface, separated by an -N option (see below).
-K
Include keys (passwords, etc.) in the debugging output.
-L
Show the license (GPL and BSD).
-N
Start describing a new interface.
-P file
Specify the location of the PID file.
-p
Driver parameters. (Per interface)
-q
Decrease debugging verbosity (specify -qq for even less).
-t
Include the timestamp in debugging messages.
-u
Enable the DBus control interface. If you specify this option, you can omit the interface definitions.
-v
Show version information. 、
-W
Wait for a control interface before starting.

参考文章

​wpa_supplicant​


wpa_cli

用法

wpa_cli  [-p path to ctrl sockets] 
[-i ifname]
[-hvB] [-a action file]
[-P pid file] [command ... ]

-p path
Change the path where control sockets should be found.
-i ifname
Specify the interface that is being configured. By default, choose the first interface found with a control socket in the socket path.
-h
Help. Show a usage message.
-v
Show version information.
-B
Run as a daemon in the background.
-a file
Run in daemon mode executing the action file based on events from wpa_supplicant. The specified file will be executed with the first argument set to the interface name, and the second to CONNECT or DISCONNECT, depending on the event.
-P file
Set the location of the PID file.

supported commands

add_network
Add a network.
bssid network_id BSSID
Set the preferred BSSID for an SSID.
disable_network network_id
Disable a network.
disconnect
Disconnect and wait for a reassociate command before connecting.
enable_network network_id
Enable a network.
get_capability eap/pairwise/group/key_mgmt/proto/auth_alg
Get capabilities.
get_network network_id variable
Get network variables.
help
Display usage information.
identity network_id identity
Configure the identity for an SSID.
interface [ifname]
Show interfaces or select the specified interface.
level debug_level
Change the debugging level.
license
Show the full wpa_cli license.
list_networks
List the configured networks.
logoff
IEEE 802.1X EAPOL state machine logoff.
logon
IEEE 802.1X EAPOL state machine logon.
mib
Get MIB variables (dot1x, dot11).
new_password network_id password
Change the password for an SSID.
otp network_id password
Configure a one-time password for an SSID.
passphrase network_id passphrase
Configure a private key passphrase for an SSID.
password network_id password
Configure a password for an SSID.
pin network_id pin
Configure a pin for an SSID.
pmksa
Show the PMKSA cache.
preauthenticate BSSID
Force preauthentication.
quit
Exit wpa_cli.
reassociate
Force a reassociation.
reconfigure
Force wpa_supplicant to reread its configuration file.
remove_network network_id
Remove a network.
save_config
Save the current configuration.
scan
Request a new BSS scan.
scan_results
Get the latest scan results.
select_network network_id
Select a network (disable others).
set
Set variables (shows list of variables when run without arguments).
set_network network_id variable value
Set network variables (shows list of variables when run without arguments).
status [verbose]
Get the current WPA/EAPOL/EAP status.
terminate
Terminate wpa_supplicant.

例子

wpa_supplicant/wpa_cli_ide


参考文章

​wpa_cli​