LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2005, 03:00 AM   #1
shimano55
LQ Newbie
 
Registered: Mar 2005
Posts: 16

Rep: Reputation: 0
Connecting to Wireless Network with ndiswrapper


I just installed ndiswrapper on Fedora Core 3, and loaded the module along with the driver for my wireless card. Everything loads fine, but I have absolutely NO idea how to connect to the wireless network. If someone could explain to me how to do it or give me a link to a tutorial, I would be very grateful.

Thanks in advance,
shimano55
 
Old 03-20-2005, 03:12 AM   #2
JSpired
Member
 
Registered: Sep 2003
Distribution: Slackware, Suse 9.2
Posts: 565

Rep: Reputation: 30
This may seem obvious, but did you read the how-to?
 
Old 03-21-2005, 02:45 AM   #3
green_squirrel
LQ Newbie
 
Registered: Nov 2004
Location: wyoming
Distribution: fc3
Posts: 7

Rep: Reputation: 0
Thumbs up

Don't you just love it when some genius says, "read someone else's How-To" which may or may not exist any more. I also noticed that there are lots of people providing information here about Ndiwrapper and WiFi systems where the information has absolutly nothing to do with a DHCP WiFi connection.

The web site pages with the Ndiswrapper 'How-To' instructions seems to have disappeared, or have become restricted.

I'm working on figuring out how to upgrade it myself on FC3 with the latest kernel. The instructions below do not cover everything, but I am working on trying to remember the rest of what was involved when upgrading to a new kernel. (I have only upgraded it once in the last three months since I originally installed it.)

Here are some of the original instructions for Ndiswarppaer and Fedora Core 3:
(This is a long post.)

Note: For my D-Link DWL-G630, the drivers from the D-Link CD worked fine, contrary to the instructions below.
-----------------------------------------------------

Installation
1. Compile and install

When you are upgrading an already existing source-directory do

make distclean

before compiling the sources.

As root run

make

and then

make install

This should compile and install both the kernel module and the userspace utilities.
2. Install your Windows driver

Important: Do NOT use drivers on your CD. They may work, but you may experience kernel crashes etc., if the driver on your CD has not been tested.

Instead, you need to download appropriate Windows XP driver for your card from the Wiki entry List. To identify the driver that you need, first identify the card you have with "lspci" and note the first column (such as 0000:00:0c.0) and then find out the PCI ID of the card that with "lspci -n" corresponding to the first column of "lspci" output. The PCI ID is third column (or fourth in some distributions) and of the form "104c:8400". Now you need to get the Windows driver for this chipset. In the list of drivers, find out an entry for the same PCI ID and download the driver corresponding to it. Unpack the Windows driver with unzip/cabextract/unshield tools and find out the INF file (i.e., file with .INF or .inf extension) and SYS file (i.e., file with .SYS or .sys extension). If there are multiple INF/SYS files, you may look in the List if there are any hints about which of them should be used. Make sure the INF file, SYS file and any BIN files (for example, TI drivers use BIN firmware files) are all in one directory. Now use "ndiswrapper" tool to install the driver with

ndiswrapper -i filename.inf

This copies all necessary files to /etc/ndiswrapper and creates the config files for your card.

After installing you can run

ndiswrapper -l

to see the status of your installed drivers. If you have installed the correct driver you should see something like this

Installed ndis drivers
bcmwl5 driver present, hardware present

Where "present" means that you have a card that can be used with the driver installed. In this case, broadcom driver bcmwl5 is used.
3. Load module

To load the module type

modprobe ndiswrapper

If you get no error the driver should now be loaded. You can verify this by checking system log (produced by dmesg). If the driver is loaded successfully, you should see a message in the system log

ndiswrapper version V loaded

Make sure the version V here matches the version of ndiswrapper package that you downloaded and installed. If you get a different version, you have old version of package, which you should uninstall and go back to step 1.

If after modprob'ing, system is locked up (no response to keyboard etc.), it indicates that kernel has crashed. See Distributions and FAQ for hints on what may cause problems for your distribution/kernel.

If you have successfully installed windows drivers earlier (with ndiswrapper -i INFfile), the ndiswrapper module will load them all. You should then see the following messages in system log

ndiswrapper: driver driver1 added

for each of the drivers. If you don't see these messages, it usually means that there are no (usable) drivers installed in /etc/ndiswrapper directory. Check if the /etc/ndiswrapper directory has one sub-directory for each driver and if in each driver's directory there are inf, sys and conf files. Otherwise, you may need to repeat step 2.

If the system has a card that works with one of the loaded drivers, you should see the following message in the system log

wlan0: ndiswrapper ethernet device xx:xx:xx:xx:xx:xx

4. Configure interface

Use iwconfig to configure wireless network interface. First, see if the interface is available, with

iwconfig

This tool is not likely to be present on your system : it is part of the package 'wireless-tools', which you shall install.

This will print the wireless interface (e.g., wlan0). In the examples below wlan0 is used; replace wlan0 with the interface reported by iwconfig above. The wireless configuration to be used should match what your Access Point (AP) uses. First, find out if you can see your AP with

iwlist wlan0 scan

Note: You may have to set the network name before the scan can find
your Access Point. If the scan does not find your AP, try issuing the
command
iwconfig wlan0 essid ESSID

before the using the command
iwlist wlan0 scan

If this lists your AP, you can continue. Otherwise, you may have one of two problems: Your AP doesn't broadcast SSID (see the FAQ for more information) or the radio of the card is off (again, see the FAQ for details).

If you see the AP in scan above, set the operating mode of the interface according to your setup. In most cases, it is Managed

iwconfig wlan0 mode Managed

If you use encryption (WEP), set the key
iwconfig wlan0 key restricted XXXXXXXX

You can use 10 hex digits for 40-bit encryption or 26 hex digits for 128-bit encryption. You may need to use open security mode instead of restricted depending on the setup of your AP. If you want to write the key in ASCII use s: (e.g. iwconfig wlan0 key restricted sassword).

Set the network name

iwconfig wlan0 essid ESSID

Replace ESSID with the network name used by your AP.

At this point, check to make sure that ESSID is set in output of iwconfig wlan0. If you see the ESSID as you set, you can proceed to next step. If you see ESSID: off/any, then your card is not associated to AP. Check if WEP encryption is set exactly as used by AP and the AP broadcasts ESSID. See FAQ for more details. Until ESSID is set in output of iwconfig wlan0, you may not use wlan0 as network interface.

Now, setup the network parameters for the interface wlan0. This varies from distribution to distribution. Refer to your distribution's documents on how to do this. Once this is done, you can use network tools to bring up the network; e.g.,

ifconfig wlan0 up

or

dhclient wlan0

or

dhcpcd wlan0

etc.
5. Automate

Once everything works fine you can write the correct modprobe settings to load ndiswrapper automatically when wlan0 interface is used, by running

ndiswrapper -m

Note that this doesn't automatically load ndiswrapper module at boot time. If you want the module to be loaded automatically at boot time, you should configure your module setup, which depends on the distrbution. Most distributions will load all modules listed in /etc/modules at boot time. Mandrake 10.x uses /etc/modprobe.preload. For them, you can add a line

ndiswrapper

in /etc/modules.



RedHat/Fedora
4k kernel stack size/freezing issue
Recent 2.6 kernels have an option to enable/disable 4k stack size. However, Fedora kernels disable this option altogether and use a 4K stack size, which is not enough for some windows drivers. If you are running a Fedora 2.6 kernel and your machine freezes after running modprobe ndiswrapper as described in the Installation page, you are probably using a driver that requires a stack sizegreater than 4K. Try installing the 16K stack kernel update fo Linuxant:
Fedora Core 2/i686: http://www.linuxant.com/driverloader...ernel-i686.php
Fedora Core 2/i586: http://www.linuxant.com/driverloader...ernel-i586.php
Fedora Core 3/i686: http://www.linuxant.com/driverloader...ernel-i686.php
Fedora Core 3/i586: http://www.linuxant.com/driverloader...ernel-i586.php
Most users will want to download the complete kernel RPM and install it using rpm -Uhv as root. Advanced users may want to use the patch instead, or try compiling a vanilla kernel (from http://www.kernel.org) and disabling 4K stack size (CONFIG_4KSTACKS).

Also, if you want to use the Fedora configuration tools, you need to set up your /etc/sysconfig/network-scripts configuration file (/etc/sysconfig/network-scripts/ifcfg-eth1 for eth1):
IPV6INIT=no
ONBOOT=no
USERCTL=yes
PEERDNS=yes
GATEWAY=
TYPE=Wireless
DEVICE=eth1
HWADDR=
BOOTPROTO=dhcp
NETMASK=
DHCP_HOSTNAME=
IPADDR=
DOMAIN=
ESSID=cuairnet
CHANNEL=1
MODE=Managed
RATE=54Mb/s
Alter your configuration details accordingly.
Finally, put your WEP keys in the /etc/sysconfig/network-scripts/keys-eth1 file (again assuming eth1):
KEY=XXXXXXXXXXXXXXXXXXXXXXXXXX
With all the above, you should be able to use neat or ifup/ifdown to control your ndiswrapper-enabled wlan card in Fedora.
 
Old 03-21-2005, 11:00 PM   #4
eagle63
LQ Newbie
 
Registered: Mar 2005
Posts: 29

Rep: Reputation: 15
Thanks green_squirrel for that terrific walkthrough! Like the original poster, I'm trying to get a wireless PCI card working with Fedora Core 3. (and I'm a total linux newb) My card is a Belkin 54G, FS5d7000.

Anway, I've followed all the directions with success, but I can't seem to get my card to find my AP (or even my neighbor's AP, which is totally unsecured) . Once I type modprobe ndiswrapper, I see the amber "link" light on the back of the wireless card come on. (yay!)

If I type ndiswrapper -l, it displays:
bcmwl5 driver present, hardware present

If I type dmesg, I get the following successful output:

ndsiwrapper version 1.1 loaded (preempt=no,smp=no)
ndiswrapper: driver bcmwl5 (Broadcom,06/13/2003, 3.20.23.0) loaded
ndiswrapper using irq11
wlan0: ndiswrapper ethernet device 00:11:50:18:ec:e6 using driver bcmwl5, configuration file 14E4:4320.5.conf
wlan0:encryption modes supported: WEP, WPA with TKIP, WPA with AES.CCMP
wlan0: no IPv6 routers present


So anyway, all appears good at this point, right? Well, then I type iwconfig wlan0. It shows a bunch of stuff I won't type, but the first line is:
IEEE 802.11g ESSIDff/any

I tried typing iwconfig wlan0 essid XXXXX where the x's are my SSID, but it didn't do anything. After that it still shows my ESSID as "off/any".
Not surprisingly, if I type iwlist wlan0 scan, it says "No scan results".

Any ideas or suggestions for me? I was so excited because all was going very smoothly up until the very end. Is it possible that I've got a bad card? I would think that if my card was fried I wouldn't have gotten as far as I did. Thanks in advance for any help!!
 
Old 04-07-2005, 01:21 PM   #5
Oly
LQ Newbie
 
Registered: Apr 2005
Posts: 5

Rep: Reputation: 0
same prob

exactly the same problem, card is present and seems to be working but i can t pick up my WAP, it has worked in the past, and i have another computer with version 3 of the card working fine.

my card is version one, but all the belkin 54g are supposed to be suipported and did work once.
 
Old 04-07-2005, 02:13 PM   #6
green_squirrel
LQ Newbie
 
Registered: Nov 2004
Location: wyoming
Distribution: fc3
Posts: 7

Rep: Reputation: 0
I'm no expert on this, but it works for me with my D-Link card.
I'm guessing that you are missing one or two steps.
I think the informatin below was in the instructions that I posted. If not, these will help.

Again, it is a long post, and slanted towards Fedora.

Lloyd

-------------
If the scan does not find your AP, try issuing the command

iwconfig wlan0 essid ESSID

before the using the command

iwlist wlan0 scan


If this lists your AP, you can continue. Otherwise, you may have one of two problems: Your AP doesn't broadcast SSID or the radio of the card is off

If you see the AP in scan above, set the operating mode of the interface according to your setup. In most cases, it is Managed

iwconfig wlan0 mode Managed

If you use encryption (WEP), set the key

iwconfig wlan0 key restricted XXXXXXXX

You can use 10 hex digits for 40-bit encryption or 26 hex digits for 128-bit encryption. You may need to use open security mode instead of restricted depending on the setup of your AP. If you want to write the key in ASCII use s: (e.g. iwconfig wlan0 key restricted sassword).

Set the network name

iwconfig wlan0 essid ESSID

Replace ESSID with the network name used by your AP.
At this point, check to make sure that ESSID is set in output of iwconfig wlan0.

If you see the ESSID as you set, you can proceed to next step. If you see ESSID: off/any, then your card is not associated to AP. Check if WEP encryption is set exactly as used by AP and the AP broadcasts ESSID. See FAQ for more details. Until ESSID is set in output of iwconfig wlan0, you may not use wlan0 as network interface.

Now, setup the network parameters for the interface wlan0. This varies from distribution to distribution. Refer to your distribution's documents on how to do this. Once this is done, you can use network tools to bring up the network; e.g.,

ifconfig wlan0 up

or

dhclient wlan0

or

dhcpcd wlan0

etc.

5. Automate
Once everything works fine you can write the correct modprobe settings to load ndiswrapper automatically when wlan0 interface is used, by running

ndiswrapper -m

Note that this doesn't automatically load ndiswrapper module at boot time. If you want the module to be loaded automatically at boot time, you should configure your module setup, which depends on the distrbution. Most distributions will load all modules listed in /etc/modules at boot time. Mandrake 10.x uses /etc/modprobe.preload. For them, you can add a line ndiswrapper
in /etc/modules.

RedHat/Fedora

4k kernel stack size/freezing issue
Recent 2.6 kernels have an option to enable/disable 4k stack size. However, Fedora kernels disable this option altogether and use a 4K stack size, which is not enough for some windows drivers. If you are running a Fedora 2.6 kernel and your machine freezes after running modprobe ndiswrapper as described in the Installation page, you are probably using a driver that requires a stack size greater than 4K. Try installing the 16K stack kernel update fo Linuxant:

Fedora Core 2/i686: http://www.linuxant.com/driverloader...ernel-i686.php

Fedora Core 2/i586: http://www.linuxant.com/driverloader...ernel-i586.php

Fedora Core 3/i686: http://www.linuxant.com/driverloader...ernel-i686.php

Fedora Core 3/i586: http://www.linuxant.com/driverloader...ernel-i586.php

Most users will want to download the complete kernel RPM and install it using rpm -Uhv as root.

Advanced users may want to use the patch instead, or try compiling a vanilla kernel (from http://www.kernel.org) and disabling 4K stack size (CONFIG_4KSTACKS).

Configuration using NetworkManager

As an alternative to the traditional script-based network configuration system, Fedora Core 3 comes with NetworkManager. The new system is designed to automatically connect a moving computer to various wireless networks, or to prefer a wired connection if one is available. It is mutually incompatible with the traditional system, so in order to use it, you must do something like:

service network stop

service NetworkManager start

Then run NetworkManagerInfo as a normal user to add the applet to your desktop's panel. The applet will allow you to see what networks are available and how strong a signal you are getting, choose a network (automatically or manually), and will prompt you for keys and passwords for encrypted networks.

As of the end of January 2005, NetworkManager is still a little rough around the edges; it hasn't yet reached 1.0. But some users may prefer it for its ease of use and simple setup.

Configuration using script system

Because the graphical Fedora configuration tools don't recognize wlan0, you can reconfigure ndiswrapper to use an ethX interface. If your eth0 interface is already configured for ethernet, you would use eth1.

Assuming you are going to be using eth1 as your wireless interface, add these two lines to the end of your /etc/modules.conf (or /etc/modprobe.conf) file to set your device to use eth1 instead of wlan0:

options ndiswrapper if_name=eth1

alias eth1 ndiswrapper

Also, if you want to use the Fedora configuration tools, you need to set up your /etc/sysconfig/network-scripts configuration file (/etc/sysconfig/network-scripts/ifcfg-eth1 for eth1):

IPV6INIT=no
ONBOOT=no
USERCTL=yes
PEERDNS=yes
GATEWAY=
TYPE=Wireless
DEVICE=eth1
HWADDR=
BOOTPROTO=dhcp
NETMASK=
DHCP_HOSTNAME=
IPADDR=
DOMAIN=
ESSID=cuairnet
CHANNEL=1
MODE=Managed
RATE=54Mb/s

Alter your configuration details accordingly.
 
Old 04-07-2005, 02:23 PM   #7
green_squirrel
LQ Newbie
 
Registered: Nov 2004
Location: wyoming
Distribution: fc3
Posts: 7

Rep: Reputation: 0
A smiley showed up in my previous post that should not have been there.

The line should read:
(e.g. iwconfig wlan0 key restricted s: password)

There is no space before password, but I had to put one here so that I wouldn't get a smiley....

Lloyd

Last edited by green_squirrel; 04-09-2005 at 10:38 PM.
 
Old 04-07-2005, 03:41 PM   #8
Oly
LQ Newbie
 
Registered: Apr 2005
Posts: 5

Rep: Reputation: 0
um, well i am broadcasting an SSID as other computers can see it.

I have also made sure the radio state is set to one manually, even though after installing a driver it does say its enforcing the state.

but thanks for the suggestions it is something else, is there a command to check your radio state ?
just encase the parameter is failing, because this does seem like the prob.

also setting an ESSID fails in the same way as the post above, where when you run iwconfig none is set even though you specified it.

i have also set the correct essid in the config file and it still does not report one.
 
Old 04-09-2005, 09:33 AM   #9
Oly
LQ Newbie
 
Registered: Apr 2005
Posts: 5

Rep: Reputation: 0
yay it works, its the radio state it is off doh!!

0 = radio on
1 = radio off

thats seems a bit odd to me as 1 is usually true, but when installing the radio state gets forced to 1 which is not correct hence why no access points can be detected.

you can edit the radio state in /etc/ndiswrapper/
go into the folder for your driver and edit the .conf file, changing the radio state.
 
Old 04-09-2005, 10:30 PM   #10
green_squirrel
LQ Newbie
 
Registered: Nov 2004
Location: wyoming
Distribution: fc3
Posts: 7

Rep: Reputation: 0
One note.
When upgrading kernels, you have to un-install ndiswrapper and re-install it.

As root, go to the source file directory.
make uninstall
make distclean
make
make install

This is probably not required, but I also uninstall the card drivers and re-install them, too.

Last edited by green_squirrel; 04-09-2005 at 10:41 PM.
 
Old 04-21-2005, 02:56 AM   #11
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Question

AFAICT OP was stating that the install went well. The ndiswrapper package has a good link to the posted instructions, which I followed as well. Had to add the .sys file from the Windows driver folder that the .inf file was in to the /etc/ndiswrapper/[driver] folder though.

I think what OP is asking is; now that wlan0 is functional, how the hell does one use it? (I am wondering also). That is my question as well. i.e.; if I find myself a wifi hot spot, how do I connect to it using my now-functional wlan card? Thanks.
ta0kira
 
Old 04-22-2005, 01:06 PM   #12
green_squirrel
LQ Newbie
 
Registered: Nov 2004
Location: wyoming
Distribution: fc3
Posts: 7

Rep: Reputation: 0
Re-read what I posted. Fedora doesn't use wlan0. Use eth1. This allows Fedora tools to work. I apologize if the instructions are confusing but they are a mixture of the original instructions and what works for me using Fedora Core 3 on the Gnome 2 desktop.

In terminal mode, after you have everything working, type 'iwlist wlan0 scan' or 'iwlist eth1 scan'

This will present you with a list of connections available.

Type:
iwconfig wlan0 essid ESSID
or
iwconfig eth1 essid ESSID

Replace ESSID with the network name used by your AP. It will be listed in the scan, along with the channel.

A repeat from the instructions:
----------------------------------------------------
Also, if you want to use the Fedora configuration tools, you need to set up your /etc/sysconfig/network-scripts configuration file (/etc/sysconfig/network-scripts/ifcfg-eth1 for eth1):
IPV6INIT=no
onBOOT=no
USERCTL=yes
PEERDNS=yes
GATEWAY=
TYPE=Wireless
DEVICE=eth1
HWADDR=
BOOTPROTO=dhcp
NETMASK=
DHCP_HOSTNAME=
IPADDR=
DOMAIN=
ESSID=cuairnet
CHANNEL=1
MODE=Managed
RATE=54Mb/s
Alter your configuration details accordingly.
Finally, put your WEP keys in the /etc/sysconfig/network-scripts/keys-eth1 file (again assuming eth1):
KEY=XXXXXXXXXXXXXXXXXXXXXXXXXX
------------------------------------------------------------

Modify what needs to be modified. You know that you are using something other then "cuairnet". Change it accordingly. The channel may or may not be channel 1. Etc.
I also change "IPV6INIT=no" to "IPV6INIT=yes"
You can also change "MODE=Managed" to "MODE=Auto". This will allow it to access any computer around, including the guy's laptop next to you. Normally you don't want this, or at least I never want this. But it's there.

Logging onto roaming WiFi access points, "Hotspots."

Scan what is available. Many of them require memberships to access.
There are also lots of private spots for homes and businesses that you will run into and will not be able to use.
Free hotspots seem to rare, but they do exist. I think that it depends more on your location for the free ones. They usually still require you to register with them.

But once you have the AP selected and configured, you just click on the "Network" under "System Settings" in Gnome, or whatever. Then type in your root password. When the menu comes up, you highlight the wireless connection and click on "Activate" at the top. Then log onto the system using your web browser.


It's not as easy as the MS Windows wifi software. The linuxant software is also a lot easier. But ndiswrapper is free, and once you become used to it, it's very easy to use.

Gkrellm has some software which is helpful. It allows to you to see more of what is happening with the signal from the desktop. KDE also has some software that does the same thing.

Last edited by green_squirrel; 04-22-2005 at 01:17 PM.
 
Old 04-26-2006, 09:32 PM   #13
jdonkeypunch
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Rep: Reputation: 0
Problem installing driver for a Belkin FSD7001 wireless card in Fedora Core 5.0

First I have a problem because the driver for winxp was a self extracting zip file. I installed the drivers on a windows machine and got the BCMWL5.INF file and put it on my linux box. I then followed all the directions for ndiswrapper.

I seem to come across this problem below

=========================

[root@localhost utils]# ndiswrapper -i /home/username/BCMWL5.INF
bcmwl5 is already installed. Use -e to remove it
[root@localhost utils]# ndiswrapper -l
Installed drivers:
bcmwl% invalid driver!
bcmwl5 invalid driver!
[root@localhost utils]# modprobe ndiswrapper
FATAL: Module ndiswrapper not found.

=================


It says that it installed the driver but it is a invalid driver. Please any help from here would be appreciated.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wireless network not connecting jburford Linux - Wireless Networking 11 07-08-2005 09:14 AM
Connecting to a wireless network death_au Linux - Newbie 3 03-06-2005 07:38 AM
Connecting to Wireless network ms82xp Linux - Wireless Networking 1 02-06-2005 09:44 PM
problem connecting wireless to DLINK DI-524 using ndiswrapper/BCM94306/Slackware 10 kirkross Linux - Wireless Networking 17 12-07-2004 11:18 PM
Connecting to wireless network? cucolin@ Linux - Wireless Networking 5 03-06-2004 02:16 PM


All times are GMT -5. The time now is 03:43 PM.

Main Menu
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration