The magazine of the Melbourne PC User Group

How To Get One 802.11g Wireless Card To Work On Linux
Tibor Majlath
 

Background

In computer terminology, a network is defined as a group of computers and associated peripheral devices that can be accessed or shared by users or computers of the group and to some extent by others in another separate network subject to firewall security restrictions.

In recent times technology has emerged that enables one to build a small computer network in the home without the need for cumbersome wiring. It is called wireless technology for obvious reasons.

There are several wireless networking standards [3]:

  • 802.11 legacy came out in 1997 and had transfer rates of 1 and 2 Mbit/s and used infrared at 2.4GHz for transmission
  • 802.11b quickly replaced 802.11 legacy; it has a maximum transfer rate of 11 Mbit/s and normally has a range of about 50 metres
  • 802.11a operates at a maximum rate of 54 Mbit/s but over the 5 GHz band and was ratified after the 802.11b standard
  • released in 2003 the 802.11g standard also operates in the 2.4 GHz band but at the maximum rate of 802.11a
  • 802.11n expected out in 2005 will operate around the 100 Mbit/s range.
Introduction

Recently I was asked by a friend to try to get a new 802.11g wireless card that is a Belkin F5D7000 to work on a Fedora Core 1 Linux system.

The card is based on a Broadcom BCM4306/BCM2050 chipset. Its Vendor ID is 14E4 and Device ID is 4320. This information was gleaned from the system data available in Windows XP itself and is of use later on.
 
The Problem

What I didn't realise was that, while wireless network cards and their software drivers are readily available for the various versions of Microsoft Windows, the same is not true for millions of Linux users. Manufacturers are unwilling to release software drivers for some of their cards in a Linux environment. Whether there is a security issue or whether the problem is one of licensing is hard to determine as the manufacturers appear reluctant to discuss the matter. Neither Belkin nor Broadcom provide drivers for this card under Linux.

Solutions

After a search of the web, I found two sites that looked like providing a solution. Both use a clever method of creating an interface between the native Linux operating system and the Microsoft drivers enabling the wireless card to function in a Linux environment.

Linuxant Company

The Linuxant Company whose address is http://www.linuxant.com/company/ will let you try out its software for 30 days and then requires US$20 per year licence. The installation was straightforward and the method worked first time. This package appeared to be easier to install than the next one.

NdisWrapper Project

There is a similar solution called the NdisWrapper Project whose author's main objective is to get unsupported cards working in Linux. It is available from http://ndiswrapper.sourceforge.net/ which worked just as well and is free to boot, although it is not as straightforward to install as the previous shareware solution or so it seemed.
 
A quick check based on the Vendor ID and the Device ID listed above for the Belkin card showed that it is supported by the NdisWrapper project. The site lists other cards or chipsets that may work.

The rest of this article refers to how the card came to work on a Fedora Core 1 Linux system installed from scratch with no applied patches and/or updates other than the operating system itself.

Method

It is difficult to know the level of detail to include or to exclude in such an exercise without alienating more advanced users while trying not to bore less experienced ones with meaningless jargon.

All references from here on will be to Fedora Core 1 Linux, however the method and the steps in general apply to other flavours of Linux as far as my limited knowledge of different versions is concerned. This method worked for me, but no assurance can be given that it will work for everyone. There are so many factors that can affect the behaviour of systems such as patches, settings and the level of user expertise.

Getting the Software

There are three components to the software needed, namely the kernel, the NdisWrapper modules, and the Microsoft drivers.

The latest kernel (Linux operating system) has to be downloaded, installed and running before the NdisWrapper modules. It is necessary to check the site http://dag.wieers.com/packages/kernel-module-ndiswrapper/ to determine the versions of the kernel that the NdisWrapper modules are compiled against.

Of course my friend wanted all the latest versions of everything, so I searched the site for the version of the file that started with "kernel-module-ndiswrapper-" appropriately named:

   
kernel-module-ndiswrapper-0.7-1_2.4.22_1.2188.nptl.rhfc1.dag.i386.rpm

where the 0.7-1 refers to the version number of this file, and 2.4.22_1.2188 refers to the version number of the kernel it was compiled against.

