Independent Study Report

Module for the 7DS project to scan for access-points in the vicinity and switch between Managed and Ad-Hoc modes for the wlan interface based on the availability of Infrastructure, or lack thereof.

Rajesh Menon
New York University
prm225@cs.nyu.edu

Stelios Sidiroglou-Douskos
Columbia University
ss1759@cs.columbia.edu

Prof. Henning Schulzrinne
Columbia University
hgs@cs.columbia.edu

Abstract

This module is written for the 7DS project (details) to perform scans for the availability of "good" access-points, and do switching of modes for the device (802.11b/g wireless LAN) between Infrastructure and Ad-Hoc. Scanning is done using the standard wireless-tools available for Linux, and switching is based on heuristics collected (signal-to-noise ratio, at the moment) over a specified number of sweeps.

I have also included in this document, all the work done as part of the independent study in the form of a timeline. The work includes writing a similar scanning utility for cards using the PrismGT/Duette chipset, and a http server written using libhttpd.

The work described here is part of my independent study course-work done at Columbia University under the supervision of Prof. Henning Schulzrinne and Stelios Douskos-Sidiroglou. As part of this independent study, I have

In this report, all explanations will be given as per my understanding of the issues. Links that I found relevant during the project are included too.

Details

The 7DS project aims to provide resource sharing in a self-organizing, peer-to-peer fashion without the need of an infrastructure. This requires a system to be able to decide on when it will change from being a client in Infrastructure, and when to be one of the nodes in an Ad-Hoc (p2p) environment. The module iwscanswitch has been written to perform this functionality - of deciding when to make a wireless interface change its behaviour by continuously checking the signal quality of the master it is connected to at that moment.

The procedure of making the decision on when to switch modes depends on the following cases:

Scanning for the AP's in the vicinity is done using iwlist which is a part of the wireless-tools API for Linux. Unlike the monitor mode, which drops the association (if the interface was connected to an AP), and only listens for beacons transmitted within range, iwlist scan allows for collection of data without having to lose association with an AP. To check if the version of the driver supports scanning, run iwpriv [interface], and unless "scanning" is seen in the output, the driver does not support it.

Platform/Tools

Programming in C on GNU/Linux (tested on the 2.4.XX and the 2.6.0-testXX kernels).
Wireless Tools for Linux Ver.2.6


Q: iwpriv [interface] does not show support for scanning.

iwlist as of now, does not come with scanning support. Users of the orinoco_cs drivers can find the version that supports scanning here. The orinoco-0.13d.tar.gz is what is needed, and the corresponding patch to support scanning in this driver is available here.


Q: When I change modes to Ad-Hoc using iwconfig, I get a cell address of all zero's.

Do a dmesg | grep "[interface]". You will most likely see that your card supports the old Demo ad-hoc mode To upgrade the firmware for it to support the later IBSS Ad-Hoc mode, upgrade the cards' firmware by getting the upgrades here (version 7.52 is tested and works, and apparently 8.10 has some issues). There are upgrades available for win32 only, so the firmware will have to be flashed on a win32 machine.

Once the upgrade has been done, you can see if the changes have been applied using dmesg | grep "[interface]".


Q: Switching modes to Ad-Hoc and a specific ESSID (in this case, "7DS") results in zero scan results for access-points.

OR

Q: Why do I keep putting the card into ESSID promiscuous everytime we scan for the list of available APs?

This is an issue with the way the firmware is implemented. When in ad-hoc, and on a specific ESSID, it looks like it filters out the results pertaining to the particular cell. So, we get no results in scanning when we are in ad-hoc and on 7DS. To get past this, we briefly put the card on ESSID "any", and then run the scan. Also, it is noticed that executing iwconfig [interface] mode "Ad-Hoc" does not really force the card into ad-hoc. You will see that it actually is associated with the first Master it sees. Hence, an AP that you would associate with in client mode, can be associated with in ad-hoc mode.


Q: How is the Cell Master chosen?

The first device that switches to Ad-Hoc and ESSID "7DS" becomes the cell master. The HW address of the device is used to decide the MAC address of the cell. The first 2 bits of the device is made 0x02 and the rest are kept the same (i.e, a device with hw address 00:AA:BB:CC:DD, becomes 02:AA:BB:CC:DD and is the MAC addr of the newly formed cell).


Acknowledgemts

Stelios Sidiroglou-Douskos
Professor Henning Schulzrinne
Jean Tourrilhes
David Gibson
Developers/Users from the prism54 and orinoco_cs projects.


References

http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/