Installing Ndiswrapper in Debian
From NewbieDOC
- Chris Lale
- chrislale AT users DOT berlios DOT de
Go to NewbieDOC index
Revision History
Revision 1.0 | 5th May 2005 | Revised by Chris Lale | |||||||||
Initial release on Ndiswrapper wiki. | |||||||||||
| |||||||||||
Revision 1.1 | 21st May 2007 | Revised by Chris Lale | |||||||||
Initial release on NewbieDOC wiki from archive copy after disappearance from Ndiswrapper wiki. | |||||||||||
| |||||||||||
Revision 1.2 | 27th November 2007 | Revised by Chris Lale | |||||||||
Reformatted for newbiedoc package. Added Revision History, Abstract and Licence Appendix. | |||||||||||
Archive copy of "Installing Ndiswrapper in Debian (Sarge)" contributed to the Ndiswrapper wiki by Chris Lale. Added to NewbieDOC wiki after disappearing from the Ndiswrapper wiki.
1 Install Ndiswrapper1.1 Either install the deb packageAdd to /etc/apt/sources.list deb http://ndiswrapper.sourceforge.net/debian/ / Update and install ndiswrapper-source 1.2 Or download and install the source tarballInstallation guide at http://ndiswrapper.sourceforge.net/wiki/index.php/Installation (Installation) Instructions tested on Sarge using a D-link DWL-650G AirPlus cardbus adapter 2 Set up NdiswrapperLogin as a normal user and switch user to root $ su (supply root password) # 2.1 Install wireless-tools# aptitude install wireless-tools 2.2 Make sure that kernel headers are availableEither install kernel-source-n.n.n package and compile kernel, or install a kernel-image and matching kernel-headers package (check installed kernel using uname -a). Due to a recent upgrade in the debian package system, you now do this in Etch by running apt-get install linux-image-`uname -r` apt-get install linux-headers-`uname -r` 2.3 Add link to kernel headers# ln -s /usr/src/kernel-src-n.n.n /lib/modules/n.n.n/build 2.4 Download ndiswrapperto a suitable directory eg ~/ndis-install. 2.5 Unpack ndiswrapper# tar -xzvf ndiswrapper-0.11.tar.gz. 2.6 Make and install ndiswrappercd to ~/ndis-install/ndiswrapper-0.11 and # make install. 2.7 Copy Windows driversCopy Windows drivers to eg ~/wifi-drivers. Eg for D-link DWL-G650: A3AB9x.sys A3AB.cat A3AB.sys DWLInst.dll DWLNdi.dll NetA3AB.inf 2.8 Install the Windows driver# ndiswrapper -i ~/wifi-drivers/NetA3AB.inf 2.9 Check Windows driver is present# ndiswrapper -l Installed ndis drivers: neta3ab driver present, hardware present 2.10 Load the module# modprobe ndiswrapper 2.11 Check that interface is available# iwconfig 2.12 Set essid(replace mylan with essid set up on AP). # iwconfig wlan0 essid mylan 2.13 Check for Access Point (AP)# iwlist wlan0 scan 2.14 Set mode# iwconfig wlan0 mode Managed 2.15 Set WEP encryption# iwconfig wlan0 key restricted XXXXXXXX 2.16 Take down any existing ethernet hardwired interfaceOther interfaces seem to cause a conflict and prevent the wireless interface from working properly. # ifdown eth0 2.17 Bring up wireless interface# ifup wlan0 Note: If it complains about unknown interface wlan0, edit /etc/network/interfaces to include an entry for wlan0 mirroring eth0 2.18 Test the interface(Replace 192.168.1.1 with the IP of your AP - the gateway.) # ping 192.168.1.1 2.19 Make ISP's nameservers are available.Edit /etc/resolv.conf and add a nameserver line for each of your ISP's nameservers. search nameserver nnn.nnn.nnn.nnn nameserver nnn.nnn.nnn.nnn 2.20 Test nameservers# ping google.co.uk 3 Permanent setup once everything is working3.1 Set module to load at bootAdd line ndiswrapper to /etc/modules. This can also be done via the 'modconf' utility by simply installing the module (select 'misc' -> 'ndiswrapper') 3.2 Disable existing ethernet interfaceComment out any entry for eth0 in /etc/network/interfaces 3.3 Enable wireless interfaceAdd entry for wlan0 to /etc/network/interfaces. See man wireless and /usr/share/doc/wireless-tools/README.Debian. Note: one of these documents documents a "wireless-" prefix for wireless command, the other gives "wireless_" (underline character instead of hyphen). Both seem to work interchangeably. auto wlan0 iface wlan0 inet static address 192.168.1.nnn netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 # replace mylan with the essid set up on the AP wireless-essid mylan wireless-mode Managed # Set up encryption. wireless-keymode restricted wireless-key1 XXXXXXXXXX wireless-defaultkey 1 Note: including the line wireless-keymode open caused a configuration error when the network started. My AP is in open mode and still works without this line. 3.4 TestFirst, shut down the computer, set up encryption on the AP and boot the computer. You may have problems trying to set encryption on the AP while the computer is still connected without encryption. # ifdown wlan0 # ifup wlan0 # ping google.co.uk 3.5 Test the init scripts(these call ifup/ifdown) # /etc/init.d/networking stop # /etc/init.d/networking start # ping google.co.uk Exit the root user account # exit $ I hope it works for you. It did for me. 4 Appendix A: LicenceCopyright ©2005-2007 Chris Lale, chrislale AT users DOT berlios DOT de.
Go to NewbieDOC index |