Installing a Wireless Network Card With Linux (It's a disaster!!!)

From: Franz Heilemann Sr. (franz_heilemann_at_yahoo.com)
Date: 05/08/04


Date: 8 May 2004 08:52:08 -0700

So tell me how Linux is easier than Windows?
The first couple of lines tells it all and before
you porky dorko's get your panties in a twist claiming
Linux excuse #55 , it's not Linux's fault if the manufacturer
doesn't release the specs, NOBODY CARES.

The FACT is that hardware that is easily installed, supported
and works under Windows does NOT work under Linux and all
the excuses in the world isn't going to change that fact.

Wonder why all the distributions of Linux put together
isn't even making a ding in Microsoft's desktop
market?

Just read below and see what a Linux user has to do to
make a Wireless Network Card work with Linux.

I just plugged mine into a Windows machine an installed
the drivers from CD.
That was it.
 

http://www.linuxelectrons.com/article.php/20040507104718960

Using the NDIS Wrapper Device Driver

Why do I need the NDIS Wrapper?

Some WireLess NIC adapters do not offer a Linux driver, but of course,
they do have Windows device drivers. Some popular chipset vendors have
not even released the specifications for their devices and that makes
it impossible for the Linux community to develop Linux based device
drivers. The Linux NDIS Wrapper allows one to use some Windows device
drivers under Linux. If you have bought a wireless NIC and tossed it
aside, or something more drastic, like reinstalled Windows on your
laptop, read on to get your wireless NIC WarDriving.

What the heck is NDIS?

NDIS is the acronym for Network Device Interface Specification. The
specification was originally developed by IBM, 3COM, Intel and
Microsoft for MS-DOS based personal computers (MS-DOS 3.0). In the
beginning, every network card manufacturer had to have their own
special driver, which also limited a personal computer to having only
one network card due to software conflicts. NDIS solved this problem
by providing a software API or layer, between the protocol stack
(network software such as TCP/IP) and the actual physical device. All
of the low level hardware interaction with a network card was now
performed in the NDIS driver such as DMA transfer's, interrupt service
routines, etc. NDIS allows a network card to serve many protocols
concurrently, such as IPX, TCP/IP, NetBEUI, Banyan and so on.
Microsoft is up to version 5 of the NDIS specification and is
documented heavily in the MS DDK.

What Do I Wrap with the Wrapper?

The NDIS Wrapper provides an environment in which a Microsoft NDIS 5
driver can function under Linux. The NDIS calls to the HAL and the NT
kernel are translated into Linux compatible functions by the wrapper.
It is truly a notable hack and shows that Linux programmers can
overcome any obstacle. The wrapper comes in source format only.
However, contributors have provided some binary packages. Mandrake 10
has the wrapper as part of their kernel listed under 3rd party
drivers. The following chipsets are known to work (from the readme):

    *

      Broadcom (4301, 94306)

    *

      Intel Centrino (2100)

    *

      Admtek (8211)

    *

      Atheros (AR5004)

    *

      SMC2802 V2

    *

      3Com 3CRSHPW796

    *

      TI AC111

A more complete list can be found at the supported_chipsets page.

Compiling and Installing

NDIS Wrapper has its own sourceforge.net development page. The project
home page has numerous links such as a faq and other binary package's
that are available. If you are using a custom kernel, you will have to
compile and install the driver package yourself, otherwise, you may be
able download a binary package for your distro. I only noticed Debian
and Red Hat binary package's, there could be more. The source package
can be downloaded here. You will also need your Windows driver disk so
that the Wrapper can install them for Linux use. Once you have
downloaded the source package and have your Windows driver handy, use
the following steps (your /lib/modules subdirectory may differ,
depends on kernel version):

    *

      tar zxvf ndiswrapper-0.7.tar.gz
    *

      cd ndiswrapper-0.7
    *

      su (log in as root)
    *

      make install
    *

      verify the driver was installed:

    *

      ll /lib/modules/YourKernel/misc/

      -rw-r--r-- 1 root root 65764 May 6 13:38 ndiswrapper.ko
    *

      verify the utils were installed:

          o whereis loadndisdriver ndiswrapper
wlan_radio_averatec_5110hx

loadndisdriver: /sbin/loadndisdriver
ndiswrapper: /usr/sbin/ndiswrapper /etc/ndiswrapper
wlan_radio_averatec_5110hx: /usr/sbin/wlan_radio_averatec_5110hx

    *

      /usr/sbin/ndiswrapper -i

      This will create a subdirectory in your /etc subdirectory named
"ndiswrapper" with a copy of your Windows driver. I copied my Windows
driver files over to my home subdirectory for future use. So i used:
"/usr/sbin/ndiswrapper -i /home/robertt/airlink/bcmwl5.inf"
    *

      verify your Windows driver was installed:

          o /usr/sbin/ndiswrapper -l

          o output:

Installed ndis drivers:
bcmwl5 present
utility

I have provided a log of my compile for your reference.

Bringing Up your NIC

The Wrapper and Windows drivers along with the utils, should now be
installed and ready to use. Next we need to bring up the NIC with the
wireless LAN utils provided by your distro. First, lets load the
Wrapper driver by issuing the command:

    *

      /sbin/modprobe ndiswrapper.

Check your message log by using dmesg. An entry should appear like the
following:

divert: allocating divert_blk for wlan0
wlan0: ndiswrapper ethernet device 00:90:96:68:6e:67 using driver
bcmwl5.sys

Boy howdy, if you are this far, you will soon be WarDriving! Issuing
the command /sbin/iwconfig should show an output similar to the one
the below (the one shown is already configured):

lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11g ESSID:"11g AP" Nickname:"MobileRob"
          Mode:Managed Frequency:2.452GHz Access Point:
00:90:96:64:75:B5
          Bit Rate=48Mb/s Tx-Power:13 dBm
          RTS thr=2347 B Fragment thr=2346 B
          Power Management:off
          Link Quality:100/100 Signal level:-41 dBm Noise level:-256
dBm
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:66133 Invalid misc:4260128 Missed
beacon:0

You can have your NIC detected at boot by issuing the command
/usr/sbin/ndiswrapper -m. This will modify your /etc/modprobe.conf by
adding the following the line: alias wlan0 ndiswrapper. The rest of
the setup procedure is distribution specific. Some information you
will need is the ESSID of your network, type of network, Ad-hoc or
Managed. Although the rest of this HowTO is Fedora Core specific, you
may still find useful tidbits in setting up your NIC with other
distro's. The INSTALL document contained in the ndiswrapper package
also has some examples of configuring your NIC manually. The commands
are very useful in testing out different parameters of your wireless
LAN.

Fedora Core Setup

Your /etc/modprobe.conf should contain an alias for wlan0. Next we
need to create the network config file that Fedora uses. For a head
start, just download my ifcfg-wlan0, and place it in:
/etc/sysconfig/network-scripts. The config file will have to be edited
to match your particular wireless LAN configuration. You will need
access to your wireless router or access point for the information
that is missing in your configuration file. Check out the snapshot's
of my access point.

Even though my network is "open", I only allow certain MAC addresses
to connect. I was running WEP, but the Windows machines kept dropping
off the network until I switched to "open".

Once you have setup the ifcfg-wlan0, run the following command:
/usr/bin/system-config-network. From the task bar, its System
Settings->Network. If you have already modprobe'd, you should be able
to "Activate" your NIC, or just reboot. Your "Network Configuration"
with Fedora Core should resemble the snapshot's as shown below:

For questions and answers use the forum.

Hardware and Software Configuration Used:

Fedora Core 2 Test 3
Dell Inspiron 5100 Laptop
AirLink+ 802.11g - WLH3010 - PCMCIA Adapter



Relevant Pages

  • Re: WARNING to potential LINUX users
    ... > One of my problems is that no-one pointed out that Linux actually only ... wouldn't invest in writing drivers for Windows 95 or Windows NT nearly a ... a generic SGA/XGA Vesa driver usually. ... >> will probably find in many cases, the SuSE install gets a lot farther ...
    (alt.os.linux.suse)
  • Re: Video editing in Linux?
    ... but the majority of windows based games were using the Directx ... >>that linux used to use for audio. ... the philosophy behind much of the linux kernel is to avoid putting large ... ALSA has a driver component and a library ...
    (alt.linux)
  • Re: Ive thought better of Linux
    ... >> mouse driver for the text consoles) and X. ... >> to do was follow advice from the gpm man pages on setting up gpm to ... > like Windows or MacOS is not to use the desktop software? ... Its one of the things I like about X and Linux, ...
    (comp.lang.lisp)
  • Re: Ive thought better of Linux
    ... > mouse driver for the text consoles) and X. ... > to do was follow advice from the gpm man pages on setting up gpm to ... So the best way to use Linux as a desktop machine that's ... like Windows or MacOS is not to use the desktop software? ...
    (comp.lang.lisp)
  • RE: Wireless support
    ... > hardware that works in Linux, I use hardware were the manufacturer cares ... And people that use ndiswrapper is because the manufacturer ... and install the driver that comes with it. ... NDIS stuff is an excellent way to beat M$ with their own whip. ...
    (Linux-Kernel)