Selasa, 14 Agustus 2012

0

Wireless on Debian

  • Selasa, 14 Agustus 2012
  • AcehCyber
  • # aptitude install ndiswrapper-dkms

    # ndiswrapper -i /full/path/to/WinXP/Driver/driver.inf
    # ndiswrapper -m
    # modprobe ndiswrapper

    # aptitude install ndiswrapper-dkms
    which will pull in all needed sources and dependencies in the process.
    Those running Debian old-stable (Lenny) must install/compile by hand
    CODE: SELECT ALL
    # aptitude install module-assistant ndiswrapper-source ndiswrapper-utils
    # m-a prepare
    # m-a a-i ndiswrapper

    Either way, you should now have the ndiswrapper.ko kernel module available in the /lib/modules/... tree for your current kernel. DKMS automatically reacts when installing a new kernel version; the manual procedure must be redone in that case.
    2. Mount the CD that came with your device, or log in at the manufacturer's website, and find the Windows XP driver for it (Windows Vista or Windows 7 drivers may not work).

    Important: if you're running a 64-bit system ("AMD64" kernel) then you'll need a 64-bit WinXP driver; a 32-bit version of the driver will not work in a 64-bit OS (even though it appears to install OK in Ndiswrapper).

    The driver will be called something like <name>.inf; there may also be a companion .sys file in the same or the parent directory. If you're getting the driver from somewhere else, make sure to also get that companion file (when present) and put it in a directory that retains the relationship with the directory the .inf file is in (e.g. its parent directory, when appropriate). Write down the full path to the driver, like /media/cdrom/Driver/WINXP/<name>.inf.
    3. Install the driver (still as root) into Ndiswrapper with
    CODE: SELECT ALL
    # ndiswrapper -i /media/cdrom/Driver/WINXP/<name>.inf
    # ndiswrapper -m
    # ndiswrapper -l
    of course substituting the path in your own setup. That last command may also show an alternative driver, like ssb or b43. This poses a bit of a problem that we deal with in item 5. Assuming that you don't have this problem, continue with the next item.
    4. Insert the module (still as root) with
    CODE: SELECT ALL
    # modprobe ndiswrapper

    There should be no error messages from the modprobe command. If necessary, add ndiswrapper to /etc/modules for automatic insertion at boot. Next insert the wireless device, if you haven't already, and watch what happens with one or more of the commands
    CODE: SELECT ALL
    # iwconfig
    # iwlist scan
    # ifconfig

    These commands should show the presence of the new wireless interface, like wlan0 (or ra0, etc), although not yet configured... but that's another story.
    5. But what if that new wireless interface of the previous step doesn't show? This could happen when the ndiswrapper module isn't loaded early enough in the boot sequence, allowing another kernel module like ssb or b43 to take over. What to do?

    Well, it could be that one of those additional modules is in fact a driver for your wireless device! This could be true for b43, in which case you wouldn't need ndiswrapper... but often the b43 driver doesn't work, so you do need ndiswrapper. If there is no other device using that module, then blacklisting it in /etc/modprobe.d/blacklist(.conf) could be tried: just add the module name, like ssb to the blacklist file with an editor. Note that blacklisting only takes effect after the command (as root)
    CODE: SELECT ALL
    # update-initramfs -u

    If blacklisting is no option (only experience will tell) then putting ndiswrapper in /etc/modules may cause it to load earlier, but it may also be necessary to force that alternative driver (and drivers dependent on it) to load after the ndiswrapper driver. Using ssb as an example, make a little script /usr/local/bin/wireless
    CODE: SELECT ALL
    #!/bin/sh
    rmmod ssb ndiswrapper
    modprobe ndiswrapper
    modprobe ssb
    and make this script executable (as root) with the command
    CODE: SELECT ALL
    # chmod a+x /usr/local/bin/wireless
    then call for it to be executed in /etc/rc.local or (if that's too late in the boot sequence) in a file like /etc/init.d/bootmisc.sh. In both cases, just add a line like
    CODE: SELECT ALL
    /usr/local/bin/wireless
    to that file. You may have to experiment a bit until it works; for an example see the 11 May 2008 post by hellfire[bg] in this thread.
    Finally, this all may not work whatever you try. In that case, assuming that you aren't mixing 32-bit and 64-bit stuff, you may just be out of luck. That could be the case with devices using the newer wireless 802.11n protocol, for which often only Windows Vista and/or Windows 7 drivers are available. Ndiswrapper development doesn't seem very active anymore, so don't hold your breath while waiting for the developers to address the chipset in your particular wireless device. Yes, life is hard sometimes, consider getting a wireless bridge or game adapter instead -- I'm using one myself.

    Have fun!

    This HOWTO has benefited from numerous suggestions by Debian users, especially the comments by mzilikazi are appreciated. Thx

    0 Responses to “Wireless on Debian”


    *Important - If you want to be informed of any replies to your comment, check the "Subscribe By Email" before submitting. Please Do Not Spam

    Posting Komentar