]> code.delx.au - monosys/commitdiff
wifi-scan: alternate form of channel
authorJames Bunton <jamesbunton@delx.net.au>
Thu, 2 Jul 2020 14:18:13 +0000 (00:18 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Thu, 2 Jul 2020 14:18:13 +0000 (00:18 +1000)
bin/wifi-scan

index 11bd7d0e23e027e6cd67789b140b5c9e96890925..9b3b17c467f691f5f5e77c8c26d8a6820ad14eb1 100755 (executable)
@@ -55,6 +55,9 @@ function formatScanResult(scanResult) {
         if (line.startsWith('DS Parameter set: channel')) {
             partial.channel = line.split(':')[1].trim();
         }
+        if (line.startsWith('* primary channel:')) {
+            partial.channel = 'channel ' + line.split(':')[1].trim();
+        }
         if (line.startsWith('freq: ')) {
             partial.freq = 'freq ' + line.split(':')[1].trim();
         }