encrypted modes don't work on ndiswrapper wireless adapters

Bug #459716 reported by rodrifra
172
This bug affects 30 people
Affects Status Importance Assigned to Milestone
ndiswrapper (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Karmic by udude
Nominated for Lucid by papukaija

Bug Description

Unencrypted connections work fine but WEP, WPA, etc.. doesn't work.
dmesg keeps showing the message

[ 459.661345] ndiswrapper (iw_set_auth:1602): invalid cmd 12

and no connection is established.

lsusb shows the usb key as

Bus 001 Device 003: ID 1690:0711 Askey Computer Corp. [hex] SMCWUSBT-G (no firmware)

ndiswrapper -l shows:

athfmwdl : driver installed
net5523 : driver installed
 device (1690:0711) present

ProblemType: Bug
Architecture: i386
Date: Sat Oct 24 13:47:45 2009
Dependencies:

DistroRelease: Ubuntu 9.10
Package: ndiswrapper-common 1.54-2ubuntu1
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=es_ES.UTF-8
 LANG=es_ES.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: ndiswrapper
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
rodrifra (rodrifra) wrote :
Revision history for this message
foxy123 (foxy) wrote :

I've got a similar problem with rt2500 pci wifi card:

~$ dmesg | tail
[ 748.200927] ndiswrapper: driver rt2500 (Ralink Technology, Inc.,10/20/2005, 3.01.00.0000) loaded
[ 748.201327] ndiswrapper 0000:02:00.0: PCI INT A -> Link[LNKB] -> GSI 5 (level, low) -> IRQ 5
[ 748.206651] ndiswrapper: using IRQ 5
[ 748.413474] wlan0: ethernet device 00:11:09:e6:91:e6 using serialized NDIS driver: rt2500, version: 0x20001, NDIS version: 0x500, vendor: 'IEEE 802.11g Wireless Card.', 1814:0201.5.conf
[ 748.413511] wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
[ 748.413628] usbcore: registered new interface driver ndiswrapper
[ 748.454685] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 758.620637] ndiswrapper (iw_set_auth:1602): invalid cmd 12
[ 758.719022] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 768.876036] wlan0: no IPv6 routers present

$ lspci | grep Network
02:00.0 Network controller: RaLink RT2500 802.11g Cardbus/mini-PCI (rev 01)

I have tried the same driver on Zenwalk and ndiswrapper works perfectly fine there...

Revision history for this message
foxy123 (foxy) wrote :

It also works without any problem on Sabayon...

Revision history for this message
Graham Beneke (graham-beneke) wrote :

Seeing the same problem with a Netgear WG111T while connecting to a WEP protected network.

"ndiswrapper (iw_set_auth:1602): invalid cmd 12" repeating in /var/log/messages when attempting to connect to the wireless network.

Changed in ndiswrapper (Ubuntu):
status: New → Confirmed
summary: - encrypted modes doesn't work on SMCWUSBT-G USB WIFI
+ encrypted modes don't work on ndiswrapper wireless adapters
Revision history for this message
amjed (am-developer) wrote :

Any luck ?? I have installed Ubuntu 9.10, and getting the same issue.. let me know if anyone has got a workaround for this ..

Revision history for this message
zmago (zmago-fluks) wrote :

I'm also having same issue... I'm using rt61pci card and driver in the kernel is corrupted that i'm losing my wireless connection constantly and ndiswrapper is also corrupted... i don't know what is with Ubuntu this time. I have at home also broadcom and realtek wireless card.. one is minipci and other is usb... with ndiswrapper i get again same issue and also kernel drivers are also corrupted for them. I hope we won't need to wait another 6 months for new release that this will be fixed...

Revision history for this message
khaest (kranxeze) wrote :

Same problem with Belkin Wireless N F5D8053 (rt2870).
Using Ubuntu 9.10 32-bit (2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686)
Hope this will be solved quickly

Revision history for this message
Michael Holmes (holmesm) wrote :

Confirmed also with ndiswrapper and BCM4318. Running Jaunty 64-bit (2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:05:01 UTC 2009 x86_64 GNU/Linux)

bouta (ff-fl)
description: updated
Revision history for this message
Brian Kratz (brian-kratz) wrote :

See the same thing with ndiswrapper and Dlink DWA-130 with WPA2 connection- 32 bit

Revision history for this message
Jaromir Obr (jaromir-obr) wrote :

Same problem with Atheros AR928X on notebook Toshiba Satellite A300D-18I.
I'm using WPA2 connection.

driver: ndiswrapper+netathwx driverversion=1.55+,03/13/2009,7.7.0.259
kernel: Linux turion 2.6.31-15-generic #49-Ubuntu SMP Fri Nov 6 09:55:13 UTC 2009 x86_64 GNU/Linux
OS: Ubuntu 9.10

Revision history for this message
Ivan Razumov (iarspider) wrote :

Same here: TRENDnet TEW-423PI 54Mbps 802.11g Wireless PCI Adapte (RTL8185).

Revision history for this message
Stefano Deponti (stefdep) wrote :

Same problem: Senao 362 802.11g USB adapter.

Revision history for this message
Master_Ne0 (master-ne0s-solutions) wrote :

My WG111T was working the first time i installed it with ndiswrapper. Then, once connected to the internet, the Ubuntu update updated my system and when i restarted the WPA failed. I'm new here, though i am learning fast and have many years of development experience, let me know if there is anything i can do to help solve this bug.

Revision history for this message
pascal (pascal-kolly) wrote :

same problem with netgear wg511v2
I try to install xubuntu 9.04

Revision history for this message
foxy123 (foxy) wrote :

yes, it worked when i installed beta for the first time but stopped after the first update

Revision history for this message
pascal (pascal-kolly) wrote :

with xubuntu 9.04 and all update installed, WPA failed too ! wifi without password works

Revision history for this message
Rene van Paassen (rene-vanpaassen) wrote :

The following happens in the wpa_supplicant, driver_wext.c lines 2115 and further

#ifdef CONFIG_IEEE80211W
 switch (params->mgmt_frame_protection) {
 case NO_MGMT_FRAME_PROTECTION:
  value = IW_AUTH_MFP_DISABLED;
  break;
 case MGMT_FRAME_PROTECTION_OPTIONAL:
  value = IW_AUTH_MFP_OPTIONAL;
  break;
 case MGMT_FRAME_PROTECTION_REQUIRED:
  value = IW_AUTH_MFP_REQUIRED;
  break;
 };
 if (wpa_driver_wext_set_auth_param(drv, IW_AUTH_MFP, value) < 0)
  ret = -1;
#endif /* CONFIG_IEEE80211W */

the ndiswrapper wireless driver (and maybe others?) does not implement IW_AUTH_MFP, and returns -EOPNOTSUPP;

A fix is needed for ndiswrapper, which can be, for now, to accept the first two frame protection values, and fail on IW_AUTH_MFP_REQUIRED only.

Revision history for this message
Rene van Paassen (rene-vanpaassen) wrote :

I dug a bit deeper, created a patch, and filed a bug report for ndiswrapper too.

Patch is:

diff --git a/iw_ndis.c b/iw_ndis.c
index 434260e..3f5e12c 100644
--- a/iw_ndis.c
+++ b/iw_ndis.c
@@ -1591,6 +1591,12 @@ static int iw_set_auth(struct net_device *dev,
                if (wrqu->param.value)
                        deauthenticate(wnd);
                break;
+ case IW_AUTH_MFP:
+ if (wrqu->param.value == IW_AUTH_MFP_DISABLED ||
+ wrqu->param.value == IW_AUTH_MFP_OPTIONAL)
+ break;
+ WARNING("MFP not implemented");
+ return -EOPNOTSUPP;
        case IW_AUTH_TKIP_COUNTERMEASURES:
        case IW_AUTH_DROP_UNENCRYPTED:
        case IW_AUTH_RX_UNENCRYPTED_EAPOL:

Am currently testing; if you see this bug report it works

Revision history for this message
pascal (pascal-kolly) wrote :

Nice news Rene !
But what is the way to install your patch ? (i'm a completely new user !)
Best regards

Revision history for this message
pascal (pascal-kolly) wrote :

after the update 9.04 -->9.10 the wifi works well with wap too !

Revision history for this message
rodrifra (rodrifra) wrote : Re: [Bug 459716] Re: encrypted modes don't work on ndiswrapper wireless adapters

Use patch command.

Use "man patch" to learn how to use it.

2009/12/2 pascal <email address hidden>

> Nice news Rene !
> But what is the way to install your patch ? (i'm a completely new user !)
> Best regards
>
> --
> encrypted modes don't work on ndiswrapper wireless adapters
> https://bugs.launchpad.net/bugs/459716
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Elias (w.irving) wrote :

Being affected by this myself, I wrote this, which I hope helps: http://ubuntuforums.org/showthread.php?p=8426311

Big thanks to Rene for the patch!

Revision history for this message
Graham Beneke (graham-beneke) wrote :

When can we expect a patched package to be released as a SRU... or at least in a PPA ?

Revision history for this message
pascal (pascal-kolly) wrote :

Hello,

I need more help if it's possible !

before the patch
dmesg returns several lines like these:
[ 227.277096] ndiswrapper (iw_set_auth:1602): invalid cmd 12

after the patch (I follow the http://ubuntuforums.org/showthread.php?p=8426311 from Irving),
I have no more " invalid cmd 12 "
but the wifi WAP does not work

Many thanks for your help
Pascal

Revision history for this message
Andy B (andy-bowdin) wrote :

I got the same "invalid cmd 12" problem, but before getting around to patch saw
http://ubuntuforums.org/showthread.php?t=1284891

Setting a low priority for wpa_supplicant with

sudo renice +19 $(pidof wpa_supplicant)

makes the connection work, even though the invalid cmd message is still there!

Revision history for this message
foxy123 (foxy) wrote :

is it possible to do renice automatically at boot?

Revision history for this message
Wizarth (wizarth) wrote :

On 9.10 WPA2 support started working, but intermittently, as described here. The renice trick appears to work.

ndiswrapper around a Marvell Technology Group Ltd. 88w8335 [Libertas] 802.11b/g Wireless (rev 03)
ndiswrapper -l
wg511v2 : driver installed
 device (11AB:1FAA) present

The invalid cmd 12 seems to be irrelevant, as I receive this on the times the connection succeeds, as well as when it fails. syslog messages from ndiswrapper when the driver is loaded suggest the card does not suppose SSID scanning (?) yet NetworkManager is setting ap_scan , perhaps this is related?

Revision history for this message
Wizarth (wizarth) wrote :

After rebooting, the renice fix did NOT work.

Revision history for this message
Marcelo Ruiz (marcelo-javier-ruiz) wrote :

It is affecting me (I have a DLink DWL-G650M with a AR5513 chipset) after upgrading to Karmic. I think this bug is really mining Ubuntu's usability: connecting to a secured wireless connection is among the most common things someone could do with a computer. Is there any way to suggest to increase the importance of this bug?

Revision history for this message
Wizarth (wizarth) wrote :

After further testing, renice +19 (which lowers the priority) does work, if not immediately. If a connection is in progress, it may take a few retries. However, if applied before attempting the connection at all (such as switching to a tty before supplying NetworkManager with the password) then it will be successful.
However, it seems to make the connection slow to handshake, as the DHCP packets seem to be lost for up to a minute or so before getting through and getting a response. So this shouldn't be main lined.

This strikes me as definitely being some sort of race condition, which is mitigated by the renice, however in future releases when what is causing the race condition changes again, this may not continue to work.

To make this occur automatically, I've changed line 262 of /etc/wpa_supplicant/functions.sh from:
start-stop-daemon --start --oknodo $DAEMON_VERBOSITY \
to:
start-stop-daemon --start --nicelevel 19 --oknodo $DAEMON_VERBOSITY \

Please test and let me know if this works for anyone else.

Revision history for this message
pascal (pascal-kolly) wrote :

I have replaced the line 262 with : start-stop-daemon --start --nicelevel 19 --oknodo $DAEMON_VERBOSITY \
and reboot without effect !
The non-secure connection works and wpa does not work.

I try also many times : sudo renice +19 $(pidof wpa_supplicant)
without success.

Have a happy Chrismas

Revision history for this message
foxy123 (foxy) wrote :

have you patched ndiswrapper?

Revision history for this message
Hans-Martin (hmm-heeg) wrote : Re: [Bug 459716] Re: encrypted modes don't work on ndiswrapper wireless adapters

foxy123 schrieb:
> have you patched ndiswrapper?
>
>
In my experience, that is not necessary although it avoids the "invalid
cmd 12" errors. I have patched the wpa_supplicant startup script and
after this WLAN works well again, without the patched ndiswrapper (I
previously tried patching ndiswrapper, with little success)
It looks like there are a couple of problems at work here - at least one
is the mentioned race condition which should be tracked down and fixed.
Others seem to be more difficult to diagnose.

Cheers,
Hans-Martin

Revision history for this message
Alexandru Bolboaca (alex-boly) wrote :

I've tried the fix to wpa_supplicant startup script but the daemon still has priority 0. I know this because I tried renice and it says it had priority 0.
After renice, the wireless still doesn't work.

This issue is really annoying for me...

Revision history for this message
Guillaume (guillaume-zin) wrote :

Maybe the probelm is more wpa_supplicant related, see here for instance (there is a workaround to try) : https://bugs.launchpad.net/ubuntu/+source/wpasupplicant/+bug/207446

Guillaume

Revision history for this message
papukaija (papukaija) wrote :

Confirming in Lucid.

Revision history for this message
papukaija (papukaija) wrote :
tags: added: jaunty karmic lucid patch
Revision history for this message
foxy123 (foxy) wrote :

It's worked fine for me so far on Lucid but I will do upgrade and see if it works after that.

Revision history for this message
foxy123 (foxy) wrote :

Works fine for me on the latest 32-20 kernel. Though it takes a bit longer than usual to connect.

Revision history for this message
Thomas (t.c) wrote :

Is a fix released? I get this bug too with Ubuntu 10.4?!

Revision history for this message
Hans-Martin (hmm-heeg) wrote :

Am 18.05.2010 19:27, schrieb Thomas C.:
> Is a fix released? I get this bug too with Ubuntu 10.4?!
>
>
For my particular adapter ("Realtek Semiconductor Co., Ltd. RTL-8185
IEEE 802.11a/b/g Wireless LAN Controller (rev 20)")
switching from ndiswrapper to the native kernel driver (rtl8180) in 10.4
worked. Before I tried that, I tried to apply various hacks that I found
on the net to wpasupplicant, without success.
But since it works now, there's no more messing with ndiswrapper for me...

I'm well aware that this is not helpful if your hardware is not
supported by a native driver, but if you have the same adapter you might
try this.

Cheers,
Hans-Martin

Revision history for this message
sles (slesru) wrote :

10.04 amd64, ralink 2500.

wep works, wpa not, even with patch.. :-(

Revision history for this message
Julian Andres Klode (juliank) wrote :

Does anyone still have this problem in raring 13.04?

Revision history for this message
Hans-Martin (hmm-heeg) wrote :

Am 08/23/2013 01:05 PM, schrieb Julian Andres Klode:
> Does anyone still have this problem in raring 13.04?
>
Hi,
since I've been using a WiFi card that is supported natively, I've not used ndiswrapper for a long time, so I can't say
whether it's ok in 13.04 - but thanks for asking :-)

Hans-Martin

Revision history for this message
Julian Andres Klode (juliank) wrote :

A fix was released upstream some time ago (1.57?), so it should be fixed now.

Changed in ndiswrapper (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.