WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ndiswrapper  (Read 13291 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
ndiswrapper
« on: July 06, 2010, 04:01:02 AM »
updated extension posted:
Code: [Select]
Title:          ndiswrapper.tcz
Description:    ndiswrapper
Version:        1.56
Author:         see list of sites below
Original-site:  see list of sites below
Copying-policy: see list of sites below
Size: 92KB
Extension_by:   juanito
Comments:       ndiswrapper for tc_3.x
                ----------
                example howto:
                $ sudo ndiswrapper -i /mnt/sda1/drivers/ndiswrapper/bcmwl5.inf
                $ sudo ndiswrapper -l
                $ sudo ndiswrapper -m
                $ sudo modprobe ndiswrapper
                ----------
                Note: you can now make an extension out of everything in
                .. /etc/ndiswrapper and use it with the ndiswrapper extension
                ..to avoid having to use the perl5 extension
                ----------
                This extension contains:
                ndiswrapper-1.56 - GPL - http://freefr.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.56.tar.gz
Change-log:     2009/03/13
                Re-compiled for tc_2.x
                2009/06/19
                Re-compiled for tc_3.x, updated 1.54 -> 1.56
Current:        2010/07/06

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ndiswrapper
« Reply #1 on: July 06, 2010, 05:22:13 AM »
thanks a lot
dCore user

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ndiswrapper
« Reply #2 on: July 06, 2010, 06:30:41 AM »
Code: [Select]
tc@box1:~$ sudo modprobe ndiswrapper
modprobe: can't load module ndiswrapper (kernel.tclocal/misc/ndiswrapper.ko.gz): invalid module format
Code: [Select]
dmesg
ndiswrapper: version magic '2.6.33-tinycore SMP mod_unload 486 ' should be '2.6.33.3-tinycore SMP mod_unload 486 '
dCore user

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: ndiswrapper
« Reply #3 on: July 06, 2010, 06:55:20 AM »
Ah - sorry about that, I'll fix in the next day or so.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ndiswrapper
« Reply #4 on: July 06, 2010, 07:16:29 AM »
no prbl
dCore user

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: ndiswrapper
« Reply #5 on: July 06, 2010, 10:41:21 PM »
corrected version uploaded

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ndiswrapper
« Reply #6 on: July 07, 2010, 06:09:55 AM »
I'm using bzImage.upxed


tc@box1:~$ sudo ndiswrapper -i /mnt/hda3/jls_legalize/condivisa/Drivers/2KXP/net
A5AGU.inf
installing neta5agu ...
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
forcing parameter MapRegisters from 256 to 64
tc@box1:~$ sudo modprobe ndiswrapper
Killed
tc@box1:~$ dmesg
......

usb 1-2: new full speed USB device using uhci_hcd and address 4
Disabling lock debugging due to kernel taint
ndiswrapper version 1.56 loaded (smp=yes, preempt=no)
usb 1-2: reset full speed USB device using uhci_hcd and address 4
ndiswrapper: driver neta5agu (D-Link,05/29/2007,1.5.204.1) loaded
ndiswrapper (ZwQueryValueKey:2329): not fully implemented (yet)
BUG: unable to handle kernel NULL pointer dereference at 00000008
IP: [<c02f29d5>] 0xc02f29d5
*pde = 00000000
Oops: 0000 [#1] SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:07.2/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1/dev
Modules linked in: ndiswrapper(+) nfsd exportfs radeon ttm drm_kms_helper drm i2c_algo_bit 3c509 snd_ens1371 gameport snd_rawmidi snd_seq_device snd_ac97_codec ac97_bus snd_pcm gspca_pac207 snd_timer gspca_main snd videodev i2c_viapro v4l1_compat soundcore via_agp snd_page_alloc i2c_core agpgart squashfs ramzswap loop scsi_wait_scan ppdev parport_pc parport

Pid: 10081, comm: modprobe Tainted: P           2.6.33.3-tinycore #2012 694X-686B/VT82C692BX
EIP: 0060:[<c02f29d5>] EFLAGS: 00210246 CPU: 0
EAX: 00000000 EBX: 00000000 ECX: 00000001 EDX: 00000000
ESI: d5ac8454 EDI: 00000000 EBP: ffffffe0 ESP: d6683b80
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process modprobe (pid: 10081, ti=d6682000 task=da6160b0 task.ti=d6682000)
Stack:
 00000000 d5ac8454 d9f7d800 c02fa11a df6388b8 00000001 d5ac8400 c0ca8c20
 d9f7d800 d2457680 d9c1a3e0 e0a8422b 00000000 e0a7d490 d9c1a3e0 00000000
 e0a7d811 d9c1a3e0 d9c1a3e0 d9c1a3e0 c0ca8c20 e0c12000 e0a7e929 c03bcaf0
Call Trace:
 [<c02fa11a>] ? 0xc02fa11a
 [<e0a8422b>] ? 0xe0a8422b
 [<e0a7d490>] ? 0xe0a7d490
 [<e0a7d811>] ? 0xe0a7d811
 [<e0a7e929>] ? 0xe0a7e929
 [<c03bcaf0>] ? 0xc03bcaf0
 [<e0a7ce55>] ? 0xe0a7ce55
 [<e0a7b178>] ? 0xe0a7b178
 [<e0a81b60>] ? 0xe0a81b60
 [<e0a82bbe>] ? 0xe0a82bbe
 [<e0a82bd1>] ? 0xe0a82bd1
 [<e0a7a748>] ? 0xe0a7a748
 [<e0a7d490>] ? 0xe0a7d490
 [<e0a7ce55>] ? 0xe0a7ce55
 [<e0a7df44>] ? 0xe0a7df44
 [<e0a7a58a>] ? 0xe0a7a58a
 [<e0a7e108>] ? 0xe0a7e108
 [<e0a7e3d0>] ? 0xe0a7e3d0
 [<e0a7e498>] ? 0xe0a7e498
 [<c01ac945>] ? 0xc01ac945
 [<c01acfbd>] ? 0xc01acfbd
 [<c01acaae>] ? 0xc01acaae
 [<c01acb11>] ? 0xc01acb11
 [<c011ff9b>] ? 0xc011ff9b
 [<c011ffa9>] ? 0xc011ffa9
 [<c03bba35>] ? 0xc03bba35
 [<c03bc0a6>] ? 0xc03bc0a6
 [<c02fa80a>] ? 0xc02fa80a
 [<c02fb2c5>] ? 0xc02fb2c5
 [<c0293309>] ? 0xc0293309
 [<c02933bb>] ? 0xc02933bb
 [<c0292bf5>] ? 0xc0292bf5
 [<c02931e2>] ? 0xc02931e2
 [<c0293380>] ? 0xc0293380
 [<c0292841>] ? 0xc0292841
 [<c029364b>] ? 0xc029364b
 [<c02fae1a>] ? 0xc02fae1a
 [<e0a75a7d>] ? 0xe0a75a7d
 [<e0959000>] ? 0xe0959000
 [<e095906e>] ? 0xe095906e
 [<c010112d>] ? 0xc010112d
 [<c01473e6>] ? 0xc01473e6
 [<c03bcc35>] ? 0xc03bcc35
Code: 1b 0f b6 72 04 31 db eb 0f 8b 4c 9a 50 8b 01 0f b6 40 02 39 f8 74 07 43 39 f3 75 ed 31 c9 5b 89 c8 5e 5f c3 57 89 d7 56 31 d2 53 <8b> 70 08 89 c3 eb 0e 6b ca 1c 03 0b 0f b6 41 03 39 f8 74 07 42
EIP: [<c02f29d5>]  SS:ESP 0068:d6683b80
CR2: 0000000000000008
---[ end trace b2526401c4651e17 ]---
dCore user

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: ndiswrapper
« Reply #7 on: July 07, 2010, 06:25:20 AM »
Do you have either:

1. other hardware to try with ndiswrapper?
2. a different driver to try with the same hardware?

The reason I ask is that with my previous laptop, I had to download maybe ten different windows drivers tarballs before I found one that would work..

Edit: is your driver on the ndiswrapper "known to work page"?
« Last Edit: July 07, 2010, 06:27:00 AM by Juanito »

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ndiswrapper
« Reply #8 on: July 07, 2010, 07:26:05 AM »
with tc 2.x it works
dCore user

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: ndiswrapper
« Reply #9 on: July 07, 2010, 07:43:16 AM »
Let me try a couple of things - if that doesn't work, maybe we should drop back to the same version as in 2.x

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: ndiswrapper
« Reply #10 on: July 08, 2010, 02:19:10 AM »
Hmm, I get:
Code: [Select]
$ lspci -nv
...
0c:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g [14e4:4315] (rev 01)
        Subsystem: Dell Wireless 1395 WLAN Mini-Card
$ sudo ndiswrapper -i /tmp/driver/bcmwl6.inf
installing bcmwl6 ...
$ sudo ndiswrapper -l
bcmwl6 : driver installed
$ sudo ndiswrapper -m
modprobe: invalid option -- 'c'
BusyBox v1.17.0.git (2010-06-26 11:03:26 UTC) multi-call binary.
... yada, yada

adding "alias wlan0 ndiswrapper" to /etc/modprobe.conf ...
$ sudo modprobe ndiswrapper
$ dmesg
...
Disabling lock debugging due to kernel taint
ndiswrapper version 1.56 loaded (smp=yes, preempt=no)
usbcore: registered new interface driver ndiswrapper [but pci...]

[add full modprobe]
$ sudo ndiswrapper -l
bcmwl6 : driver installed
        device (14E4:4315) present (alternate driver: ssb)
..but still no wireless device created.

To get this far, I edited wireless-2.6.33.3-tinycore.tcz to remove b43, which loads automatically - I wonder if I need to remove ssb too...

ref: http://forums.gentoo.org/viewtopic-t-827657-start-0.html
Quote
Disable the b43 AND ssb modules in your kernel. They clash with both ndiswrapper and the broadcom-sta driver and you should be fine.

A couple more things to try yet, but I wonder if our kernel is too recent for ndiswrapper?

http://sourceforge.net/projects/ndiswrapper/forums/forum/323168/topic/3567976

..although our kernel config seems have the required settings
« Last Edit: July 08, 2010, 02:40:34 AM by Juanito »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: ndiswrapper
« Reply #11 on: July 08, 2010, 04:57:01 AM »
updated extension uploaded.

..making some progress now:

1. edit wireless-2.6.33.3-tinycore.tcz and remove b43 [if you have hardware using this]
2. remaster microcore/tinycore and remove ssb module
3. overwrite busybox modprobe with full fat version [just in case..]

Code: [Select]
$ sudo modprobe mac80211
$ sudo modprobe lib80211_crypt_wep
$ sudo ndiswrapper -i /tmp/driver/bcmwl5.inf
$ sudo ndiswrapper -l
bcmwl6 : driver installed
$ sudo ndiswrapper -m
adding "alias wlan0 ndiswrapper" to /etc/modprobe.conf ...
$ sudo modprobe ndiswrapper
$ dmesg
...
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: 00
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
    (2457000 KHz - 2482000 KHz @ 20000 KHz), (600 mBi, 2000 mBm)
    (2474000 KHz - 2494000 KHz @ 20000 KHz), (600 mBi, 2000 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Calling CRDA to update world regulatory domain
lib80211: common routines for IEEE802.11 drivers
lib80211_crypt: registered algorithm 'NULL'
lib80211_crypt: registered algorithm 'WEP'
Disabling lock debugging due to kernel taint
ndiswrapper version 1.56 loaded (smp=yes, preempt=no)
ndiswrapper: driver bcmwl5 (Broadcom,09/20/2007, 4.170.25.12) loaded
ndiswrapper 0000:0c:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
ndiswrapper 0000:0c:00.0: setting latency timer to 64
ndiswrapper: using IRQ 17
wlan0: ethernet device 00:24:2b:60:07:5a using NDIS driver: bcmwl5, version: 0x4aa190c, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4315.5.conf
wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
usbcore: registered new interface driver ndiswrapper

I must emphasise that I did not have a wifi network to join, so I couldn't do the final test, but it looks like it's going to work.

I should be able to fully test tomorrow.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: ndiswrapper
« Reply #12 on: July 08, 2010, 05:08:05 AM »
Blacklisting ssb and b43 should be enough, though it might need to be in an extension or gz to be loaded before the wireless extension.
The only barriers that can stop you are the ones you create yourself.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: ndiswrapper
« Reply #13 on: July 08, 2010, 05:12:13 AM »
I was thinking about that too - let me be sure ndiswrapper works first, then I'll play around with blacklisting

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: ndiswrapper
« Reply #14 on: July 09, 2010, 04:26:15 AM »
It works  :)

1. Make a blacklist file containing at least the module ssb, and create a cpio/gz out of it to load as an overlay at boot, eg:
Code: [Select]
$ cat /etc/modprobe.d/blacklist
blacklist ssb
blacklist b43

2. busybox modprobe seems to work fine despite the error message, so:
Code: [Select]
$ sudo ndiswrapper -i /tmp/driver/bcmwl5.inf
$ sudo ndiswrapper -l
bcmwl5 : driver installed
$ sudo ndiswrapper -m
modprobe: invalid option -- 'c'
BusyBox v1.17.0.git (2010-06-26 11:03:26 UTC) multi-call binary.

Usage: modprobe [-alrqvsb] MODULE [symbol=value]...

Options:
        -a      Load multiple MODULEs
        -l      List (MODULE is a pattern)
        -r      Remove MODULE (stacks) or do autoclean
        -q      Quiet
        -v      Verbose
        -s      Log to syslog
        -b      Apply blacklist to module names too

adding "alias wlan0 ndiswrapper" to /etc/modprobe.conf ...

$ sudo iwconfig wlan0 essid "essid"
$ sudo iwconfig wlan0 key restricted 12:34:56:78:9A:BC:DE:F1:23:45:67:89:AB
$ sudo udhcpc -b -i wlan0
udhcpc (v1.17.0.git) started
Sending discover...
Sending select for 192.168.1.103...
Lease of 192.168.1.103 obtained, lease time 600
deleting routers
route: SIOCDELRT: No such process
adding dns 213.42.20.20
adding dns 195.229.241.222
$ sudo ping -c2 www.tinycorelinux.com
PING www.tinycorelinux.com (69.89.31.92): 56 data bytes
64 bytes from 69.89.31.92: seq=0 ttl=51 time=302.567 ms
64 bytes from 69.89.31.92: seq=1 ttl=51 time=304.675 ms

--- www.tinycorelinux.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 302.567/303.621/304.675 ms