PDA

View Full Version : How to use ndiswrapper



2k3autococker
01-24-2007, 05:02 PM
Everything I've seen about wireless networking all seems to be related to the specific wireless card, but from what I get from it, you can download windows drivers and run them through ndiswrapper and it should work... How exactly do I run / configure ndiswrapper with windows drivers?

onemyndseye
01-25-2007, 09:54 AM
I havent messes with wireless under Linux so I cant be of much help...

I will say dont get your hopes up as Wireless networking under Linux is still pretty shaky

Take Care,
-Justin
One Mynds Eye

kej
01-26-2007, 07:07 PM
I have just been working with this, and have found, for my specific case that wireless through the ndiswrapper can still work, if done properly. information on what I did is as follows:

system: hp pavillion zv5000
memory: 512MB
wireless card: Broadcom BCM4306 802.11b/g Wireless LAN Controller
wireless router: linksys wrt54gl
firmware: v4.30.5, Apr. 27, 2006
wireless mode: mixed

disk: 100GB, 3 partitions, hda1 = /; hda2 = swap; hda3 = /home

notes:

I was not able to make bcm43xx work. It seems to fire up and connect, i.e. gets dhcp info, but can not do any thing farther. It seems that there is a one line kernel patch associated with 2.6.19.2 that speaks to this issue. I tried to make this work, by doing an hd (debian type) install, and then work with the kernel patch - but was not successful. Not enough time to pursue that farther. It has been a long time since I have built kernels. However, was able to finally make ndiswrapper to work.

Before I removed microsoft from this machine, I found the wireless driver information and copied that to my hda3 disk partition.


procedure:

boot knoppix 5.1.1 dvd screen=1280x800

open terminal window - issue su - command
mount the hda3 disk partition

#for general purposes:

rmmod bcm43xx

# need MS devide drivers - a variety of sources - bcmwl5a.inf, bcmwl5.sys
#
# in my case, wireless device fairly consistently comes up as eth2

cd to the directory on the hda3 drive where these are stored

ndiswrapper -i bcmwl5a.inf
modprobe ndiswrapper
ifup wlan0

Now, there are a number of more complete discussions about ndiswrapper and how to carry forward the installation to make things more permenant. These can be found in this forum in other places, or a google search on knoppix and ndiswrapper.

As a follow on note, this information is for the live dvd only.

I tried to do an HD install (knx2hd), following the above procesure, but the wireless setup info was not successfully preserved, and I have not figured a way round that yet. (This was the approach that I had used with an HD install of 4.0.2 and it worked great for that version). About the only thing that I can say is that I am understanding more, why the tools need to be re-written.


Finally, the drawback here is that since I was unable to either do an HD install, or to save the system configuration information, this procedure needs to be done each time knoppix 5.1.1 is loaded.

While this information is specific to my case, some of the ideas may be helpful to others.

Good Luck!

2k3autococker
01-26-2007, 08:04 PM
Thanks for the help, I have the 5.1.1 DVD, so it should come in handy... thanks man

2k3autococker
01-31-2007, 06:55 PM
I tried what you said, got an error saying that the file didn't exist at /usr/sbin/ndiswrapper at line 172
I tried using the configuration thing thats under the K menu -> Knoppix -> network/internet -> ndiswrapper configuration and it generated an error that said "su returned with error"

What to do?

TR7110
02-01-2007, 05:16 AM
Kej
Good info, at long last I have gotten my bcm internal card to work in Knoppix. This time I used Live CD 5.1.1
I followed your instructions Opened Root Shell.

rmmod bcm43xx
#mounted the drive with my wireless adapter files. Same .inf that was used with XP
ndiswrapper -i /media/sda1/bcmwl5.inf
ndiswrapper -m
modprobe ndiswrapper
ifup wlan0 (got a failure there)

#Used Network Card Configuration to set up SSID and WEP and NWID. Wavelan and Wireless LAN didn't do the trick.

ifconfig

#Presto up and running, with an IP and everything. This is the first time I have had any success using Knoppix and I have tried numerous times.
#In previous versions there was a bcmwl5 in the ndiswrapper I used and I should have removed it then added my version.
Thanks again for the post.

