# # Copyright (c) 2004-2006, Intel Corporation. All rights reserved. # Created by: julie DOT n DOT fleischer REMOVE-THIS AT intel DOT com # crystal DOT xiong REMOVE-THIS AT intel DOT com # This file is licensed under the GPL license. For the full content # of this license, see the LICENSE file at the top level of this # source tree. # File: ABAT # This file performs an automated basic acceptance test on the ipw2X00 # driver. It tests that the basic functionality of association, # WEP, fragmentation, power management, and wireless tools exists. # More detailed tests are available online from # http://ipw2200.sf.net/validation.php. # # USAGE: # First, modify all variables in the "Configuration" section for your # system. # # NOTE that you'll need at least version 27-pre26 of the Wireless tools # to run this ABAT.txt script, and at least Wireless extension v16. # # Run: # ./ABAT # Mail ABAT results to: # salwan.searty REMOVE-THIS AT intel DOT com # along with information on hardware vendor and model, version of # the ipw driver used, and OS/version used. # # 6/23/04 - Applied patch for configuring the network via # ifconfig/dhclient from Pedro Ramalhais # # 7/7/04 - Changed 'ifdown $IF' to 'ifconfig $IF down' on the # advice of Gentoo ABAT testers. # # 7/27/04 - Changed 'iwconfig $IF power' to 'iwpriv $IF set_power' # # 8/16/04 - Fix a bug in ad-hoc function. # Using iwpriv $IF get_power to get the power level. # # 8/20/04 - Change the grep pattern from :1 to :*1 in iwpriv get_power # # 9/02/04 - Added CLIENTDHCPBIN variable as suggested by Henrik Brix # Andersen and Bruno Pelaia. # 9/21/04 - Removed hardcoding of eth1 in some places - Salwan Searty # 9/22/04 - Added new configuration variable allowing tester to # specify whether they are using a WEP-enabled AP or not. # 11/1/04 - Changed monitor mode case to grep for "Frequency=2.427" # instead of "Channel:4". This is becaues more recent versions # of the wireless tools (example 27_pre26 and 27_pre27) # display "Frequency" instead of "Channel" in the iwlist # output. -salwan. # 11/2/04 - Added ABATVERSION variable to help keep track of the # version of the script. Also added function # printconfiguration() to show the output the way # the script is configured # 11/22/04- uncommented the 'rts off' test case since it's now # supported in both ipw2100 and ipw2200 drivers. # 11/22/04- added small note below USAGE section about the wireless # tools version. # 12/01/04- Accounted for some of the inconsistencies between the outputs # of wireless tools. Bumped ABATVERSION to 004. # 12/12/04- Modified the variables to be set from outside this # script (thanks Lars Heer) # 11/25/05- Add test to test the A band # 12/06/05- Add func definition of wait_progress() and wait_for_association() # to facilitate the waiting of the association to AP # 12/06/05- Add func definition of reset_channel_mode() to clear static # configuration of "channel" and "mode", especially for IPW3945 # 05/11/06- Add wep, more a band, datatransfer to the test cases # 06/01/06- Add associate_diffssid() and associate_keylevel and cover more # parameters for each setting. # #!/bin/bash # The ABATVERSION Variable is used by maintainers of the script # to keep track of all the changes. Please do not modify if you # are sending us the output to post ABATVERSION="009" # Configuration RFKILL="" # string for RF kill module (if needed) DRIVER=${DRIVER:="ipw3945"} # string containing driver name IF=${IF:="eth2"} # string containing wireless interface ESSID=${ESSID:="linksys-ven"} # string containing ESSID name in B/G mode ESSID_A=${SSID_A:="linksys-jup"} # string containing A only AP's # SSID name. A only AP should have # the same config as B/G AP. APIP=${APIP:="192.168.1.1"} # string containing AP's IP CLIENTDHCP=${CLIENTDHCP:="no"} CLIENTDHCPBIN=${CLIENTDHCPBIN:="dhcpcd"} CLIENTIP=${CLIENTIP="192.168.1.100"} CLIENTNETMASK=${CLIENTNETMASK:="255.255.255.0"} ABATOUTPUT="abat.out" TIMEOUT=100 TESTFAIL=0 TESTROOT=$(pwd) # Set APSET info HASAPSET=${HASAPSET:="no"} APTYPE=${APTYPE:="Linksys-WRIT55AG"} # we enable two kinds of APs to let remote # control: Linksys-WRT55G, ASUS-WL500g # Global variables TEST="no test" declare -i FAIL=0 declare -i PASS=0 #Set AP to let remote automated control function ap_type_set() { #Check if there are apset tool installed, if yes, rename it. which apset &>/dev/null if [ $? -eq 0 ];then if [ -e /usr/bin/apset ];then echo "To change apset" >> $ABATOUTPUT 2>&1 mv -f /usr/bin/apset /usr/bin/apset.bak &>/dev/null fi fi set -x case $APTYPE in "ASUS-WL500g") export PATH=$PATH:$TESTROOT/apset/apset.rsh ;; "Linksys-WRT55AG") export PATH=$PATH:$TESTROOT/apset/apset.web ln -s $TESTROOT/apset/apset.web/Linksys-WRT55AG-config $TESTROOT/apset/apset.web/stddconfig ln -s $TESTROOT/apset/apset.web/Linksys-WRT55AG-apset $TESTROOT/apset/apset.web/apset ;; *) echo "please configure the correct AP type in config file\n" exit ;; esac set +x } # show the waiting progress function wait_progress() { elapsed= i= while kill -s 0 $1 >/dev/null 2>&1; do [ "$((i%4))" = "0" ] && echo -n "." sleep 0.1 i=$((i+1)) done elapsed=$i } # waiting for completion of the association to AP function wait_for_associate() { local i=0 while [ $i -le $TIMEOUT ]; do ((i=i+1)) grep $1 /proc/net/wireless | (read nic status link rest && [ ! "$link" = "0." ]) && break sleep 0.1 done } function wait_for_drvup() { local i=0 # set the server ip addresslocal i=0 while [ $i -le $TIMEOUT ]; do ((i=i+1)) [ -d /sys/module/$1 ] && ps -ef | grep ipw3945d && sleep 2 && break sleep 0.1 done if [ ! -d /sys/module/$DRIVER ] || ! ps -ef | grep ipw3945d; then echo "E: Driver loading timeout, exit." exit 1 fi } # reset mode and channel. # COMMENTS: especially for IPW3945, since new association cannot change # the foregoing static configuration, i.e. "channel number" # and "mode", therefore, we do it deliberately. # ------ which is not similar to IPW2100/2200. function reset_channel_mode() { RUN "iwconfig $IF mode managed" RUN "iwconfig $IF channel 0" } # Run the command given as the first parameter, # first printing out the command being run # If two parameters are given. Execute them with | function RUN() { if [ -n "$2" ]; then echo "$1 | $2" $1 | $2 else echo $1 $1 fi } function showconfiguration() { echo "===========================================" >> $ABATOUTPUT 2>&1 echo "ABAT Script Configuration Information " >> $ABATOUTPUT 2>&1 echo "===========================================" >> $ABATOUTPUT 2>&1 echo "+ ABAT Version $ABATVERSION " >> $ABATOUTPUT 2>&1 echo "+ RFKILL=$RFKILL " >> $ABATOUTPUT 2>&1 echo "+ DRIVER=$DRIVER " >> $ABATOUTPUT 2>&1 echo "+ IF=$IF " >> $ABATOUTPUT 2>&1 echo "+ ESSID=$ESSID " >> $ABATOUTPUT 2>&1 echo "+ APIP=$APIP " >> $ABATOUTPUT 2>&1 echo "+ CLIENTDHCP=$CLIENTDHCP " >> $ABATOUTPUT 2>&1 echo "+ CLIENTDHCPBIN=$CLIENTDHCPBIN " >> $ABATOUTPUT 2>&1 echo "+ CLIENTNETMASK=$CLIENTNETMASK " >> $ABATOUTPUT 2>&1 echo "+ TESTROOT=$TESTROOT " >> $ABATOUTPUT 2>&1 if [ X"$HASAPSET" = X"yes" ]; then echo "+ HASAPSET=$HASAPSET " >> $HASAPSET 2>&1 echo "+ APTYPE=$APTYPE " >> $HASAPSET 2>&1 fi echo "===========================================" } function starttest() { echo "**************************" >> $ABATOUTPUT 2>&1 echo "TEST: '$TEST' starting..." >> $ABATOUTPUT 2>&1 cat /proc/version >> $ABATOUTPUT 2>&1 } function endtest() { if [ $? -eq $1 ]; then echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS else echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL fi echo "**************************" >> $ABATOUTPUT 2>&1 } function driverload() { TEST="Test driver load" starttest if [ -n "$RFKILL" ]; then RUN "modprobe $RFKILL" fi RUN "modprobe $DRIVER" wait_for_drvup $DRIVER & wait_progress $! RUN lsmod "grep $DRIVER" endtest 0 } function setssid() { TEST="Test setting different kinds of ssid" SSIDS="linus 9 A _ aaaaaaa111111111" TESTFAIL=0 starttest for SSID in $SSIDS do RUN "iwconfig $IF essid $SSID" RUN "iwconfig $IF" iwconfig $IF |grep $SSID if [ $? -ne 0 ]; then TESTFAIL=1 fi done if [ $TESTFAIL -ne 0 ]; then endtest 1 fi endtest 0 } function setfrag() { TEST="Test setting fragmentation" FRAGS="256 500 1000 2000 off" TESTFAIL=0 starttest for FRAG in $FRAGS do RUN "iwconfig $IF frag $FRAG" RUN "iwconfig $IF" iwconfig $IF | grep -E "Fragment thr:$FRAG|Fragment thr=$FRAG" if [ $? -ne 0 ]; then TESTFAIL=1 fi done if [ $TESTFAIL -ne 0 ]; then echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL else echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS fi echo "**************************" >> $ABATOUTPUT 2>&1 } function setrts() { TEST="Test setting rts" RTSS="256 500 1000 2000 off" TESTFAIL=0 starttest for RTS in $RTSS do RUN "iwconfig $IF rts $RTS" iwconfig $IF | grep -E "RTS thr:$RTS|RTS thr=$RTS" if [ $? -ne 0 ]; then TESTFAIL=1 fi done if [ $TESTFAIL -ne 0 ]; then echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL else echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS fi echo "**************************" >> $ABATOUTPUT 2>&1 } function setmode() { TEST="Test setting mode" MODES="managed ad-hoc" TESTFAIL=0 starttest for MODE in $MODES do RUN "iwconfig $IF mode $MODE" iwconfig $IF | grep -i "$MODE" if [ $? -ne 0 ]; then TESTFAIL=1 fi done if [ $TESTFAIL -ne 0 ];then echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL else echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS fi echo "**************************" >> $ABATOUTPUT 2>&1 } function settxpower() { TEST="Test txpower setting" starttest TESTFAIL=0 i=0 while [ "$i" -le 15 ] do RUN "iwconfig $IF txpower $i" iwconfig $IF | grep -i "TX-Power=$i dBm" if [ $? -ne 0 ]; then TESTFAIL=1 fi i=${i}+1 done if [ $TESTFAIL -ne 0 ];then echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL else echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS fi echo "**************************" >> $ABATOUTPUT 2>&1 } function setkey() { TEST="Test key setting off default level" RUN "iwconfig $IF key off" starttest RUN "iwconfig $IF" "grep off" endtest 0 TEST="Test key setting open level" RUN "iwconfig $IF key open" starttest RUN "iwconfig $IF" "grep :.*open" endtest 0 TEST="Test key setting restricted level" RUN "iwconfig $IF key restricted" starttest RUN "iwconfig $IF" "grep :.*restricted" endtest 0 TEST="Test different key" KEY1="1111111111" KEY2="2222222222" KEY3="3333333333" KEY4="4444444444" TESTFAIL=0 starttest RUN "iwconfig $IF key $KEY1 [1]" RUN "iwconfig $IF key $KEY2 [2]" RUN "iwconfig $IF key $KEY3 [3]" RUN "iwconfig $IF key $KEY4 [4]" RUN "iwconfig $IF key [2]" RUN "iwconfig $IF" | grep "2222-2222-22" if [ $? -ne 0 ]; then TESTFAIL=1 fi RUN "iwconfig $IF key [3]" RUN "iwconfig $IF" | grep "3333-3333-33" if [ $? -ne 0 ]; then TESTFAIL=1 fi RUN "iwconfig $IF key [4]" RUN "iwconfig $IF" | grep "4444-4444-44" if [ $? -ne 0 ]; then TESTFAIL=1 fi RUN "iwconfig $IF key [1]" RUN "iwconfig $IF" | grep "1111-1111-11" if [ $? -ne 0 ]; then TESTFAIL=1 fi if [ $TESTFAIL -ne 0 ];then echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL else echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS fi echo "**************************" >> $ABATOUTPUT 2>&1 } function setchannel() { TEST="Test channel setting" if [ $DRIVER = "ipw3945" ]; then TOTAL_A=$(iwlist $IF channel | grep -i "total" | awk '{print $2}') CHANS=$(tail -$TOTAL_A /sys/bus/pci/drivers/ipw3945/*/channels \ | grep "active" | awk -F: '{ print $1}') else CHANS=$(iwlist $IF channel | grep -iE "Channel.*GHz" | awk '{print $2}') fi starttest for CHANNEL in $CHANS do RUN "iwconfig $IF channel $CHANNEL" RUN "iwlist $IF channel " "grep $CHANNEL" if [ $? -ne 0 ]; then TESTFAIL=1 fi done if [ $TESTFAIL -ne 0 ];then echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL else echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS fi echo "**************************" >> $ABATOUTPUT 2>&1 } function setrate() { TEST="Test rate setting" RATES="1 2 5.5 6 9 11 12 18 24 36 48 54" starttest TESTFAIL=0 for RATE in $RATES do RUN "iwconfig $IF rate ${RATE}M" RUN "iwlist $IF rate" "grep $RATE" if [ $? -ne 0 ]; then TESTFAIL=1 fi done if [ $TESTFAIL -ne 0 ]; then echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL else echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS fi echo "**************************" >> $ABATOUTPUT 2>&1 } function association() { TEST="Test association with no WEP" driverunload driverload RUN "iwconfig $IF essid $ESSID" wait_for_associate $IF & wait_progress $! starttest if [ X"$CLIENTDHCP" = X"yes" ]; then $CLIENTDHCPBIN $IF else RUN "ifconfig $IF $CLIENTIP netmask $CLIENTNETMASK up" fi sleep 3 RUN "ping -c 1 -I $IF $APIP" ping -c 1 -I $IF $APIP | grep "1 received" endtest 0 } # Test that basic wireless tools functionality for iwconfig, iwpriv, and # iwspy exists function wirelesstools() { TEST="Wireless tools - iwconfig" starttest RUN "iwconfig $IF" "grep 802.11" endtest 0 TEST="Wireless tools - iwpriv" starttest RUN "iwpriv" "grep Available" # this test is weak endtest 0 #TEST="Wireless tools - iwspy" #starttest #RUN "iwspy" "grep doesn" # this test is weak #endtest 0 } function fragmentation() { TEST="fragmentation - setting" starttest RUN "iwconfig $IF frag 300" RUN "iwconfig $IF" iwconfig $IF | grep -E "Fragment thr:300|Fragment thr=300" endtest 0 TEST="fragmentation - Tx" starttest RUN "ping -c 1 -I $IF $APIP" ping -c 1 -I $IF $APIP | grep "1 received" endtest 0 TEST="fragmentation off" starttest RUN "iwconfig $IF frag off" RUN "iwconfig $IF" iwconfig $IF | grep -E "Fragment thr:off|Fragment thr=off" endtest 0 TEST="fragmentation - RTS/CTS setting" starttest RUN "iwconfig $IF rts 300" RUN "iwconfig $IF" iwconfig $IF | grep -E "RTS thr:300|RTS thr=300" endtest 0 TEST="fragmentation - RTS/CTS Tx" starttest RUN "ping -c 1 -I $IF $APIP" ping -c 1 -I $IF $APIP | grep "1 received" endtest 0 TEST="fragmentation - RTS/CTS off" starttest RUN "iwconfig $IF rts off" iwconfig | grep -E "RTS thr:off|RTS thr=off" endtest 0 } function adhoc_nowep() { TEST="Test setting up an BG band network" starttest RUN "ifconfig $IF down" RUN "iwconfig $IF mode ad-hoc essid testing channel 4" if [ $? -ne 0 ]; then endtest 1 else wait_for_associate $IF & wait_progress $! RUN "ifconfig $IF up 192.168.3.1" RUN "ping -c 1 -I $IF 192.168.3.1" ping -c 1 -I $IF 192.168.3.1 | grep "1 received" endtest 0 RUN "ifconfig $IF down" fi TEST="Test setting up an A band network" RUN "ifconfig $IF down" RUN "iwconfig $IF set_mode 1" if [ $DRIVER = "ipw3945" ]; then TOTAL_A=$(iwlist $IF channel | grep -i "total" | awk '{print $2}') CHAN_SET=$(tail -$TOTAL_A /sys/bus/pci/drivers/ipw3945/*/channels \ | grep "active"|grep "IBSS" | awk -F: '{ print $1}') else CHAN_SET=$(iwlist $IF channel | grep -iE "Channel.*GHz" | awk '{print $2}') fi if [ X"$CHAN_SET" = X"" ]; then echo "No A band channel to support ahoc in your card" >> $ABATOUTPUT 2>&1 return fi starttest TESTFAIL=0 for chan in $CHAN_SET;do RUN "iwconfig $IF mode ad-hoc essid test channel $chan" if [ $? -ne 0 ]; then TESTFAIL=1 else wait_for_associate $IF & wait_progress $! if [ $? -ne 0 ]; then TESTFAIL=1 fi RUN "ifconfig $IF up 192.168.3.1" RUN "ping -c 1 -I $IF 192.168.3.1" ping -c 1 -I $IF 192.168.3.1 | grep "1 received" if [ $? -ne 0 ];then TESTFAIL=1 fi RUN "ifconfig $IF down" fi done if [ $TESTFAIL -ne 0 ]; then echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL else echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS fi echo "**************************" >> $ABATOUTPUT 2>&1 } function adhoc_wep() { TEST="Test setting up an adhoc network with wep" starttest RUN "ifconfig $IF down" RUN "iwconfig $IF mode ad-hoc essid testing channel 4 key 1111" if [ $? -ne 0 ]; then endtest 1 else wait_for_associate $IF & wait_progress $! RUN "ifconfig $IF up 192.168.3.1" RUN "ping -c 1 -I $IF 192.168.3.1" ping -c 1 -I $IF 192.168.3.1 | grep "1 received" if [ $? -ne 0 ]; then endtest 1 fi RUN "iwconfig" "grep 1111-0000-00" endtest 0 RUN "ifconfig $IF down" fi } function setpower() { # Remove when bugzilla 11 is fixed. #TEST="Turn on power management" #starttest #RUN "iwconfig $IF power on" #RUN "iwconfig" "grep period:" #endtest 0 TEST="Set PSP level to 1" starttest RUN "iwpriv $IF set_power 1" RUN "iwpriv $IF get_power" "grep :.*1" endtest 0 TEST="Set PSP level to 2" starttest RUN "iwpriv $IF set_power 2" RUN "iwpriv $IF get_power" "grep :.*2" endtest 0 TEST="Set PSP level to 3" starttest RUN "iwpriv $IF set_power 3" RUN "iwpriv $IF get_power" "grep :.*3" endtest 0 TEST="Set PSP level to 4" starttest RUN "iwpriv $IF set_power 4" RUN "iwpriv $IF get_power" "grep :.*4" endtest 0 TEST="Set PSP level to 5" starttest RUN "iwpriv $IF set_power 5" RUN "iwpriv $IF get_power" "grep :.*5" endtest 0 TEST="Turn off power management" starttest RUN "iwconfig $IF power off" RUN "iwconfig" "grep Management:off" endtest 0 } function driverunload() { TEST="$DRIVER driver unload" starttest RUN "ifconfig $IF down" sleep 2 RUN "modprobe -r $DRIVER" if [ -n $RFKILL ]; then RUN "modprobe -r $RFKILL" fi RUN lsmod "grep $DRIVER" endtest 1 } function switch_asso() { TEST="Test association with A band" starttest RUN "iwconfig $IF key off channel 0" RUN "iwconfig $IF essid $ESSID_A" wait_for_associate $IF & wait_progress $! if [ X"$CLIENTDHCP" = X"yes" ]; then $CLIENTDHCPBIN $IF else RUN "ifconfig $IF $CLIENTIP netmask $CLIENTNETMASK up" fi RUN "ping -c 1 -I $IF $APIP" RUN "iwconfig" ping -c 1 -I $IF $APIP | grep "1 received" endtest 0 TEST="Test association switch to B/G band" starttest RUN "iwconfig $IF essid $ESSID" wait_for_associate $IF & wait_progress $! if [ X"$CLIENTDHCP" = X"yes" ]; then $CLIENTDHCPBIN $IF else RUN "ifconfig $IF $CLIENTIP netmask $CLIENTNETMASK up" fi sleep 2 RUN "ping -c 1 -I $IF $APIP" RUN "iwconfig" ping -c 1 -I $IF $APIP | grep "1 received" endtest 0 TEST="Test association switch to A band from B/G band" starttest RUN "iwconfig $IF essid $ESSID_A" wait_for_associate $IF & wait_progress $! if [ X"$CLIENTDHCP" = X"yes" ]; then $CLIENTDHCPBIN $IF else RUN "ifconfig $IF $CLIENTIP netmask $CLIENTNETMASK up" fi sleep 3 RUN "ping -c 1 -I $IF $APIP" ping -c 1 -I $IF $APIP | grep "1 received" endtest 0 } function associate_diffssid() { TEST="Test setting different kinds of ssid" ASSIDS="linus 9 A _ aaaaaaa11111111" modprobe -r ipw3945 modprobe ipw3945 apset --reset TESTFAIL=0 starttest for ASSID in $ASSIDS do apset 2G-SSID $ASSID RUN "iwconfig $IF essid $ASSID key off channel 0" wait_for_associate $IF & wait_progress $! if [ X"$CLIENTDHCP" = X"yes" ]; then $CLIENTDHCPBIN $IF else RUN "ifconfig $IF $CLIENTIP netmask $CLIENTNETMASK up" fi RUN "ping -c 1 -I $IF $APIP" ping -c 1 -I $IF $APIP | grep "1 received" if [ $? -ne 0 ]; then TESTFAIL=1 fi done if [ $TESTFAIL -ne 0 ]; then echo "FAIL: '$TEST' failed" >> $ABATOUTPUT 2>&1 FAIL=++FAIL else echo "PASS: '$TEST' passed" >> $ABATOUTPUT 2>&1 PASS=++PASS fi echo "**************************" >> $ABATOUTPUT 2>&1 } function associate_keylevel() { TEST="Test association with different level keys" LKEY1="11110000000000000000000000" LKEY2="22220000000000000000000000" LKEY3="33330000000000000000000000" LKEY4="44440000000000000000000000" modprobe -r ipw3945 modprobe ipw3945 RUN "apset --reset" RUN "apset WEP enabled 2G-ENCRYPT 128 2G-KEY1 $LKEY1 2G-KEY2 $LKEY2 2G-KEY3 $LKEY3 2G-KEY4 $LKEY4" starttest RUN "iwconfig $IF essid $ESSID" RUN "iwconfig $IF key $LKEY2 [2]" RUN "iwconfig $IF key [2]" if [ X"$CLIENTDHCP" = X"yes" ]; then $CLIENTDHCPBIN $IF else RUN "ifconfig $IF $CLIENTIP netmask $CLIENTNETMASK up" fi RUN "ping -c 1 -I $IF $APIP" ping -c 1 -I $IF $APIP | grep "1 received" endtest 0 starttest RUN "iwconfig $IF key $LKEY3 [3]" RUN "iwconfig $IF key [3]" RUN "ping $APIP -c 3 -I $IF" ping -c 1 -I $IF $APIP | grep "1 received" endtest 0 starttest RUN "iwconfig $IF key $LKEY4 [4]" RUN "iwconfig $IF key [4]" RUN "ping $APIP -c 3 -I $IF" ping -c 1 -I $IF $APIP | grep "1 received" endtest 0 } # Main rm $ABATOUTPUT # Print the environment variable values showconfiguration # Driver load test driverload #set different ssid setssid #set differenet frag frag setfrag #set rts setrts #set mode setmode #set txpower settxpower #set_power setpower #set different level key setkey #channel test setchannel #adhoc test adhoc_nowep #adhoc without wep adhoc_wep # Association tests association # Wireless tools tests wirelesstools # Fragmentation tests fragmentation # Test Association switch between B/G band to A band during 3945 testing. if [ X"$DRIVER" = X"ipw3945" ]; then # especially for IPW3945, see COMMENTS over definition of this function reset_channel_mode switch_asso # setrate fi if [ X"$HASAPSET" = X"yes" ]; then ap_type_set associate_diffssid associate_keylevel RUN "apset --reset" fi # Driver unload test driverunload echo "********************************************" >> $ABATOUTPUT 2>&1 echo -e "PASS\t-\t$PASS\n" >> $ABATOUTPUT 2>&1 echo -e "FAIL\t-\t$FAIL\n" >> $ABATOUTPUT 2>&1 echo "********************************************" >> $ABATOUTPUT 2>&1