How to get your atheros wifi drive to work under Centos/Linux and get that WPA working
Many times I have come across this thread on forums… many wondering how to get their wifi card (Atheros) to work under Linux (Centos) and then how to proceed to get WPA working… now here is the bundle you have been looking for.
1) Do you have an atheros card?
lspci |grep Atheros (should give you enough info)
2) Get the madiwifi tarball
Go there http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6/ and download the latest tarball.
wget http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6/madwifi-hal-0.10.5.6-r4016-20090429.tar.gz
3) Untar it
tar -zxf madwifi-hal-0.10.5.6-r4016-20090429.tar.gz
4) Compile it
(Note: yum install gcc gcc-cc make kernel-devel) is REQUIRED in case you do not have it yet installed
cd madwifi-hal-0.10.5.6-r4016-20090429
make && make install
5) Load the modules
modprobe -r ath5k (AND edit /etc/modprobe.d/blacklist and add blacklist ath5k to the list)
modprobe ath_pci
modprobe wlan_scan_sta
[ to verify all went well ]
lsmod | grep ath
you should obtain a similar or even more output as
ath_rate_sample
ath_pci
wlan
ath_hal
6) Reboot (in some cases)
I know we did load the module so why the reboot fuss? with some cards a reboot would still be required… so go ahead reboot the machine
7) Configure the card
First, do an ifconfig ath0 up if the network service didn’t bring the card up
Second… do an iwconfig ath0 scan to look for ESSID
So let’s sump up
a. ifconfig ath0 up
b. iwconfig ath0 scan
So now you see your favorite wireless signal in the iwconfig output… it is using WPA, how do you connect?
Connect to a signal WPA protected
Let’s assume our signal ESSID (the name) is bobHouse
First we need the wpa_supplicant installed… so yum install wpa_supplicant
on the command line, type wpa_supplicant bobHouse y&NcDspHUIfReX-Y$/IH
(keep in mind y&NcDspHUIfReX-Y$/IH is our WPA key)
now, look into /etc/wpa_supplicant/wpa_supplicant.conf and you should see something like
network={
ssid=”bobHouse”
#psk=”y&NcDspHUIfReX-Y$/IH”
psk=1ce60475894155fd6dec38082e749ccd70a29ad0452214472e9784e2f966d
}
(Of course, you would have different values than the one showed here)
So now that this is verified…
type on the command line
/usr/sbin/wpa_supplicant -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf -Bw
if needed, do an ifdown ath0 and an ifup ath0 to request a new dhcp ip.
and voila.
Have the ios_supplicant command saved in a bash script and get creative…
Cheers,