ArchLUG Kwiki - www.archlug.org

Download the RSS XML Feed for this site

Download the RSS XML Feed for this site

Subscribe to this channel with Amphetadesk

Subscribe to this channel with RadioUserland

Add to Google

HostAP


The HostAP driver

HostAP is a driver for Intersil Prism 2/2.5/3 802.11b wireless cards.

The HostAP homepage is http://hostap.epitest.fi/

Examples of these cards include:

  • Proxim Harmony 802.11b PCMCIA cards
  • D-Link DWL-520 (note the non-"plus" model number - see DWL520 Plus if you have a DWL-520+)

(There is a longer list of Prism 2 cards here.)

Building the HostAP Driver - Step By Step

Many of these cards will work with the Orinoco driver, but the HostAP driver tends to be more reliable. The HostAP driver will also work in Master mode, which allows the host to function as an "access point", and hence, the driver name. wink smiley All the heavy lifting is handled by the hardware. You should take note that you will want recent firmware (or programming for the chips on the card itself, not for Linux, which is the driver), but we'll get to that later.

Red Hat and Fedora Users

PLEASE NOTE: The hostap driver is included with 2.6.14+ kernel updates for Fedora Core 4. For anything older than that, see my repository (apt.kspei.com/fedora/*/*/RPMS.kspei/).

Mandrake, SuSE, and RPM-based Distributions

Please note that these instructions might work for users of Mandrake, SuSE, and other RPM-based systems, but they have not been tested on them. ( SuSE users should probably stick with the km_hostap package, installable with yast.) I'd be interested in the results if you try it though.

Debian

If you add testing and/or unstable to /etc/apt/sources.list, you should be able to just apt-get install hostap-modules. (It might be a little more complicated than that, so feedback is welcome, but that should get you started. You'll probably have to update your kernel as well.)

Building the HostAP Driver

Get the Pre-Requisites

For now, the easiest thing to do is build the driver from the source RPM. Obviously, from here on out, you will need to be the 'root' (Administrator) user to have the necessary permissions to install any required system software and to install the driver when you're done.

You should download the most current !Fedora-specific version of the driver (or, for your distribution, if not Fedora). You'll also need the kernel-source package for your kernel and the rpmbuild package installed. A current version can be found here:

Determine your CPU architecture

The "trick" is to build a package that properly matches your running kernel. Almost everything necessary to build the driver is auto-detected, but the big exception is the target CPU. The simplest way to find this out is to run the following command as 'root':

rpm -q --qf '%{ARCH}\n' kernel

The output will probably be one of i386, i586, i686, or athlon. Let's assume that the result is i686 (i.e. PentiumIII or !Pentium4) for this example.

Compile the driver

To properly build the driver in that case, run

rpmbuild --rebuild --target i686 \
  kernel-module-hostap-0.1.3-0.fdr.0.src.rpm

Just replace i686 with whatever is appropriate for your system. The resulting binary RPM would be deposited in /usr/src/redhat/RPMS/i686/ in this case.

What about a different kernel?

Let's say you want to build the modules for another kernel (that you aren't running yet). For example, let's say you just downloaded the Fedora 2.4.22-1.2188.nptl kernel on your athlon laptop. You can build the modules for that kernel by running

rpmbuild --rebuild --target athlon \
  --define 'kernel 2.4.22-1.2188.nptl' \
  kernel-module-hostap-0.1.3-0.fdr.0.src.rpm

Easy, right? smile smiley

Installing the Driver

Then, to install the driver, issue the following command:

rpm -ivh /usr/src/fedora/RPMS/i686/kernel-module-hostap-0.1.3-0.fdr.0.i686.rpm

Using the driver

A reader asks:

Would also be nice if you'd have a pointer to next
steps - go with RH/Fedora config menus (how?), or use
modprobe?
- what next as far a configuration

If it is a PCMCIA card, just do service pcmcia restart (or reboot) and pop the card in. If it is PCI, you'll have to add a line to /etc/modules.conf like this:

alias wlan0 hostap_pci

Either way, configure wlan0 appropriately. (I don't use the GUI tools, ever, so I have no clue how to do that beyond just editing /etc/sysconfig/network-scripts/ifcfg-wlan0.)

Conclusion

Currently, this procedure isn't too hard, but hopefully the driver will be auto-built by Fedora soon, so all of this will be unnecessary for most people.

Of course, if all else fails, ask Steve (steve@silug.org) for a binary rpm. Be sure to include the output of uname -a on your system. If you have a standard Red Hat/Fedora kernel, I should be able to build it.

-- Steve


Valid XHTML 1.0! Valid CSS!
InterTran (www.tranexp.com)
InterTran (www.tranexp.com)

Please MOVE AND HOLD your MOUSE CURSOR over any WORD in the translated web page in order to see a pop-up window with ALTERNATIVE TRANSLATIONS. Translations provided by: www.tranexp.com