Differences between revisions 27 and 29 (spanning 2 versions)
Revision 27 as of 2008-12-10 10:22:02
Size: 7227
Comment: typo fix
Revision 29 as of 2009-01-06 16:17:24
Size: 10378
Editor: GeoffSimmons
Comment: State arch availability.
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
''This page describes how to install [http://ndiswrapper.sourceforge.net/ NDISwrapper] on Debian systems.'' = NDISwrapper =
This page describes how to install NDISwrapper on Debian systems.
Line 4: Line 5:
= NDISwrapper =
Some vendors do not release specifications of the hardware, and don't provide a Linux driver for their wireless network cards. The [http://ndiswrapper.sourceforge.net/ NDISwrapper] project provides a Linux kernel module that loads and runs Windows kernel API and NDIS (Network Driver Interface Specification) API drivers supplied by the vendors within the Linux kernel. A Windows driver for wireless network card is then linked to this implementation so that the driver runs natively, as though it is in Windows, without binary emulation.
== Introduction ==
Some vendors do not release hardware specifications and do not provide a Linux driver for their wireless network devices.
Line 7: Line 8:
NDISwrapper uses the Windows *.inf driver files that came with your hardware to operate your wireless card on Linux. Most likely you will need to uncompress a *.cab file which contains your drivers. The [http://ndiswrapper.sourceforge.net/ NDISwrapper] project provides a Linux kernel module that loads and runs Windows kernel API and NDIS (Network Driver Interface Specification) API drivers supplied by the vendors within the Linux kernel. A Windows driver for a wireless network card is then linked to this implementation so that the driver runs natively, as though it is in Windows, without binary emulation.

NDISwrapper uses Windows XP driver files - which may have been supplied with your hardware - to operate your wireless device. This driver wrapper is ''only'' available for use on the x86 and x86-64 architectures (Debian ["i386"] and [:DebianAMD64:AMD64] ports respectively).
Line 10: Line 13:
To install the NDISwrapper module for use with the Debian stock kernel, enter the following commands (as root): === Debian Packages ===
Line 12: Line 15:
 . {{{
# aptitude install module-assistant wireless-tools
# m-a prepare && m-a update
# m-a a-i ndiswrapper
# modprobe ndiswrapper
# echo ndiswrapper >> /etc/modules
 1. Install the DebPkg:module-assistant and DebPkg:wireless-tools packages: {{{
aptitude install module-assistant wireless-tools
Line 19: Line 18:
## need to determine exact README locations on Etch and Lenny systems
## You find more instruction in /usr/share/doc/ndiswrapper*/README*
NDISwrapper is now inserted into the Linux kernel. It will again be inserted during system startup.
== NDIS Drivers ==
You need to have the appropriate Windows driver for your card. The first place you should check is the [http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,list/ NDISwrapper compatiblity list]. It lists many models of wireless cards that are usable with NDISwrapper and the driver that works best.
 1. Build and install a ndiswrapper-modules-* package for your system: {{{
m-a prepare
m-a a-i ndiswrapper
}}}
 1. Add {{{ndiswrapper}}} to the list of kernel modules to load at boot: {{{
echo ndiswrapper >> /etc/modules
}}}
 1. Insert the NDISwrapper module into the kernel: {{{
modprobe ndiswrapper
}}}
More information on building the NDISwrapper kernel module is described within {{{/usr/share/doc/ndiswrapper-source/README.Debian}}}.
Line 25: Line 30:
If you can't find it there, the [http://www.linuxant.com/driverloader/drivers.php Linuxant Windows Driver] page has many drivers that work with NDISwrapper. It also has drivers for some 64 bit cards that don't offer native 64 bit drivers on the manufacturer's web page. Once the module is loaded, [#ndis_driver install a NDIS driver] and [#configure configure your wireless interface].
Line 27: Line 32:
The final place you should go is your CD or the manufacturer's web page. These often work, but sometimes they're broken or don't offer you full functionality. It's best to go with the ones listed on the NDISwrapper web page. === From Source ===
<!> The following procedure is only necessary for [:DebianEtch:Etch] systems which require a version of NDISwrapper greater than 1.28.

 1. Install necessary development packages, along with DebPkg:wireless-tools: {{{
aptitude install build-essential linux-headers-$(uname -r) wireless-tools
}}}
 1. Download and compile the NDISwrapper [http://sourceforge.net/project/showfiles.php?group_id=93482 source code].
 For example, to acquire and build NDISwrapper version 1.53: {{{
wget http://superb-east.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.53.tar.gz
tar xvf ndiswrapper-1.53.tar.gz
cd ndiswrapper-1.53
make
su
make install
}}}
 1. Add {{{ndiswrapper}}} to the list of kernel modules to load at boot: {{{
echo ndiswrapper >> /etc/modules
}}}
 1. Insert the NDISwrapper module into the kernel: {{{
modprobe ndiswrapper
}}}

Once the module is loaded, [#ndis_driver install a NDIS driver] and [#configure configure your wireless interface].

[[Anchor(ndis_driver)]]
== NDIS Driver ==
You are required to provide the appropriate Windows XP driver for your device. The first place you should check is the [http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,list/ NDISwrapper compatiblity list]. It lists many models of wireless devices that are usable with NDISwrapper and the driver that works best.

If you can't find it there, the [http://www.linuxant.com/driverloader/drivers.php Linuxant Windows Driver] page has many drivers that work with NDISwrapper. It also has drivers for some 64-bit devices that don't offer native 64-bit drivers on the manufacturer's web page.

The final place you should examine is your driver CD or the manufacturer's web page. These often work, but sometimes they're broken or don't offer you full functionality. It's best to go with the ones listed on the NDISwrapper web page.

The driver you find may be packaged as a ZIP (.zip) archive or in the [wiki:WikiPedia:Portable_Executable Portable Executable] (.exe) format. The .exe file may just be a ZIP archive, you can run the {{{unzip}}} de-archiver (provided by the DebPkg:unzip package) to extract its contents.

Other .exe files may be !InstallShield installers or other installer formats. These require the use of utilities such as DebPkg:unshield or DebPkg:orange to extract the contents within.

If your drivers are within the [wiki:WikiPedia:Cabinet_(file_format) cabinet file format] (.cab), install DebPkg:cabextract and run {{{cabextract}}} on a file of interest, typically named {{{data2.cab}}}.
Line 30: Line 71:
The drivers you find may be packaged as ZIP, or an executable file. Some of the EXE files are just ["zip"] files, so you can run ["unzip"] and obtain driver files. Some EXE files are CAB files, so run DebPkg:cabextract and/or unshield on CAB file, typically named data2.cab <!> The following procedure is specific to the "Dell Wireless Card 1390" (man: 14e4, dev: 4311) device and is provided as an '''example only'''. Consult the [http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,list/ NDISwrapper compatiblity list] for information on your specific device.
Line 32: Line 73:
Assuming you have downloaded the Windows driver in ~/Desktop/Downloads/V11.1.1.0_XP_DRIVERS.ZIP :

 . {{{
$mkdir /usr/local/i4965/
$cd /usr/local/i4965/
$unzip -q ~/Desktop/Downloads/V11.1.1.0_XP_DRIVERS.ZIP
$ndiswrapper -i /usr/local/i4965/NETw4x32.INF
 1. Install the DebPkg:unzip package: {{{
aptitude install unzip
Line 40: Line 76:
Alternatively, you might refer directly to any Windows-owned folder. If the way to this folder (the pathname) contains white spaces, e.g. "Program Files", it is recommended first to move with ["cd"] to the folder containing the required ''*.inf'' file:

 . {{{
cd '/windows/where the inf file is'
ndiswrapper -i this_and_that.inf
 1. Acquire an archive containing the NDIS driver from Dell's FTP site: {{{
wget http://ftp.us.dell.com/network/R151517.EXE
Line 46: Line 79:
Let's make sure it's configured :

 . {{{
$ndiswrapper -l
installed drivers:
netw4x32 driver installed, hardware (8086:4233) present
 1. Extract its contents: {{{
unzip -a R151517.EXE
}}}
 1. Install the NDIS driver: {{{
ndiswrapper -i DRIVER/bcmwl5.inf
}}}
 1. To verify NDIS driver installation, list the currently installed drivers: {{{
ndiswrapper -l
}}} You should receive the following output: {{{
bcmwl5 : driver installed
        device (14E4:4311) present
Line 54: Line 92:
This should be it. Refer to the NDISwrapper manual page for more information:
  * Debian Lenny/5.0: [http://manpages.debian.net/cgi-bin/man.cgi?query=ndiswrapper-1.9&apropos=0&sektion=8&manpath=Debian+Sid&format=html&locale=en ndiswrapper-1.9(8)]
  * Debian Etch/4.0: [http://manpages.debian.net/cgi-bin/man.cgi?query=ndiswrapper-1.9&apropos=0&sektion=8&manpath=Debian+4.0+etch&format=html&locale=en ndiswrapper-1.9(8)]
  * Debian Sarge/3.1: [http://manpages.debian.net/cgi-bin/man.cgi?query=ndiswrapper&apropos=0&sektion=8&manpath=Debian+3.1+sarge&format=html&locale=en ndiswrapper(8)]
Line 59: Line 100:
To uninstall a driver, you need to type:

 .
{{{
ndiswrapper -e <then the name of the driver to uninstall>
To remove a previously installed NDIS driver from your system: {{{
ndiswrapper -e <driver>
Line 64: Line 103:
An additional check can be to look at

 . {{{
/etc/ndiswrapper
For example: {{{
ndiswrapper -e bcmwl5
Line 69: Line 106:
if a directory named as the installed driver is there available.
Line 73: Line 109:
== Interface Configuration ==
See [:WiFi/HowToUse:How To use Wifi network adapter].
[[Anchor(configure)]]
== Configuration ==
 1. Verify your device has an available interface: {{{
iwconfig
}}}
 If your interface is not present, physically remove and insert the device, then run {{{iwconfig}}} again.
Line 76: Line 116:
=== Configure on insert / hotplug ===
According to a DebianEtch entry on the ndiswrapper wiki, an 'allow-hotplug wlan0' entry in /etc/network/interfaces is about all it takes to get the card to be automatically configured and brought up when inserted (beyond the required steps to configure the card for manually bringing the interface up.)
 1. Raise the interface to activate the radio, for example: {{{
ifconfig wlan0 up
}}}
 1. [:WiFi/HowToUse:Configure] your wireless interface as appropriate.
Line 79: Line 121:
http://ndiswrapper.sourceforge.net/mediawiki/index.php/InstallDebianEtch

On Sarge this does not appear to be the case. Adding that line does not make hotplug 'just work'. This is most likely due to the lack of an entry for NDISwrapper in /lib/modules/<kernel version>/modules.pcimap. According to the hotplug overview when new hardware is detected the MODULE_DEVICE_TABLE map is consulted to determine which module is responsible for the device. Without that entry or some other help hotplug will not 'just work' for the device.

The easiest workaround is to require the NDISwrapper module at boot so that it is always loaded and ready to claim the hardware. Just add it to the list in /etc/modules.

The most difficult workaround (for many) may be to edit the NDISwrapper source and recompile so that it will make MODULE_DEVICE_TABLE entries for your hardware.

http://www.linuxquestions.org/questions/showthread.php?t=360483 http://sourceforge.net/mailarchive/message.php?msg_id=6713442

An inbetween workaround may be to modifiy /etc/hotplug/pci.agent to parse an /etc/hotplug/pci.handmap and have it include the hardware details necessary to load ndiswrapper when your card is inserted, like you can do with usb.handmap. This step and the re-coding are probably best left to the developers which leaves us with /etc/modules.

There seems to be a couple different ways documented to enable hotplugging on interfaces (once hotplugging is working for ndiswrapper). Mentioned in the DebianEtch page on the NDISwrapper wiki is the line allow-hotplug wlan0. The man page for the interfaces file confirms that this is the intended way to enable hotplug. In /etc/hotplug/net.agent, you are directed to include mapping hotplug stanzas in /etc/network/interfaces.
=== Insert / Hotplug ===
## Commented due to ndiswrapper being specified in /etc/modules at module installation time -- GeoffSimmons
##According to a !DebianEtch entry on the NDISwrapper wiki, an 'allow-hotplug wlan0' entry in /etc/network/interfaces is about all it takes to get the card to be automatically configured and brought up when inserted (beyond the required steps to configure the card for manually bringing the interface up.)
##
##
http://ndiswrapper.sourceforge.net/mediawiki/index.php/InstallDebianEtch
##
##On Sarge this does not appear to be the case. Adding that line does not make hotplug 'just work'. This is most likely due to the lack of an entry for NDISwrapper in /lib/modules/<kernel version>/modules.pcimap. According to the hotplug overview when new hardware is detected the MODULE_DEVICE_TABLE map is consulted to determine which module is responsible for the device. Without that entry or some other help hotplug will not 'just work' for the device.
##
##The easiest workaround is to require the NDISwrapper module at boot so that it is always loaded and ready to claim the hardware. Just add it to the list in /etc/modules.
##
##The most difficult workaround (for many) may be to edit the NDISwrapper source and recompile so that it will make MODULE_DEVICE_TABLE entries for your hardware.
##
##http://www.linuxquestions.org/questions/showthread.php?t=360483 http://sourceforge.net/mailarchive/message.php?msg_id=6713442
##
##An inbetween workaround may be to modify /etc/hotplug/pci.agent to parse an /etc/hotplug/pci.handmap and have it include the hardware details necessary to load ndiswrapper when your card is inserted, like you can do with usb.handmap. This step and the re-coding are probably best left to the developers which leaves us with /etc/modules.
##
There seems to be a couple different ways documented to enable hotplugging on interfaces. Mentioned in the !DebianEtch page on the NDISwrapper wiki is the line allow-hotplug wlan0. The man page for the interfaces file confirms that this is the intended way to enable hotplug. In /etc/hotplug/net.agent, you are directed to include mapping hotplug stanzas in /etc/network/interfaces.
Line 95: Line 141:
== Cabinet Archives ==
You can try unpacking *.cab files with any of the following:
== External Links ==
 * [http://ndiswrapper.sourceforge.net/ NDISwrapper homepage];
  * [http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,list/ NDISwrapper compatibility list]
  * [http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/ Wiki]
 * NDISwrapper manual pages:
  * Debian Lenny/5.0: [http://manpages.debian.net/cgi-bin/man.cgi?query=ndiswrapper-1.9&apropos=0&sektion=8&manpath=Debian+Sid&format=html&locale=en ndiswrapper-1.9(8)]
  * Debian Etch/4.0: [http://manpages.debian.net/cgi-bin/man.cgi?query=ndiswrapper-1.9&apropos=0&sektion=8&manpath=Debian+4.0+etch&format=html&locale=en ndiswrapper-1.9(8)]
  * Debian Sarge/3.1: [http://manpages.debian.net/cgi-bin/man.cgi?query=ndiswrapper&apropos=0&sektion=8&manpath=Debian+3.1+sarge&format=html&locale=en ndiswrapper(8)]
Line 98: Line 150:
== See Also ==
Line 99: Line 152:
 * DebPkg:unshield - extracts CAB files from InstallShield installers (If it doesn't succeed, you might want to try using i5comp or i6comp under Windows. search it in google)
== See Also ==
 * NDISwrapper
  * [http://ndiswrapper.sourceforge.net/ Homepage]
  * [http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/ Wiki]
  * [http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,list/ ndiswrapper compatibility list]
 * WiFi
 * DebPkg:orange - extracts CAB files from self-extracting installers
 * DebPkg:unshield - extracts CAB files from !InstallShield installers
 * [:WiFi/HowToUse: How To use Wifi network adapter]

NDISwrapper

This page describes how to install NDISwrapper on Debian systems. ?TableOfContents(3)

Introduction

Some vendors do not release hardware specifications and do not provide a Linux driver for their wireless network devices.

The [http://ndiswrapper.sourceforge.net/ NDISwrapper] project provides a Linux kernel module that loads and runs Windows kernel API and NDIS (Network Driver Interface Specification) API drivers supplied by the vendors within the Linux kernel. A Windows driver for a wireless network card is then linked to this implementation so that the driver runs natively, as though it is in Windows, without binary emulation.

NDISwrapper uses Windows XP driver files - which may have been supplied with your hardware - to operate your wireless device. This driver wrapper is only available for use on the x86 and x86-64 architectures (Debian ["i386"] and [:DebianAMD64:AMD64] ports respectively).

Module Installation

Debian Packages

  1. Install the module-assistant and wireless-tools packages:

    aptitude install module-assistant wireless-tools
  2. Build and install a ndiswrapper-modules-* package for your system:

    m-a prepare
    m-a a-i ndiswrapper
  3. Add ndiswrapper to the list of kernel modules to load at boot:

    echo ndiswrapper >> /etc/modules
  4. Insert the NDISwrapper module into the kernel:

    modprobe ndiswrapper

More information on building the NDISwrapper kernel module is described within /usr/share/doc/ndiswrapper-source/README.Debian.

Once the module is loaded, [#ndis_driver install a NDIS driver] and [#configure configure your wireless interface].

From Source

<!> The following procedure is only necessary for [:DebianEtch:Etch] systems which require a version of NDISwrapper greater than 1.28.

  1. Install necessary development packages, along with wireless-tools:

    aptitude install build-essential linux-headers-$(uname -r) wireless-tools
  2. Download and compile the NDISwrapper [http://sourceforge.net/project/showfiles.php?group_id=93482 source code]. For example, to acquire and build NDISwrapper version 1.53:

    wget http://superb-east.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.53.tar.gz
    tar xvf ndiswrapper-1.53.tar.gz
    cd ndiswrapper-1.53
    make
    su
    make install
  3. Add ndiswrapper to the list of kernel modules to load at boot:

    echo ndiswrapper >> /etc/modules
  4. Insert the NDISwrapper module into the kernel:

    modprobe ndiswrapper

Once the module is loaded, [#ndis_driver install a NDIS driver] and [#configure configure your wireless interface].

?Anchor(ndis_driver)

NDIS Driver

You are required to provide the appropriate Windows XP driver for your device. The first place you should check is the [http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,list/ NDISwrapper compatiblity list]. It lists many models of wireless devices that are usable with NDISwrapper and the driver that works best.

If you can't find it there, the [http://www.linuxant.com/driverloader/drivers.php Linuxant Windows Driver] page has many drivers that work with NDISwrapper. It also has drivers for some 64-bit devices that don't offer native 64-bit drivers on the manufacturer's web page.

The final place you should examine is your driver CD or the manufacturer's web page. These often work, but sometimes they're broken or don't offer you full functionality. It's best to go with the ones listed on the NDISwrapper web page.

The driver you find may be packaged as a ZIP (.zip) archive or in the [wiki:Portable_Executable Portable Executable] (.exe) format. The .exe file may just be a ZIP archive, you can run the unzip de-archiver (provided by the unzip package) to extract its contents.

Other .exe files may be InstallShield installers or other installer formats. These require the use of utilities such as unshield or orange to extract the contents within.

If your drivers are within the [wiki:Cabinet_(file_format) cabinet file format] (.cab), install cabextract and run cabextract on a file of interest, typically named data2.cab.

Installation

<!> The following procedure is specific to the "Dell Wireless Card 1390" (man: 14e4, dev: 4311) device and is provided as an example only. Consult the [http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,list/ NDISwrapper compatiblity list] for information on your specific device.

  1. Install the unzip package:

    aptitude install unzip
  2. Acquire an archive containing the NDIS driver from Dell's FTP site:

    wget http://ftp.us.dell.com/network/R151517.EXE
  3. Extract its contents:

    unzip -a R151517.EXE
  4. Install the NDIS driver:

    ndiswrapper -i DRIVER/bcmwl5.inf
  5. To verify NDIS driver installation, list the currently installed drivers:

    ndiswrapper -l

    You should receive the following output:

    bcmwl5 : driver installed
            device (14E4:4311) present

Refer to the NDISwrapper manual page for more information:

You can alternatively use ndisgtk to install drivers to the system.

Uninstallation

To remove a previously installed NDIS driver from your system:

ndiswrapper -e <driver>

For example:

ndiswrapper -e bcmwl5

You can alternatively use ndisgtk to uninstall drivers from the system.

?Anchor(configure)

Configuration

  1. Verify your device has an available interface:

    iwconfig

    If your interface is not present, physically remove and insert the device, then run iwconfig again.

  2. Raise the interface to activate the radio, for example:

    ifconfig wlan0 up
  3. [:WiFi/HowToUse:Configure] your wireless interface as appropriate.

Insert / Hotplug

There seems to be a couple different ways documented to enable hotplugging on interfaces. Mentioned in the DebianEtch page on the NDISwrapper wiki is the line allow-hotplug wlan0. The man page for the interfaces file confirms that this is the intended way to enable hotplug. In /etc/hotplug/net.agent, you are directed to include mapping hotplug stanzas in /etc/network/interfaces.

On a Debian 3.1 / Dell Inspiron 1200 system the allow-hotplug entry did not seem to be necessary. The map stanza seemed to be enough, once NDISwrapper was already loaded. YMMV.

See Also

  • cabextract - a program to extract Microsoft Cabinet files

  • orange - extracts CAB files from self-extracting installers

  • unshield - extracts CAB files from InstallShield installers

  • [:WiFi/HowToUse: How To use Wifi network adapter]