Tips Linux Explorers   All Things Linux Forum   Great Linux Links   Hometown    

( Installing Windows Wireless Drivers in Linux )

Here is the second Wireless Networking Tip from Julia ( aka Teacher ). If you have a card that is not supported under Linux, this is one way you can get it working with the Windows drivers. It will not give you the full 100% download speed, but still, it is better then not being connected at all.

QUOTE (Julia @ Forum 2005)

Installing a windows wireless driver in Linux can be done through the use of a program called ndiswrapper.  This is the way to go if your wireless card does not have Linux support. 

The very first thing you need to do is locate the .inf file in Windows that supports your driver.  *)
If you do not have Windows on your computer, you will need to search on the Internet or the disks that came with your card for the inf file.  Make sure the file is somewhere you have easy access to from Linux.

Ndiswrapper does not work with old kernels.  You must be running at least a 2.4 or higher kernel.  You will also need a package called Wireless Tools installed.  This comes with most distributions and is there ready for you to install it. 

1.  Install Wireless Tools through your control center of your distro.
2.  Obtain your copy of ndiswrapper and wireless tools.  If it is available through your distribution then go ahead and install it that way.  If not download the latest from ndiswrapper on SourceForge.
Extract the file with:


$ tar zxvf ndiswrapper-1.0.tar.gz
$ cd ndiswrapper-1.0
$ su
# make
# make install

3.  Now that you have your ndiswrapper and your wireless tools installed, you are ready to get down to business:

# ndiswrapper -i (name of your file).inf
# ndiswrapper -l

This should give you a printout like this:

[root@localhost julia]# ndiswrapper -l
Installed ndis drivers:
netasag driver present, hardware present

Now you are ready to continue. 

4.  Next it is time to probe for  your ndiswrapper.  It should just continue without any messages.  If so, you will then continue to the next step:

# modprobe ndiswrapper
# iwconfig

This will give you a printout like this:

lo        no wireless extensions.
eth0      no wireless extensions.
eth1      no wireless extensions.
sit0      no wireless extensions.
wlan0     IEEE 802.11g  ESSID:"YourNetworkname"  Nickname:"localhost"
         Mode:Managed  Frequency:2.412 GHz  Access Point: 00:00:00:00:00:00
         Bit Rate=54 Mb/s
         Encryption key:off
         Link Quality:22/100  Signal level:-93 dBm  Noise level:-256 dBm
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0

With this you can continue with:

# iwlist wlan0 scan

This will give you all the details  to show it is working.  Here is mine:

wlan0     Scan completed :
         Cell 01 - Address: 00:0F:3D:5A:95:BC
                   Protocol:IEEE 802.11g
                   Frequency:2.437 GHz (Channel 6)
                   Quality:0/100  Signal level:-50 dBm  Noise level:-256 dBm
                   Encryption key:off
                   Bit Rate:1 Mb/s
                   Bit Rate:54 Mb/s

You can see that I have an ESSID of XXXXXX and am using Channel 6.  Managed means I am not running WEP at the moment. If you are then you will need to tell it "open" rather than managed.  You will take the information from this printout to do your configuration:

# iwconfig wlan0 mode Managed (or Open or Shared if using WEP)
# iwconfig wlan0 key restricted XXXXXXXXXX
(if using wep this is where you tell it your key)
# iwconfig wlan0 essid YourNetworkName [code]

Now that you have it configured you have just a few things left to do.;)

You will need to do one of the following three commands.  You might have to do trial and error.  For me in mandrake it was dhclient wlan0 (which of course was the last I tried. :D  The choices are:

[code]# ifconfig wlan0 up
# dhclient wlan0
# dhcpcd wlan0

If that worked you are now ready to tell it to load it automatically each time you boot up. 

# ndiswrapper -m

In most cases it will finish by saying "Adding "alias wlan0 to ndiswrapper" to /etc/modprobe.conf". 

Happy wireless browsing.

Julia has more wireless tricks up her sleeve and even some that can give a better connection than this hack with the Windows drivers . . . but more about that next time in the next episode of Wireless Networking.
Thanks Teach !


PS: Here is an interesting link with a list of cards known to work with ndiswrapper

*) You can use Majorgeeks - DriverBackup to backup the drivers in Windows Vista or XP. It will locate and copy the wireless drivers to a folder.

-- Mar 1 2005 ( Revised Dec 30 2008 ) --

Tips Linux Explorers   All Things Linux Forum   Great Linux Links   Hometown