Page 1 of 121 1231151101 ... LastLast
Results 1 to 10 of 1210

Thread: Comprehensive ndiswrapper troubleshooting guide

  1. #1
    Join Date
    Aug 2007
    Location
    Paris
    Beans
    5,538
    Distro
    Ubuntu 11.04 Natty Narwhal

    Comprehensive ndiswrapper troubleshooting guide

    2013-12-29: Ndiswrapper used to be the standard solution to a lot of problems regarding wireless cards. However, today the native Buntu drivers for a number of cards have improved, and Ndiswrapper should be seen as last resort.

    Be careful if you find old advice pointing you to Ndiswrapper. Usually the best approach is googling for results younger than two years.

    /Mörgæs

    = = = = = = =

    Introduction


    There are plenty of good how-tos on ndiswrapper out there, but many of them lack thorough troubleshooting sections or omit important information. This guide is intended to diagnose and solve the most common issues that prevent ndiswrapper from working, even after it appears to be successfully installed and configured.

    This guide assumes that you've followed ndiswrapper instructions somewhere and as far as you know completed all steps successfully, but still are unable either to see wireless networks (using the "iwlist scan" command) or make your system detect your wireless interface at all. (If you can see networks but can't manage to connect for some reason, steps 5 and up may be useful, although they were not written specifically for your situation.) If that describes your troubles, start at the top of this guide and work your way down; hopefully you'll discover the source of your problem and be able to resolve it.

    Please note that this is not intended to be another guide to installing and setting up ndiswrapper, as that would be redundant. If you need help getting started with ndiswrapper, refer to the community documentation or do a Google search.


    1. check whether ndiswrapper recognizes your wireless card


    ndiswrapper won't work until it thinks that your Windows drivers have been properly installed and that they are the appropriate ones for your wireless card. You can run the command:
    Code:
    ndiswrapper -l
    (that's a lowercase L, not a 1) to find out whether it recognizes your card properly (make sure your wireless card is plugged in and turned on before running that command). If you get a message like:
    Code:
    netwg111 : driver installed
        device (0846:4240) present (alternate driver: p54usb)
    then ndiswrapper detects your card correctly and believes that you have installed the appropriate Windows drivers for it. In that case, go on to check #2 below. If ndiswrapper mentions an "alternate driver" (p54usb in the example above) and you haven't already blacklisted it, you may want to do so now; see check #3 below for instructions on how to blacklist modules that may interfere with ndiswrapper. (Note that the "alternate driver" message doesn't necessarily mean that a conflicting driver is causing ndiswrapper not to work. To determine for sure whether a conflicting driver is the problem, you need to look at the output of lshw -C Network; see check #3 below for details.)

    'invalid driver!' message

    If ndiswrapper -l complains about an invalid driver, it most likely means that it was unable to find a .sys file corresponding to the .inf file that you loaded into ndiswrapper. The .sys file (which usually, but not always, has the same name as the .inf file) needs to be in the same directory as the .inf when you install the Windows driver. So if ndiswrapper is telling you that an invalid driver is installed, try installing your Windows driver again, and make sure that the .sys file is in the same folder as the .inf that you install into ndiswrapper.

    finding the right drivers: Note: the ndiswrapper database is currently down; please see the notice below for more information

    If the output of 'ndiswrapper -l' says that a driver is installed but doesn't mention either device XXXX:XXXX present or invalid driver, then something's wrong: most likely you installed the wrong Windows driver.

    The most reliable way to locate the appropriate Windows drivers for your wireless device is to search the ndiswrapper site for your wireless card's device ID and chipset model. To get the device ID and chipset model of your card, run the command:
    Code:
    lspci -nn
    or, if your wireless card is an external USB stick, use:
    Code:
    lsusb
    The output of the 'lspci' or 'lsusb' command should include a line describing your wireless card (note that the relevant line may not necessarily include the word "wireless"; it may mention only "ethernet" or "network communications device" or something similar), including its device ID. For example, here is a line for an Atheros PCI wireless card, with the important information in bold:
    Code:
    01:01.0 Ethernet controller [0200]: Atheros Communications Inc. AR2413 802.11bg NIC [168c:001a] (rev 01)
    and here's the line for a Netgear WG111v2 USB wireless card (in this example, the chipset model is not mentioned...but you should always at least see the device ID number):
    Code:
    Bus 001 Device 003: ID 0846:4240 NetGear, Inc. WG111 WiFi (v2)
    Once you've determined the device ID of your wireless card, use Google to search the ndiswrapper site (the built-in search function of the site doesn't work very well). Search for site:ndiswrapper.sourceforge.net [device ID] or site:ndiswrapper.sourceforge.net [chipset name], e.g.:
    or:

    IMPORTANT NOTE: as of early October, the ndiswrapper database has been broken for some time--it returns blank pages when you try to access it. It's not clear when this is going to be resolved. As a result, I copied Google's cache of the database pages to my personal website. You can access them here. Put your wireless card's name or device ID into the search function of that site, and any relevant pages in the database will be brought up.

    The result should return a link to the ndiswrapper wiki with information on where to find good Windows drivers for your card. For instance, the search above (for device ID 168c:001a) leads to a page with this information:

    * Chipset: Atheros AR5007EG (rev 01)
    * PCI ID: 168c:001c
    * Driver: ftp://ftp.work.acer-euro.com/noteboo...s_v5_1_1_9.zip
    * ndiswraper version : > 1.45
    * other : need to uninstall all madwifi kernel module before use ndiswrapper
    * other : if you can’t get any AP signal, try to enable wifi radio through wlan switch (it’s look like nothing happened when you try to enable through wifi, because the LED is not compatible with linux(i’m using ubuntu 7.04), but if you try ‘iwlist wlan0 scan’ you’ll see some AP information
    * other : 64-bit XP driver is available at http://www.giga-byte.com.tw/Support/...Name=GN-WI01GT
    which nicely outlines where to find Windows drivers for the card in question, and special tweaks that may be required to make the card work.

    If your wireless card is very new, you may not find any references to it on the ndiswrapper site. If that's the case, try using the Windows drivers that came on a CD with your wireless card, or download drivers from the manufacturer's site. You may have to try a few different versions of the Windows drivers before you get one that works.

    what if the Windows drivers are inside a .exe file?


    Increasingly, wireless-card vendors are releasing Windows drivers in .exe format, making it difficult to extract the .inf and .sys files that you need to load into ndiswrapper (loading the whole exe. won't work). On Linux, you can sometimes extract .exe packages using the commands 'unzip' or 'cabextract' (needs to be installed first with sudo apt-get install cabextract), or use 7-zip in Windows to break the .exe open. If that doesn't work, try running the .exe installer using wine; it should extract the driver files to a directory at some point, at which time you can copy them over elsewhere, then kill the installer (the Windows installer will not make your wireless card work on Linux, even if it appears to install everything properly; don't bother trying). In a worst case, install the .exe package on a Windows machine, and the .inf and .sys files that you need should be copied into c:\windows\system32 (or system64), from whither you can copy them to your Linux system.

    forcing device recognition:

    In rare cases, ndiswrapper doesn't recognize wireless cards even when the correct Windows drivers are installed. If this happens, you can force ndiswrapper to try to use a certain driver for a given device with the command sudo ndiswrapper -a device-id driver, e.g.:
    Code:
    sudo ndiswrapper -a 0846:4240 netwg111
    Note that there is a small chance that forcing ndiswrapper to use the wrong driver can cause physical damage to your wireless card, so you should not use the -a argument unless you have a good reason to believe that the Windows driver that you're selecting is the right one for your card, even though ndiswrapper disagrees.

    2. check machine architecture


    An important caveat to ndiswrapper, and one that many tutorials fail to mention, is that the architecture of the Windows drivers that you use with ndiswrapper needs to match that of your Linux kernel--no exceptions. In other words, if you're running 64-bit Ubuntu, the Windows drivers that you use need to be built for 64-bit Windows. If ndiswrapper -l reports "device present" but you still can't get your wireless card to work, this is the likely culprit--ndiswrapper will still report "device present" even if the Windows drivers are not the right architecture.

    If you don't know whether your kernel is 32 or 64-bit, run the command:
    Code:
    uname -m
    If the output is 'i686' (or possibly 'i586' or 'i486' on older machines), you have a 32-bit kernel; if it's 'x86_64,' you're using 64-bit. If the output is anything else, you don't have an x86-compatible processor and you can't use ndiswrapper (because Windows doesn't support platforms other than x86).

    If you installed Windows drivers built for the wrong architecture, find the appropriate ones and install them (you will need to remove the bad ones first with the sudo ndiswrapper -r driver-name command). Refer to check #1 above for information on locating good Windows drivers.

    Keep in mind that for some wireless cards, 64-bit Windows drivers were never released. If this is the case for your device and you want to use a 64-bit Linux kernel, you're probably out of luck. You could complain to your wireless-card vendor and demand 64-bit Windows drivers, or you could check to see if any native Linux driver will support your card. Otherwise, your only option is to switch to a 32-bit kernel.


    3. resolve conflicts with competing wireless drivers


    If ndiswrapper -l looks good and you're sure that your Windows drivers are built for the right architecture, but you still can't get the system to recognize your wireless device, it could be because another wireless driver is trying to control the card. Some native Linux wireless drivers (many of which are built into the Ubuntu Linux kernel by default) will claim a device even though they're not capable of driving it successfully.

    To check whether another driver is trying to claim your device, use the command lshw -C Network. Here's an example of the output:
    Code:
      *-network:0             
           description: Wireless interface
           product: AR2413 802.11bg NIC
           vendor: Atheros Communications Inc.
           physical id: 1
           bus info: pci@0000:01:01.0
           logical name: wifi0
           version: 01
           serial: 00:19:e0:67:8a:f1
           width: 32 bits
           clock: 33MHz
           capabilities: pm bus_master cap_list logical ethernet physical wireless
           configuration: broadcast=yes driver=ath_pci ip=192.168.1.3 latency=168 maxlatency=28 mingnt=10 module=ath_pci multicast=yes wireless=IEEE 802.11g
    In bold is information about which driver (module) is controlling the device in question (if you don't see any drivers or modules mentioned and the first line of lshw mentions UNCLAIMED, move on to check #4). In the example above, the driver is ath_pci, which is a native Linux driver for Atheros-based wireless cards. Other common drivers that may conflict with ndiswrapper are 'b43' (Broadcom chipsets), 'ssb' (Broadcom), 'bcm43xx' (Broadcom), 'iwl3945' (Intel), 'iwl4965' (Intel) and 'rt2x00' (Ralink).

    ndiswrapper won't work until you tell the system not to use the module that's trying to claim the card. You can prevent the system from loading modules by adding them to '/etc/modprobe.d/blacklist' (in Ubuntu 9.04 and later, this file is named /etc/modprobe.d/blacklist.conf' instead of just 'blacklist'). Open up the blacklist file with:
    Code:
    sudo gedit /etc/modprobe.d/blacklist
    (or 'sudo gedit /etc/modprobe.d/blacklist.conf' if you're using Ubuntu 9.04 or later) and add to the bottom of the file a line to blacklist each module that you want the system to ignore. For example, to blacklist 'ath_pci,' add the line:
    Code:
    blacklist ath_pci
    Then save the file and run this command:

    Code:
    sudo update-initramfs -k all -u
    Now reboot. Thereafter, the system will not load ath_pci until you remove it from the blacklist, and ndiswrapper should be free to claim the wireless card.

    module-dependency issues:


    Once in a while, the system will load a module even though it's on the blacklist. This happens because the module is a dependency of another module that's not on the blacklist--for example, 'b44,' an ethernet driver, requires the 'ssb' module and won't allow it to be unloaded, so you have to also add 'b44' to the blacklist in order to force the system to ignore 'ssb.'

    If after a reboot lshw -C Network still shows a module other than ndiswrapper claiming your wireless card, use the rmmod command to remove the module. For example, to remove 'ssb,':
    Code:
    sudo rmmod ssb
    If the system doesn't want to unload the module because of dependency issues, it will tell you which modules are at the root of the dependency, so that you can blacklist them too. If 'ssb' cannot be unloaded because of 'b44,' for example, then the command above would output:
    Code:
    ERROR: Module ssb is in use by b44
    Then you could blacklist 'b44' as per the instructions above (don't forget to run update-initramfs -k all -u after editing your /etc/modprobe.d/blacklist file) and everything would be great (except your ethernet may not work, but that's another issue).

    module-alias problems:

    If you still find the conflicting module being loaded and you're sure that module-dependency issues are not the problem, it's probably because an alias of the module in question needs also to be blacklisted (thanks to caljohnsmith for pointing this out). To find out if the module that you want to blacklist has aliases, run the command:


    Code:
    depmod -n | grep alias | grep -v ':' | grep -i [module name]
    e.g.:

    Code:
    depmod -n | grep alias | grep -v ':' | grep -i p54usb
    would list aliases for the module p54usb, a driver for Prism-based USB wireless cards. The output from the example above would tell you that p54usb has the alias prism54usb, so in order to blacklist p54usb effectively, you would need also to add the line blacklist prism54usb to your /etc/modprobe.d/blacklist file.

    *many thanks to nightmarelord for pointing out the bit about running sudo update-initramfs -k all -u after updating the blacklist file.


    4. check that the ndiswrapper module is loaded


    If the lshw -C Network output for your wireless card looks like:
    Code:
    
      *-network:0 UNCLAIMED
           description: Ethernet controller
           product: AR2413 802.11bg NIC
           vendor: Atheros Communications Inc.
           physical id: 1
           bus info: pci@0000:01:01.0
           version: 01
           width: 32 bits
           clock: 33MHz
           capabilities: pm cap_list
           configuration: latency=168 maxlatency=28 mingnt=10
    then no driver, including ndiswrapper, is trying to claim the card. This is bad, because you want ndiswrapper to claim it.

    If you've run through all of the checks above but lshw -C Network still reports your wireless card as unclaimed, the most likely cause is that the ndiswrapper module is not being loaded by the system. To check whether it's present, run the command:
    Code:
    lsmod | grep ndis
    If the output returns nothing, the ndiswrapper module is not being loaded for some reason. Try running this command to load it:
    Code:
    sudo modprobe ndiswrapper
    Then wait a few seconds and see if your wireless card is detected. If so, great; keep reading for steps on making the system load ndiswrapper automatically. Otherwise, move on to check #5.

    Loading ndiswrapper automatically at boot:

    In modern versions of Ubuntu, ndiswrapper is supposed to be loaded automatically at boot. Sometimes for various reasons that fails to happen, however. If this appears to be your problem, run this command:

    Code:
    echo 'ndiswrapper' | sudo tee -a /etc/modules
    and the problem should be resolved. This command tells the system explicitly to load the ndiswrapper module while booting, no matter what.


    5. check dmesg output


    dmesg prints messages from the kernel. If you've run through all of the stuff above but still can't get ndiswrapper to work, it may be because something weird is going on (e.g., a bug in ndiswrapper or the Windows driver); dmesg should provide some insight into the problem. You can get dmesg information related to ndiswrapper with the command:
    Code:
    dmesg | grep -e ndis -e wlan
    Normal output for a working ndiswrapper configuration should look similar to:
    Code:
    [  507.517874] ndiswrapper version 1.52 loaded (smp=yes, preempt=no)
    [  507.555668] ndiswrapper: driver net5211 (,05/02/2007,5.3.0.45) loaded
    [  507.969072] ndiswrapper: using IRQ 20
    [  508.055020] wlan0: ethernet device 00:1f:3a:8f:13:96 using serialized NDIS driver: net5211, version: 0x50003, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 168C:001C.5.conf
    [  508.060224] wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
    [  508.060642] usbcore: registered new interface driver ndiswrapper
    [  508.139154] ADDRCONF(NETDEV_UP): wlan0: link is not ready
    If dmesg doesn't mention ndiswrapper at all, run sudo modprobe ndiswrapper and then try dmesg | grep -e ndis -e wlan again, or go back to check #4 to verify that the ndiswrapper module is being loaded by the system.

    If your dmesg output contains error messages related to ndiswrapper, try googling them (leave out the numbers in brackets at the beginning of each line, which are timestamps and will throw off your Google search) to see if you can figure out a fix. Unfortunately, it's impossible here to cover every kind of strange problem with ndiswrapper that dmesg may reveal, but Google may be able to help.

    In addition, below are some of the most common error messages that you may encounter in dmesg, and their meaning:

    If dmesg complains about "bad magic," you probably installed drivers for the wrong architecture (e.g., 32-bit Windows drivers on 64-bit Linux). Refer back to check #2.

    If dmesg mentions something like "radio disabled by hardware," you probably need to turn your wireless card on; see check #6 below.

    If dmesg contains a lot of errors that begin with "unknown symbol," it probably means that the Windows driver that you installed is either corrupted or that ndiswrapper doesn't like it for some reason. It may help to reinstall the Windows driver, or choose a different version of it (e.g., try the Windows 2000 driver instead of the XP one, or try version 1.0 of the driver instead of 2.0). Sometimes it's the case that a certain release of the Windows driver doesn't agree with ndiswrapper, even though it should. It can also happen that the Windows drivers that you downloaded were corrupted in transit, so downloading them a second time (and checking the md5 sum if possible) may help.

    Again, if your error message is not listed above, remember: Google (and, failing that, the Ubuntu forums) is your friend.



    6. make sure the wireless is turned on


    Some computers, particularly laptops, have switches for enabling and disabling wireless cards. Usually this is either a physical button on the outside of the computer, or a software switch that you toggle using key combinations, like function+F2. More often than you might think, wireless issues come down to the card being physically disabled, so if nothing above has helped you yet, make sure that your wireless is turned on.

    In rare cases, your wireless card (or the PCI bus holding it) may be disabled in your computer's BIOS for some reason, so if you can't seem to get the system to detect a wireless device at all (even an unclaimed one in the output of lshw -C Network), check BIOS.

    7. reinstall ndiswrapper from source


    Most people use the Ubuntu repositories (Synaptic or "apt-get") to install ndiswrapper using a Debian package. Sometimes, it's helpful to compile the program from source, which will ensure that the build of ndiswrapper that you're using matches your system's characteristics as exactly as possible. Compiling from source also usually gives you a more up-to-date version of ndiswrapper than the one available in the repositories. To compile ndiswrapper from source, follow these steps:

    First, remove Ubuntu's version of ndiswrapper by typing:
    Code:
    sudo apt-get remove --purge ndiswrapper-common
    Next, download the latest stable release of the ndiswrapper source code from the ndiswrapper site and save it to your desktop (if you don't have a wired Internet connection available for this step, download the ndiswrapper .tar.gz file on another computer and transfer it over via a USB stick or CD). Note: Ubuntu 8.10 (Intrepid) users should download ndiswrapper version 1.54 or later, as earlier versions won't compile on Intrepid.

    Additionally, if you are using Ubuntu 10.10 (Maverick) or later, you will also need to apply a patch in order for the source to compile. To grab the patch, go here, click the "Attached File" link, then click the "Download" link. Save the downloaded file to your desktop.

    Finally, extract the source and compile it (these commands assume that the ndiswrapper. tar.gz file is saved on your desktop, along with the file ndiswrapper-2.6.35.patch if you need the patch):
    Code:
    cd ~/Desktop
    sudo -s
    apt-get install build-essential patch
    tar -xzvf ndiswrapper*
    cd ndiswrapper*
    patch -p0 < ndiswrapper-2.6.35.patch ### Only run this command if you need the patch; otherwise, if you are using Ubuntu 10.04 or earlier, ignore this line
    make
    make install
    After that, you will need to reinstall the appropriate Windows drivers into ndiswrapper, and then reboot for good measure. Your wireless will then hopefully be working.


    8. none of the above helped


    If you've gone through all of the checks above and still have no idea why ndiswrapper won't work, the first thing to do is google a lot for ndiswrapper + ubuntu + [your wireless card name] or ndiswrapper + ubuntu + [your wireless card device ID]. In many cases, this will lead to a solution: remember, you're probably not the first person in the world to run into trouble with ndiswrapper with your particular wireless card (although it's possible if your card is really new). There may be some special hacking required to get it to work, and that should be documented somewhere on the Internet.

    If you're still at a total loss, start a new thread in the Networking and Wireless subforum of this site, or post below. Include results from the checks above, and hopefully someone will be able to help you figure out what's wrong and make your wireless work.

    ---

    This is a working guide. If you have suggestions for improvement, please tell me. If this guide helps you, I would also be grateful if you'd let me know.
    Last edited by mörgæs; December 29th, 2013 at 01:54 PM. Reason: Encouraging people to search for alternatives before following the Ndiswrapper approach.

  2. #2
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Comprehensive ndiswrapper troubleshooting guide

    Pytheas22, thanks for writing up a great guide for troubleshooting ndiswrapper! I just have a few suggestions that you might want to consider:
    Quote Originally Posted by pytheas22 View Post
    Code:
    netwg111 : driver installed
    	device (0846:4240) present (alternate driver: p54usb)
    then ndiswrapper detects your card correctly and believes that you have installed the appropriate Windows drivers for it. In that case, go on to check #2 below.
    This is just an idea, but I think that if the user gets the above results from ndiswrapper, the next thing they should do would be to blacklist the "p54usb" module, because that is being used instead of ndiswrapper according to the above output. That may be the only thing they need to do to get ndiswrapper working, and they wouldn't need to go through the next steps.

    Also, when they go to blacklist the module, it is important that they check for "aliases" of the module. Just as an example, "ndiswrapper -l" and "lsmod" may both show that the "prism54pci" module is being used for a particular PCI wireless card, and yet blacklisting "prism54pci" does no good because the prism54pci module is actually just an alias for the p54pci module. You have to blacklist the p54pci module instead of the prism54pci module to prevent it from interfering with ndiswrapper.

    So how do you figure out if the module reported by "lsmod" or "ndiswrapper -l" is just an alias? Here's one way of doing it:
    Code:
    depmod -n | grep alias | grep -v ':' | grep -i <module name>
    Where <module name> can be a substring, like as follows:
    Code:
    john@TECH5321:~$ depmod -n | grep alias | grep -v ':' | grep -i 54
    alias prism54usb p54usb
    alias prism54pci p54pci
    alias prism54common p54common
    As seen above, prism54pci is just an alias for p54pci. You would want to blacklist "p54pci" and not "prism54pci", as blacklisting the latter will do nothing.
    Quote Originally Posted by pytheas22 View Post
    For example, here is a line for an Atheros PCI wireless card, with its device ID in bold:
    Code:
    01:01.0 Ethernet controller [0200]: Atheros Communications Inc. AR2413 802.11bg NIC [168c:001a] (rev 01)
    Actually the relevant info I think is the "AR2413" and not the PCI ID "168c:001a", because the AR2413 is the chipset of the card. Ultimately, ndiswrapper cares only about the wireless chipset used, because that determines which Windows driver should be used with ndiswrapper.

    Anyway, those are just some ideas, and thanks again for writing a great troubleshooting guide.
    Last edited by caljohnsmith; August 10th, 2008 at 09:43 PM.

  3. #3
    Join Date
    Aug 2007
    Location
    Paris
    Beans
    5,538
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Comprehensive ndiswrapper troubleshooting guide

    Thanks a lot for the suggestions.
    This is just an idea, but I think that if the user gets the above results from ndiswrapper, the next thing they should do would be to blacklist the "p54usb" module, because that is being used instead of ndiswrapper according to the above output. That may be the only thing they need to do to get ndiswrapper working, and they wouldn't need to go through the next steps.
    Check #3 is supposed to cover dealing with competing native drivers, but I agree that it would make more sense to blacklist the competing driver from the outset if ndiswrapper detects one. I'll add that in to check #1 (I may not get a chance to do so till tomorrow).
    As seen above, prism54pci is just an alias for p54pci. You would want to blacklist "p54pci" and not "prism54pci", as blacklisting the latter will do nothing.
    This is a good point. But I've never seen a situation where the alternate driver referred to by 'ndiswrapper -l,' or the driver controlling a card according to 'lshw,' is named something other than what needs to be added to the blacklist. Have you run into that problem or can you think of an example? If so, I'll add that in, but I'm not sure whether it's necessary, and I wanted to keep this guide as short as possible (it's bloated enough already) so as to avoid overwhelming new users. If you think that this is important, though, then let me know and I'll definitely put it in.
    Actually the relevant info I think is the "AR2413" and not the PCI ID "168c:001a", because the AR2413 is the chipset of the card. Ultimately, ndiswrapper cares only about the wireless chipset used, because that determines which Windows driver should be used with ndiswrapper.
    As far as I know, the XXXX:XXXX device ID is a unique identifier for every kind of chipset out there (I don't think it has to do with the PCI bus, which is a different number in lspci). All cards with the same chipset model, regardless of what name they're sold under, share the same device ID and need the same Windows driver in ndiswrapper to work (but correct me if that's wrong).

    Identifying cards by their chipset name (like AR2413 above) works almost as well as the device ID, but in some cases, there are multiple revisions (e.g. AR2413 rev 01 vs. AR2413 rev 02). I think that this usually doesn't matter--usually the cards use the same Windows driver--but just in case there's a difference, I think it makes more sense to go by device ID.

    Thanks again for the feedback, and please let me know if you think of anything else.

  4. #4
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Comprehensive ndiswrapper troubleshooting guide

    Quote Originally Posted by pytheas22 View Post
    This is a good point. But I've never seen a situation where the alternate driver referred to by 'ndiswrapper -l,' or the driver controlling a card according to 'lshw,' is named something other than what needs to be added to the blacklist. Have you run into that problem or can you think of an example? If so, I'll add that in, but I'm not sure whether it's necessary, and I wanted to keep this guide as short as possible (it's bloated enough already) so as to avoid overwhelming new users. If you think that this is important, though, then let me know and I'll definitely put it in.
    I feel exactly the way you do, Pytheas22; if it wasn't because I actually ran into a case of the module being called something other then the name necessary for blacklisting, I didn't know such a thing could happen. Here's an example of how it actually happened:
    http://ubuntuforums.org/showthread.php?t=876205
    Note that Tijmz's "ndiswrapper -l" output showed that the "prism54" module was being used instead of ndiswrapper. It wasn't until he tried blacklisting the "p54pci" module that he fixed his problem. So I dug into it deeper, and that's when I found out about the whole aliasing business.
    Quote Originally Posted by pytheas22 View Post
    As far as I know, the XXXX:XXXX device ID is a unique identifier for every kind of chipset out there (I don't think it has to do with the PCI bus, which is a different number in lspci). All cards with the same chipset model, regardless of what name they're sold under, share the same device ID and need the same Windows driver in ndiswrapper to work (but correct me if that's wrong).
    I'm certainly not an ndiswrapper authority, but let's again look at your previous example:
    Code:
    01:01.0 Ethernet controller [0200]: Atheros Communications Inc. AR2413 802.11bg NIC [168c:001a] (rev 01)
    If you go to the Ndiswrapper Wiki page under "A", if you search for "168c:001a" you will find two instances:
    Code:
    Laptop: Acer Travelmate 2310
        * Chipset: Atheros ar5211, labelled as AR5005G (168c:001a)
        * Driver: from Acer (generic drivers do NOT work) ftp://ftp.work.acer-euro.com/notebook/travelmate_2310/driver/802bg.zip
    
    Card: Atheros AR2413 / AR5005G
        * Chipset: Atheros Communications, Inc. AR2413 802.11bg NIC (rev 01) (by lspci command)
        * pciid: 168c:001a
        * Driver: net5211 - 802bg.zip (from ftp://ftp.work.acer-euro.com/notebook/travelmate_2310/driver/802bg.zip or try other in http://support.acer-euro.com/drivers/notebook/tm_2410.html. Original from Toshiba doesn’t recognized by ndiswrapper. There are others from other sources, but this one is already working good for me)
    So even though both cards have the exact same "pciid" (PCI ID), they have entirely different chipsets and require different drivers. Or at least that is how I've always understood it, and I could be wrong.

    Best wishes, great guide.

  5. #5
    Join Date
    Aug 2007
    Location
    Paris
    Beans
    5,538
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Comprehensive ndiswrapper troubleshooting guide

    Thanks for the suggestions again, and especially for pointing out the module-alias stuff. I had never heard of that causing problems, so it's definitely good to know.

    I added a section about dealing with module aliases. I also put in instructions to search for Windows drivers according to either the chipset model or the device ID. I think that giving users the option to do either is best (also, lsusb usually doesn't mention chipset names). Hopefully if they can't find good Windows drivers with one, the other will lead them to the right download.

    Thanks again for the support, and let me know if you ever think of anything else!

  6. #6
    Join Date
    Sep 2008
    Beans
    15

    Re: Comprehensive ndiswrapper troubleshooting guide

    You wrote a beautiful guide, but it didn't solve my problem. I have read loads of threads and tips with no luck.


    I have a Toshiba A205-S5843 with an atheros wireless. It came with windows but I immediately loaded ubuntu 8.04.

    I am submitting some of my outputs from your article:

    joeradtke@joeradtke-laptop:~$ ndiswrapper -l
    netathw : driver installed
    device (168C:001C) present (alternate driver: ath_pci)
    lspci -nn

    05:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01)

    joeradtke@joeradtke-laptop:~$ uname -m
    i686

    joeradtke@joeradtke-laptop:~$ lshw -C network
    WARNING: you should run this program as super-user.
    *-network
    description: Ethernet interface
    product: RTL8101E PCI Express Fast Ethernet controller
    vendor: Realtek Semiconductor Co., Ltd.
    physical id: 0
    bus info: pci@0000:04:00.0
    logical name: eth0
    version: 01
    serial: 00:1e:ec:33:73:4a
    width: 64 bits
    clock: 33MHz
    capabilities: bus_master cap_list ethernet physical
    configuration: broadcast=yes driver=r8169 driverversion=2.2LK ip=192.168.1.177 latency=0 module=r8169 multicast=yes
    *-network
    description: Ethernet controller
    product: AR242x 802.11abg Wireless PCI Express Adapter
    vendor: Atheros Communications Inc.
    physical id: 0
    bus info: pci@0000:05:00.0
    version: 01
    width: 64 bits
    clock: 33MHz
    capabilities: bus_master cap_list
    configuration: driver=ndiswrapper latency=0 module=ndiswrapper
    I have blacklisted ath_pci, ath_hal and ath5k.
    I did the depmod thing and found no aliases

    joeradtke@joeradtke-laptop:~$ lsmod |grep ndis
    ndiswrapper 192920 0
    usbcore 146028 5 ndiswrapper,usbhid,ehci_hcd,uhci_hcd

    my guess is the problem lies below:

    joeradtke@joeradtke-laptop:~$ dmesg | grep -e ndis -e wlan
    [ 37.928644] ndiswrapper version 1.52 loaded (smp=yes, preempt=no)
    [ 38.425015] ndiswrapper (link_pe_images:604): DLL initialize failed for athw.sys
    [ 38.425046] ndiswrapper: driver netathw (,06/27/2008,7.6.0.239) loaded
    [ 38.425340] ndiswrapper (mp_init:207): assuming WDM (non-NDIS) driver
    [ 38.425396] usbcore: registered new interface driver ndiswrapper

    The other thing which perplexes me as that most of the things I have researched refer to a logical name for the wireless device such as wlan0, wifi0, ath0 or eth1. None of this exists on my system although the hardware appears to be recognized at some level.

    I have turned the device on and off numerous times. I have reinstalled all the stuff a few times.

    HELP!!!!

    Joe Radtke

  7. #7
    Join Date
    Aug 2007
    Location
    Paris
    Beans
    5,538
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Comprehensive ndiswrapper troubleshooting guide

    Joe,

    It looks like ndiswrapper doesn't like the Windows driver that you loaded. Where did you get it from? The driver from here should work for your card. Please uninstall the current driver and install the .inf from that link, and see if it makes a difference.

    If not, I believe that you can now also get your card working using native drivers, so that may be another route to explore if ndiswrapper really won't work. But I'm sure that ndiswrapper works for 168C:001C, based on this thread which I was involved in a few weeks back.

  8. #8
    Join Date
    May 2007
    Location
    San Francisco, California
    Beans
    5,857
    Distro
    Ubuntu Development Release

    Re: Comprehensive ndiswrapper troubleshooting guide

    Nice guide! Very well written.

  9. #9
    Join Date
    Sep 2008
    Beans
    15

    Smile Re: Comprehensive ndiswrapper troubleshooting guide

    I got the driver from the Atheros Czech site that was cited in many threads. I tried your driver, rebooted and everything works.
    Thank you a thousand times; I have been fooling with this thing for two weeks.

    Joe

  10. #10
    Join Date
    Mar 2008
    Beans
    26

    Re: Comprehensive ndiswrapper troubleshooting guide

    Hi, I've managed to set up ndiswrapper with a windows wireless driver without any problems. I realised my wired ethernet stopped working, so I installed a windows driver for my wired ethernet card, under ndiswrapper.

    It works fine except that every time I reboot, the wired ethernet stops working. To fix this I use the "Windows wireless drivers" ndiswrapper GUI to uninstall then reinstall the wired ethernet driver every time. This is annoying. Can someone please tell me how to get it working better?

    here is the result of doing dmesg | grep -e ndis -e wlan
    results of

    [ 20.084000] ndiswrapper version 1.45 loaded (smp=yes)
    [ 20.340000] ndiswrapper: driver bcmwl5 (Broadcom,10/12/2006, 4.100.15.5) loaded
    [ 20.344000] ndiswrapper: using IRQ 16
    [ 20.712000] wlan0: ethernet device 00:1c:26:ab:85:02 using NDIS driver: bcmwl5, version: 0x4640f05, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4311.5.conf
    [ 20.712000] wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
    [ 20.732000] usbcore: registered new interface driver ndiswrapper
    [ 20.756000] ndiswrapper: changing interface name from 'wlan0' to 'eth1'
    [ 20.756000] udev: renamed network interface wlan0 to eth1
    [ 438.088000] ndiswrapper: device eth1 removed
    [ 438.088000] usbcore: deregistering interface driver ndiswrapper
    [ 438.100000] ndiswrapper version 1.45 loaded (smp=yes)
    [ 438.128000] ndiswrapper: driver bcmwl5 (Broadcom,10/12/2006, 4.100.15.5) loaded
    [ 438.136000] ndiswrapper: using IRQ 16
    [ 438.500000] wlan0: ethernet device 00:1c:26:ab:85:02 using NDIS driver: bcmwl5, version: 0x4640f05, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4311.5.conf
    [ 438.500000] wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
    [ 438.500000] ndiswrapper: changing interface name from 'wlan0' to 'eth1'
    [ 438.500000] udev: renamed network interface wlan0 to eth1
    [ 438.508000] ndiswrapper: driver b44win (Broadcom,11/21/2006, 4.60.0.0) loaded
    [ 438.524000] ndiswrapper: using IRQ 22
    [ 438.724000] wlan0: ethernet device 00:1c:23:a2:12:02 using NDIS driver: b44win, version: 0x4003c, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:170C.5.conf
    [ 438.724000] ndiswrapper: changing interface name from 'wlan0' to 'eth0'
    [ 438.724000] udev: renamed network interface wlan0 to eth0
    [ 438.728000] usbcore: registered new interface driver ndiswrapper
    [ 440.400000] ndiswrapper (NdisWriteErrorLogEntry:192): log: 40050009, count: 0, return_address: f8bdb1af
    What is really happening here?

    Also, when does Network Manager applet 7 get released for Ubuntu? I've heard it allows multiple connections at once which would be really useful as I'm trying to set up wireless in our house at uni.

Page 1 of 121 1231151101 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •