From: drowe67 Date: Tue, 7 Dec 2010 22:08:27 +0000 (+0000) Subject: improved sigstr, more robust to different telnets X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=e79def2033ec0d0d9a15d9faf70916ec423e8935;p=freetel-svn-tracking.git improved sigstr, more robust to different telnets git-svn-id: https://svn.code.sf.net/p/freetel/code@262 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/dilimesh/cgi-bin/getsig.cgi b/dilimesh/cgi-bin/getsig.cgi index 24374443..1850fccf 100755 --- a/dilimesh/cgi-bin/getsig.cgi +++ b/dilimesh/cgi-bin/getsig.cgi @@ -18,8 +18,8 @@ Content-type: text/html EOF ip=`echo "$QUERY_STRING" | sed -n "s/.*ip=//p" | sed "s/,/ /g"` +nc $ip 4950 echo $ip -nc $ip 4950 | sed -e "1d" cat < diff --git a/dilimesh/dilimesh/dilimesh.html b/dilimesh/dilimesh/dilimesh.html index 393d834b..9f1bcb84 100644 --- a/dilimesh/dilimesh/dilimesh.html +++ b/dilimesh/dilimesh/dilimesh.html @@ -260,7 +260,7 @@ } if (ips != "") { - downloadUrl("/cgi-bin/fpingnodes.cgi?" + ips, processFping); + downloadUrl("/cgi-bin/fpingnodes.cgi?" + ips, processFping); // set up HTML for ping tests of all nodes @@ -323,11 +323,15 @@ var nodes_poor_packet_loss = 0; for (var j=0; j' + trim(neighbour_sigs[i]) + ' dBm'; - } + } html += ''; document.getElementById('sigstr_last_node').innerHTML = ip; document.getElementById('sigstr_results').innerHTML = html; diff --git a/dilimesh/scripts/sigstr.sh b/dilimesh/scripts/sigstr.sh index fd787d3d..726458a4 100755 --- a/dilimesh/scripts/sigstr.sh +++ b/dilimesh/scripts/sigstr.sh @@ -2,18 +2,20 @@ # node_tune.sh # David Rowe 13 April 2010 # -# Prints the IPs and signal strengths of nodes we can see. +# Prints information useful for tuning a mesh node # -# Run as a telnet login, e.g. on node 10.130.1.100 -# telnetd -l /usr/sbin/sigstr.sh -p 4950 -# Test: -# "telnet 10.130.1.100 4950" +# Useful to run as a telnet login, e.g. +# telnetd -l /usr/sbin/node_tune.sh -p 4950 +# will let you plug a laptop into eth0 and "telnet 192.168.1.20 4950" +# to run this script # list of nodes this node can see in IP and MAC order IP=`cat /proc/net/arp | grep "10.130.1" | awk '{ print $1 }'` MAC=`cat /proc/net/arp | grep "10.130.1" | awk '{ print $4 }'` + echo + echo "sigstr" echo $IP for m in $MAC do