Ndiswrapper

Wireless for linux is tricky at best, and frustrating almost all the time.

Wireless support for linux is progressing slowly, and it can be very frustrating to set it up correctly.

That being said, you can get the majority of wireless cards to work for linux, even if it takes a little bit of extra work.

The reason for this? You can actually use the Windows XP (and perhaps other versions of windows, I'm not sure) drivers.

In most cases, if it work's with windows, it will work with linux. Just with more work involved.

Every distro is very diffrent when it comes to wireless, which can be frustrating. Debian (woody) worked quickly, after setting up nidis wrapper. SuSe 9.1, however, took nearly an hour to work (be default, they cripple wireless. Several files you need for wireless are making, and you have to make them. Manually.)

If you want help with SuSe or other distros that my guide doesn't work with, I suggest you visit their forums.

This post I found on SUSE's forums might help:

http://slforums.typo3-factory.net/index.ph...wtopic=1264&hl=

Before we start, I reccommend that you grab dhcpcd. Most distros include this by default, but you might have to install it yourself. I won't cover this here, since you can usually find a .rpm/.deb/etc file for it, or grab it through yast/apt-get/up2date.

Let's start by seeing if your wireless card is recogized by linux.

iwconfig

Does any wlan# show up? If so, skip the next section. If not, read on.

Section 1: Setting up ndiswrapper



ndiswrapper is *very* easy to set up.

Download the latest release from http://ndiswrapper.sourceforge.net/

tar -zxf ndisiwrapper-x.x.x.tar.gz
cd ndiswrapper*
./configure
make
su
make install


Section 2: Setting up your wireless device



Make sure you've 'modprobe ndiswrapper'

Pop in your wireless driver CD, and:

mount /dev/cdrom /mnt/cdrom
ndiswarpper -i /mnt/cdrom/WinXP/driver.inf

iwlist wlan0 (or whatever number) will show you details about the various wireless networks around you.

Find the one you want to use, and copy/write down the information listed. Things to look for are ESSID, mode, and encryption upon other things.

iwconfig wlan0 will show the *current* details of whatever network you are connected to. If the internet isn't working, you want to check here and see what you're missing! (be it a key, ESSID, or DHCP)
/usr/sbin/iwconfig wlan0 key open KEYHERE (open might be replaced by managed, depending)
/usr/sbin/iwconfig wlan0 essid ESSIDHERE


Generally then all you need to do is 'ifconfig wlan0 up' and 'dhcpcd wlan0'

You may have to replace dhcpcd wlan0 with 'ifup wlan0' or 'ifup wlan0 wlan0'

You can automate this process at startup by using this simple script, and adding it to /etc/rc.d (or whatever it is on your distro). You might want it somewhere else, like .bash_profile, it's up to you.

Personally, I don't like it running on start up for security reasons. It's not that hard to

type sudo /home/user/wireless

Feel free to copy/change this little script. You might want to make several of them

(wireless-home, wireless-school, wireless-friend1, wireless-friend2)

CODE

#!/bin/bash
echo "Loading ndiswrapper..."
/sbin/modprobe ndiswrapper
echo "Setting up wlan0..."
#I require open, instead of restricted. You might have to change this
/usr/sbin/iwconfig wlan0 key open KEYHERE
/usr/sbin/iwconfig wlan0 essid ESSIDHERE
echo "Finishing..."
#I acually need to use these three to get it working in SuSE. xD
#Trial and error will help you find which one(s) you need
/sbin/ifup wlan0
/sbin/ifup wlan0 wlan0
/sbin/dhcpcd wlan0