Monitor bug fixes (#867)

This commit is contained in:
Tim Wilkinson 2023-06-07 22:42:42 -07:00 committed by GitHub
parent 8287742822
commit b64aa0c988
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -36,6 +36,7 @@
local periodic_scan_tick = 5
local wifiiface
local phy
function rssi_monitor_10k()
if not string.match(get_ifname("wifi"), "^wlan") then
@ -46,7 +47,7 @@ function rssi_monitor_10k()
wifiiface = get_ifname("wifi")
-- ath10k only
local phy = iwinfo.nl80211.phyname(wifiiface)
phy = iwinfo.nl80211.phyname(wifiiface)
if not phy or not nixio.fs.stat("/sys/kernel/debug/ieee80211/" .. phy .. "/ath10k") then
exit_app()
return

View File

@ -66,6 +66,12 @@ function station_monitor()
frequency = iwinfo.nl80211.frequency(wifiiface)
ssid = iwinfo.nl80211.ssid(wifiiface)
-- If frequency or ssid is missing (some kind of bad configuration) just exit this
if not (frequency and ssid) then
exit_app()
return
end
-- Mikrotik AC hardware has some startup issues which we try to resolve
-- by leaving and rejoining the network
local boardid = aredn.hardware.get_board_id():lower()