Compiling the NDIS Wrapper
Now that the kernel has been recompiled, the NDIS wrapper can be compiled. An NDIS wrapper can be used to get a Wifi card (like the Netgear MA521 I have) working in Linux that does not have Linux drivers. I have never gotten an NDIS wrapper to compile correctly without recompiling the kernel first. It may be possible to skip the recompile of the kernel and use the modules-assistant package to compile the NDIS wrapper. However, this is not the method that I use, and I have never done it that way, so that writeup will have to wait until the future.- Download the appropriate packages
# apt-get update# apt-get install ndiswrapper-source wireless-tools - Get the unzip package so that the windows driver can be unpacked, along with the links browser so that things can be downloaded from webpages without install an X-server first.
# apt-get install unzip links - Download the windows driver for this Wifi card using links. Change to the directory that you want to download the driver to:
# cd /home/tew
Then use links to download the driver
# links http://www.realtek.com.tw/downloads/downloads1-3.aspx?Keyword=8180
Use the "d" key to download Win2K driver (ndis5x-8180(173).zip), then use the "q" key to quit. - Unpack the windows driver
# unzip ndis5x-8180(170).zip - Unpack the ndiswrapper source
# cd /usr/src# tar -jvxf ndiswrapper-source.tar.gz - Get the fakeroot package
# apt-get install fakeroot - Compile the NDIS wrapper
# cd /usr/src/linux# fakeroot make-kpkg --append-to-version=-2006-0720.02 modules_image - Get the ndiswrapper-utils package
# apt-get install ndiswrapper-utils-1.8 - Install the newly compiled NDIS wrapper package
# cd /usr/src# dpkg -i ndiswrapper-modules-2.6.15-2006-0720.02.Custom_i386.deb - Use depmod to manage dependencies of the new package
# depmod - Install the windows driver
# ndiswrapper -i /home/tew/NET8180.INF - Check to see that the driver got properly installed
# ndiswrapper -l
You should see the windows driver listed there. - Insert the kernel module
# modprobe ndiswrapper - Check that interface is available
# iwconfig
- Set essid. Replace "mylan" with whatever your actual essid is.
# iwconfig wlan0 essid mylan
- Check for an access point using the above settings
# iwlist wlan0 scan
- Set the mode
# iwconfig wlan0 mode Managed
- Set a WEP encryption key (enter the actual key, instead of the X's)
# iwconfig wlan0 key restricted XXXXXXXX
- Bring up the Wifi card
# ifup wlan0 - Assuming that worked, change settings so that the card will be brought up automatically during boot. First, modify the modules file so that the ndiswrapper module gets loaded at boot time
# nano -w /etc/modules
Add "modules" to a new line at the end of the file. - Now modify the /etc/network/interfaces file with the appropriate settings needed to connect to your wireless AP.
# nano -w /etc/network/interfaces
Add the following stanza to the end of the line (replacing "mylan" and "XXXXXXXX" with the appropriate ESSID and WEP key, respectively:
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless_essid mylan
wireless-key XXXXXXXX
(written 7/26/2006)
Now you can continue onto installing your X-server and other packages.
