Arthur de Jong

Open Source / Free Software developer

Using WPC54G with Debian

2004-05-22

Note that this document is outdated and no longer describes my current setup. This card is now supported in the Linux kernel since 2.6.something.

This document roughly describes the steps I used to get my Linksys WPC54G CardBus 802.11g wireless network adapter to work under Debian GNU/Linux. This is really a one-time document that I do not really intend on keeping up-to-date (though I may occasionally update it). The steps I used here work for me but your milage may vary. You can mail be about this document, but changes are that I don't have an answer for any problems you run into.

Note

This page is probably outdated since it describes a setup that was done some time ago. More recent and up-to-date information can be found here: http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,installation/, here: http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,list_g-l/ and here: http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,faq/.

My setup

I run Debian GNU/Linux testing (as of 2004-05-22) on a Dell Inspiron 4150. I bought a Linksys WPC54G card, the relevant output of lspci -v is:

0000:07:00.0 Network controller: Broadcom Corporation BCM94306 802.11g (rev 03)
        Subsystem: Linksys WPC54G
        Flags: bus master, fast devsel, latency 64, IRQ 11
        Memory at 11000000 (32-bit, non-prefetchable) [size=8K]
        Capabilities: [40] Power Management version 2

and lspci -vn:

0000:07:00.0 Class 0280: 14e4:4320 (rev 03)
        Subsystem: 1737:4320
        Flags: bus master, fast devsel, latency 64, IRQ 11
        Memory at 11000000 (32-bit, non-prefetchable) [size=8K]
        Capabilities: [40] Power Management version 2

I used a Linksys WAP54G access point with a pretty standard configuration.

Steps

Prerequisites

  • Debian testing (or unstable) (stable should also work now that sarge has been released)
  • kernel with correct modules (pcmcia, etc) (I use a 2.4.25 kernel built with make-kpkg)
  • kernel sources available (or correct kernel-headers package installed)

Install ndiswrapper

The ndiswrapper is a Linux kernel module that acts as a wrapper for loading NDIS (Microsoft Windows network) drivers. This is obviously not the nicest solution but the one I got working without too many problems. If anyone knowns of a native driver that works, let me know.

  • install tools and module sources:
    apt-get install ndiswrapper-utils ndiswrapper-source
  • unpack module source and go to the module source directory:
    cd /usr/src
    tar -xvzf ndiswrapper-source.tar.gz
    cd modules/ndiswrapper
  • build the module package for your current kernel:
    debian/rules binary-modules KSRC=/lib/modules/`uname -r`/build
    (optionally change KSRC to point to the correct location of your kernel sources)
  • install the kernel module:
    dpkg -i ../ndiswrapper-modules-*.deb
  • Download the Windows driver from your vendor. I've got my driver here: ftp://ftp.linksys.com/pub/network/wpc54g_v2_driver_utility_v2.0.zip but be sure to check for a recent version.
  • Unzip the downloaded zipfile, find the correct .inf (lsbcmnds.inf in my case) file and run
    ndiswrapper -i lsbcmnds.inf
  • load the module and make it reload on reboot:
    modprobe ndiswrapper
    echo ndiswrapper >> /etc/modules

Now the wireless interface wlan0 should be available. You can check this with iwconfig from the wireless-tools package. To scan for access points do:

iwlist wlan0 scan

To configure the interface use:

iwconfig wlan0 channel 11 essid test mode Managed

changing the channel and essid to the values from the output of iwlist.

Autoconfiguration

You can have your wireless card scan for accesspoints and configure the network interface automatically. Install some packages:

apt-get install waproamd ifplugd

Edit /etc/default/ifplugd and set HOTPLUG_INTERFACES to "all". Edit /etc/default/waproamd and set HOTPLUG_INTERFACES to "all". Edit /etc/network/interfaces and add:

iface wlan0 inet dhcp

Now restart the neccesary services:

/etc/init.d/ifplugd restart
/etc/init.d/waproamd restart

There may be some missing components here, maybe hotplug, maybe some others that I have set up earlier, but these were the steps that I needed.

Issues

This is just a list of issues that I still have with this setup. Note that there may be more issues because I have not yet tested the card with WEP keys or more exotic configurations.

  • AirSnort does not work in this setup
  • most link-quality applets do not really work
  • I had occasional problems with suspend/resume of my laptop until I put APM=eject in /etc/apm/event.d/pcmcia
  • there were some problems with putting ndiswrapper in /etc/modules that does not seem to load the module correctly (I currently hand-load the module after every reboot)
  • I had a problem with enabling the card, after some digging I changed all the "RadioState|1" strings in /etc/ndiswrapper/lsbcmnds/14E4*.conf to "RadioState|0" (0 is on for this driver for some strange reason).
    sed -i.bak 's/RadioState|1/RadioState|0/' /etc/ndiswrapper/lsbcmnds/14E4*.conf