mirror of https://github.com/aredn/aredn.git
Switch to more active wifi reset (#508)
This commit is contained in:
parent
808f4b1aa1
commit
c341bba378
|
@ -99,7 +99,7 @@ function run_monitor()
|
|||
-- avoid node going deaf while trying to obtain 'normal' statistics of neighbor strength
|
||||
-- in first few minutes after boot
|
||||
if now > 119 and now < 750 then
|
||||
os.execute("/usr/sbin/iw " .. wifiiface .. " scan freq " .. aredn_info.getFreq() .. " passive")
|
||||
os.execute("/usr/sbin/iw " .. wifiiface .. " scan")
|
||||
end
|
||||
|
||||
local station_count = 0
|
||||
|
@ -157,7 +157,7 @@ function run_monitor()
|
|||
|
||||
if amac then
|
||||
-- reset
|
||||
os.execute("/usr/sbin/iw " .. wifiiface .. " scan freq " .. aredn_info.getFreq() .. " passive")
|
||||
os.execute("/usr/sbin/iw " .. wifiiface .. " scan")
|
||||
wait_for_ticks(5)
|
||||
-- update time
|
||||
now = nixio.sysinfo().uptime
|
||||
|
@ -193,7 +193,7 @@ function run_monitor()
|
|||
end
|
||||
elseif station_count == 0 and last_station_count ~= 0 then
|
||||
-- reset
|
||||
os.execute("/usr/sbin/iw " .. wifiiface .. " scan freq " .. aredn_info.getFreq() .. " passive")
|
||||
os.execute("/usr/sbin/iw " .. wifiiface .. " scan")
|
||||
wait_for_ticks(5)
|
||||
log:write("No stations detected")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue