[ltp] Success - Wireless on T42p with Fedora Core 3
morpheus
linux-thinkpad@linux-thinkpad.org
Mon, 13 Dec 2004 20:57:49 -0500
Hi,
I had been using ndiswrapper on my Atheros adapter but kept getting
mysterious system freezes, so I switched to madwifi.
There were a few tricks, so I thought I'd send a little HOWTO to
everyone.
1. Download the madwifi drivers
# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co
madwifi
# cd madwifi
# make
If you get an error saying "uudecode: command not found" then you need
to install package "sharutils". You can get an rpm on rpm.pbone.net or
just apt-get install sharutils if you have apt (which I highly
recommend, and you can also get on rpm.pbone.net).
2. As root:
# make install
# modprobe wlan
# modprobe ath_hal
# modprobe ath_pci
Depending on your system, you should see a new wireless interface called
ath0 or wlan0. To check, type:
# iwconfig
All the examples below use wlan0, but if yours is ath0 then substitute
it for wlan0.
Now, here's the tricky part. The adapter can do all three modes (802.11
a/b/g) and supposedly defaults to an "auto-detection" state. However,
for some reason in auto mode mine would only scan the 5GHz (802.11a)
range, so it never found my 802.11g access point. You can manually set
it to 802.11g with:
# iwpriv wlan0 mode 3
Similarly, mode 0 is auto, mode 1 is 802.11a, mode 2 is 802.11b.
To make this happen automatically with the ifup command, you need to
create a special script called /sbin/ifup-local
If this file exists (and is executable) the ifup script will execute it
when it's finished. It's a nice way to add custom commands to ifup
without editing it directly. Also, ifup passes the interface name as an
argument. So, here's my script:
#!/bin/bash
if [ "$1" == "wlan0" ]; then
iwpriv wlan0 mode 3
fi
That's it. Save it as /sbin/ifup-local. Change permissions so everyone
can execute and read it.
# chmod a+rx /sbin/ifup-local
Now, set up your ESSID and WEP keys as required using:
# system-config-network
You can now just press "activate" or type:
# ifup wlan0
Should be good to go!