Results 1 to 1 of 1
Wireless LAN in Linux Wireless support in Linux can be pretty shrewd to say the least. Most wireless vendors base their cards on cheap chip sets that have no support ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-28-2007 #1
Wireless LAN in Linux
Wireless support in Linux can be pretty shrewd to say the least. Most wireless vendors base their cards on cheap chip sets that have no support for Linux. This can lead to a lot of hassle. However there is a solution.
Ndiswrapper is a utility for Linux that allows you to use Windows wireless drivers on your Linux system. I've used it several times on different computers and had it working perfectly.
Ubuntu: Instead of running commands as root, use sudo before each command (e.g. sudo modprobe ndiswrapper)
This tutorial was written using Kubuntu Feisty (7.04) I do not guarantee that it will work. Some things in this tutorial may be specific to Kubuntu. If you find yourself unable to do something in this tutorial e-mail me and I shall try and fix it.
Before trying Ndiswrapper, it's recommended you have a browse around Google to find native drivers for your card since these will probably work better than Ndiswrapper. If you don't know your device chipset run lspci or lsusb (Depending on what type it is) and it should tell you. If you've come up empty handed or the native driver is a bit iffy, continue.
First of all we need to get Ndiswrapper, we can either compile from source or get a distribution specific package. I recommend finding a distribution specific package rather than compiling from source as it's more likely to work.
From The Internet
If you have internet access through another device run these commands in console.
Debian users (As root):
apt-get install ndiswrapper-common ndiswrapper-utils-1.9
sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9
yum install kmod-ndiswrapper
yast2 -i ndiswrapper
If you don't have internet access (or if you don't know how to get packages from the repository) you'll need to get packages from somewhere else and transfer them onto your Linux box. Here are a few places you can get packages from:
RPM based distributions (Suse, Fedora Core, Mandrivia):
(Search for ndiswrapper for your distribution)
Debian based distributions (Debian, Ubuntu):
Debian -- Packages
(Search for ndiswrapper-common and ndiswrapper-utils-1.9
If you can't be arsed with all that, you may like to compile from source, a source tarball can be found at the Ndiswrapper Website. It's recommended you use a stable release, not a testing release.
Move to the directory where the tarball is located:
tar -zxvf ndiswrapper-1.44.tar.gz
make make install
Wrapping The Drivers
If you completed the last section successfully then you should be able to run 'ndiswrapper' in console and get some output without errors. That being the case, lets move on.
Just a brief explanation, the driver for the wireless card will be a .inf file; sometimes there are additional files the .inf file needs to install such as .sys files. Keep these files with the .inf file otherwise you won't be able to use it.
First of all, find the drivers, either on a CD or someone on your hard drive, then run this command as root.
ndiswrapper -i /path/to/driver.inf
ndiswrapper -e driver_name
graham@lightside:~$ ndiswrapper -l bcmwl5 : driver installed device (14E4:4320) present (alternate driver: bcm43xx)
Loading the Module
Now, we're almost sorted. We need to load the module, to do this run the following (As root):
If you don't see anything errors, then it worked! Your card should be active.
This is important, after this run dmesg to find the device name of the card (Default wlan0) without that you won't be able to setup the card. Also you can use iwconfig (described below) to list wireless devices, like so.
graham@lightside:~$ iwconfig lo no wireless extensions. eth0 IEEE 802.11b ESSID:"13cliff" Mode:Managed Frequency:2.462 GHz Access Point: 00:0D:54:9C:D9:CC Bit Rate=11 Mb/s Tx-Power:14 dBm RTS thr=2347 B Fragment thr=2346 B Power Management:off Link Quality:78/100 Signal level:-46 dBm Noise level:-96 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Assuming the driver works (Check for lights) then all we need to do is connect to the access point. You can use GUI tools like KNetworkManager to set-up the connection, this is recommended if you're likely to connect to more than one access point. However I'm going to show you IWconfig, IWconfig is part of Wireless Tools for Linux and will let us connect to the access point by running these commands (As root):
iwconfig <device name> essid <essid of ap> iwconfig <device name> key s:”<key>”
iwconfig eth0 essid 13cliff iwconfig eth0 key s:“myaccesspoint”
dhclient <device name> dhcpcd <device name>
If you have an alternative driver for the card (that isn't functioning) you need to blacklist it. To do that, open a text editor and edit '/etc/modprobe.d/blacklist' with any non-formatting text editor (kwrite, gedit, nano) (As root):
# driver blacklisted and replaced by ndiswrapper blacklist <drivername>
modprobe -r <drivername>
modprobe -r bcm43xx
E-mail me at graham.a (~at~) 13cliff.co.uk and I'll respond.
Last edited by devils casper; 06-12-2007 at 07:45 AM. Reason: a few code typos.Graham - You'd better Use Linux!
I'm registerd Linux user #397030. What about you?