diff --git a/files/etc/init.d/vtund b/files/etc/init.d/vtund index 4f13cf46..80a7a4e0 100755 --- a/files/etc/init.d/vtund +++ b/files/etc/init.d/vtund @@ -20,6 +20,18 @@ uci_type_count() { } ######### UTILITY FUNCTIONS END ########### +default_config() { + local cfg="$1" + local new_file="$2" + local persist + + config_get persist "$persist" persist "yes" + + echo "default {" >> $new_file + echo " persist $persist;" >> $new_file + echo "}" >> $new_file + echo " " >> $new_file +} options_config() { local cfg="$1" @@ -112,22 +124,32 @@ start() { then apply_uci_config config_load vtun - + #if options section doesn't exist, add it j=`uci get vtun.@options[0]` - if [ $? -ne 0 ] + if [ $? -ne 0 ] then j=`uci add vtun options` j='uci commit vtun' config_load vtun fi - + + #if default section doesn't exist, add it + j=`uci get vtun.@default[0]` + if [ $? -ne 0 ] + then + j=`uci add vtun default` + j='uci commit vtun' + config_load vtun + fi + # Remove the current vtun config file mkdir -p /tmp/vtun rm -f $CLIENT_CONF # config_foreach network_config network config_foreach options_config options "$CLIENT_CONF" + config_foreach default_config default "$CLIENT_CONF" config_foreach to_server_config server "$CLIENT_CONF" # STARTUP CLIENT TO SERVER CONNECTIONS diff --git a/files/www/cgi-bin/signal b/files/www/cgi-bin/signal index 79999758..8972a38e 100755 --- a/files/www/cgi-bin/signal +++ b/files/www/cgi-bin/signal @@ -121,7 +121,7 @@ $header = <"; - content += "SNR: " + e.entries[0].dataPoint.m + "dBm
"; + content += "SNR: " + e.entries[0].dataPoint.m + "dB
"; content += "TX Rate: " + e.entries[0].dataPoint.tx_rate + "Mbps
"; content += "TX MCS: " + e.entries[0].dataPoint.tx_mcs + "
"; content += "RX Rate: " + e.entries[0].dataPoint.rx_rate + "Mbps
"; @@ -144,7 +144,9 @@ $header = <Strongest Signal"; + $page = $page . ""; } $firstSel=1; diff --git a/files/www/cgi-bin/signal.json b/files/www/cgi-bin/signal.json index 6cc6a2d7..2385134b 100755 --- a/files/www/cgi-bin/signal.json +++ b/files/www/cgi-bin/signal.json @@ -93,7 +93,7 @@ if parms.realtime then end -- get strongest signal s=iwinfo["nl80211"].signal(wifiiface) - m=tonumber(n)-tonumber(s) + m=tonumber(s)-tonumber(n) if s==0 then s="null" end diff --git a/files/www/cgi-bin/sysinfo.json b/files/www/cgi-bin/sysinfo.json index 06435809..c0034032 100755 --- a/files/www/cgi-bin/sysinfo.json +++ b/files/www/cgi-bin/sysinfo.json @@ -219,7 +219,7 @@ if string.find(nixio.getenv("QUERY_STRING"):lower(),"services=1") then hfile:close() for pos,val in pairs(lines) do local service={} - local link,protocol,name = string.match(val,"^(.*)|(.+)|(.*)\t+%s+.*") + local link,protocol,name = string.match(val,"^([^|]*)|(.+)|([^\t]*)\t#.*") if link and protocol and name then service['link']=link service['protocol']=protocol diff --git a/files/www/help.html b/files/www/help.html index 737de1b2..e7acf566 100644 --- a/files/www/help.html +++ b/files/www/help.html @@ -102,7 +102,7 @@ name (if known) of the device accessing this page.

The right column contains the signal strength reading and other attributes of your node. The Signal/Noise/Ratio is a reading of the strongest neighbor Mesh RF signal -strength in dBm, and it is available only when the node is in a Mesh or Client +strength (in dBm) from all connected stations, and it is available only when the node is in a Mesh or Client configuration. The Auto button will take you to an automatically refreshing display of the current signal strength and an average of the last 20 readings. This is provided as an aid to assist in antenna @@ -142,7 +142,7 @@ temporary files. Memory is the amount of RAM available for running processes.


Charts Page

-

This page shows RF signal information in both a realtime and an archived view. The default view shows the STRONGEST RF signal in realtime.
+

This page shows RF signal information in both a realtime and an archived view. The default view shows the Average signal of all connected stations in realtime.
Below the node name, there will be a few control buttons: