1

I have a TP-Link TL-WN851ND wireless card that doesn't work properly (slow and disconects from time to time) with the regular ath9k driver. I tried to make it work with ndiswrapper and followed the steps here:

https://help.ubuntu.com/community/WifiDocs/Driver/Ndiswrapper#Downloading_Windows_Drivers

sudo ndiswrapper -l

shows: netathrx : driver installed device (168C:002D) present (alternate driver: ath9k)

I did sudo depmod -a, sudo modprobe ndiswrapper and sudo ndiswrapper -m with no errors.

As suggested here: How to keep ndiswrapper configuration after reboot?

I checked with lsmod | grep ndiswrapper if it was loaded and I get this: ndiswrapper 254773 0

So, as I understand, everything is loading fine. However, if I do lspci -k I get this: 06:01.0 Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (rev 01) Subsystem: Atheros Communications Inc. Device 0300 Kernel driver in use: ath9k Kernel modules: ath9k

So it seems that the system is still using the open source driver :S

What I am doing wrong?

Cmorales
  • 1,308
  • 14
  • 25

1 Answers1

1

Firstly: quite honestly, I doubt you'll be happy with ndiswrapper. It's a hacky solution, that's great when it's the only option, but far from ideal. Normally any other driver, no matter how broken, is better.

That said, You need to blacklist the ath9k driver, so that it doesn't claim the card.

Create a file like /etc/modprobe.d/blacklist-ath.conf with this contents:

blacklist ath9k

Then update yoru initramfs:

sudo update-initramfs -u

Then reboot, and it should be available for ndiswrapper to bind to it. If you want to use ath9k again, comment out that line or delete the file.

tumbleweed
  • 7,986
  • 23
  • 36
  • Thanks for your answer. I am going to try it and report how well it goes. But, no matter how hacky the solution is, if it works well it will be better than having an unusable wifi (it takes a minute to load pages that load in a few seconds with a laptop with a different driver). – Cmorales Dec 24 '11 at 14:58
  • Now I don't have wireless at all :S I blacklisted ath9k and I don't get wireless options in the network menu. lspci -k shows this: 06:01.0 Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (rev 01) Subsystem: Atheros Communications Inc. Device 0300 Kernel modules: ath9k Shouldn't that show something different in "kernel modules"? – Cmorales Dec 24 '11 at 15:24
  • 1
    you probably also need to update your initramfs, edited my answer – tumbleweed Dec 24 '11 at 15:39
  • I've updated initramfs with no luck, still don't have wireless options in network manager. Can it be a problem with the driver itself? I installed the one for Windows7 64, since I use Ubuntu 64bits... should I try with Vista or XP? – Cmorales Dec 24 '11 at 19:06
  • dmesg | grep ndiswrapper throws this errors: [ 3.076157] ndiswrapper (import:233): unknown symbol: ntoskrnl.exe:'KeInitializeGuardedMutex' [ 3.076167] ndiswrapper (import:233): unknown symbol: ntoskrnl.exe:'_local_unwind' [ 3.076300] ndiswrapper (load_sys_files:206): couldn't prepare driver 'netathrx' [ 3.076554] ndiswrapper (load_wrap_driver:108): couldn't load driver netathrx; check system log for messages from 'loadndisdriver' [ 3.078521] usbcore: registered new interface driver ndiswrapper – Cmorales Dec 24 '11 at 20:41
  • I want to use ath9k until I get ndiswrapper to properly work (if I do...) and now it's not working. I commented the blacklist file and I get wireless options in network manager, but it doesn't find and network. – Cmorales Dec 24 '11 at 20:51
  • A bit of googling says that error comes from trying to use a 32bit driver on a 64bit kernel. As to it not working any more, reboot. – tumbleweed Dec 24 '11 at 22:31
  • That's weird, because I did copy the 64bit driver... The only thing I can think of is that the driver for the 64bit version isn't really 64bit :S For the rebooting part, I had rebooted and it didn't work, it changed after completely turning off. Thanks for your help, by the way – Cmorales Dec 25 '11 at 15:35
  • Now it does find networks but it's not able to connect... I am really getting fed of this :@ How can it be so difficult to get wireless working? Is there any way to get a better ath9k driver? – Cmorales Dec 25 '11 at 15:46