kej
02-02-2007, 03:47 PM
to 2k3autococker:

I am not sure what is happening, but it is very important to get the correct MS driver files and point to them properly when doing the ndiswrapper -i .... , as TR7110 reported.

You can point to the files by either cd to the specific directory and then use a relative path name, as I did, or by specifying the complete path, as in the case of TR7110.

Now, there are a couple of different version of the .inf file. Mine only works with the bcmwfl5a.inf version. Others may only work with the bcmwl5.inf version.

One other interesting point that I have encountered, is that if I mess something up along the process, i.e. forget to do something correctly, I have not found the proper way to undo these things without just doing a clean re-boot.
When things do not work correctly, there is enough information that gets into some places, but not others, and that is enough to keep everything from being undone.

The answer is a quick re-boot.

Good Luck!!

ginoe
02-05-2007, 05:54 AM
where did you get the 5.1.1 dvd - did you purchase it?

i've been searching but cannot find the 4gb iso - all i can find are ones that claim to be 4gb but ends up only being 27mb or so...


Thanks for the help, I have the 5.1.1 DVD, so it should come in handy... thanks man :?:

Harry Kuhman
02-05-2007, 06:36 AM
i've been searching but cannot find the 4gb iso - all i can find are ones that claim to be 4gb but ends up only being 27mb or so...
You don't know what you are doing. You are either trying to download to a FAT partition or using a download tool that will not support a file this size. Don't save to FAT and try using a version of BitTorrent 4.0 or greater. Use the Get Knoppix link near the top of this page. And in the future try to kep your posts on topic, your post had nothing to do with ndswrapper, the subject of this thread.

ginoe
02-05-2007, 06:54 AM
thanks for the insightful tip :roll:

google led me here; where the files show mismatching .md5 signifying damaged archives:
http://www.knopper.net/knoppix-mirrors/index-en.html

i was able to locate a download that was not corrupt (no special d/l tools needed): http://linux.softpedia.com/progDownload/KNOPPIX-Live-DVD-Download-2621.html

i was hoping the dvd would contain additional files with regards to networking, unlike the smaller cd version i have.

btw - discs are NTFS not FAT

http://i21.photobucket.com/albums/b255/ginoe/ntfs.jpg

Harry Kuhman
02-05-2007, 07:06 AM
You didn't post enough info to know if it was a FAT problem or not, but FAT or a tool that can't deal with files over 4 gig in size are the common problems for the hugh size discrepency that you reported. There is also a well known problem of the mirrors way too frequently corrupting ISO downloads; I had about 50% bad downloads (md5 sum wrong and the file slightly wrong in size) before Knoppix started becoming available by BitTorrent. Since BitTorrent has been available I've not had a bad download and have downloaded much faster than I could before. But the corruption issue would not explain the hugh file size difference that you wrote of, so I didn't focus on that.

exsencon
02-22-2007, 01:11 AM
I have just been working with this, and have found, for my specific case that wireless through the ndiswrapper can still work, if done properly. information on what I did is as follows:

system: hp pavillion zv5000
memory: 512MB
wireless card: Broadcom BCM4306 802.11b/g Wireless LAN Controller
wireless router: linksys wrt54gl
firmware: v4.30.5, Apr. 27, 2006
wireless mode: mixed

disk: 100GB, 3 partitions, hda1 = /; hda2 = swap; hda3 = /home

notes:

I was not able to make bcm43xx work. It seems to fire up and connect, i.e. gets dhcp info, but can not do any thing farther. It seems that there is a one line kernel patch associated with 2.6.19.2 that speaks to this issue. I tried to make this work, by doing an hd (debian type) install, and then work with the kernel patch - but was not successful. Not enough time to pursue that farther. It has been a long time since I have built kernels. However, was able to finally make ndiswrapper to work.

Before I removed microsoft from this machine, I found the wireless driver information and copied that to my hda3 disk partition.


procedure:

boot knoppix 5.1.1 dvd screen=1280x800

open terminal window - issue su - command
mount the hda3 disk partition

