[pisa-src] r2941 - trunk/tools/auto-handover-tablet.sh

  • From: Rene Hummen <Rene.Hummen@xxxxxxxxxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 21 Mar 2012 23:30:43 +0100

Author: hummen
Date: Wed Mar 21 23:30:42 2012
New Revision: 2941

Log:
further optimize tablet handover script

Modified:
   trunk/tools/auto-handover-tablet.sh

Modified: trunk/tools/auto-handover-tablet.sh
==============================================================================
--- trunk/tools/auto-handover-tablet.sh Wed Mar 21 23:27:08 2012        (r2940)
+++ trunk/tools/auto-handover-tablet.sh Wed Mar 21 23:30:42 2012        (r2941)
@@ -35,6 +35,7 @@
 
 fail_counter=0
 while true; do
+    #result=$(iwlist $WIFI_IF scanning | ./iwlist_parser -s $PATTERN | grep 
[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]
 -o | cut -d' ' -f1)
 
     result=$(python iwlist_parser.py -p $PATTERN)
 
@@ -51,12 +52,10 @@
         iwconfig $WIFI_IF essid $PATTERN ap $result
         sleep 0.5
         while [ true ]; do
-            ping -c 1 -w 1 -W 1 $AP_IP > /dev/null 2>&1
+            ping -c 1 -w 1 -W 0.5 $AP_IP > /dev/null 2>&1
             if [ $? -eq 0 ]; then
                     echo "Triggering HIP update"
                     hipconf daemon manual-update > /dev/null 2>&1
-                    sleep 2
-                    hipconf daemon manual-update > /dev/null 2>&1
                     update_counter=0
                     fail_counter=0
                     last_result=$result
@@ -73,7 +72,7 @@
             fi
 
             update_counter=$(($update_counter+1))
-            sleep 1
+            sleep 0.5
         done
     else
         echo "Access Point is still best ($result)"
-- 
This is the pisa developer mailing list. Please also subscribe to the main pisa 
list at:
//www.freelists.org/list/pisa

Other related posts:

  • » [pisa-src] r2941 - trunk/tools/auto-handover-tablet.sh - Rene Hummen