wpa_supplicant for ad-hoc mode

Shawn Rutledge shawn.t.rutledge
Tue Mar 3 13:59:28 PST 2009


On Tue, Mar 3, 2009 at 7:46 AM, Dan Williams <dcbw at redhat.com> wrote:
> On Mon, 2009-03-02 at 23:29 -0500, Dan Williams wrote:
>> On Mon, 2009-03-02 at 13:15 -0700, Shawn Rutledge wrote:
>> > Next problem though: if one peer is not running wpa_supplicant, it can
>> > work. ?If both peers are running wpa_supplicant, they will keep timing
>> > out. ?Each timeout, the ESSID is de-configured:
...
>> I use it (well, 0.6.x) in ad-hoc mode all the time with the 'wext'
>> driver and ipw2200 hardware. ?Seems like you shouldn't even be getting
>> to this point though. ?The driver should be signalling association
>> completed way before the timeout triggers. ?What driver was this again?
>
> (The Socket P300 driver as I now read below). ?So the problem is
> probably in the driver. ?The driver needs to send the WEXT association
> event in *both* cases, either for association to an Infrastructure AP,
> or when it starts/joins an IBSS as well. ?The BSSID sent along with the
> event should include the BSSID that the driver just
> associated/joined/started.

When the "other end" is running something else, not wpa_supplicant,
it's fine.  wpa_supplicant's goal is to connect to something, so it
will connect to the "other end" when it sees that ESSID after a scan.
When both ends are running wpa_supplicant though, it has to leave the
interface configured with the correct ESSID, not shut it down
completely in between its attempts to connect.  Because the attempts
to connect are not synchronized, what are the odds that both ends will
find each other at the moment in which the ESSID is actually set?
That is why I needed to make that change.  Ad-hoc mode should mean
that the node is always available: it should not un-set the ESSID, and
go through the motions of blacklisting 00:00:00:00:00:00 (because it
didn't see the other node because its ESSID wasn't set) etc.  In
between attempts to connect, it should leave the interface in the same
state as if you had done

iwconfig wlan0 mode ad-hoc essid foo



More information about the Hostap mailing list