wpa_cli -a is calling the action script only for connect, not for disconnect
Jouni Malinen
j
Fri Jan 16 09:04:41 PST 2009
On Thu, Jan 15, 2009 at 06:14:32PM -0700, Shawn Rutledge wrote:
> This is for an embedded system I'm working on. I added some extra
> printfs to try to debug this. I'm testing by using wpa_gui to connect
> and disconnect from the AP, and I wanted to do the scripting to run
> dhcpcd when connected and to kill it when disconnected.
Which version of wpa_supplicant are you using?
> It's looking like there is no notification coming across the socket
> when wlan0 is disconnected from the AP... but then again, wpa_gui
> notices somehow, and changes its Status: line accordingly; so why
> doesn't wpa_cli notice it?
There is supposed to be disconnect message and this works in my test.
When I'm using wpa_cli to connect and disconnect while running wpa_cli
-a in the background, I see following output in the action script:
$ ./wpa_cli -a $PWD/action.sh -p Ctrl
Selected interface 'sta0'
ACTION: sta0 CONNECTED
ACTION: sta0 DISCONNECTED
ACTION: sta0 CONNECTED
ACTION: sta0 DISCONNECTED
ACTION: sta0 CONNECTED
ACTION: sta0 DISCONNECTED
The disconnect event generation shows up in wpa_supplicant debug log:
RX ctrl_iface - hexdump_ascii(len=10):
44 49 53 43 4f 4e 4e 45 43 54 DISCONNECT
wpa_driver_test_disassociate addr=02:b8:a6:62:08:5a reason_code=3
Setting scan request: 0 sec 100000 usec
Added BSSID 02:b8:a6:62:08:5a into blacklist
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
(that last line is sent to wpa_cli, too)
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list