#for general purposes:

rmmod bcm43xx

# need MS devide drivers - a variety of sources - bcmwl5a.inf, bcmwl5.sys
#
# in my case, wireless device fairly consistently comes up as eth2

cd to the directory on the hda3 drive where these are stored

ndiswrapper -i bcmwl5a.inf
modprobe ndiswrapper
ifup wlan0

Now, there are a number of more complete discussions about ndiswrapper and how to carry forward the installation to make things more permenant. These can be found in this forum in other places, or a google search on knoppix and ndiswrapper.

As a follow on note, this information is for the live dvd only.

I tried to do an HD install (knx2hd), following the above procesure, but the wireless setup info was not successfully preserved, and I have not figured a way round that yet. (This was the approach that I had used with an HD install of 4.0.2 and it worked great for that version). About the only thing that I can say is that I am understanding more, why the tools need to be re-written.


Finally, the drawback here is that since I was unable to either do an HD install, or to save the system configuration information, this procedure needs to be done each time knoppix 5.1.1 is loaded.

While this information is specific to my case, some of the ideas may be helpful to others.

Good Luck!

Complete newbie to linux
I just read your post and tried to do the same but no luck.
My system: Dell Inspiron 1501, HD 120G, 1G RAM,ethernet card, wireless minicard dell 1390 (a Broadcom card really 4311)
Wireless works fine under WinXP via Linksys WRT54G router
Now I am exploring Linux and downloaded the live Knoppix DVD 5.1
Works well but of course the wireless card was not detected (the ethernet card works fine when connected to the router but that's not the purpose of a laptop of course)
I downloaded the driver via the ndiswrapper site and put them on the desktop (in KDE it's in my home folder)
bcmwl5.inf and bcmwl5.sys

I can get it in the ndiswrapper window and do OK and the window closes and that's it. When I try to open a terminal window under root i just cannot find the right commands to see if the driver is installed or not, so I feel I am missing something.
Since you were successful maybe you could give me your procedure in more detail step by step. Don't forget I know next to nothing about Linux (how do you mount a disk?) so every detail is welcome. Thanks

posmanet
02-23-2007, 12:38 AM
Hello exsencon!

With "ndiswrapper -l" You can see if ndiswrapper has loaded Your binary
driver. (bcmwl5) With "lsmod" You can see Your loaded kernel modules.
Ndiswrapper should be in this list. With "ifconfig" You can see Your
configured network interfaces. Your WLAN should be something like
eth0, eth1 or wlan0. If everything is fine (ndiswrapper has loaded
driver, ndiswrapper kernelmodule is loaded) You are ready to go and
should set up the network parameters for the device. You could use
"netcardconfig" for that.

Good luck!

PS: If You want to know more about any of these commands, just read the
manual pages. Example: "man ifconfig"

PPS: Greetings to Harry Kuhman! ;-)

Harry Kuhman
02-23-2007, 01:27 AM
PPS: Greetings to Harry Kuhman! ;-)
Good to see I finally have my act together and you are able to post again. :D

exsencon
02-23-2007, 10:24 PM
Hello exsencon!

With "ndiswrapper -l" You can see if ndiswrapper has loaded Your binary
driver. (bcmwl5) With "lsmod" You can see Your loaded kernel modules.
Ndiswrapper should be in this list. With "ifconfig" You can see Your
configured network interfaces. Your WLAN should be something like
eth0, eth1 or wlan0. If everything is fine (ndiswrapper has loaded
driver, ndiswrapper kernelmodule is loaded) You are ready to go and
should set up the network parameters for the device. You could use
"netcardconfig" for that.

Good luck!

PS: If You want to know more about any of these commands, just read the
manual pages. Example: "man ifconfig"

PPS: Greetings to Harry Kuhman! ;-)

I tried loading the driver once more and now I got at least something. It said bcmwl5.inf is not a valid driver.
This is the very same driver WinXP uses to get a very good wireless connection! I deleted the downloaded drivers and used (copy and paste) the files that are on my winXP system (bcmwl5.inf and bcmwl5.sys) I don't understand. Wireless under linux is not a piece of cake!

