# [SOLVED] WPA, NDISWRAPPER & LinkSys WG111T

## TheFueley

Hi all, I'm having trouble getting my USB wifi adapter working. I'm using ndiswrapper to load the Windows drivers. here's the output of my wpa_supplicant command:

```

exp ~ # wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

Trying to associate with 00:16:b6:d8:8a:6d (SSID='rivera' freq=2437 MHz)

Associated with 00:16:b6:d8:8a:6d

Authentication with 00:16:b6:d8:8a:6d timed out.

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with 00:16:b6:d8:8a:6d (SSID='rivera' freq=2437 MHz)

Authentication with 00:00:00:00:00:00 timed out.

Trying to associate with 00:16:b6:d8:8a:6d (SSID='rivera' freq=2437 MHz)

Authentication with 00:00:00:00:00:00 timed out.

Trying to associate with 00:16:b6:d8:8a:6d (SSID='rivera' freq=2437 MHz)

Authentication with 00:00:00:00:00:00 timed out.

Trying to associate with 00:16:b6:d8:8a:6d (SSID='rivera' freq=2437 MHz)

Authentication with 00:00:00:00:00:00 timed out.

Trying to associate with 00:16:b6:d8:8a:6d (SSID='rivera' freq=2437 MHz)
```

That trying to assoc with 'rivera' and auth with 000000000000 keeps looping.

And here's what shows up in /var/log/messages

```

Oct 21 20:04:35 exp rc-scripts: For iproute2 support, emerge sys-apps/iproute2

Oct 21 20:05:41 exp ADDRCONF(NETDEV_UP): wlan0: link is not ready

Oct 21 20:06:10 exp ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

Oct 21 20:06:10 exp BUG: unable to handle kernel NULL pointer dereference at virtual address 00000010

Oct 21 20:06:10 exp printing eip:

Oct 21 20:06:10 exp f88dd8de

Oct 21 20:06:10 exp *pde = 36dd9067

Oct 21 20:06:10 exp *pte = 00000000

Oct 21 20:06:10 exp Oops: 0002 [#1]

Oct 21 20:06:10 exp SMP 

Oct 21 20:06:10 exp Modules linked in: ndiswrapper rng_core

Oct 21 20:06:10 exp CPU:    0

Oct 21 20:06:10 exp EIP:    0060:[<f88dd8de>]    Tainted: P       VLI

Oct 21 20:06:10 exp EFLAGS: 00010202   (2.6.22-gentoo-r8 #9)

Oct 21 20:06:10 exp EIP is at NdisMIndicateReceivePacket+0x129/0x234 [ndiswrapper]

Oct 21 20:06:10 exp eax: 00000081   ebx: f79b6180   ecx: 0000001c   edx: 00000071

Oct 21 20:06:10 exp esi: e9bda04e   edi: 00000010   ebp: e9bda04e   esp: e9b81dd0

Oct 21 20:06:10 exp ds: 007b   es: 007b   fs: 00d8  gs: 0000  ss: 0068

Oct 21 20:06:10 exp Process ntos_wq/0 (pid: 6329, ti=e9b80000 task=f75b1030 task.ti=e9b80000)

Oct 21 20:06:10 exp Stack: ffffffff e9b81e08 e9b81dfc e9b81e04 e9b81e00 00000010 00000071 e9b9a500 

Oct 21 20:06:10 exp e9b7ab80 00000000 e9b7abcb e9bda04e 00000071 00000071 e944642c f8b108d0 

Oct 21 20:06:10 exp f8b17f88 f8b0e000 f8b17f90 f8b68650 e9b7ee00 e9b81e40 00000001 f8b4429e 

Oct 21 20:06:10 exp Call Trace:

Oct 21 20:06:10 exp [<f88e1732>] KeSetEvent+0x0/0x97 [ndiswrapper]

Oct 21 20:06:10 exp [<f88e4600>] IofCompleteRequest+0x8d/0x139 [ndiswrapper]

Oct 21 20:06:10 exp [<f88ed2b7>] usb_init+0xac/0x4aa [ndiswrapper]

Oct 21 20:06:10 exp [<f88ed476>] usb_init+0x26b/0x4aa [ndiswrapper]

Oct 21 20:06:10 exp [<f88ed2b7>] usb_init+0xac/0x4aa [ndiswrapper]

Oct 21 20:06:10 exp [<c0126d50>] run_workqueue+0x73/0xf5

Oct 21 20:06:10 exp [<c0129b50>] prepare_to_wait+0x12/0x49

Oct 21 20:06:10 exp [<c0127478>] worker_thread+0x0/0xc4

Oct 21 20:06:10 exp [<c0127532>] worker_thread+0xba/0xc4

Oct 21 20:06:10 exp [<c0129a3d>] autoremove_wake_function+0x0/0x35

Oct 21 20:06:10 exp [<c0129977>] kthread+0x38/0x5d

Oct 21 20:06:10 exp [<c012993f>] kthread+0x0/0x5d

Oct 21 20:06:10 exp [<c0103c47>] kernel_thread_helper+0x7/0x10

Oct 21 20:06:10 exp =======================

Oct 21 20:06:10 exp Code: 54 8d 04 0f 3b 83 84 00 00 00 89 83 80 00 00 00 76 10 8b 54 24 18 89 d8 b9 d0 d8 8d f8 e8 b6 6c b2 c7 8b 4c 24 18 89 ee c1 e9 02 <f3> a5 8b 4c 24 18 83 e1 03 74 02 f3 a4 8b 44 24 38 8b 00 89 44 

Oct 21 20:06:10 exp EIP: [<f88dd8de>] NdisMIndicateReceivePacket+0x129/0x234 [ndiswrapper] SS:ESP 0068:e9b81dd0

Oct 21 20:06:10 exp note: ntos_wq/0[6329] exited with preempt_count 1

Oct 22 00:06:11 exp avahi-daemon[5681]: Registering new address record for fe80::218:4dff:fedd:a7be on wlan0.*.

Oct 21 20:06:20 exp wlan0: no IPv6 routers present
```