I downloaded kernel version 2.4.22_1.2188 from this site http://download.fedora.redhat.com/pub/fedora/linux/core/updates/1/i386/ and retrieved two required NdisWrapper packages named:

  ndiswrapper-utils-0.7-1.rhfc1.dag.i386.rpm

   kernel-module-ndiswrapper-0.7-1_2.4.22_1.2188.nptl.rhfc1.dag.i386.rpm

that are compiled against this Fedora kernel from http://dag.wieers.com/packages/kernel-module-ndiswrapper/

Note that the NdisWrapper package version numbers must be the same, 0.7-1 in this case. Also note that the files come in different flavours for instance "athlon.rpm", "i686.rpm", "i386.rpm"; the identifier before the .rpm refers to the machine architecture. If you aren't sure, the safest is to pick the files ending in "i386.rpm" which should run on most 'modern' CPUs. Not many people have the newer 64 bit processors yet.

I found the final component of the software on the CD that came with the wireless card, and copied these two Microsoft driver files to my home directory:

   bcmwl5.inf

   bcmwl5.sys

Installing the Software

Once again there were three steps involved, namely installing the kernel, the NdisWrapper modules, and finally the Microsoft drivers.

I installed the new kernel with the following command in a Linux terminal session with root privileges:

  
rpm -i kernel-2.4.22-1.2188.nptl.i386.rpm

This simply means that we are executing RedHat Package Manager (RPM), and the -i parameter means that this new kernel is installed without overriding the old one so that you can load the old kernel if this new version has problems or is faulty for some reason. It's just safe practice.

The kernel installed with no complaints from the package manager, and I shut down Linux and reloaded on this new kernel. This was to prove that the new operating system can load and run, and it was also a prerequisite for the wireless software installed next using the following commands in a terminal session with root privileges:

  
rpm -i ndiswrapper-utils-0.7-1.
      rhfc1.dag.i386.rpm

  rpm -i kernel-module-ndiswrapper-0.7-1_2.4.22_1.2188.nptl.rhfc1.dag.i386.rpm

Finally, it was a minor exercise to install the Microsoft drivers, and the following commands achieved this in a terminal session with root privileges:

   
ndsiwrapper -i bcmwl5.inf

  ndiswrapper -m


I made sure that both bcmwl5.inf and bcmwl5.sys were in the same directory as these commands require it. NdisWrapper will copy these files to the location /etc/ndiswrapper eventually.

Creating A Network Device

The software required for the wireless card was now up and running, but I still had to tell the networking software that there was a new device in the system.

I opened the "Network Configuration" utility and selected the "Devices" tab to see something like the image in Figure 1.

To add a new device type, I clicked on the "New" button resulting in the window shown in Figure 2 which offered several choices. Having selected the obvious "wireless connection" device type, the configuration utility asked what type of wireless card I wanted to define in Figure 3. I selected "ndiswrappper (wlan0)" option and clicked "Forward" to be asked to actually configure the card as in Figure 4.

Configuring A Network Device

In Figure 4 for "Mode" I selected "Managed". This means that the card will connect to a common access point such as a wireless router via a broadband modem connection.

The "Network Name" or SSID can be used to give a unique name to a wireless network which every device in that network must then use for security. In this case I left it on "Auto" so that the router can set this value.

In wireless networks where information is broadcast around the neighbourhood, some extra security becomes necessary to stop others listening in or connecting to your network. The "Key" field provides that extra bit of security. I did not set this field during the initial trial as the main aim was to get the card working in Linux.

Configure Network Setting

After accepting the settings in Figure 4 the system asked me to choose between dynamic or statically assigned addresses as you can see in Figure 5. The choice in my friend's case was to use automatic assigned IP addresses using DHCP.

Figure 6 which shows the results of the configuration, and after clicking on "Apply" to continue I ended up back at the window in Figure 7 which finally listed the newly created wireless device.

Nearly There

Linux still needed to be told a bit more about the card before it could find it successfully. This was achieved by double-clicking on the wireless entry in Figure 7 to see the window shown in Figure 9 which shows the wireless device configuration window once more.

In the "General" tab I needed to tick "Activate device when computer starts" so that the card connects to the network as soon as Linux starts.

Selecting the "Hardware Device" tab resulted in Figure 10 where I had to tick the box next to the "Bind to MAC address" field and then to click "Probe". This action bound the wireless software to the wireless hardware. The MAC address is a unique hardware identifier built into every network card and is not to be confused with the so-called unique IP address that such cards also must use.
 



Figure 1. Network Configuration
 


Figure 2. Select Device Type.
 


Figure 3. Select Wireless Device.
 


Figure 4. Configure Wireless Connection.
 


Figure 5. ConFigure Network Settings.
 


Figure 6. Create Wireless Device.


Figure 7. Network Configuration.

As the probe was able to identify the card, the MAC address appeared in the window. If the MAC address did not appear then obviously something would have been malfunctioning. It could be a software or even a hardware problem and may be difficult to track down.

I saved these settings in the network configuration window by selecting "File|Save" options. The system responded with the window shown in Figure 11 which advises that the operating system needs to be reloaded or the network needs to be restarted for these changes to come into effect.

 wlan0

IEE 802.11B ESSID:"mybelkin" Nickname:"MYNICNAME:
Mode:Managed Frequency:2.4626Ghz Access Point: XX:XX:XX:XX:XX:XX:
Bit Rate=54Mb/s  Tx-Power: 14 dBm
RTS thr=2347 B  Fragment thr=2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:5.1 dNm  Noise level:-256 dBm
Rx invalid nwid:0  Rx invalid cryt:0  Rx invalid frag:0
Tx excesive retries:0  Invalis misc:97  Missed beacon:0

Figure 8. Card statistics as displayed by Linux.

After a general reload of Linux the wireless card was detected and correctly identified at boot time. In my friend's case the card has worked flawlessly since installation and calling the Linux "iwconfig" command showed the following set of statistics for his card (See Figure 8).

Interestingly, the command listed the card as running the 802.11b protocol yet the bit rate and frequency are identified correctly for the 802.11g card. My main regret in all this is that I couldn't play with the wireless technology a bit more. Definitely was fun to see it work.

Conclusion

With the growing popularity of broadband connections, wireless devices can make setting up home networks much more appealing. However, some manufacturers do not provide drivers for their devices under Linux. In the last six months that impediment for Linux users has been partially overcome by at least two developers.
 


Figure 9. Wireless Device Configuration.
 


Figure 10. Probe MAC Address.


Figure 11. Restart.

The method of using available Microsoft drivers within Linux may not seem "user friendly" to some or it may even be seen as a bit experimental, but that is part of the "fun" for fiddling penguins in the Linux community. The wireless card now works under Linux, which was after all, the main goal of this exercise.

About the Author
Tibor Majlath whose interests include Linux and Java had been in IT for 24 years, started as a COBOL programmer, and eventually ended up supporting mainframes and networking PCs as a "certified" Netware engineer and can be contacted via e-mail at
tmajlath@melbpc.org.au.

References and Background Information

[1] PC Update, March 2004, An Introduction to TCP/IP by Mike Chambers.
[2] PC Update, April 2004, WiFi Update by Peter Lang.
[3] WIKIPEDIA, The Free Encyclopedia on 802.11:
http://en.wikipedia.org/wiki/IEEE_802.11
[4] Very comprehensive list of WLAN adapters with chipset information:
http://www.linux-wlan.org/docs/wlan_adapters.html.gz
[5] Wireless LAN resources for Linux:
http://www.hpl.hp.com/personal/Jean_Tourrilhes/index.html
[6] Linux Driver for the 802.11g Prism GT/Prism Duette/Prism Indigo Chipsets:
http://prism54.org/
[7] Groups building free community broadband networks using inexpensive, off-the-shelf wireless network gear (see Gary Winder’s article on this group’s activities in PC Update, April 2004):
http://www.melbourne.wireless.org.au/

Reprinted from the July 2004 issue of PC Update, the magazine of Melbourne PC User Group, Australia

[ About Melbourne PC User Group ]