Catching wpa_supplicant events

Jouni Malinen j at w1.fi
Fri Dec 26 13:39:20 EST 2008


On Fri, Dec 19, 2008 at 04:17:33PM +0100, Nicola Guerrini wrote:

> I'm writing an application that, in a similar way that wpa_cli does,
> connects to the wpa_supplicant deamon and lets the user to configure and
> manage wireless connections.

Do you use the same control interface connection for both sending
commands and receiving unsolicited events (which is what wpa_cli is
doing) or using two connections (which is what wpa_gui is doing)? The
latter is more robust way of receiving the events even if you happen to
be waiting for your own command to be completed at the time when an
event message is sent.

> I'm a little bit confused about unsolicited messages raised by
> wpa_supplicant. What I see is that not all the events that wpa_supplicant
> should raise are raised.
> The only events I can catch are the following:
> 
> CTRL-EVENT-CONNECTED
> CTRL-EVENT-DISCONNECTED
> 
> But, as seen in wpa_ctrl.h and in some log files around internet and in many
> mailing-lists, wpa_supplicant should notify also (and some others that I
> don't care):
> 
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-TERMINATING

These messages should be received in the exact same way.. Have you
verified, e.g., by running wpa_cli, that the other events are being
delivered?

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list