[pisa-src] r1126 - trunk/tools

  • From: René Hummen <rene.hummen@xxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 13 Oct 2009 17:30:57 +0200

Author: hummen
Date: Tue Oct 13 17:30:57 2009
New Revision: 1126

Log:
minor enhancement to auto-handover script

Modified:
   trunk/tools/auto-handover.sh

Modified: trunk/tools/auto-handover.sh
==============================================================================
--- trunk/tools/auto-handover.sh        Tue Oct 13 17:22:16 2009        (r1125)
+++ trunk/tools/auto-handover.sh        Tue Oct 13 17:30:57 2009        (r1126)
@@ -5,14 +5,16 @@
 
 #your parameters
 WIFI_IF="eth2"
-PATTERN="pisa-demo"
+PATTERN="pisa-testbed"
+AP_IP="192.168.8.1"
+IP="192.168.8.123"
 
 ## internal parameters
 last_result="NONE"
 
 while [ 1 ]
 do
-result=($(iwlist $WIFI_IF scan | ./piwlist -s $PATTERN))
+result=($(iwlist $WIFI_IF scan | ./iwlist_parser -s $PATTERN))
 
 if [ "${result[0]}" == "NONE" ]
 then
@@ -22,7 +24,13 @@
        then
                echo "Changing to " ${result[1]}
                iwconfig $WIFI_IF ap  ${result[0]} essid  ${result[1]}
-               arp -d -a
+               arp -d $AP_IP 2> /dev/null
+
+               if [ "$last_result" = "NONE" ]
+               then
+                       ifconfig $WIFI_IF $IP
+               fi
+
                last_result=${result[0]}
        else
                echo "Access Point is still best"

Other related posts:

  • » [pisa-src] r1126 - trunk/tools - René Hummen