PDA

View Full Version : ndiswrapper issues



picodreamer
2nd April 2007, 12:10 AM
Hello All,

I'm using Fedora Core 6 with kernel version 2.6.20-1.2933.fc6 on a
Toshiba Satellite A40-151 Laptop. I have a linksys WPC11 ver 4
wireless card. I've been going through the configuration steps for
the card that I found here

http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation

Everything seems to be going fine until I get to the step "modprobe
ndiswrapper". At that point I get this error.

FATAL: Error inserting ndiswrapper (/lib/modules/2.6.20-1.2933.fc6/
misc/ndiswrapper.ko): Invalid module format

When I look in /var/log/messages I see this line.

Apr 1 12:05:57 localhost kernel: ndiswrapper: version magic
'2.6.20-1.2933.fc6 SMP mod_unload 686 4KSTACKS ' should be
'2.6.20-1.2933.fc6 SMP mod_unload 586 4KSTACKS '

I've done some searching for both errors. I get many hits for the
invalid module format but I get nothing for the 4KSTACKS error.

I am curious. Does the SMP mean I am using a kernel compiled for a
symmetric multi processor? Because as far as I know I've only got a
single processor. I'm at a loss as to what to do at this point. Any
help at all would be greatly appreciated.

v/r

Rob

louspag
3rd April 2007, 01:40 PM
I know how you feel, lol. I've been trying to get my usb working and so far no luck. I've decided to wait for FC7. But on your question here is what I know. The kernel seems to support two stacks one being 4k the other beign 16K. Some Windows drivers need 16K of stack space to be used. So if the 4K is installed than it will fail. Do a search for ndiswrapper & 4Kstack it should turn up some results and if I remember correctly one has a link to where the 16K stack kernel can be downloaded along with install instructions. I went through that and after everything I still haven't been able to get my usb wifi to work. Best of luck and don't give up. From what I have seen everything eventually does work on Linux, it just takes a bit of time, knowledge, and determination.

JGreen6883
3rd April 2007, 03:56 PM
This page has some info on the 4k stack issue.

http://ndiswrapper.sourceforge.net/mediawiki/index.php/Fedora

j1mw3b
5th April 2007, 04:57 PM
Rather than start a new thread on ndiswrapper and wireless - there are a lot of them - I will try to just append to this one.

I have Fedora 6 kernel 2.6.20-1.2925.
Have a Netgear WG111 USB adapter.
Am able to get the driver loaded
modprobe ndiswrapper works fine - the following shows up in /var/log/messages when I do:
modprobe ndiswrapper
Removed the date tags to make it more readable. myth is name of machine.

myth kernel: ndiswrapper version 1.40 loaded (smp=yes)
myth kernel: usb 5-5: reset high speed USB device using ehci_hcd and address 6
myth kernel: ndiswrapper: driver net111v2 (NETGEAR Inc.,11/20/2006,5.1254.1120.2006) loaded
myth kernel: wlan0: ethernet device 00:18:4d:c3:10:72 using NDIS driver: net111v2, version: 0x1, NDIS version: 0x500, vendor: 'Realtek RTL8187 Wireless LAN USB NIC ', 0846:6A00.F.conf
myth kernel: wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
myth kernel: usbcore: registered new interface driver ndiswrapper
myth kernel: usbcore: deregistering interface driver ndiswrapper
myth kernel: ndiswrapper: device wlan0 removed

I do iwconfig wlan0 channel 11 #my router is on channel 11
Then iwconfig wlan- essid ng1941 #ng1941 is the ssid of my router (a Netgear WGR614v5)
iwconfig wlan0 shows this:
wlan0 IEEE 802.11g ESSID:off/any
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Bit Rate=54 Mb/s Tx-Power:20 dBm Sensitivity=0/3
RTS thr=2432 B Fragment thr=2432 B
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

I have /proc/net/wireless with this:
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 21
wlan0: 0000 0 0 0 0 0 0 0 0 0

