I had such trouble getting my wireless G card to work under Debian 3.1 R2. So I figured I would post how I got my card working.

I could not find any good HOWTOs so using bits and pieces from other HOWTOs and reading up on wireless-tools and wpa_supplicant I was able to get my wireless-g card (WPC54GS Linksys) working great.

First you need to be running the 2.6 Kernel. I am not sure which version so I used 2.6.8.


apt-get install kernel-image-2.6.8-2-686

This will automaticly update your kernel. reboot when the install is complete and select the new kernel and you're good to go.

Now we want to get (apt-get) wireless-tools

apt-get install wireless-tools

Type "iwconfig" to see if wireless-tools is working. It won't find anything right now but thats fine since we have a ways to go.

Now we need the ndiswrapper so...

apt-get install ndiswrapper-modules-2.6.8-2-686

Now when that is complete try:

ndiswrapper -l

You will get a "no drivers are installed" message. Thats fine too since we have not loaded the drivers yet.

Now you need to download the Windows drivers for your wireless card and locate the ".inf" file. I used a linksys card and the drivers were contained within a ".cab" file. So I did:

To unzip the ".zip"
apt-get install unzip

To uncab the ".cab" file you need:
apt-get install cabextract

The ".cab" file I used was built with InstallShield so I needed unshield:
apt-get install unshield

Now locate the ".inf" file and run:

ndiswrapper -i DRIVER.inf

I only needed one ".inf" file and it was the only one in the archive (lsbcmnds.inf) but load each ".inf" file the same way. Now run:

ndiswrapper -l

and check to see if you get a driver present message like:

Installed ndis drivers:
lsipnds driver present, hardware present

If you get any other message then the driver is bad or you missed something.

Now you want to load the Module for the ndiswrapper you can manually do that by running:

insmod /lib/modules/`uname -r`/misc/ndiswrapper.ko

The "`" is next to the one the same as a tilde key.

Now you can try "iwconfig" to see if you have the wireless card working. Mine was called wlan0


You should get something like this:

wlan0 IEEE 802.11b ESSID:off/any
Mode:Managed Frequency:2.437 GHz Access Point: 00:40:05:C5:4E:03
Bit Rate:11 Mb/s Tx-Power:17 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-69 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:54 Invalid misc:512 Missed beacon:0

Now the card is setup and working. Easy huh? well now lets connect to something.

To be able to test the wireless you should disconnect any other network cards.

If you are using WPA you will need wpa_supplicant. Do:

apt-get install wpasupplicant

Now you need to edit the ".conf" file for wpa_supplicant but first you need the WPA key so do:

wpa_passphrase SSID PASSPHRASE > /etc/wpa_supplicant.conf

Replace the SSID with your SSID and PASSPHRASE with your WPA key. It will put the output in the ".conf" file. Now you need to edit /etc/wpa_supplicant.conf when you first open it you should see:

psk=ffc39b1e76424da33afaf2b39be37f9a5596ae06e20801 839edac01061356bc9

Now you want to add a few things.

psk=ffc39b1e76424da33afaf2b39be37f9a5596ae06e20801 839edac01061356bc9

Now you're config file should be good to go.

Next we need to test it so:

wpa_supplicant -Bw -Dndiswrapper -iwlan0
dhclient wlan0

Now in theory you should be connected. If not then double check your WPA key and SSID.

I added the following to the /etc/init.d/pcmcia file at the bottom of the start action:

insmod /lib/modules/2.6.8-2-686/misc/ndiswrapper.ko
wpa_supplicant -Bw -Dndiswrapper -iwlan0
dhclient wlan0

Pulled from: