travelmate: update to 0.9.3

* backend/frontend: supports a Connection Limit ('trm_maxretry')
  of '0', to disable this feature (unlimited retries)

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2017-08-21 19:22:58 +02:00
parent 7cdb6c7031
commit 8fbe0820af
3 changed files with 10 additions and 6 deletions

View File

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
PKG_VERSION:=0.9.2
PKG_VERSION:=0.9.3
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>

View File

@ -39,7 +39,7 @@ To avoid these kind of deadlocks, travelmate set all station interfaces in an "a
* trm\_debug => enable/disable debug logging (default: '0', disabled)
* trm\_automatic => keep travelmate in an active state (default: '1', enabled)
* trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (default: '30')
* trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3')
* trm\_maxretry => how many times should travelmate try to connect to an uplink, '0' means unlimited retries. (default: '3')
* trm\_timeout => timeout in seconds for "automatic mode" (default: '60')
* trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
* trm\_iface => main uplink / procd trigger network interface (default: trm_wwan)
@ -121,7 +121,7 @@ edit /etc/config/travelmate and set 'trm_enabled' to '1'
**A:** In "manual" mode travelmate will be triggered solely by procd interface down events, whenever an uplink disappears travelmate tries n times (default 3) to find a new uplink or reconnect to the old one. The 'automatic' mode keeps travelmate in an active state and checks every n seconds the connection status / the uplink availability regardless of procd event trigger.
**Q:** What happen with misconfigured uplinks, e.g. due to outdated wlan passwords?
**A:** Travelmate tries n times (default 3) to connect, then the respective uplink SSID will be marked / renamed to '_SSID_\_err'. In this case use the builtin wireless station manager to update your wireless credentials.
**A:** Travelmate tries n times (default 3) to connect, then the respective uplink SSID will be marked / renamed to '_SSID_\_err'. In this case use the builtin wireless station manager to update your wireless credentials. To disable this functionality at all set the Connection Limit ('trm\_maxretry') to '0', which means unlimited retries.
**Q:** Is travelmate compatible with CC/Openwrt?
**A:** Travelmate was never tested with an ancient CC/OpenWrt release ... it should still work, but no promises.

View File

@ -10,7 +10,7 @@
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
trm_ver="0.9.2"
trm_ver="0.9.3"
trm_sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')"
trm_enabled=0
trm_debug=0
@ -201,7 +201,7 @@ f_main()
then
continue
fi
while [ ${cnt} -le ${trm_maxretry} ]
while [ ${trm_maxretry} -eq 0 ] || [ ${cnt} -le ${trm_maxretry} ]
do
ssid_list="$(${trm_iwinfo} "${dev}" scan | awk '/ESSID: "/{ORS=" ";if (!seen[$0]++) for(i=2; i<=NF; i++) print $i}')"
f_log "debug" "main: ${trm_iwinfo}, dev: ${dev}, ssids: ${ssid_list}"
@ -223,7 +223,7 @@ f_main()
f_log "info " "interface '${sta_iface}' on '${sta_radio}' connected to uplink '${sta_ssid}' (${trm_sysver})"
f_jsnupdate "${sta_iface}" "${sta_radio}" "${sta_ssid}"
return 0
elif [ ${cnt} -eq ${trm_maxretry} ]
elif [ ${trm_maxretry} -ne 0 ] && [ ${cnt} -eq ${trm_maxretry} ]
then
uci -q set wireless."${config}".disabled=1
uci -q set wireless."${config}".ssid="${sta_ssid}_err"
@ -231,6 +231,10 @@ f_main()
f_check "dev"
f_log "info " "can't connect to uplink '${sta_ssid}' (${cnt}/${trm_maxretry}), uplink disabled (${trm_sysver})"
else
if [ ${trm_maxretry} -eq 0 ]
then
cnt=0
fi
uci -q revert wireless
f_check "dev"
f_log "info " "can't connect to uplink '${sta_ssid}' (${cnt}/${trm_maxretry}) (${trm_sysver})"