Query: can wpa_supplicant set up an ad-hoc network

Dan Williams dcbw
Wed Oct 21 10:52:52 PDT 2009


On Mon, 2009-10-19 at 11:14 +0800, Soh Kam Yung wrote:
> On Sat, Oct 17, 2009 at 12:08 AM, Dan Williams <dcbw at redhat.com> wrote:
> >
> > Yes.  There is no real difference between starting and joining an adhoc
> > network.  Except a scan is done first (usually in the driver) to
> > determine whether there is an existing IBSS with that SSID and security
> > settings, and if so, that IBSS's BSSID is used.
> >
> > Remember, ad-hoc is *ad-hoc*.  There's no central controller to say who
> > can join the network and who cannot.  The only access restriction is by
> > SSID and encryption key.
> >
> > Is there some specific reason you are thinking you need to distinguish
> > between the operations?
> >
> > Dan
> 
> Dan,
> 
> It's more of trying to understand how an ad-hoc network works.  Thanks
> for the info.
> 
> One more question: if the initial scan does not reveal an existing
> IBSS and one is created instead by wpa_supplicant, how is the RF
> channel selected?  Is this at random or are there specific rules that
> determine which channel will be used?

Again, it's usually the *driver* that handles IBSS creation after the
scan, not the supplicant.  The RF channel is either auto-selected by the
driver, or you can specify a "frequency=" option in the supplicant's
network block to lock the IBSS to a channel of your choice.  If the
driver does not honor that channel after creating the new IBSS, then
it's a driver bug that needs to be fixed in the kernel.

> Is there a wpa_supplicant option to configure the channel to be used for a IBSS?

I believe it's 'frequency=2412' where of course you replace '2412' with
your desired channel center frequency in MHz.  We can't use channels
there, because channels overlap depending on your band.

Dan





More information about the Hostap mailing list