![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Networking & Wireless Having problems getting connected to the internet or getting your wireless card to work? Ask here. |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Ubuntu addict and loving it
![]() Join Date: Aug 2007
Location: Baltimore, United States
Beans: 4,704
Ubuntu 9.04 Jaunty Jackalope
|
Comprehensive ndiswrapper troubleshooting guide
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 Code:
netwg111 : driver installed device (0846:4240) present (alternate driver: p54usb) '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 Code:
lsusb Code:
01:01.0 Ethernet controller [0200]: Atheros Communications Inc. AR2413 802.11bg NIC [168c:001a] (rev 01) Code:
Bus 001 Device 003: ID 0846:4240 NetGear, Inc. WG111 WiFi (v2) 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: Quote:
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 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 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
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 Code:
blacklist ath_pci Code:
sudo update-initramfs -k all -u 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 Code:
ERROR: Module ssb is in use by b44 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] Code:
depmod -n | grep alias | grep -v ':' | grep -i p54usb *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
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 Code:
sudo modprobe ndiswrapper 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 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 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 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 Finally, extract the source and compile it (these commands assume that the ndiswrapper .tar.gz file is saved on your desktop): Code:
cd ~/Desktop sudo -s apt-get install build-essential tar -xzvf ndiswrapper* cd ndiswrapper* make make install 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.
__________________
Personal site | Understanding Wireless Chipsets | Troubleshooting ndiswrapper | Works With U blog Last edited by pytheas22; August 18th, 2009 at 09:30 AM.. |
|
|
|
|
|
|
#2 | ||
|
== Happy Ubuntuing ==
![]() Join Date: Mar 2008
Location: California, USA
Beans: 8,111
Ubuntu 9.04 Jaunty Jackalope
|
Re: Comprehensive ndiswrapper troubleshooting guide
Pytheas22, thanks for writing up a great guide for troubleshooting ndiswrapper!
Quote:
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> Code:
john@TECH5321:~$ depmod -n | grep alias | grep -v ':' | grep -i 54 alias prism54usb p54usb alias prism54pci p54pci alias prism54common p54common Quote:
Anyway, those are just some ideas, and thanks again for writing a great troubleshooting guide. Last edited by caljohnsmith; August 10th, 2008 at 04:43 PM.. |
||
|
|
|
|
|
#3 | |||
|
Ubuntu addict and loving it
![]() Join Date: Aug 2007
Location: Baltimore, United States
Beans: 4,704
Ubuntu 9.04 Jaunty Jackalope
|
Re: Comprehensive ndiswrapper troubleshooting guide
Thanks a lot for the suggestions.
Quote:
Quote:
Quote:
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.
__________________
Personal site | Understanding Wireless Chipsets | Troubleshooting ndiswrapper | Works With U blog |
|||
|
|
|
|
|
#4 | ||
|
== Happy Ubuntuing ==
![]() Join Date: Mar 2008
Location: California, USA
Beans: 8,111
Ubuntu 9.04 Jaunty Jackalope
|
Re: Comprehensive ndiswrapper troubleshooting guide
Quote:
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:
Code:
01:01.0 Ethernet controller [0200]: Atheros Communications Inc. AR2413 802.11bg NIC [168c:001a] (rev 01) 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)
Best wishes, great guide. |
||
|
|
|
|
|
#5 |
|
Ubuntu addict and loving it
![]() Join Date: Aug 2007
Location: Baltimore, United States
Beans: 4,704
Ubuntu 9.04 Jaunty Jackalope
|
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!
__________________
Personal site | Understanding Wireless Chipsets | Troubleshooting ndiswrapper | Works With U blog |
|
|
|
|
|
#6 |
|
First Cup of Ubuntu
![]() Join Date: Sep 2008
Beans: 11
|
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 |
|
Ubuntu addict and loving it
![]() Join Date: Aug 2007
Location: Baltimore, United States
Beans: 4,704
Ubuntu 9.04 Jaunty Jackalope
|
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.
__________________
Personal site | Understanding Wireless Chipsets | Troubleshooting ndiswrapper | Works With U blog |
|
|
|
|
|
#8 |
|
No Random F/R's plz
![]() |
Re: Comprehensive ndiswrapper troubleshooting guide
Nice guide! Very well written.
__________________
My first name is Montana, seriously!! MSI Wind user, and Asus EeePC user!
|
|
|
|
|
|
#9 |
|
First Cup of Ubuntu
![]() Join Date: Sep 2008
Beans: 11
|
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 | |
|
5 Cups of Ubuntu
![]() 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 Quote:
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. |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|