Switch to more active wifi reset (#508)

This commit is contained in:
Tim Wilkinson 2022-09-20 16:29:03 -07:00 committed by GitHub
parent 808f4b1aa1
commit c341bba378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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