programming question for wpa_supplicant driver

Jouni Malinen jkmaline at cc.hut.fi
Wed Mar 2 23:28:54 EST 2005


On Wed, Mar 02, 2005 at 01:37:47PM +0100, Holger Schurig wrote:

> I'm in the process of writing a driver_hermes.c for wpa_supplicant from 
> current CVS which does not depend on the (very awkward) sources for the 
> hermes wlags49 driver.

Do you mean that you are reimplementing a driver interface component for
the same driver that the Agere version of driver_hermes.c is using?

> By doing this, I'm going from simple to complex. Now, a static wep key 
> seems simpley enought. Unfortunately, it doesn't work. Can wpa_supplicant 
> also "enter" the WEP keys for me?

Yes. However, in some cases WPA-PSK may actually end up being simpler to
get working ;-). You should at least make sure that the set_wpa()
function is not forcing the driver to only accept WPA modes. This has
been one of the most common issues when wpa_supplicant has first been
used only for WPA modes and then plaintext and static WEP have ended up
not work.

>   Fine. Now it selects on of the access points, MYWLAN2 with a weird
>   frequency. Is 0 MHz correct?
> 
> Jan 02 01:55:01.038060: Trying to associate with 00:12:7f:8b:62:30 
> (SSID='MYWLAN' freq=0 MHz)

This frequency is coming from the scan results. Is the driver reporting
the correct frequency here? You should be able to check this with
'iwlist eth1 scan'.

> Jan 02 01:55:01.038514: wpa_driver_hermes_set_key: alg=WEP key_idx=0 
> set_tx=1 seq_len=0 key_len=13
> 
>    Looks like it enters the static WEP key ?!?

Isn't that what you configured it to do?

> Jan 02 01:55:01.038641: wpa_driver_hermes_set_drop_unencrypted: enabled=1
> Jan 02 01:55:01.038915: State: SCANNING -> ASSOCIATING
> Jan 02 01:55:01.039077: wpa_driver_hermes_associate
> 
>    Here it tries to associate. But note: the my current driver (wlags49
>    7.18, 7.22 had compilation problems) doesn't support any *_set_bssid()
>    like IOCTL, i.e. not the SIOCGIWAP ioctl that driver_wext uses and
>    exports. Not sure if this is a problem.

The driver may end up selecting a different BSS that wpa_supplicant was
planning on associating with, but that may work fine if the APs are
configured with identical security policy.

> Jan 02 01:55:06.050134: Authentication with 00:00:00:00:00:00 timed out.
> 
>   But somehow the association got wrong?  I never asked or wanted
>   to associate with 00:00:00:00:00:00. Which event/function should
>   have been called in order to mark the association as "working"?

Can you verify with iwevent whether the driver is generating association
events? You can test this both with wpa_supplicant trying to associate
and then manually doing the same with iwconfig.

> If I do, instead of starting wpa_supplicant, issue the command "iwconfig 
> eth1 mykey12345678" by hand, then everything works and I can ping my 
> device.

How did you implement set_key() handler for the driver interface in
wpa_supplicant?

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the HostAP mailing list