That doesn't look good. 

My /etc/wpa_supplicant/wpa_supplicant.conf file:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

        ssid="rivera"

   psk=000000000000000

}
```

And finally, my /etc/conf/net file

```

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules_wlan0=(

      "wpa_supplicant"

)

wpa_supplicant_wlan0="-Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf"

wpa_timeout_wlan0=60

config_wlan0=( "dhcp" )

config_eth0=( "dhcp" )

dhcp_eth0="nontp"

ifplugd_wlan0="--api-mode=wlan"
```

Do I have any hope?

----------

## Corvinian

Hello TheFueley,

please see here:

http://www.linuxquestions.org/questions/linux-wireless-networking-41/netgear-wg111v2-ndiswrapper-installation-problems-460124/

you most probably require the old Win98 driver for your ndiswrapper under Linux:

http://kbserver.netgear.com/release_notes/D102843.asp

HTH, Corvinian

----------

## TheFueley

Thanks Corvinian, I had pretty much given up on this adapter. Yesterday I had tried it again with no luck. But today, I just plugged it in and modprobe'd ndiswrapper. And Holy Sh!t, it worked. I saw a dhcp addy pop up. Wow. Well, here are my config files, maybe it will help someone else too.

/etc/conf.d/net

```

modules_wlan0=( 

      "wpa_supplicant" 

      ) 

      wpa_supplicant_wlan0="-Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf" 

      wpa_timeout_wlan0=60 

      config_wlan0=( "dhcp" ) 

      config_eth0=( "dhcp" ) 

      dhcp_eth0="nontp" 

      ifplugd_eth0="--poll-time=5"
```

/etc/wpa_supplicant/wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant 

ctrl_interface_group=0 

ap_scan=1 

network={

        ssid="rivera"

        psk="000000"

        key_mgmt=WPA-PSK

        proto=WPA

}
```

