Oct 15 2007

Atheros Wireless Interface on Linux Redhat

Published by at 12:00 am under Linux




Got an old PC or server you want to leave running in a remote place? Don’t want to bother with cables?
Add a wireless card in, and configure the network service so it (re)connects automatically when the access point (re)boots.
We’ve chosen a Netgear because it integrates an Atheros based chipset. They’re well supported under Linux.

 

Card detection

Once the card is installed and the system rebooted, check the card has been detected with the command lspci.
You should get the following line in the result set:

# lspci
...
00:0d.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
...

 

Driver Installation

Unfortunately, most Linux distributions do not provide any driver for Atheros chipset-based wireless cards, out of the box.
Madwifi.org have developped and provide a standard Atheros driver for Linux.
To install madwifi, you will need the kernel development and header packages. On Redhat, install these rpms

  • kernel-header and

  • kernel-devel

Download madwifi, untar and compile it:

tar xfz madwifi-0.9.4.tar.gz
cd madwifi-0.9.4/
make
make install

 
Be aware the module has been installed in your kernel modules directory /lib/modules/`uname -r`/net meaning, if you upgrade your kernel, you’ll have to reinstall appropriate modules (kernel header and devel) and recompile madwifi.
 
Make the kernel module available:

modprobe ath_pci

 

Configuration

The last thing to do is to configure the wireless network interface.
On Redhat-like systems, create a file named ifcfg-ath0 in the same way you would for a classic network interface,
in /etc/sysconfig/network-scripts/. Extra parameters need to be added for wireless values.

# cat /etc/sysconfig/network-scripts/ifcfg_ath0
DEVICE=ath0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.2
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
type=WIRELESS
ESSID=YourESSID
MODE=managed
KEY=F...A
CHANNEL=6
RATE=Auto
IWPRIV="authmode 2"
GATEWAY=192.168.1.1

 
From now on, your wireless interface will be managed by the “network” service.
The card is activated after each reboot;
You can turn off and on your access point, the card will reconnect with no manual intervention.
You can also use the iw commands such as iwlist and iwconfig to get more features out of it.
This configuration file only works for WEP but WPA which is more secure.


No responses yet

Comments RSS

Leave a Reply