Cooking with Linux - The Wireless Kitchen
No, thank you, François, I don't need to sit down right now. Yes, I see that the tables are free. That's because our guests haven't arrived yet. Quoi? Ah, I see. You're wondering why I am wandering around with this notebook in my hands and not taking a moment to sit down. The reason is simple, mon ami. I've installed wireless access points in each wing of the wine cellar so we and our guests can have wireless access. I'm wandering around with my notebook to check signal strength. I want to make sure that no matter where our guests make themselves comfortable, they have access.
Welcome, mes amis, to Chez Marcel, home to the finest in Linux cooking, a superb wine cellar and, now, wireless Internet access. Please sit and make yourselves comfortable. François, head down to the wine cellar and bring back the 1998 Eden Valley Riesling from Australia, immédiatement!
Before you came in, mes amis, I was busy making sure that wireless access was available in all parts of the restaurant. In the case of a classic, wired network card, a little light let you know whether you actually were plugged in to the network. This isn't always so cut and dry with wireless cards. Factors such as distance, signal strength and even the location of access points dictate what kind of service you can expect. That's all fine, if you have that information at your disposal.
The tools on today's menu offer a variety of approaches to providing wireless card information, from signal strength to access-point availability. A number of these applications' authors thank Jean Tourrilhes for his work on the Linux kernel wireless extensions, so I take a moment here to thank him as well. As François pours the wine, it's time to sample the first item on today's menu.
As I've mentioned in the past, I'm rather fond of WindowMaker dock apps, those self-contained programs that take up so little room on the desktop. Consequently, I have three such apps for you starting with Jess Mahan's WmWiFi (Figure 1). This little WindowMaker application caught my eye partly, I suppose, because it looks a little like the signal meter on my old cell phone. When you download it (see the on-line Resources section), you can choose from Debian packages as well as the source. Building the package from source requires your old friend, the extract and build five-step:
tar -xzvf wmwifi-0.4.tar.gz cd wmwifi-0.4 ./configure make su -c "make install"
To run it, you can type wmwifi at the command line and leave it at that, but you may find that it doesn't appear too easily if you aren't running WindowMaker. Try this command instead, wmwifi -bw. The -bw, if you are curious, stands for broken window manager. Never let it be said that Jess Mahan did not have a sense of humor. Incidentally, the gray background is WmWiFi's default appearance, but clicking on the dock app turns on the backlight, which then glows LCD green.
In a similar vein, Carsten Schrmann's wmWAVE (now maintained by Jens Schrmann) offers a nice compact signal strength meter for your wireless card, plus a little bit more. There's also an overall link quality reading and a reading on the noise level. Building this app is easy. Simply extract the tarred and gzipped bundle, type make and make install. To run wmWAVE, execute the binary called wmwave
The third of my WindowMaker apps is Ico Doornekamp's wmifinfo. Unlike the others, this isn't strictly a wireless application. Instead, it automatically detects all of your network interfaces and provides information on each one. With a wireless card, it also displays a signal strength meter at the bottom of the dock app itself. See Resources for the source for wmifinfo.
Once again, this is an easy build: simply extract, type make and make install. To run it, type the command wmifinfo. If you are fond of the gray LCD look, use the wmifinfo -l option. To switch between interfaces, if you have multiple cards, left-click on the dock app. By using the -i option, you can specify a certain interface with which to start (wmifinfo -i eth0).
Longtime command-line fans such as myself always are excited about finding a nongraphical application that does a great job and manages to do it with style. Jan Morgenstern's wavemon is such an application. In a single ncurses display, wavemon offers a great deal of network information, including signal, noise and quality levels. The information is displayed in a dynamic bar graph; see Figure 2. wavemon also includes a histogram view and onscreen configuration.
Building wavemon is the classic extract and build five-step again. To run wavemon, type wavemon at the command line. When the display starts up, you should see the summary information screen, which includes signal levels, TCP statistics, information on mode, encryption, bitrate, your access point, local network card and more. All of the functions are controlled with function keys. To switch to the histogram view, press F2 and then F1 to return to the summary screen. The configuration screen is accessed by pressing F7. Reminders about each function key's function are at the bottom of the screen.
With the release of KDE 3.2, users of the popular desktop environment will find a nice new application called KWiFiManager. This application, written by Stefan Winter, provides signal and quality information like the programs previously mentioned, but there is much more to KWiFiManager. It also makes it possible to maintain up to four different configurations. The road warriors among you who move from office to office should find this one particularly useful.
KWiFiManager may not be installed by default. The easiest way to check is either to look in your KDE menu or simply type kwifimanager to start the program.
When KWiFiManager starts, it displays a basic status window showing signal strength, connection speed, access point, local IP address and the frequency of the channel. Depending on the actual strength of the connection, you see words like TOP, EXCELLENT or ULTIMATE accompanying the numeric signal strength indicator. You also see a small icon in your system tray with a numeric and graphical signal quality indicator. Click File on the menu bar and select Connection statistics for a graph of signal quality over time (Figure 3).
For those who feel cheated that computers aren't providing all the lights, beeps and science-fiction noises technology promised, KWiFiManager has an audible feature to satisfy that craving. A beeping tone that increases or decreases in pitch with the signal can be turned on. Click Config on the KWiFiManager menu bar and select Acoustic Scanning. I warn you, mes amis, that you may find this becomes tedious pretty quickly, but it is fun for short periods.
KWiFiManager goes well beyond being a signal strength meter. It can help simplify your network configurations by providing automatic connections to the various networks you may encounter. Click Config on the menu bar and select Configuration Editor. At first, you are asked to enter the root password and then a somewhat larger window appears.
Along the top, you see four tabs labeled Config1 through Config4. Each of these areas allows you to prepare a configuration based on whatever network you are going to be accessing, whether at home or on the road. I tell you about these settings in a moment, but first I want to direct your attention to the bottom of the KWiFiManager window. There's a check box to allow you to Load preset configuration on KDE startup. If you check that box, you can select one of your four configurations as the default. If you generally are in your office when you start your notebook, you can select that as your default network setup for whenever you log in.
Now, back to the rest of these settings. The most basic aspect to each of these configurations is right at the top, the Network name. Each of the four configurations can have a network name associated with it that is specified in your access point. If you want KDE to activate your interface and connect you to whatever network is available, enter ANY as the network name. Off to the right of that, you can select the connection speed. I personally leave this set to Auto.
Right below these settings is a field labeled Execute script on connect. This can be any kind of a program you want to run, including a script. Perhaps you'd like to play a tune or have your system suggest a wine. I want to run custom firewall scripts depending on where I am and what services I like to make available on the network in question. Speaking of security, a little further down, you should see a check box labeled Use cryptography. If you are using a wireless access point with WEP encryption, make sure this box is checked. Some new fields appear in the application window where you can specify and enter your key passphrase information. Click OK (or Apply if you want to keep making changes) and you are done.
Incidentally, you also can access this configuration dialog through the KDE control center; the program name is kcontrol. Look under the control center's Internet menu.
Once again, mes amis, closing time has arrived all too quickly, but Chez Marcel is never too strict with the hours. Enjoy a final glass of wine and enjoy the wireless access. Until next time, mes amis, let us all drink to one another's health. A votre santé Bon appétit!
Resources for this article: /article/7643.
Marcel Gagné (email@example.com) lives in Mississauga, Ontario. He is the author of Moving to Linux: Kiss the Blue Screen of Death Goodbye! (ISBN 0-321-15998-5) from Addison Wesley. His first book is the highly acclaimed Linux System Administration: A User's Guide (ISBN 0-201-71934-7). In real life, he is president of Salmar Consulting, Inc., a systems integration and network consulting firm.
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal
- Be a Mechanic...with Android and Linux!
- New Products
- Users, Permissions and Multitenant Sites
- Flexible Access Control with Squid Proxy
- Security in Three Ds: Detect, Decide and Deny
- High-Availability Storage with HA-LVM
- Solving ODEs on Linux
- DevOps: Everything You Need to Know
- Tighten Up SSH
- Non-Linux FOSS: MenuMeters