Back to home
<<Back to Linux Notebook

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.

  1. Download the appropriate packages

    # apt-get update
    # apt-get install ndiswrapper-source wireless-tools

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

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

  4. Unpack the windows driver

    # unzip ndis5x-8180(170).zip

  5. Unpack the ndiswrapper source

    # cd /usr/src
    # tar -jvxf ndiswrapper-source.tar.gz

  6. Get the fakeroot package

    # apt-get install fakeroot

  7. Compile the NDIS wrapper

    # cd /usr/src/linux
    # fakeroot make-kpkg --append-to-version=-2006-0720.02 modules_image

  8. Get the ndiswrapper-utils package

    # apt-get install ndiswrapper-utils-1.8

  9. Install the newly compiled NDIS wrapper package

    # cd /usr/src
    # dpkg -i ndiswrapper-modules-2.6.15-2006-0720.02.Custom_i386.deb

  10. Use depmod to manage dependencies of the new package

    # depmod

  11. Install the windows driver

    # ndiswrapper -i /home/tew/NET8180.INF

  12. Check to see that the driver got properly installed

    # ndiswrapper -l

    You should see the windows driver listed there.

  13. Insert the kernel module

    # modprobe ndiswrapper

  14. Check that interface is available

    # iwconfig

  15. Set essid. Replace "mylan" with whatever your actual essid is.

    # iwconfig wlan0 essid mylan

  16. Check for an access point using the above settings

    # iwlist wlan0 scan

  17. Set the mode

    # iwconfig wlan0 mode Managed

  18. Set a WEP encryption key (enter the actual key, instead of the X's)

    # iwconfig wlan0 key restricted XXXXXXXX

  19. Bring up the Wifi card

    # ifup wlan0

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

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






Linux Notebook on FluggartFluggartEmail