Wireless Ethernet for Linux
by Ed Sawicki
Accelerated Learning Center
Tailored Computers
June 2001
I've had to teach numerous hands-on Linux courses at various locations recently that required that I setup and tear down a network. Connecting the Ethernet cables from the notebook computers to the Ethernet hub can take quite a bit of time when care has to be taken to avoid people tripping over cables. This often involves duct tape and crawling around under tables. When the class is finished, the network has to be taken down, cables coiled, and hubs and power supplies stowed in the traveling case.Last week, I wired a temporary network in a room that had severe static problems. I would take a few steps across the carpet and get zapped on door knobs. Static is deadly to my notebook computers and LAN cabling can easily carry the static charge to other computers in a wired network. As I was connecting my notebook computer to my video projector, I zapped myself on the projector cable. When I connected the cable to the computer, I was unable to get any images on the screen.
I thought that I blew out the expensive InFocus projector but later learned that it was the cable that went bad. InFocus cables have active components which can quite obviously be damaged by static as I discovered. I solved the problem by purchaing a plain VGA cable at a computer store. This close call caused me to take this static problem more seriously. I didn't want to damage other devices that I needed for my class.
I was not able to get the folks that owned the building to put more moisture in the air to reduce the static problem and I didn't have anti-static carpet spray. So, I did the only thing I could think of. I watered the carpet. I spread a few gallons of water on the floor being careful not to concentrate too much water in one spot. I didn't want people to notice. This solved the problem.
I've done this before and experience told me that I'd have to water the carpet every few hours. So, the students took breaks and I'd sprinkle water in the floor.
Going Wireless
This week I reasoned that I could make things quite a bit easier by using wireless Ethernet. I would no longer have to spend time setting up and tearing down a cabling system. Static would be less of a problem because all the machines would be isolated from one another; galvanically speaking.
After spending a few hours reading everything I could on the subject of integrating Wireless Ethernet, PCMCIA, and Linux, I purchased Wavelan2 cards from Lucent Technologies. Lucent has recently renamed these cards to Orinoco. These are IEEE 802.11-compliant PCMCIA cards that run at 11 Mbit/s when signal strength is strong and back off to lesser data rates of 5.5, 2, and 1 Mbit/s when signal strength is reduced.
I I discovered that the Wavelan2 cards are supported by a stable Linux driver. The driver is included on the CDROM that comes with the cards but you can also download it from Lucent's web site. (Since this article was written, Orinoco support is included with most or all Linux distributions)
The cards are PCMCIA Slot I cards as shown in the following picture. The black portion of the card, shown on the left side, is the antenna that sticks out from the computer by about .75 inches. Though it seems rugged enough, I remove the card from the computer before I pack the computer in my travel bag.