posmanet
02-24-2007, 05:59 PM
Well, Wireless under linux is not a piece of cake because the wireless hardware vendors are no piece of cake... many of them dont care about linux unfortunately, and dont even release details about their chips, so that free driver development is next to impossible.

Ndiswrapper tries to use the drivers that were programmed for mswindows - emulating a kind of mswindows environment for them. As You can imagine, this is not that easy and because of the lack of documentation of windows drivers or windows itself, problematic.
(see more on http://ndiswrapper.sourceforge.net/)

I have an IBM Thinkpad T40 running with an Broadcom BCM4306 Mini-PCI in it, on Knoppix 5.1.1. It is not 100% bug free, but it's working now (i use ndiswrapper). Here are some additional tips that might help You:

1) Before loading ndiswrapper kernel module, try removing another kernel module named bcm43xx. You can do this by typing: "rmmod bcm43xx".

2) Instead of using ndiswrapper, You could give another driver-project a try. (read more on http://bcm43xx.berlios.de/) I wasn't lucky with this one, but maybe You are. (comment: This one is the kernelmodule i mentioned in 1). But You need the firmware of Your card, because the driver developers aren't allowed to redistribute them... - read more on the weblink!)



Unfortunately, yes, this is quite confusing stuff to newbies (i am also no pro...) - but again: This is no problem caused by linux itself, but a problem caused by ignorant hardware vendors. And this is a problem especially for wlan devices - i dont know why this is. Most hardware usually just works out-of-the-box. (Ever needed to install drivers for chipset/mouse/keyboard/ide/scsi/dsl/vga/cable-lan/soundcard/floppy/hdd/cdrom/dvd/burners/monitors/whatever in Knoppix? I guess not... 8) )

Greetings

mehrdad_p
02-25-2007, 11:43 PM
Hi everyone.......I have problem to setting my wireless card it's broadcom 4311.........I did as bottom:

I copy all the driver files(bcmwl5.inf, bcmwl5.sys, bcmwl564.sys) in home
$ ndiswrapper -i bcmwl5.inf
$ ndiswrapper -l I got bcmwl5 driver present, hardware present
$ depmod -a
$ modprobe ndiswrapper I got error which said it can not find modules


can someone guide me how to setup my wireless card step by step becuase I am new to Linux OS

posmanet
02-26-2007, 02:58 PM
mehrdad_p:
Which Knoppix version are You using?
Maybe the ndiswrapper module is missing on Your system for some reason. Maybe reinstalling ndiswrapper helps.

Greetings

mehrdad_p
02-26-2007, 05:26 PM
mehrdad_p:
Which Knoppix version are You using?
Maybe the ndiswrapper module is missing on Your system for some reason. Maybe reinstalling ndiswrapper helps.

Greetings

I am using knoppix 2.7 but I download the knoppix 5 live dvd and try it but I got another error at the beginning when I type ndiswrapper -i bcmwl5.inf it said that you do not have pemision somthing like that.........and can you guild me how to uninstall and install ndiswrapper becuase I try that but I couldnt remove ndiswrapper completly.

thanks

posmanet
02-26-2007, 08:42 PM
Permission errors are most likely happening when You are trying to do sometiong as user, that only root is allowed to do. Use a root shell (find itin the Knoppix menu) for ndiswrapper stuff. By the way, the exact error will be very helpful!

Reinstalling ndiswrapper:

version 1) You have an internet connection (maybe via LAN) - do as root:
apt-get update # this means updating the lists of available software packages
apt-get install ndiswrapper --reinstall # this one reinstalls/updates Your ndiswrapper software

version 2) Find another computer that has an internet connection, and search for an ndiswrapper debian package (.deb). Download it, and move it to Your target machine. There, You can install it using:
dpkg -i /path/to/Your/ndiswrapper.deb

Greetings

