From patchwork Sun Nov 26 13:01:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v3,3/4] fff-web: Enable 5 GHz in wifiscan.html From: Adrian Schmutzler X-Patchwork-Id: 710 Message-Id: <1511701300-3004-3-git-send-email-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Sun, 26 Nov 2017 14:01:39 +0100 This externalizes writing the table to a function and switches to wXap instead of wXmesh to support KeyXchangeV2 better. Signed-off-by: Adrian Schmutzler --- Introduced in v3. --- .../fff-web/files/www/ssl/cgi-bin/wifiscan.html | 52 +++++++++++++++------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/wifiscan.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/wifiscan.html index cc2c3b1..f9186d2 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/wifiscan.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/wifiscan.html @@ -13,27 +13,45 @@ readIWinfo() { "<'${ssid}'>\\2\\4\\5 dBm\\3<'${mac}'>\\1\\6", "g"); print r;}' | sort -n | sed 's#&#\&#' # The HTML comment contains the signal quality to allow sorting } +printWifiScan() { + local iface=$1 + local freq="2.4 GHz" + if [ "$iface" = "w5ap" ] || [ "$iface" = "w5mesh" ] ; then + freq="5 GHz" + fi %> - -
-
- Wifi Scan - - - - - - - - - + +<% +} + +%> +
NameKanalSignalTypMACEncryption
+
+ Wifi Scan: <%= "$freq" %> + + + + + + + + + <% -readIWinfo "w2mesh" "td" "td" + readIWinfo "$iface" "td" "td" +%> +
NameKanalSignalTypMACEncryption
+
+
+<% +if uci -q get wireless.w2ap > /dev/null ; then + printWifiScan "w2ap" +fi +if uci -q get wireless.w5ap > /dev/null ; then + printWifiScan "w5ap" +fi %> -
-
-
<%in /www/ssl/cgi-bin/footer %>