wps_pbc "alert" event?

Jouni Malinen j
Sun Oct 12 07:57:54 PDT 2014


On Wed, Sep 17, 2014 at 07:06:23PM -0700, John Finley wrote:
> What I want is for the button push on the device (wpa_cli wps_pbc) to be
> noticed _automatically_ on the AP, such that I can prompt an operator to
> accept the pairing or not. In other words, the only user-initiated action
> to start a pairing will be the button push on the device, then software
> should lead the user through the rest of it. Security is secondary to
> simplicity.
> 
> So, I am trying to figure out how, on the AP side, I can get some kind of
> event when the device tries to pair. The device does not know the SSID of
> the AP - it is going to be quite trusting as far as whom it will pair with.

The WPS-ENROLLEE-SEEN event messages sent on the hostapd control
interface can be used to determine when a station is trying to use WPS.
They look like this:

<3>WPS-ENROLLEE-SEEN 02:00:00:00:00:00 362db47b-a53a-5191-88fb-5458b986b2e4 0-00000000-0 0x2148 4 1 [Device A]

Where that "4" towards the end of the message is the Device Password ID.
If that field has value 4, this event indicates that there is a station
in active PBC mode.

> I attached an "action" to hostapd_cli, i.e. "hostapd_cli -a/my/script", and
> all it does is log what it sees to a file. I don't see anything interesting
> that comes out as an event when I initiate pairing on the device side.

There was no such attachment in the message, so I could not check what
this was doing. Anyway, WPS-ENROLLEE-SEEN events should be visible to
the action script.

> Starting to grope around in the dark, I added some output on the AP side in
> wps_hostapd.c::hostapd_wps_probe_req_rx, and can see probes coming in from
> the device when I push the button, but they are dropped when
> ieee802_11_vendor_ie_concat returns NULL. I have no idea if I'm in an
> interesting place there or not.

If ieee802_11_vendor_ie_concat() returns NULL for a Probe Request from a
station in active PBC mode, that would indicate that the station is
sending invalid Probe Request frames.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list