Update:
I think You'll need more Packages than just one. On my system, following ndiswrapper packages are installed:
ii ndiswrapper-common 1.15-1 Userspace utilities for ndiswrapper
ii ndiswrapper-modules-2.6.17 1.16-1 Linux kernel module for NdisWrapper for 2.6.17
ii ndiswrapper-utils 1.8-1 User space tools for ndiswrapper
ii ndiswrapper-utils-1.7 1.8-2 Userspace utilities for ndiswrapper
(You could check this out on Your machine with "dpkg -l | grep ndiswrapper")

exsencon
02-27-2007, 02:31 PM
OK, I am at it again! Still no luck installing the wireless driver with ndiswrapper but maybe I am getting closer (I hope!). Last time when I tried to install,I got this message (this was with the Suse live DVD,but it should be similar with Knoppix)

linux:/home/linux/ndiswrapper-1.37 # make
make -C driver
make[1]: Entering directory `/home/linux/ndiswrapper-1.37/driver'
Can't find kernel build files in /lib/modules/2.6.18.2-34-default/build;
give the path to kernel build directory with
KBUILD=<path> argument to make
make[1]: *** [prereq_check] Error 1
make[1]: Leaving directory `/home/linux/ndiswrapper-1.37/driver'
make: *** [all] Error 2

Where is the Kernel build directory and how do I get it to build those files?
Any suggestions?
As for knoppix I am still trying but for now I always get the same (discouraging) answer: bcmwl5.inf :invalid driver

mehrdad_p
02-27-2007, 02:54 PM
Do I need to unistall ndiswrapper first and after install it then install the packages............I realy confused when I download the packages I install them but when I typed ndiswrapper -i bcmwl5 it said that ndiswrapper not found........Can u guide me how can I uninstall and then nstall the new version on Knoppix 2.7(Whoppix 2.7) Live CD..........and also can u put the exact package links for me. at last can you guide me step by step because I just trying use Linux OS for about a week so I need to guide step by step









Permission errors are most likely happening when You are trying to do sometiong as user, that only root is allowed to do. Use a root shell (find itin the Knoppix menu) for ndiswrapper stuff. By the way, the exact error will be very helpful!

Reinstalling ndiswrapper:

version 1) You have an internet connection (maybe via LAN) - do as root:
apt-get update # this means updating the lists of available software packages
apt-get install ndiswrapper --reinstall # this one reinstalls/updates Your ndiswrapper software

version 2) Find another computer that has an internet connection, and search for an ndiswrapper debian package (.deb). Download it, and move it to Your target machine. There, You can install it using:
dpkg -i /path/to/Your/ndiswrapper.deb

Greetings

Update:
I think You'll need more Packages than just one. On my system, following ndiswrapper packages are installed:
ii ndiswrapper-common 1.15-1 Userspace utilities for ndiswrapper
ii ndiswrapper-modules-2.6.17 1.16-1 Linux kernel module for NdisWrapper for 2.6.17
ii ndiswrapper-utils 1.8-1 User space tools for ndiswrapper
ii ndiswrapper-utils-1.7 1.8-2 Userspace utilities for ndiswrapper
(You could check this out on Your machine with "dpkg -l | grep ndiswrapper")

posmanet
02-27-2007, 07:36 PM
I'm sorry, but i dont know such an old knoppix as 2.7, and what is whoppix?!

The description i gave You was general debian administration, and it already was step by step (there are no smaller steps). If You use apt-get You dont have to uninstall anything manually and You dont have to care of that. Best thing is to get an internet connection via LAN and install via apt. I dont have exact links to any debian packages (.dep) sorry - You can use google Yourself i think.

Greetings

exsencon
02-28-2007, 06:43 PM
Yes,yes,yes I got it! Dear posmanet I am writing this from my wireless laptop under Knoppix! It really came down to a mistyped path for my driver so poor ndiswrapper could not find it. Stupid {very stupid) mistake. But still; you really have to earn your Linux! Now being on a live DVD, there is no way to save this configuration I suppose and you have to start over again next time you start the computer?
A happy man and thank you for your suggestions and keeping the faith, it was needed! :D

posmanet
02-28-2007, 09:48 PM
Im happy to hear that it works! :D

