Browse Source

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>
lilik-openwrt-22.03
Dirk Brenken 7 years ago
parent
commit
8fbe0820af
3 changed files with 10 additions and 6 deletions
  1. +1
    -1
      net/travelmate/Makefile
  2. +2
    -2
      net/travelmate/files/README.md
  3. +7
    -3
      net/travelmate/files/travelmate.sh

+ 1
- 1
net/travelmate/Makefile View File

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


+ 2
- 2
net/travelmate/files/README.md 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\_debug => enable/disable debug logging (default: '0', disabled)
* trm\_automatic => keep travelmate in an active state (default: '1', enabled) * 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\_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\_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\_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) * 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. **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? **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? **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. **A:** Travelmate was never tested with an ancient CC/OpenWrt release ... it should still work, but no promises.


+ 7
- 3
net/travelmate/files/travelmate.sh View File

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


Loading…
Cancel
Save