wpa_supplicant Windows port, again (WPA2)

Jouni Malinen jkmaline
Sun Sep 25 16:34:57 PDT 2005

On Sun, Sep 25, 2005 at 05:51:22PM -0400, Bryan Kadzban wrote:

> But I can try to get a debug log.  Any idea how to do that on a Cisco
> AP?  (I'm not using HostAP.)  I have every severity being logged to the
> internal event log on the AP, but all it shows is "authentication
> failed" after the failed 4-way handshake.  (I *think* this is because
> the supplicant hasn't proved that it knows the PMK, but I don't know for
> sure.)

If the AP is using IOS, you should be able to telnet (or use console
cable) to it, run 'enable' command, get debug output on the telnet
session ('terminal monitor') and then start enabling debugging with
'debug' command. I don't remember the exact debug commands, but if you
type 'debug dot11 ?', you should get a list of various options which can
be enabled for debugging.

> Err, uh oh.  Last time I tried modifying stuff inside the supplicant, I
> couldn't get it to build a Windows version properly -- but that was
> under Cygwin, too, so I'm sure that was part of it.  It complained for a
> long time about the socket stuff (because e.g. <sys/select.h> was being
> included before Cygwin's <winsock2.h>; normally that file (and others)
> have to be included after winsock2.h).  But even after fixing that, it
> still didn't work quite right (unfortunately I don't remember the error
> anymore; I think it was a segfault, with an empty stackdump file?
> something like that).

OK. I haven't built wpa_supplicant with Cygwin for a long time, so I
don't know whether something has changed. Anyway, I'm about to release
version 0.4.5, so I can include some changes with that.

> What kind of setup do you use to cross-compile the Windows binaries from
> Linux?  I know it has something to do with the MinGW cross compiler, but
> I don't know how to set that up or whether I need to do anything else
> with w32api headers (I probably do), other headers, libc, etc.

I have a build of gcc with MinGW as the target. I used to built this
manually, but have now moved to use Gentoo's xmingw-* packages since
they seem to be working fine. With that, you get most of the needed
stuff. However, there some more work to do to get WinPcap and OpenSSL
(I'm using a patched version for EAP-FAST) building. If I remember
correctly, I just build these on cygwin under Windows and copy the
libraries and headers to my cross compiler tree.

> (I wonder if I can increase the timeout in the AP, instead of decreasing
> the polling interval in wpa_supplicant.  Will have to look into that,
> but I'm not very hopeful.  I'd still like to know how you set up your
> MinGW environment.)

I'm not aware of such parameter in Cisco APs. Anyway, I have couple of
ideas that could help with latency on Windows. I haven't tested these
yet, but my goal is to start receiving all pending packets with one poll
(previously, only one packet per 100 ms was received) to avoid cases in
which a flood of packets gets wpa_supplicant completely out of sync with
the AP. In addition, I'm thinking of reducing the poll interval
automatically whenever EAPOL frames are being received.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list