This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
sdk:scripts:best-operator [2015/05/05 15:04] – external edit 127.0.0.1 | sdk:scripts:best-operator [2023/06/30 12:25] (current) – dodenhoeft | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== SDK Script best-operator.are ====== | ====== SDK Script best-operator.are ====== | ||
+ | This script will scan for operators on startup and choose the one with the best signal. The script is only recommended for static installations. | ||
+ | |||
<code c best-operator.are> | <code c best-operator.are> | ||
/* DESC: This script will scan for operators on startup and choose the one with the best signal | /* DESC: This script will scan for operators on startup and choose the one with the best signal | ||
Line 57: | Line 59: | ||
if (is_void(net) || is_void(lai) || is_void(status)) continue; | if (is_void(net) || is_void(lai) || is_void(status)) continue; | ||
- | if (trim(status) == " | + | if (trim(tolower(status)) == " |
nb_syslog(" | nb_syslog(" | ||
networks[netcount++] = mkstruct(" | networks[netcount++] = mkstruct(" | ||
Line 93: | Line 95: | ||
status = nb_status(" | status = nb_status(" | ||
s = (int) struct_get(status, | s = (int) struct_get(status, | ||
- | if (s < -113) { | + | if (s > -113) { |
signal = s; | signal = s; | ||
nb_syslog(" | nb_syslog(" |