July 20, 2006

WiFi Radar eases connections

Author: Joe Barr

WiFi Radar is a handy tool for those who move from one wireless access point (AP) to another. My laptop regularly connects to a wireless AP on my home LAN, to a free wireless service in downtown Austin where we hold our weekly LUG meetings, and to whatever is available at airports and hotels when I'm on the road. WiFi Radar makes it simple to switch connections no matter where I am.The software is available in pre-packaged form for Gentoo, Debian, Ubuntu, and SUSE distributions. You can also get the latest tarball from the WiFi Radar homepage.

I downloaded wifi-radar-1.9.6.tar.bz2 and untarred it by entering tar xjf wifi-radar-1.9.6.tar.bz2 at the command line. I then entered the wifi-radar-1.9.6 subdirectory created by the tar command and took a look at the included INSTALL and README texts for installation and usage tips.

WiFi Radar requires the python and pygtk2 packages be installed, but you don't have to compile it before you use it. The WiFi Radar homepage recommends installing a distribution-specific package if one is available for your flavor of Linux. If not, run make install as root from the installation directory. If you prefer, you can install it manually by moving the wifi-radar executable from the installation directory to /usr/bin or elsewhere in your path, marking it as executable, and creating an /etc/wifi-radar subdirectory where the configuration file (wifi-radar.conf) will live. On my Ubuntu machine, I did it like this:

mv wifi-radar /usr/bin

chmod +x /usr/bin/wifi-radar

mkdir /etc/wifi-radar

WiFi Radar creates a default configuration file if it doesn't find one at startup. This file may need to be tweaked before it can "see" any wireless access points. The built-in wireless card in my IBM ThinkPad T40 is seen by Ubuntu as eth0, for example, but WiFi Radar looks at eth2 in the default configuration, or at eth1 if no configuration is found.

If you don't see any access points listed in the program's interface and you know they are there, edit the configuration file and make sure the line that begins interface = is pointing at the correct network adapter device. Figure 1 shows how WiFi Radar lists the connections it finds after it has been properly configured as eth0 and had profiles added.

Figure 1

Run this way

You can run WiFi Radar in two different ways: as a daemon without a user interface, or by starting it up as you would any other program. The daemon requires at least one profile in order to function correctly, and we need the UI to create a profile, so let's start there.

When WiFi Radar runs normally, it displays all the available wireless networks it detects. The first time you run it, that's all it does. To connect to one of the listed access points, click on its name and then select Connect. WiFi Radar will tell you that it does not have a profile configured for the network, and ask if you want to create one. Click Yes.

That brings up a new window which allows you to set various wireless options, such as mode, channel, and WEP key. You can also set a WPA driver, tweak the DHCP settings, and specify startup commands. When you're finished editing the profile, click Save. Assuming that the network likes the way you've configured it, you'll be connected to the access point. Even better, the profile will be there the next time you need it.

WiFi Radar maintains its list of APs in priority order, and when run as a daemon it will automatically connect to the highest priority network that it detects. With the UI, you can change the priority of the list by dragging and dropping an AP name.

The advantage of running WiFi Radar as a daemon is that you won't have to start the user interface, select the AP, and click on Connect each time you fire up the laptop. You can let the daemon do it for you. Here's an example of what you may see when you start the daemon:

$ sudo wifi-radar -d

Error for wireless request "Set Frequency" (8B04) :
  SET failed on device eth0 ; Operation not supported.
Stale pid file. Removing
Internet Systems Consortium DHCP Client V3.0.3
Copyright 2004-2005 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

Listening on LPF/eth0/00:0c:f1:28:de:c9
Sending on  LPF/eth0/00:0c:f1:28:de:c9
Sending on  Socket/fallback
DHCPREQUEST on eth0 to port 67
bound to -- renewal in 21410 seconds.

Some people like to run that command at boot time; I refer you to the docs for your distro for details on how to accomplish that.

I can start the daemon if I'm at home or at a LUG meeting and get connected automagically, or I can start the UI if I'm on the road at a new AP. Either way, WiFi Radar gets me connected a little more quickly.


  • News
Click Here!