Query: can wpa_supplicant set up an ad-hoc network

Soh Kam Yung sohkamyung
Thu Oct 15 19:13:27 PDT 2009


On Thu, Oct 15, 2009 at 10:47 PM, Dan Williams <dcbw at redhat.com> wrote:
> On Thu, 2009-10-15 at 12:20 +0800, Soh Kam Yung wrote:
>> Can wpa_supplicant be used to create an ad-hoc network in linux? ?If
>> yes, what are the configuration options to use?
>
> Yes. ?Something like:
>
> ap_scan=2
>
> network={
> ? ? ? ?ssid="my ad-hoc network"
> ? ? ? ?mode=1
> ? ? ? ?key_mgmt=NONE
> }
>[...]
> Join == create for adhoc. ?There is no difference. ?This also requires
> driver support, because the *driver* is the part that decides to join or
> create the network. ?The driver scans, and if there is an existing
> ad-hoc network with the same SSID as you've specified, then the driver
> will proceed to join that network. ?Otherwise, it will create that
> network. ?Older kernel version (previous to 2.6.27 I believe) had
> problems with mac80211 drivers and the join/create operations, so you'll
> get better luck with later kernels.
>
> Dan

Dan,

I have tried the simple option above and I see the adhoc network being
created (CTRL-EVENT-CONNECTED).  However, after less than a minute, it
goes down again (CTRL-EVENT-DISCONNECTED).

I am trying this on an embedded system running linux 2.6.21 with a
Marvell wifi driver.  Could this be a problem with the kernel, driver
or wpa_supplicant?

As a test, I have disabled wpa_supplicant and used iwconfig to setup
the ad-hoc network and this appears to work.

Regards,
Kam-Yung
-- 
Soh Kam Yung
my Google Reader Shared links:
(http://www.google.com/reader/shared/16851815156817689753)
my Google Reader Shared SFAS links:
(http://www.google.com/reader/shared/user/16851815156817689753/label/sfas)



More information about the Hostap mailing list