mirror of https://github.com/aredn/aredn.git
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
This commit is contained in:
parent
ed5e8b4770
commit
a8c6ac90ba
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue