One-line hardware support (USB Wireless Adapter)

I got recently a USB Wire­less Adaptor, pro­duced by Aztech. It was a good buy for sev­eral reasons:

  • It advert­ised Linux support
  • It was affordable
  • It had good qual­ity casing; you can step on it and it won’t break
  • It had the Pen­guin on the box and was really really cheap

When I plugged it in on my Linux system, it did not work out of the box. The kernel acknow­ledged that a USB device was inser­ted (two lines in /var/log/messages) but no driver claimed the device.

With the pack­age came a CD which had drivers for sev­eral oper­at­ing sys­tems, includ­ing Linux. Appar­ently one would need to install the spe­cific driver. I think the driver was avail­able in both source code and as a binary pack­age (for some kernel version).

The kernel module on the CD was called zd1211, so I checked whether my kernel had such a module installed. To my sur­prise, there was such a kernel module, called zd1211rw. I hope you have better chance with the URL because now the web­site appears to be down (Error 500).

There­fore, what was wrong with my zd1211rw kernel module? Read­ing the doc­u­ment­a­tion of pro­ject web­site, I figured out that you have to report the ID (called the USB ID) of your adapter  so that it is included in the kernel module, and when you plug in your device, it will be auto­mat­ic­ally detected.

You can find the USB ID by run­ning the com­mand lsusb. Then, it is a one-​line patch for the zd1211rw driver to add sup­port for the device,

zd1211rw.linux2.6.20/zd_usb.c      2007-09-25 14:48:06.000000000
+0300
+++ zd1211rw/zd_usb.c    2007-09-28 11:35:51.000000000 +0300
@@ -64,6 +64,7 @@
{ USB_DEVICE(0×13b1, 0×0024), .driver_​info = DEVICE_ZD1211B },
{ USB_DEVICE(0×0586, 0×340f), .driver_​info = DEVICE_ZD1211B },
{ USB_DEVICE(0×0baf, 0×0121), .driver_​info = DEVICE_ZD1211B },
+       { USB_DEVICE(0×0cde, 0×001a), .driver_​info = DEVICE_ZD1211B },
/* “Driverless” devices that need eject­ing */
{ USB_DEVICE(0×0ace, 0×2011), .driver_​info = DEVICE_​INSTALLER },
{ USB_DEVICE(0×0ace, 0×20ff), .driver_​info = DEVICE_​INSTALLER },

What Aztech should have done is to submit the USB ID to the developers of the zd1211rw driver. In this way, any Linux dis­tri­bu­tion that comes out with the updated kernel will have sup­port for the device.

It is very import­ant to get the man­u­fac­tur­ers to change men­tal­ity. From offer­ing a CD with “drivers”, for free and open-​source soft­ware they should also work upstream with the device driver developers of the Linux kernel. The effort is small and the cus­tomer bene­fits huge.

Discussion Area - Leave a Comment