Setting up Ndiswrapper

From Freespire

Jump to: navigation, search

Home-->Documentation-->Hints & Tips-->Setting up Ndiswrapper

Setting up Ndiswrapper

Wouldn't it be nice if all wireless cards worked 'out of the box' in Linux? Many do, but unfortunately many don't. Luckily there's a little programme that allows you to use the Windows driver in Linux, and it works really well. It's called ndiswrapper, and in Freespire it's installed by default. I couldn't see an ndiswrapper how to on this forum so thought I'd write a quick one for those who need to use this utility.

The first stage is identifying the windows driver for your card. Rather than using the driver that came with your card, go to http://ndiswrapper.sourceforge.net/mediawiki/index.php/List and see what driver others have succesfully used. You might find that this is already installed as Freespire comes with various drivers loaded into ndiswrapper. To check type the following command:

 sudo ndiswrapper -l

The output looks something like this:

 Installed ndis drivers:
 2802w           driver present
 ar5211          driver present
 ar5211-g                driver present
 bcmwl5-4301             driver present
 bcmwl5-4309             driver present
 bcmwl5-4318             driver present
 bcmwl5-94306            driver present
 bel6001         driver present
 i2220ntx                driver present
 lsipnds         driver present
 lstinds         driver present
 mrv8ka51                driver present
 n3ab            driver present
 net5211         driver present
 neta504         driver present
 netani          driver present
 netdlwl         driver present
 netrw796                driver present
 ntpr11ab                driver present
 prisma02                driver present
 rt2400          driver present
 rtl8180         driver present
 w70n51          driver present
 wg311v2         driver present
 wusb54g         driver present
 wusb54gv2               driver present[/code]

If your driver isn't there download the driver that corresponds to your card. Usually the download is a compressed file, so uncompress it and extract the *.inf and *.sys files. If there's several of these the drivers you need are the ones for Windows XP (usually). For the purpose of this example I'll assume the driver files are called rt2500.inf and rt2500.sys (these are for the ralink rt2500 chipset), and that you've downloaded them to your desktop.

The next step is to create a directory for the driver files and to move them into that directory:

 mkdir windriv
 mv ~/Desktop/rt2500.inf rt2500.sys ~/windriv/

Now load the driver:

 cd windriv
 sudo ndiswrapper -i rt2500.inf

Even if your driver was preinstalled everyone should now follow these steps. Check that the driver has loaded by typing:

 sudo ndiswrapper -l

The output should look something like this:

 Installed ndis drivers:
 rt2500 driver present, hardware present

If all went well load the ndiswrapper module by typing

 sudo modprobe ndiswrapper

Then type:

 sudo iwconfig

Again, if all went well you should see an interface called wlan0. You should now be able to configure your connection with the network tools in the control centre.

Once you're online and everything seems to be working setup the modprobe settings by typing:

 sudo ndiswrapper -m

and add ndiswrapper to the end of the /etc/modules file to ensure it loads when booting.

 sudo kwrite /etc/modules
Personal tools