travelmate: update 0.7.0

* no longer misuse ubus/procd service object for travelmate runtime 
  information, now save all required information directly
  in a JSON file/format
* new 'status' init command to print runtime information
* add a configurable interface trigger timeout for
  nested & slow modem/router setups, set 'trm_triggerdelay' accordingly
* change start priority & refine reload timings
* cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken
2017-04-20 09:22:22 +02:00
parent cf919894d6
commit 80e34d6f73
5 changed files with 95 additions and 60 deletions
+15 -22
View File
@@ -12,14 +12,14 @@ To avoid these kind of deadlocks, travelmate set all station interfaces in an "a
* manual / automatic mode support, the latter one checks the existing uplink connection regardless of ifdown event trigger every n seconds
* support of devices with multiple radios
* procd init and hotplug support
* runtime information accessible via ubus service call
* runtime information available via LuCI & via 'status' init command
* status & debug logging to syslog
## Prerequisites
* [OpenWrt](https://openwrt.org) or [LEDE](https://www.lede-project.org) trunk
* [LEDE](https://www.lede-project.org) 17.01 or latest snapshot
* iw (default) or iwinfo for wlan scanning
## OpenWrt / LEDE trunk Installation & Usage
## LEDE trunk Installation & Usage
* download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages)
* install 'travelmate' (_opkg install travelmate_)
* configure your network to support (multiple) wlan uplinks and set travelmate config options (see below)
@@ -30,7 +30,6 @@ To avoid these kind of deadlocks, travelmate set all station interfaces in an "a
* download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci)
* install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
* the application is located in LuCI under 'Services' menu
* _Thanks to Hannu Nyman for this great LuCI frontend!_
## Travelmate config options
* travelmate config options:
@@ -42,28 +41,22 @@ To avoid these kind of deadlocks, travelmate set all station interfaces in an "a
* trm\_timeout => timeout in seconds for "automatic mode" (default: '60')
* trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw)
* trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
* trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: wan wwan)
* trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: wwan)
* trm\_triggerdelay => additional trigger delay in seconds before travelmate processing starts (default: '2')
## Runtime information
**receive travelmate information via ubus:**
**receive travelmate runtime information:**
<pre><code>
ubus call service get_data '{"name":"travelmate"}'
This will output the current connection status, e.g.:
{
"travelmate": {
"travelmate": {
"last_rundate": "02.04.2017 07:22:03",
"online_status": "true",
"station_interface": "wwan",
"station_radio": "radio1",
"station_ssid": "blackhole",
"system": "LEDE Reboot SNAPSHOT r3888-8fb39f1682",
"travelmate_version": "0.6.0"
}
}
}
root@adb2go:/tmp# /etc/init.d/travelmate status
::: travelmate runtime information
travelmate_version : 0.7.0
station_connection : true
station_ssid : blackhole
station_interface : wwan
station_radio : radio1
last_rundate : 20.04.2017 08:54:48
system : LEDE Reboot SNAPSHOT r3974-56457dbcb7
</code></pre>
## Setup