One way to "save" Your special wlan configuration would be, to create a bash script, including the commands You needed to setup Your wireless connection - and store this file on a fixed drive oder USB stick or similar. This can be quite easily been done by creating a text file, entering Your commands (one per line), save, and change permissions of this file to being executable. The first line in this file should contain something like this:

#!/bin/sh

Greetings, and happy wireless networking.

By the way, on my system ndiswrapper runs better than bcm43xx driver. bcm43xx is slower (11mbit only) and after a while connection is lost magically, and cannot be restored (only by reboot). Well, this driver is still under development, and i dont even have the latest version - so there may be more to come in the future.

exsencon
02-28-2007, 11:26 PM
Well, on my system ndiswrapper runs at the rated speed of 54mb/s and it's a real beauty. The funny thing though is that I didn't have to configure anything. After driver installation I just did modprobe and looked into desmg and it gave me my wlan0 with essid and everything. Of course my wireless router was running and I guess the card detected it and configured the whole thing.I really was up and running before I realized it.

I don't think the 43xx driver will work on my system although I have it in the catalog of the driver file I downloaded. W'll see.

If I make a file to save the config, is the first line added automatically or do you have to write (or edit) it yourself?

posmanet
03-01-2007, 08:08 PM
You'll have to enter the first line (and all following lines) yourself. Then save the file on one of Your fixed drives. When you boot next time, You can just mount the fixed drive, and start it (as root) - it will work as if You would enter the commands manually. For example, You could creat a file called "wlan-start" on the first partition of the first hard disc drive. (This would be c:\ under Windows, and hda1 under Linux.) This file should contain something linke this (example, with windows wlan-driver in c:\wlan-driver\):

#!/bin/sh
echo "Setting up wireless networking."
ndiswrapper -i /media/hda1/wlan-driver/bcmwl5.inf
modprobe ndiswrapper
# This is a comment: You could also use ifup / ifconfig / iwconfig for networt setup here:
netcardconfig

For the moment, i will stay to ndiswrapper (i also have 54mbit here :D and no interruptions at all) - but i'm looking forward to using bcm43xx in future versions of this driver (and Knoppix, containing newer kernel/drivers).

Greetings

mehrdad_p
03-02-2007, 12:07 AM
hi posmanet

Finally I set my wireless in knoppix 5.1.1 Live dvd and thanks alot but I really need to set it in whoppix 2.7 ( you can find it here http://distrowatch.com/?newsid=02683) and I found that the problem is my ndiswrapper and I need to Uninstall and install it again.........th problem here is I dont know how to Uninstall it and then Install.......can you guide me ow can I do that Setp-By-Step :D..........I read sth about how to do it but I didnt get any result I can not use cable connection becuase I;m using my university wireless AP (I can not use apt-get command).............at the end thanks again

posmanet
03-02-2007, 12:16 PM
Dear Mehrdad,
If Your Whoppix is based on Knoppix, the step-by-step description i already gave should work. If not, either You did something wrong (read - try again), got the wrong package (use Your favourite search machine), or it is some problem concerning Whoppix. You should ask someone in the Whoppix forum then. There's nothing more i can do from here. And sorry, i dont have the time to start tiddling with Whoppix - i'm fine with Knoppix, and can help You with that.
Greetings

exsencon
03-02-2007, 02:27 PM
Thanks Posmanet, I will sure try to do this and will keep you posted!Thanks again because you kept me alive in the wireless linux business!

PaulE
03-03-2007, 08:20 AM
I was trying to get a Linksys WMP54G card going (another thread on the forum) but had also purchased a Belkin Wireless G Plus Desktop Card (F5D7001) as a backup plan. Thanks to Posmanet, this is now working for me. Seems that 'rmmod bcm43xxx' is the trick.

Before that I tried using the "firmware cutter" (bcm43xxx-fwcutter) to extract firmware modules. Limited but no ultimate success with that approach. Used .inf and .sys files found through the ndiswrapper wiki. Specifically...

http://biginoz.free.fr/linux/bcmwl5a.inf
http://biginoz.free.fr/linux/bcmwl5.sys

Haven't tried to duplicate and automate this setup so we'll see if it sticks. Also would like to see if I can get the bitrate over 18Mb/s.