diff --git a/files/usr/local/bin/mgr/rssi_monitor_ath10k.lua b/files/usr/local/bin/mgr/rssi_monitor_ath10k.lua index 19c70838..d07f60aa 100644 --- a/files/usr/local/bin/mgr/rssi_monitor_ath10k.lua +++ b/files/usr/local/bin/mgr/rssi_monitor_ath10k.lua @@ -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 diff --git a/files/usr/local/bin/mgr/station_monitor.lua b/files/usr/local/bin/mgr/station_monitor.lua index 4be9151d..6dc95cc9 100755 --- a/files/usr/local/bin/mgr/station_monitor.lua +++ b/files/usr/local/bin/mgr/station_monitor.lua @@ -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()