I also copied /etc/init.d/net.eth0 to /etc/init.d/net.wlan0 When I made the symlink as someone else had pointed out, I had a NO GO.

Also, I did use the 1.3 WIN98 drivers. Thanks again!

----------

## mamac

Hi,

I'm having trouble with ndiswrapper and wpa_supplicant since upgrade to kernel 2.6.23-r3, wpa_cli keeps ASSOCIATING.

TheFueley, could you tell me please which version of kernel, ndiswrapper and wpa_supplicant you're using?

Thanks

----------

## JohnerH

 *mamac wrote:*   

> Hi,
> 
> I'm having trouble with ndiswrapper and wpa_supplicant since upgrade to kernel 2.6.23-r3, wpa_cli keeps ASSOCIATING.
> 
> TheFueley, could you tell me please which version of kernel, ndiswrapper and wpa_supplicant you're using?
> ...

 

Same problem... with the added fact that if I use ndiswrapper 1.50 the system just freezes upon loading the module...

Anyone got a solution yet?

----------

## Bevan

 *mamac wrote:*   

> I'm having trouble with ndiswrapper and wpa_supplicant since upgrade to kernel 2.6.23-r3, wpa_cli keeps ASSOCIATING.

 

Same here with ndiswrapper and a broadcom chipset. Authentication always times out.

The native bcm43xx driver works...

----------

## JohnerH

Right... I found a solution, ultimately not the best one but still working nevertheless.

Using ndiswrapper 1.49_RC4 and gentoo-sources 2.6.22....

They combine well...

I'm just going to have to wait for a couple of version bumps until I try and get everything up and running nicely on new stuff..

Hope this helps anyone...

----------

## TheFueley

```

chris@exp ~ $ uname -r

2.6.22-gentoo-r9
```

```

chris@exp ~ $ /usr/sbin/ndiswrapper -v

utils version: '1.9', utils version needed by module: '1.9'

module details:

filename:       /lib/modules/2.6.22-gentoo-r9/misc/ndiswrapper.ko

version:        1.50

vermagic:       2.6.22-gentoo-r9 SMP mod_unload CORE2
```

```

chris@exp ~ $ /usr/sbin/wpa_supplicant -v

wpa_supplicant v0.5.7

Copyright (c) 2003-2006, Jouni Malinen <jkmaline@cc.hut.fi> and contributors
```

Also I have to say that it's not very reliable. I get kernel panics sometimes. Sometimes it fails to pull up a DHCP addy. sometimes I have to try a few times before it actually work right, such as manually setting my essid and key, even though it's in wpa_supplicant.conf. Go Figure. Best of Luck!

----------

## JohnerH

 *TheFueley wrote:*   

> 
> 
> ```
> 
> chris@exp ~ $ uname -r
> ...

 

0.5 ?? Is that even stable yet ?

No wonder your having problems, I'd strongly suggest going back down to 0.49...

----------

## TheFueley

Go back down? I followed a "wireless networking" guide here at Gentoo.org. So whatever version was installed, was a default one for me. I never did anything to move to an unstable version, ya dig?

----------

## TheFueley

latest stable ndiswrapper release = 1.50 @ http://sourceforge.net/project/showfiles.php?group_id=93482

lastest stable wpa_supplicant release = 0.5.9 @ http://hostap.epitest.fi/wpa_supplicant/

----------

## mamac

Thanks,

ndiswrapper is not very stable for me neither, it doesn't get an IP every third time but I was still testing.

Found another configuration here: https://forums.gentoo.org/viewtopic.php?p=4622441#4622441

It seems 2.6.23-r3 upgrade is quite tricky because I had issues with ndiswrapper, framebuffer, ipw3945, on several computer.

----------

## mamac

ndiswrapper-1.50 is now stable but that doesn't help.

So, still the same problem, the interface keeps SCANNING/ASSOCIATING. I don't know if the problem comes from ndiswrapper or wpa_supplicant, actually...

----------

