How to use ndiswrapper
Be aware this document presumes one has a working ndiswrapper and only covers the usage of same, not compiling and installation. See bottom of this document for the page where those instructions may be found. To follow the instructions on this page one will usually need root access either via direct root login or sudo.
Get the Windows driver for your Network Interface Card (NIC) chipset. Unpack the Windows driver with unzip|cabextract|unshield tools and find the INF file (i.e., file with .INF or .inf extension) and the SYS file (i.e., file with .SYS or .sys extension). If there are multiple INF/SYS files, you may have to look in the ndiswrapper Chipset List to see if there are any hints about which of them should be used. Make sure the INF file, SYS file and any BIN files (for example, TI drivers use BIN firmware files) are all in one directory. Now use 'ndiswrapper' tool to install the driver:
ndiswrapper -i INF filename
This should copy all needed files to /etc/ndiswrapper and also creates the config files for your card.
If you should see this, 'basename: too many arguments', it means it may be having trouble due to spaces in the directory names.
After installing the drivers, you can now check the status of your installed drivers:
ndiswrapper -l
If you have installed the correct driver, you should see something like this:
Installed ndis drivers
bcmwl5 hardware present
Where "present" means that you have a card that can be used with the driver installed. In this case, broadcom driver bcmwl5 is used.
If everything has gone well to this point, it is now time to load the module:
modprobe ndiswrapper
If you got no error, then the driver should now be loaded. You can verify this by checking system log (produced by dmesg).
dmesg
If the driver was loaded successfully, you should see something similar to the following message:
ndiswrapper version V loaded
Make sure the version V here matches the version of the ndiswrapper package that you downloaded and installed. If you get a different version, you should uninstall ndiswrapper and go back to the beginning.
If you don't get the the above message, check if ndiswrapper is loaded with the lsmod command:
lsmod
If ndiswrapper is not listed with the 'lsmod' command then check dmesg for an error message.
If you have successfully installed windows drivers earlier (with ndiswrapper -i INF filename), the ndiswrapper module will load them all. You should then see the following messages in system log for each of the drivers.
ndiswrapper: driver driver1 added
If you don't see these messages, it usually means that there are no (usable) drivers installed in the /etc/ndiswrapper directory. Check if the /etc/ndiswrapper directory has one sub-directory for each driver and if in each driver's directory there are inf, sys and conf files. Otherwise, you may need to repeat the 'ndiswrapper -i INF filename' and 'ndiswrapper -l' steps.
If the system has a card that works with one of the loaded drivers, you should see the following message in the system log:
wlan0: ndiswrapper ethernet device xx:xx:xx:xx:xx:xx
Use iwconfig to configure the wireless network interface. First, see if the interface is available with:
iwconfig
This will print the wireless interface (e.g., wlan0). In the examples below wlan0 is used, replace wlan0 with the interface reported by iwconfig above. The wireless configuration to be used should match what your Access Point (AP) uses. First, find out if you can see your AP with:
iwlist wlan0 scan
If this lists your AP, you can continue. Otherwise, you may have one of two problems: Your AP doesn't broadcast SSID or the radio of the card is turned off.
If you see the AP in the scan above, set the operating mode of the interface according to your setup. In most cases this will be mode Managed.
iwconfig wlan0 mode Managed
If you use encryption (WEP), set the key:
iwconfig wlan0 key restricted XXXXXXXX
You can use 6 hex digits for 40-bit encryption or 10 hex digits for 128-bit encryption. You may need to use open security mode instead of restricted depending on the setup of your AP. If you want to write the key in ASCII use s: (e.g. iwconfig wlan0 key restricted s:password).
Set the network name, replace ESSID with the network name used by your AP:
iwconfig wlan0 essid ESSID
If essid is not set, then ndiswrapper itself works and the rest of this section may or may not help you.
Now, setup the network parameters for the interface wlan0. This varies from distribution to distribution. Refer to your distribution's documents on how to do this. Once this is done, you can use network tools to bring up the network:
ifconfig wlan0 up
or
dhclient wlan0
or
dhcpcd wlan0
Once everything works fine, you can write the correct modprobe settings to load ndiswrapper automatically when wlan0 interface is used, by running:
ndiswrapper -m
Note that this doesn't automatically load ndiswrapper module at boot time. If you want the module to be loaded automatically at boot time, you should configure your module setup, which depends on the distribution. Most distributions will load all modules listed in /etc/modules at boot time. For them, you can add a line in /etc/modules:
ndiswrapper
Note: this information borrowed from a forum post at http://www.linuxfordummies.org/ and edited to clean it up for HTML.
If you find any of the documents on our information pages useful please make a secure donation to help us defray the cost of our bandwidth to provide these documents. Thank you.

