Welcome to graduate2professional.blogspot.com

Sunday, December 2, 2012

Overview of wpa_cli


Wpa_cli:

The wpa_cli utility is a text-based front-end program for interacting with wpa_supplicant. You can use it to query the current status, change the configuration, trigger events, and request interactive user input. 
 
Prerequisites to using wpa_cli:
A working wireless interface with wpa_supplicant running on it
The wpa_cli utility can show the current authentication status, selected security mode, dot11 and dot1x MIBs, etc. In addition, it can configure some variables like EAPOL state machine parameters and trigger events like reassociation and IEEE 802.1X logoff/logon. 

The wpa_cli utilities supports interactive and command-line modes. Both modes share the same command set, and the main difference is in interactive mode providing access to unsolicited messages (event messages, user name/password requests).


Interactive mode is started when wpa_cli is executed without any parameters on the command line. Commands are then entered from the controlling terminal in response to the wpa_cli prompt.
In command line mode, the same commands are entered as command line arguments.

Syntax:

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


Options:

-p path
Change the path where control sockets should be found.
Eg:wpa_cli -p /var/run/ctrl_interface
 
-i ifname
Specify the interface that is being configured. By default, choose the first interface found with a control socket in the socket path. 
Eg: wpa_cli -iwlan0 
-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.
command
Run a command
  Eg: p2p_find, p2p_connect, p2p_group_add, p2p_group_remove, p2p_peer, p2p_peers, all_sta e.t.c.

No comments:

Post a Comment