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")
|
nixio.fs.mkdir("/tmp/web")
|
||||||
end
|
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
|
-- scan start
|
||||||
|
|
||||||
local scanned = {}
|
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
|
if f then
|
||||||
local scan = {}
|
local scan = {}
|
||||||
for line in f:lines()
|
for line in f:lines()
|
||||||
|
|
Loading…
Reference in New Issue