I did all this work with the USB card plugged in to the PC.
I got this firsts bit of advice from the zd1211rw developers:
"re-install the "kernel-devel" package along with the latest zd1211rw snapshots
(firmware and kernel module) from
http://www.deine-taler.de/zd1211/snapshots/ if you can. Here are my
notes for building zd1211rw on Fedora Core:
yum groupinstall developement-tools
yum install kernel-devel.x86_64
# or "kernel-devel.i386" for 32bits kernel or "kernel-xen-devel.x8_64"
for xen enabled kernel
wget
http://www.deine-taler.de/zd1211/sna...-11-07.tar.bz2
wget
http://www.deine-taler.de/zd1211/sna...-11-07.tar.bz2
tar -vxjf zd1211rw_fw_2006-11-07.tar.bz2
tar -vxjf zd1211rw_2006-11-07.tar.bz2
cd *fw*07 ; make clean all install
cd ../*07 ; make rm ; make clean all modules_install ins
# remove and re-attached the USB stick
# check to make sure the driver/firmware is loaded
dmesg | grep -e usb -e 1211
# test and report bugs"
This was the crucial step - my zd1211 driver had been incomplete and in the wrong directory previously. The above instructions got the module to load - I checked with lsmod | grep -e zd and dmesg | grep -e usb -e 1211
To get this setup to work with WPA involved a lot of research, guesswork and luck:
create the following file:
/etc/wpa_supplicant.conf
This should contain the following entries:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel # set this up if it isn't already on your system
network={
ssid="your ssid"
scan_ssid=1 # but check other values acording to how your AP is set up
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="your 26 character PSK" #don't use the long generated string - I couldn't, anyway
with this in place, I went through the following:
modprobe zd1211rw
iwconfig eth1 # check it's okay
/usr/sbin/wpa_supplicant -B -i eth1 -c /etc/wpa_supplicant.conf -D wext
/sbin/dhclient eth1
Then use
iwlist scanning
ifup eth1 and/or ifconfig
to check the status of the interface - though probably no connection at this stge if you are using DHCP. Try with static IP and your AP security off to check the connection to begin with - set the IP through ifconfig
I added this to my startup using the following:
/etc/init.d/wpa_supplicant
#!/bin/bash
#
# wpa_supplicant
#
# chkconfig: 2345 12 88
# description: wpa_supplicant is a WPA Supplicant for Linux, BSD and \
# Windows with support for WPA and WPA2 (IEEE 802.11i / RSN). Supplicant \
# is the IEEE 802.1X/WPA component that is used in the client stations. \
# It implements key negotiation with a WPA Authenticator and it controls \
# the roaming and IEEE 802.11 authentication/association of the wlan driver.
# processname: wpa_supplicant
# config: /etc/wpa_supplicant/wpa_supplicant.conf
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
exec="/usr/sbin/wpa_supplicant"
prog=$(basename $exec)
conf="/etc/wpa_supplicant/wpa_supplicant.conf"
lockfile=/var/lock/subsys/$prog
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
[ "$INTERFACES" != "" ] || exit 0
[ "$DRIVERS" != "" ] || exit 0
start() {
echo -n $"Starting $prog: "
daemon $prog -c $conf $INTERFACES $DRIVERS -Bw
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
fdr_status() {
status $prog
}
case "$1" in
start|stop|restart|reload)
$1
;;
force-reload)
force_reload
;;
status)
fdr_status
;;
condrestart|try-restart)
[ -f $lockfile ] || restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
exit 1
esac
with
/etc/sysconfig/wpa_supplicant
# eth1
INTERFACES="-ieth1"
DRIVERS="-Dwext"
and
/etc/init.d/dhclient
#!/bin/bash
#
# dhclient
#
# chkconfig: 2345 13 87
# description: dhclient is a utility to obtain a DHCP address for the
# network interface specified - (all i/f's if none specified)
#
# This script is for wireless networking through eth1;
# it requires wpa_supplicant to be running before it starts
#
# processname: dhclient
exec="/sbin/dhclient"
proc=$(basename $exec)
check_prereq() {
# Check that networking is up
[ "$NETWORKING" = "no" ] && exit 0
# Make sure that wpa_supplicant is running
wpa_running="$(ps -ea | grep wpa_supplicant)"
if [ "$wpa_running" = "" ] ; then
echo $"wpa_supplicant not running; exiting"
exit 0
fi
}
start() {
/sbin/dhclient eth1 -H myhostname
}
stop() {
killall -9 dhclient
}
restart() {
start
stop
}
case "$1" in
start|stop|restart)
check_prereq
$1;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1;;
esac
You can check / debug the operation using
/etc/init.d/wpa_supplicant stop
and
killall -9 dhclient
then restart with
/etc/init.d/wpa_supplicant start
/etc/init.d/dhclient start
My error trapping isn't very good - maybe somebody out there would like to help me to improve my shell scripting - but the above should work and hopefully save somebody a few hours of frustration.
BTW, I needed to have ssid broadcast enabled on my router for this to work. Without it, the Fedora box just cycled through the channels but found nothing.
Also - see
http://fedoranews.org/blog/?p=599