The cards operate in the 2.4 GHz band. The signals can pass through hollow walls, ceilings and floors without too much signal attenuation. I was able to communicate at high speed (11 Mbit/s) between two rooms that were about 50 feet apart with three sheetrock walls separating them.
It uses data rates of 11, 5.5, 2, and 1 Mbit/s. As the distance between two machines increases and signal strength diminishes, the data rate steps down to compensate.
There are three versions of the card called Bronze, Silver, and Gold. The Bronze card uses no encryption. Silver uses WEP 40-bit encryption and Gold uses 128-bit encryption.
Windows
The Wavelan2 cards come with Windows software that allow you to do such things as link-testing between two machines and to monitor the signal strength, signal-to-noise ratio, and noise level of a wireless connection. This is great for doing site surveys to see where you must place access points and external antennas.
Unfortunately, these programs do not run on Linux. So when you're running Linux, you're blind to these technical parameters. In case you're thinking that you can just run VMware and run this program, think again. VMware virtual machines don't see the Wavelan2 card. They see a simulated LAN card. Too bad.
I reluctantly keep a Windows machine around just to run this program. Maybe someday Lucent or someone else will create a Linux/X version.
Firmware
The Wavelan2 cards can have their firmware changed easily but firmware versions could be a problem. With certain versions of the firmware, the card runs in promiscuous mode. If you upgrade to a newer version of firmware, you gain additional features but lose promiscuous mode. Since I use promiscuous mode often, this is disastrous. I have to find older versions and save them somewhere in case newer cards that I buy have the "wrong" firmware. (Since this article was written, newer Orinoco drivers now run promiscuous mode.)
Topology
I've used wireless Ethernet before but this was about one year ago. The Breezecom products I used required an access point. An access point is usually quite a bit more expensive than the cards for individual workstations. The great news about Wavelan2 is that they don't need an access point, though you can use one if you wish. Without the access point, all cards can still communicate with each other. Lucent uses two terms to describe this: peer-to-peer and Ad-Hoc modes.
For my purposes, I did not need an access point so I did not buy one. One of my notebok computers will have both a Wavelan2 card and a wired Ethernet card. This computer will support NAT (called IP Masquerading in Linux) so all the other notebook computers can access an Internet connection or other machines that do not have wireless connections.
Linux DriverThe CDROM that comes with the Wavelan2 cards has drivers for all modern versions of Windows, NetWare, Linux, DOS, and the Macintosh OS. I installed it on a Windows 98 machine and numerous Linux machines so far.
The Linux driver is not supplied as a binary. It is supplied as source code. You must compile it before you can use it. You must compile the Wavelan2 driver along with the PCMCIA Card Services for Linux package. I went to the PCMCIA web page at http://pcmcia.sourceforge.org and clicked on the "Downloads and release notes" link. I then downloaded the latest version and untarred it into a temporary directory.
Then I took the Wavelan2 file off of the Orinoco CDROM and untarred it into the same directory as the PCMCIA Card Services. I compiled the PCMCIA Card Services, along with the WaveLan2 driver, with the following commands:
make config make all make install
Next, the Wavelan2 card must be configured so all the settings will be correct when you remove and later insert the card. You need to add only one line to the /etc/pcmcia/config.opts file. Here's the settings I used for my peer-to-peer network:
module "wavelan2_cs" opts "port_type=3 network_name=ALC
The "port_type=3" statement tells the card to run in peer-to-peer or Ad-Hoc mode.
Next, you need to configure the network settings by editing the file /etc/pcmcia/network.opts. I assigned a static IP address to my cards. To do this, I modified the following statements in the file.
IPADDR="192.168.1.12" NETMASK="255.255.255.0" NETWORK="192.168.1.0" BROADCAST="192.168.1.255" GATEWAY="192.168.1.254" DOMAIN="alcpress.com" DNS_1="206.190.111.222"
You would, of course, set these to values that are appropriate for your network. Next, you'll need to restart the PCMCIA Card Services. Since the version of PCMCIA Card Services was newer than what I had installed on my computer, I decided to stop the service and start it with the following two statements:
/etc/rc.d/init.d/pcmcia stop /etc/rc.d/init.d/pcmcia start
Next, I installed the Wavelan2 card and waited for the two beeps. I ran the ifconfig program and there it was - eth0 - my Wavelan2 card set to 192.168.1.12. After I installed the software on the second notebook computer and installed the second Wavelan card on it, I was able to ping both machines from the other. It was working!
I brought up a web browser on one machine and entered the URL of the other machine's web server. The web page appeared on the screen quickly; at LAN speeds. Then I moved a large file with FTP that moved along at Ethernet speeds. Impressive.
After the successful test, I bought cards for all of the notebook computers. One computer was running an older version of the kernel - 2.2.5 - and the Wavelan2 software noticed this as I was compiling the code. It suggested that I upgrade the kernel. I didn't want to take the time to upgrade the kernel so I pressed on. In the end, this machine worked the same as the others. In my spare time, I'll dig in to the changes later kernel code has on the Wavelan2 code.
Going for Distance
Just for fun, I wanted to see how far I could get with the Wavelan2 cards installed in two notebook computers and no external antenna. I had my daughter stand in the street in front of my house holding one computer. I held the other notebook computer and set it to ping the other continuously. Then I walked down the street.
I got about three blocks away before I started noticing missing packets. I estimate this was at least 1000 feet away with line of sight all the way. I probably could have gotten better distances but I forgot to tell my daughter to stand still and point the PCMCIA card's antenna towards me. She was dancing around and, when the antenna was faced away from me, I lost packets. I should have used a stack of cardboard boxes; teenagers are too unstable (physically).
The Orinoco documentation says that I should get 1750 feet at 1 Mbit/s. I'm sure this is true under ideal conditions.
Since the notebook computers were running Linux instead of Windows, I was not able to use the graphical utilities to see signal strength, signal to noise, and noise parameters.
Additional distance could be achieved with external antennas. The Orinoco cards have a tiny connector that an external antenna can connect to. Lucent sells an indoor omnidirectional antenna that offers 5 dBi of gain. This translates to about a 50 percent increase in distance if the antenna is used at one end. The distance doubles if the antenna is used at both ends.
While you may not want an external antenna connected to a notebook computer, you could connect it to a Wavelan2 access point to connect buildings together several miles away. All you need is line-of-sight. Outdoor antennas are available from numerous sources with gains of up to 24 dBi for distances up to 16 miles.
If you're interested in communicating at distances measured in miles and you're not especially skilled at radio frequency communications, it's best to consult experts. There are issues such as feed line signal loss and environmental conditions to deal with that you may not know about.
Price and Warranty
Each Wavelan2 card costs under $200 each. I was delighted that they're covered by a 3-year warranty. I made sure I saved my sales receipt in a safe place.