Outdoor Wireless LAN
In support of research being conducted into long range wireless LANs I
have developed a couple of scripts to assist in the managment of our
research network.
The first is to change the channel on a minitar access point which can
be useful when the link is flakey or a gui interface is not available:
------------------------------------------------------------------------
changechan
------------------------------------------------------------------------
#!/bin/sh
#script to change channel on minitar access point
#first cd to /tmp so result of wget gets written there
cd /tmp
#subsititute the details for your access point in the line below.
Note you need recent version of wget
wget --http-user=admin --http-passwd=youllneverguessme
"http://192.168.0.7/goform/form
WlanSetup"
--post-data="apMode=0&name=myap&ssid=myap&chan=3&wlan-url=%2F
wlb.asp&x=40&y=12"
Often noise will come up on a particular channel making it unusable, so
the second script monitors a link and if it goes down will automatially
rotate through the channels until it finds a working link:
------------------------------------------------------------------------
apupcheck
------------------------------------------------------------------------
#!/bin/sh
# Initialize variables
netup=0
chan=1
#first cd to /tmp so result of wget gets written there
cd /tmp
while [ $netup -ne 1 ]
do
# if link down
/bin/ping -c 3 192.168.0.7 > /dev/null
if [ $? -eq 1 ]
then
sleep 55
# check path to ap is up
/bin/ping -s 512 -c 5
192.168.0.8 > /dev/null
if [ $? -ne 1 ]
then
# make sure link is still down
/bin/ping -c 2 192.168.0.7
> /dev/null
if [ $? -eq 1 ]
then
#rotate to next channel
chan=`expr $chan + 1`
date>>/var/log/chan
echo
$chan>>/var/log/chan
#send command to access point
wget --http-user=admin
--http-passwd=youllneverguessme
"http://192.168.0.8/goform/formWlanSetup"
--post-data="apMode=0&name=myap&ssid=myap&chan=${chan}&wlan-url=%2F
wlb.asp&x=40&y=12"
if [ $chan -ge 10 ]
then
chan=0
fi
fi
fi
fi
#set interval between checks
sleep 400
done
---------------------------------------------------------------------------------------
We are working on a project to modify the minitar access point to
perform a similar task internally with improved logic to find the optimum
working channel as well researching other techniques to improve speed and reliability including forward error correction and dynamically changing other parameters such as the fragment threshold.