Following line is in my /proc/modules
ndiswrapper 176724 0 - Live 0xf953f000

ifconfig wlan0 shows this:
wlan0 Link encap:Ethernet HWaddr 00:18:4D:C3:10:72
BROADCAST MULTICAST MTU:1500
txqueuelen:1000

I've tried also dhclient wlan0 and it fails to find anything.

Now when I do iwlist wlan0 scan, I only get this:
wlan0 No scan results

I have placed the WG111 USB dongle right next to the router and get the same thing.

Any suggestions. I can't give up 'cuz in order to use this box as my mythtv box I have to move it to TV area and there is no ethernet wired connection there.
I guess my next move might be to run a cable thru attic, etc; but it's awful hot in the attic in Florida right now.

Thanks,

Jim

JGreen6883
5th April 2007, 05:38 PM
Please post output from

ndiswrapper -l

j1mw3b
5th April 2007, 05:46 PM
BTW, I also have downloaded the 8187B_linux_24.6.1021.0212.2007.targz drivers from realtek.com, but not successful in building them yet.

Kamikaze78
5th April 2007, 07:05 PM
This is where my problem lies


[root@localhost ndiswrapper-1.41]# make install
make -C driver install
make[1]: Entering directory `/root/Desktop/ndiswrapper-1.41/driver'
Can't find kernel build files in /lib/modules/2.6.20-1.2933.fc6/build;
give the path to kernel build directory with
KBUILD=<path> argument to make
make[1]: *** [prereq_check] Error 1
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.41/driver'
make: *** [install] Error 2

Someone told me that I posted here before and I was given 2 links of things I can try, but both kinda didnt work for me. This site: http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation has the guide I used, and in there is does say this "Make sure you have started compiling the kernel sources, so needed header files are present. " But does not walk you threw it.

BTW, I am running Fedora 6, and have a Cnet CWP-854 PCI wireless card

j1mw3b
6th April 2007, 01:44 AM
Please post output from

ndiswrapper -l
Output from ndiswrapper -l:

! myth->root:/root>#ndiswrapper -l
net111v2 : driver installed
device (0846:6A00) present
! myth->root:/root>#

Again, I hope I haven't mucked up everything by posting in someone else's thread - just thought it might be OK to have it all together. If not OK, let me know and i can move off of here.
I installed NetworkManager-vpcn and started it - also dhcdbd and wifi-radar. Not sure if any had an affect, but now if I do
"iwlist wlan0 scan", I get this:
! myth->root:/root>#iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: 32:8A:B0:F2:25:C6
ESSID:"hpsetup"
Protocol:IEEE 802.11g
Mode:Ad-Hoc
Frequency:2.437 GHz (Channel 6)
Quality:18/100 Signal level:-84 dBm Noise level:-96 dBm
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
18 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 12 Mb/s
24 Mb/s; 48 Mb/s
Extra:bcn_int=100
Extra:atim=0

Only problem is - that's not my router!!!

Re other poster's problems with ndiswrapper, I found that the version available thru yum repositories didn't work too well, so I downloaded the 1.40 version and compiled it - it compiled with no problems.

thanks,

Jim

j1mw3b
6th April 2007, 04:14 AM
BTW, you dont have to actually "begin compile" of kernel, just download the 2925 kernel sources. I tried to find the url for it but couldn't find it quickly. I have downloaded both the 2925 and 2933 sources so it's out there - I just neglected to bookmark it.

j1mw3b
6th April 2007, 04:19 AM
Kernel sources:
http://ftp.linux.ncsu.edu/pub/fedora/linux/core/updates/6/SRPMS/

j1mw3b
6th April 2007, 06:20 PM
Holy s... - I got this working. Not sure exactly what did it and I sure hope it works the next time I reboot.
Went back, uninstalled the wg111v2 stuff (ndiswrapper -r netv1112).
Reinstalled it - this time the Win98 version - I think I had been using the WinXP version of the driver, but not real sure.
Followed all the steps in the wiki (http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch13_:_Linux_Wireless_Networking) and when I did the ifup wlan0, voila, ifconfig shows an ip address and I can ping the wireless adapter.

ramasees
6th April 2007, 06:41 PM
Hi all i found this for installing Netgear WG111 USB adapter this is more for using packet injection but it installs the native drivers for it and any rtl8187 pci

Choose ONE of the following files, they are all the same, just different mirrors:

wget ftp://202.65.194.18/cn/wlan/rtl8187_linux_26.1010.zip
wget ftp://220.228.150.22/cn/wlan/rtl8187_linux_26.1010.zip
wget ftp://61.56.86.122/cn/wlan/rtl8187_linux_26.1010.zip

unzip rtl8187_linux_26.1010.zip
cd rtl8187_linux_26.1010.0622.2006/
wget http://patches.aircrack-ng.org/rtl8187_2.6.20v2.patch
tar xzf drv.tar.gz
tar xzf stack.tar.gz
patch -Np1 -i rtl8187_2.6.20v2.patch
sh makedrvbk
sh wlan0up

this way is assuming you havent any drivers for it running
WARNING I HAVE NOT DONE THIS MYSELF SO DO AT YOUR OWN RISK LET ME KNOW IF ANYONE FINDS THIS USEFUL

j1mw3b
7th April 2007, 04:32 AM
Well, after much effort trying to get the WG111 to get enabled at boot up, I finally got it. Lots of weird things going on tho'. Was in /etc/sysconfig/network-scripts debugging and trying to figure out what's going on.
Here's a tip - don't ever do "ifup eth0" if eth0 is already up. You get a new address from the router - after everything disconnects first.

So finally, both interfaces are enabled at startup.

The bad news, now the system totally locks up periodically - haven't been able to isolate it - but suspect the wireless drivers. Or maybe mythtv. dunno.
I hate lockups.
I got rid of the NetworkManager, etc and dhcdbd daemons to try to narrow it down.

This is really a lot of trouble - guess I'll just eliminate the wireless for a while and see if the lockups go away.
The attic is looking cooler, if I can find a ethernet cable long enough.

Jim

j1mw3b
9th April 2007, 03:20 AM
Well, I pretty much give up on wireless for Fedora.
I got it to where it would find the wireless and configure it automatically during bootup so I have the wlan0 showing with an IP address with ifconfig. Communicates fine.

But, just can't get rid of the lockups. I thought it was the "CONFIG_4KSTACKS issue that ndiswrapper warns about.
So, tried recompiling the kernel, had a few problems, then found some precompiled kernels with CONFIG_16KSTACKS, including source code.
Downloaded that kernel, along with the source code, recompiled ivtv, ndiswrapper, etc against that kernel (2933 level).

Still get the lockups.
So, using Windows drivers is just not a good way to do this.
No wireless for me; Linux just ain't ready for it.

Jim

j1mw3b
20th April 2007, 12:30 AM
Hi all i found this for installing Netgear WG111 USB adapter this is more for using packet injection but it installs the native drivers for it and any rtl8187 pci

Choose ONE of the following files, they are all the same, just different mirrors:

wget ftp://202.65.194.18/cn/wlan/rtl8187_linux_26.1010.zip
wget ftp://220.228.150.22/cn/wlan/rtl8187_linux_26.1010.zip
wget ftp://61.56.86.122/cn/wlan/rtl8187_linux_26.1010.zip

unzip rtl8187_linux_26.1010.zip
cd rtl8187_linux_26.1010.0622.2006/
wget http://patches.aircrack-ng.org/rtl8187_2.6.20v2.patch
tar xzf drv.tar.gz
tar xzf stack.tar.gz
patch -Np1 -i rtl8187_2.6.20v2.patch
sh makedrvbk
sh wlan0up

this way is assuming you havent any drivers for it running
WARNING I HAVE NOT DONE THIS MYSELF SO DO AT YOUR OWN RISK LET ME KNOW IF ANYONE FINDS THIS USEFUL


This is working quite nicely for me so far - at least for 4 or 5 hours the system is up and stable with my USB enet wireless active.
No more ndiswrapper.

j1mw3b
20th April 2007, 12:32 AM
BTW, did modify the wlan0up script to not use the ifcfg-wlan0 in the zip file, but let it use my own ifcfg-wlan0. Also moved the drivers to /lib/modules, etc

sideways
20th April 2007, 12:52 AM
The realtek driver was recently (16/04/2007) updated on the realtek site

http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=1&PFid=1&Level=6&Conn=5&DownTypeID=3&GetDown=false&Downloads=true#RTL8187L

(rtl8187_linux_26.1025.0328.2007.tar.gz)

I assume this includes the patch, but haven't checked. This driver works fine even on 64 bit fedora.

j1mw3b
20th April 2007, 01:45 AM
whoa... moving the files to /etc/modules/xxxx and doing depmod -a; and allowing the kernel to load the drivers and configure automatically apparently caused the drivers to get loaded in a different order. Things work a bit funny now.

Soo, slightly modified the supplied wlan0up script and invoke it via /etc/rc.local.
Better again.

j1mw3b
20th April 2007, 03:46 AM
Those don't compile. I remember trying those drivers from the Realtek site previously and them failing compile. Then I got sidetracked to ndiswrapper, and didn't pursue it.

Hmmmm. how did you stumble on the ones you first posted? Seems someone may have modified the Realtek source.

sideways
20th April 2007, 11:20 PM
Those don't compile. I remember trying those drivers from the Realtek site previously and them failing compile. Then I got sidetracked to ndiswrapper, and didn't pursue it.

Hmmmm. how did you stumble on the ones you first posted? Seems someone may have modified the Realtek source.

The patch ramasees posted is from aircrack-ng.org (http://www.aircrack-ng.org/doku.php?id=), a site devoted to cracking WEP and WPA-PSK keys, the r8187 page is http://www.aircrack-ng.org/doku.php?id=r8187.

They apply a patch to the official realtek driver to enable packet injection, but the patch also updates the source to compile with the latest fc6 2.6.20 kernels. :)

Since realtek can't be bothered to update their driver (the latest one posted a few days ago still won't compile on kernels >= 2.19) this looks like the only resource we have to turn to.

For my netgear wg111v2 in 32 bit fc6 I still use ndiswrapper v1.33 and a 16k stack kernel (2.6.18-1.2869) from linuxant.com, but only because the latest 2.6.20 kernels in fc6 won't recognize my sata drive.

But I will probbaly switch to this patched realtek diver for fc7 (since the sata recognition also seems fixed)

Great find ramasees.

Kiniai
8th May 2007, 08:10 AM
Hey all. New to posting here but I have been trollin around for a bit. I have an issue with getting wireless working on my laptop (go figure.)

Specs of interest:
Compaq Persario 2108US
Brodcomm Chipset Wireless card pcid 14e4:4320 (rev 02)
Fedora Core 6
Kernel: 2.6.20-1.2933.fc6xen

I tried using the bcm43xx but as with many people it caused many a Kernel Panic. I removed all relevent mods, drivers, and firmware then proceeded to start work on ndiswrapper.
I get as far as modprobe ndiswrapper and get the error:

FATAL: Error inserting ndiswrapper (/lib/modules/2.6.20-1.2933.fc6xen/misc/ndiswrapper.ko): Invalid module format

When I check the /var/log/messages and dmesg I see the following:

ndiswrapper: disagrees about version of symbol struct_module

My kernel is using 4k stacks, but I havnt seen any errors relating to it so I am not sure if this is the issue or not... Any ideas?