Few doubts about ad-hoc devices
Thu Aug 21 07:06:19 PDT 2008
On Thu, 2008-08-21 at 16:16 +0530, Raghavendra wrote:
> Hi All,
> I have two doubts.
> * Assume I have one wlan device enabled with ad-hoc mode and
> with no-security. I am using wpa_supplicant for this purpose.
> Since this is a first device to create a ad-hoc network, with
> no security. It is always possible that other devices can
> connect to my device easily in ad-hoc mode. Is there a way to
> know other devices connecting to this device in ad-hoc mode?
> some indications/events using wpa_supplicant or some ioctls?
In ad-hoc mode, every STA just sets a BSSID, SSID, and a channel, and
ignores traffic on that channel that's not addressed to the SSID + BSSID
that the STA is using. Ad-Hoc means there's no central authority
handing out association IDs and controlling who connects and who
It's like this: there's a really big open square in a city. A crowd of
people stand in the square. Some speak English, others speak Chinese,
others speak Spanish. Anyone can walk into the square and start talking
in a language they can speak. Each language is like the SSID+BSSID
+channel tuple, and each person is like an ad-hoc wifi node.
To join an adhoc network, the STA just starts listening and transmitting
because there's nothing to gate its entry into the network. That's the
definition of Ad-Hoc. If you want security, either set an encryption
key or use infrastructure mode.
The only indications you have that something else is trying to talk to
your STA is incoming traffic with the same SSID, BSSID, and channel as
your device is on.
> * Is it possible to hide device ssid in ad-hoc mode? so that
> even if some body scans my ad-hoc device ssid should not get
> displayed in scan result.
Ad-Hoc BSSIDs are auto-generated, thus to actually join an Ad-Hoc
network you need to know what BSSID to connect to. So you can hide the
SSID all you want by not transmitting it in the Ad-Hoc beacon (which
might violate standards, not sure) but then nothing else would be able
to join the adhoc network because there would be no way to match the
known SSID up with a given random adhoc BSSID. And BSSID coalescing
couldn't occur because you have no idea what SSID all the other BSSIDs
are using, and thus you can't eventually converge on one BSSID.
In short, no, unencrypted Ad-Hoc networks just can't do what you are
asking here. At least that's my understanding of it.
More information about the Hostap