Project 004 : WLAN scanner - raster data acquisition
necessary software: ImageMagick, feh, iwlist, bash
iwlist on Win*: netsh wlan show networks
Data Acquisition
- wlanscanner4.sh
#!/bin/bash
test "$USER" != 'root' && { echo 'Starte bitte das Script als root.' ; exit ; }
readonly radius=20
echo 'Signalqualität Signalpegel'
for((x=40;$x<200;x+=20))
do
for((y=40;$y<200;y+=20))
do
dx=$(( $x + $radius ))
dy=$(( $y + $radius ))
convert raumplan.png -fill none -stroke red -strokewidth 2 -draw "circle $x,$y $dx,$dy" tmp-raumplan.png
feh -B white -F tmp-raumplan.png
value=`iwlist wlan0 scan | grep -B 3 'ESSID:"ebo-wlan' | grep 'Quality=' | sed 's/=/ | /g;s/\// |/;' | cut -f2,4 -d'|' | sort -nr | head -n1`
echo "$x $y ${value}"
echo "$x $y ${value}" >> wlan-raster-note.dat
done
done
