wpa_supplicant and ad-hoc mode - possible?

Dan Williams dcbw at redhat.com
Mon Jul 7 12:55:09 EDT 2008


On Sun, 2008-07-06 at 19:08 +0200, Tomasz Chmielewski wrote:
> Is it possible to set up wpa_supplicant to work in an ad-hoc mode?
> 
> I have a router with a Broadcom wireless card, but currently, its b43 
> Linux module doesn't support AP mode. So I have to use ad-hoc on this 
> device and on my laptop, if I want to connect both devices.
> 
> I tried to configure wpa_supplicant to work in ad-hoc mode, but I can't 
> even ping the other side.
> 
> This is the config I used on this device:
> 
> 
> ctrl_interface=/var/run/wpa_supplicant
> 
> ap_scan=2
> fast_reauth=1
> 
> # IBSS/ad-hoc network with WPA-None/TKIP.
> network={
> ssid="testwpa"
> mode=1
> proto=WPA
> key_mgmt=WPA-NONE
> pairwise=NONE
> group=TKIP
> psk="superduperwpa"
> }
> 
> 
> I can see the "testwpa" ESSID in Ad-Hoc mode when I do "iwlist eth1 
> scanning" on my laptop, but other than that, I can't even ping, tcpdump 
> doesn't show any received packets etc.
> 
> When I use WEP, it works, so hardware is fine ;)
> 
> Any hints?

You probably want some patches that will hit 2.6.26, and a recent git
pull of the supplicant.  While you may be able to get away with what
you've got right now, the mac80211 stack was not playing nicely enough
with wpa_supplicant to give stable IBSS connections.  You certainly
won't get CONNECTED status without the patches.

wpa_supplicant:
[PATCH] wpa_supplicant: give adhoc associations a bit more time
[PATCH v2] wext: handle mode switches correctly for mac80211

kernel (wireless-testing.git):
872ba53395b2a8be08c3ea2d39e225e5b4a8cb40 mac80211: decrease IBSS creation latency
507b06d0622480f8026d49a94f86068bb0fd6ed6 mac80211: send association event on IBSS create

Also, don't automatically rule out issues with the driver; there may
well be bugs in the mac80211 or b43 IBSS mode with WPA even though WEP
works fine.

Dan



More information about the HostAP mailing list