Differences between revisions 25 and 26
Revision 25 as of 2008-07-01 16:27:29
Size: 7214
Editor: WillOrr
Comment: Added driver section
Revision 26 as of 2008-11-29 16:18:06
Size: 7226
Editor: GeoffSimmons
Comment: capitalization, removed unnecessary cruft, sections re-ordered, spelling
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Some vendors do not release specifications of the hardware, and don't provide a linux driver for their wireless network cards. 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. ''This page describes how to install [http://ndiswrapper.sourceforge.net/ NDISwrapper] on Debian systems.''
[[TableOfContents(3)]]
= 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.
Line 4: Line 7:
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. 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.
Line 6: Line 9:
== Packages ==
Make sure the following packages are installed:
== Module Installation ==
To install the NDISwrapper module for use with the Debian stock kernel, enter the following commands (as root):
## Note: m-a will download 'ndiswrapper-source' and install the relevant 'ndiswrapper-utils-*' package (during apt's installation of 'ndiswrapper-modules-*', to fulfil package dependencies). You don't need to explicitly install these packages prior to invoking m-a a-i!
 . {{{
# aptitude install module-assistant wireless-tools
# m-a prepare && m-a update
# m-a a-i ndiswrapper
# modprobe ndiswrapper
# echo ndiswrapper >> /etc/modules
}}}
## 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.
Line 9: Line 25:
 * packages DebPkg:ndiswrapper
 * packages ndiswrapper-${arch}-[default|smp|xen]
 * DebPkg:ndiswrapper-utils -Userspace utilities for ndiswrapper. You will also need the kernel module package.
 * DebPkg:wireless-tools (If you use a with wireless card)
Choose the proper kernel module package (${arch}) for your architecture. Most people will just need to use "ndiswrapper-${arch}-default".
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.
Line 15: Line 27:
You can also use DebPkg:ndisgtk , a graphical frontend for ndiswrapper . 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.
Line 17: Line 29:
== Drivers ==
You also 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 usuable with ndiswrapper and the driver that works the 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 cards that don't offer native 64 bit drivers on the manufacturer's web page.

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.

== Installation ==
Download the module's source and build a module binary package :

To download and install ndiswrapper tools and modules with debian ( provided you have the standard debian kernel )

 . {{{
apt-get install module-assistant ndiswrapper-utils ndiswrapper-source
m-a prepare
m-a update
module-assistant auto-install ndiswrapper
}}}
You find more instruction in /usr/share/doc/ndiswrapper*/README*
=== Installation ===
Line 47: Line 40:
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: 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:
Line 60: Line 53:
Then add ndiswrapper in /etc/modules
Line 62: Line 54:
 . {{{
# added ndiswrapper to load XXXXX Network driver.
ndiswrapper
}}}
You can either reboot you system to get the module loaded... or simply run {{{modprobe ndiswrapper}}} this time ;).
This should be it.
Line 68: Line 56:
This should be it. You can alternatively use DebPkg:ndisgtk to install drivers to the system.
Line 70: Line 58:
== Uninstallation == === Uninstallation ===
Line 83: Line 71:
== Configure interface ==
Use ["iwconfig"] to configure wireless network interface.
You can alternatively use DebPkg:ndisgtk to uninstall drivers from the system.
Line 86: Line 73:
=== Configure on insert / Hotplug === == Interface Configuration ==
See [:WiFi/HowToUse:How To use Wifi network adapter].

=== Configure on insert / hotplug ===
Line 91: Line 81:
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. 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.
Line 93: Line 83:
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 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.
Line 95: Line 85:
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. 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.
Line 101: Line 91:
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. 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.
Line 103: Line 93:
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. 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.
Line 105: Line 95:
== Cab == == Cabinet Archives ==
Line 111: Line 101:
 * Ndiswrapper  * NDISwrapper
Line 113: Line 103:
  * [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 compatiblity list].
  * [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 compatiblity list]

This page describes how to install [http://ndiswrapper.sourceforge.net/ NDISwrapper] on Debian systems. ?TableOfContents(3)

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.

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.

Module Installation

To install the NDISwrapper module for use with the Debian stock kernel, enter the following commands (as root):

  • # aptitude install module-assistant wireless-tools
    # m-a prepare && m-a update
    # m-a a-i ndiswrapper
    # modprobe ndiswrapper
    # echo ndiswrapper >> /etc/modules

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.

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.

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.

Installation

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 cabextract and/or unshield on CAB file, typically named data2.cab

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

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

Let's make sure it's configured :

  • $ndiswrapper -l
    installed drivers:
    netw4x32                driver installed, hardware (8086:4233) present

This should be it.

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

Uninstallation

To uninstall a driver, you need to type:

  • ndiswrapper -e <then the name of the driver to uninstall>

An additional check can be to look at

  • /etc/ndiswrapper

if a directory named as the installed driver is there available.

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

Interface Configuration

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

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.)

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.

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.

Cabinet Archives

You can try unpacking *.cab files with any of the following:

  • cabextract - a program to extract Microsoft Cabinet files

  • 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