LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Linux Answers > Networking
User Name
Password

Notices


By ratcheson at 2004-07-25 19:53
HOWTO INSTALL THE NDISWRAPPER IN SUSE-9

INTRODUCTION

This is not solely my work! I've taken info from many different sources, especially the Install file in the Ndiswrapper tarball, and distilled it by setting up my broadcom stuff and making notes. I've used this sequence for Belkin FD7000 series PCI and PCMCIA wifi cards. It also worked fine on my Dell Inspiron 1150 with the built in wireless card. You can look up more info on ndiswrapper by going to http://ndiswrapper.sourceforge.net/.

This is a bit detailed so it should be fairly clear for the newbie. I welcome criticism of all kinds but only respond to the constructive variety.

Unfortunately, to use this HOWTO you still have to read, you just cant get away from that!

Thanks to C. Hamel for having the patience to go through this verifying the steps and making so many good suggestions.

Persistence, determination, and being methodical are the keys to success. Above all, keep notes on what you did and the resulting response/error messages.
Otherwise no one will be able to tell where things are going wrong and how to fix any problem.

OVERVIEW

I think the way this thing is supposed to work is

1.you install ndiswrapper , then

2. install the driver using ndiswrapper;

3. make sure eth0 isn't running and that the wlan0 is;

4. set up your wireless with:

iwconfig wlan0 enc <etc>

and iwconfig wlan0 essid <whatever you call it>

5. Finally to get the IP you dhcpcd wlan0.

When you get it going then you must make sure it can start automatically at boot. Either you place ndiswrapper in modprobe.conf, or in the boot sequence.

INSTALLATION

You must have your kernel's source installed before installing ndiswrapper. If you change/update the kernel you may need to reinstall ndiswrapper against the new kernel's source to get it working again.

Start by getting the drivers and ndiswrapper. The drivers can be found on the CD that comes with your card or you can get the driver from broadcom or the maker of your computer. Ndiswrapper can be found at http://prdownloads.sourceforge.net/ndiswrapper/.

Make a note of where you put the drivers so you can tell nidswrapper later on.

NOTE: Ndiswrapper comes already compiled, all you do is install it with make install and then use it to load your card's drivers.


Make sure you have the source for your kernel installed in /usr/src . Check that it is there. For example mine is found at /usr/src/linux-2.6.4-54.5, yours should be somewhere similar. Compare your kernel version to the source version. The kernel version can be determined by typing uname -r , then check that it matches the directory found at /usr/src. When you're satisfied the source is okay, then proceed as follows:

Untar the ndiswrapper. I'm lazy and not a real accurate typist so I use konqueror in super user Mode. After the tarball is downloaded click on it in konqueror, which opens another window with a folder holding ndiswrapper. Drag that folder to the /usr/src directory and drop it and if asked, click Copy. It is untarred!

2. Use Konqueror to open and read the install file in that folder, It has the installation instructions. Print them. For the experienced simply follow it. That's where I got most of this. I expanded on the install instructions so the newbie would have an easier time.

3 Using your bash shell change to superuser mode by typing su, then enter your root password and

cd /usr/src/ndiswrapper.

4. Type:

make install

5.Have some coffee.

6. When it finishes make sure there are no error messages at the end. Ndiswrapper is now installed and ready to install the driver and then wrap itself around the driver which is what follows.

7. Read the Install again to see what commands to enter.

8. You should know the path to the driver so you can do the driver install.

Mine went in with:

ndiswrapper -i /home/download/bcwml5.inf

[Note: On an HP notebook the make install caused the driver to also be installed as the ndiswrapper binary was installed.]

Now do:

ndiswrapper -l

to see if the driver is there. You should see something like

bcmwl5 present

If it is then type:

modprobe ndiswrapper

To verify that ndiswrapper has been loaded, type:

lsmod

Somewhere in the listing that follows the lsmod command you should find ndiswrapper.

BEFORE YOU GO ON, go back into Yast and remove the old NIC (i.e., eth0). It can save you a lot of hair pulling. On my machine a reboot would enable that card by default so I had to do an ifconfig eth0 down, then ifconfig wlan0 up to get back in business.

SETTING UP THE NIC

There is a definite sequence to setting up your NIC. You must set the encryption key first before you can set the essid. After you do each step you can verify the result with a simple iwconfig which will show the current settings.

1. Begin by setting the encryption key if required.. If your Access Point is secure then you need to set the encryption to the proper word. That's done with:


iwconfig wlan0 enc nnnnnnnnnnnnn

where nnnn = the 26 character hex key.

All this comes from Section 4 of the install file.

My setup departed from the Install instructions at this point, to set the encryption key type::

iwconfig wlan0 enc <your key goes here>

and NOT the suggestion in the Install file/

2. Set the Mode, I use Managed but you can use whatever you think is necessary. The mode is determined by how you wish to use the card. Managed, also called infrastructure by some, lets you talk to an access point; ad-hoc, also called peer-to-peer, lets you talk to another ad-hoc machine. There are other modes but these two are used primarily.

3. Now comes the setting of the ESSID. This one can be a bit daunting. It is set with

iwconfig wlan0 essid <your ssid here>

Then check it by doing

iwconfig

if ESSID is followed by a blank then you gotta play a bit.

Mine eventually got set after I did:

ifconfig wlan0 up

followed by the above. On the Dell, I had to delete the YAST setup for the internal WIRED NIC. Otherwise I could not set the essid for the wireless and it would not get its IP on boot.


4. Finally I did:

dhcpcd wlan0

and it started working.


The instructions say if it all works then do

ndiswrapper -m

which should modify your modules.conf file. This is to make it install during boot, but that only works on pre 2.6 kernels, the later kernels use modprobe.conf for such things. I'm sure someone knows how to setup the modprobe.conf file but my solution is to use an editor to change the

/etc/sysconfig/kernel file and set the line:

MODULES_LOADED-ON-BOOT="ndiswrapper"

If it is all working you should be able to do

rcnetwork restart

and see the NICs shut down and restart with the wlan0 getting its IP from your router.


The ultimate proof of all this is if it fires up when you reboot.

If you need to take down the eth0 with ifconfig, be sure you do

ifconfig eth0 down

THEN

ifconfig wlan0 up

in that sequence.


TESTING -TROUBLESHOOTING

One little problem I have noticed, sometimes the bcmwl5 driver doesn't work. When that happens I remove then reinstall it with the ndiswrapper command.

Another little trick is to go into the /etc/sysconfig/network directory and put your info into ifcfg-wlan0. That way ndiswrapper is loaded and your wlan0 is setup at the start. Sure did make my life easy!

The only time I have had a problem is when I forget to do it as root.

Now, if you do all this and try to load the bcmwl5 and it still wont go, that's probably because it's already there. Do

ndiswrapper -e bcmwl5

to remove the driver so you can reinstall it.

I hate this command line crap, but sometimes it is inescapable.

It may be important to go back into Yast and remove the old NIC such as eth0, after you get the ndiswrapper up and can see your card with the iwconfig command. On my machine whenever I did a reboot it would enable that card by default so I had to do an ifconfig eth0 down , then ifconfig wlan0 up to get back in business.

CAUTION: C Hamel reported

by Khalinsar on Fri, 2005-11-04 11:46
Hello,

I use a Palm (tungsten t5) with a wifi card. By following the instructions on your howto, will I be able to access the internet from my palm, through my USB Adapter (which I have already configured with ndiswrapper by following the instructions on the ndiswrapper website)?

Thank you very much!


  



All times are GMT -5. The time now is 02:48 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration