Getting Wireless the NDISwrapper Way
Using a wireless connection on Linux still is a dicey thing, and you must acknowledge the fact that you probably will have to go a non-open-source software direction, if you want to have any chance of getting connected. A lot of development is happening in this realm, but let's face it, making wireless devices work natively with open-source drivers is not something you can count on, at least for the time being.
What's the reason for this state of affairs? Just as with graphics cards, there are many factors. Vendors are quite interested in offering newer devices, but the majority of them do not care about Linux and have a Windows-only mindset. Furthermore, if you purchase a laptop, you may not even have the option to choose the card, so you have to make do with whatever you are dealt. Finally, developers cannot produce the needed software when manufacturers won't release the specs, APIs and so on for their products, and this documentation almost never is available.
Thus, unless you are quite lucky and happen to have one of the few open-source-supported options, NDISwrapper probably will be your best option; however, it's no surefire silver bullet. NDISwrapper tries to provide a wrapper around Windows drivers, so Linux can use them as if they were native ones. If you are lucky (okay, not so much lucky, as many drivers seem to work), your Linux machine will think it has perfectly fine drivers and will use them.
Though the program itself is open source, this usage of proprietary drivers is objectionable (maybe even not 100% legal?) and obviously not guaranteed. Furthermore, it's still a bit of a hit-or-miss, not very well documented and somewhat obscure method. There's no fancy graphic interfaces here, only old-fashioned command-line work, with many possibilities for mistakes. Taking all of this into account, it's no wonder many people become conscientious objectors of NDISwrapper or end up not being able to make it work.
Hopefully, in the near future, this will be a moot point, and we will have full open-source software for most, if not all, wireless cards. Certainly, such drivers exist for a select few. In the meantime, we have to make do with this sort of kludge—even though NDISwrapper is brilliant, it's a pity we have to rely on such a program—and wait for better times.
I recently got a somewhat old eMachines M5305 laptop, and as I had to work in a wireless-only office, I had no option but to get wireless going. In this article, I explain how I installed two different kinds of cards (USB and PCI) and got them to function with NDISwrapper. I won't dwell on the many other alternatives I tried (which got me nowhere) and focus on the NDISwrapper solution. Being purely practical, I needed my box to work—open-source software or not.
NDISwrapper stands for Network Driver Interface Spec Wrapper. A wrapper is a technical name for a piece of software that, loosely speaking, allows you to use something in a somewhat different way. Using Windows drivers under Linux certainly qualifies as “using something in a somewhat different way”.
You can find NDISwrapper in most modern distributions. Either use the provided repositories, or go to the NDISwrapper site (see Resources), download the source files and install them yourself. As a matter of fact, even though I use OpenSUSE 10.2 and NDISwrapper was readily available, I opted to go that route myself, so as to get the most up-to-date version. At the time of this writing, the current stable version stands at 1.47, and there is a 1.48RC2 release candidate in the works, but I decided to go with the former.
If you already had a version of NDISwrapper on your system, it might be best to uninstall it first (using the tools in your distribution—I used YaST), and then, as a common user, go to wherever you downloaded the file, and do the following:
tar zxvf ndiswrapper-1.47 cd ndiswrapper-1.47 make distclean make
Finally, as root, type make install.
I went to a nearby computer shop and found a cheap, nice USB wireless adapter, Allied Telesyn's AT-WCU201G model, which supports speeds up to 108Mbps and is compatible with IEEE 802.11, 802.11b and 802.11g. Of course, today, speeds of 54Mbps are more common, so it's nice having an extra speed reserve resource.
Because this is a USB device, you can use the lsusb command to get the device ID. Insert the device at any USB slot, and do:
lsusb Bus 003 Device 002: ID 3242:4001 Bus 003 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 001 Device 001: ID 0000:0000
It's pretty clear our device's ID is 3242:4001. If you want more information—there's lots of it—about the device, try lsusb -d 3242:4001 -v, and you can verify the manufacturer, product code, serial number and so on. It's highly likely that other people already will have tried their hands at getting the device to work, so I Googled it on-line to see if there was any help or known good Linux drivers. I didn't find any useful references, but I went on ahead anyway—did you expect to give up so easily?
If you're following along, you will need a Windows XP driver, both the .inf and the .sys files. Fortunately, the product I chose includes a CD with several appropriate drivers, and it's just a matter of copying it to disk. Note that possibly not all Windows drivers will work or be stable. Sometimes you may discover you need to try alternate drivers to get your card to work. Also, the vendor might have included the needed files within an EXE file (try unzipping it and see if you get what you need) or a CAB file.
In my particular case, it was easy—just a matter of copying some files (atiwu.inf and atiwu.sys) and then typing ndiswrapper -i atiwu.inf, followed by ndiswrapper -m and then ndiswrapper -l to list all drivers. I got:
atiwu : driver installed device (3242:4001) present
- Papa's Got a Brand New NAS
- Applied Expert Systems, Inc.'s CleverView for TCP/IP on Linux
- Panther MPC, Inc.'s Panther Alpha
- Simplenote, Simply Awesome!
- The Tiny Internet Project, Part III
- GENIVI Alliance's GENIVI Vehicle Simulator
- Rogue Wave Software's TotalView for HPC and CodeDynamics
- NethServer: Linux without All That Linux Stuff
- Jetico's BestCrypt Container Encryption for Linux
- Sometimes My Office Goes with Me