From a8c6ac90ba15e5a5bb591e0a69001cdd51a51126 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Thu, 12 Oct 2023 14:46:35 -0700 Subject: [PATCH] Use frequency list for scan. (#960) Some hardware doesnt scan all the frequencies we want by default. Not a fix for the current limited scan problem --- files/www/cgi-bin/scan | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/files/www/cgi-bin/scan b/files/www/cgi-bin/scan index 36a9185c..f1e62e74 100755 --- a/files/www/cgi-bin/scan +++ b/files/www/cgi-bin/scan @@ -52,10 +52,17 @@ if not nixio.fs.stat("/tmp/web") then nixio.fs.mkdir("/tmp/web") end +local channels = aredn.hardware.get_rfchannels(wifiiface) +local scan_list = "" +for _, channel in ipairs(channels) +do + scan_list = scan_list .. " " .. channel.frequency +end + -- scan start local scanned = {} -local f = io.popen("iw dev " .. wifiiface .. " scan passive") +local f = io.popen("iw dev " .. wifiiface .. " scan freq" .. scan_list .. " passive") if f then local scan = {} for line in f:lines()