626956452aade0967731d9360c2a293eef51c858
[feed/packages.git] / net / travelmate / files / README.md
1 # travelmate, a wlan connection manager for travel router
2
3 ## Description
4 If you’re planning an upcoming vacation or a business trip, taking your laptop, tablet or smartphone give you the ability to connect with friends or complete work on the go. But many hotels don’t have a secure wireless network setup or you’re limited on using a single device at once. Investing in a portable, mini travel router is a great way to connect all of your devices at once while having total control over your own personalized wireless network.
5 A logical combination of AP+STA mode on one physical radio allows most of OpenWrt/LEDE supported router devices to connect to a wireless hotspot/station (STA) and provide a wireless access point (AP) from that hotspot at the same time. Downside of this solution: whenever the STA interface looses the connection it will go into an active scan cycle which renders the radio unusable for AP mode operation, therefore the AP is taken down if the STA looses its association.
6 To avoid these kind of deadlocks, travelmate set all station interfaces in an "always off" mode and connects automatically to available/configured hotspots.
7
8 ## Main Features
9 * STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible
10 * easy setup within normal OpenWrt/LEDE environment
11 * fast uplink connections
12 * manual / automatic mode support, the latter one checks the existing uplink connection regardless of ifdown event trigger every n seconds
13 * support of devices with multiple radios
14 * procd init and hotplug support
15 * runtime information available via LuCI & via 'status' init command
16 * status & debug logging to syslog
17
18 ## Prerequisites
19 * [LEDE](https://www.lede-project.org) 17.01 or latest snapshot
20 * iw (default) or iwinfo for wlan scanning
21
22 ## LEDE trunk Installation & Usage
23 * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages)
24 * install 'travelmate' (_opkg install travelmate_)
25 * configure your network to support (multiple) wlan uplinks and set travelmate config options (see below)
26 * set 'trm\_enabled' option in travelmate config to '1'
27 * travelmate starts automatically during boot and will be triggered by procd interface triggers
28
29 ## LuCI travelmate companion package
30 * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci)
31 * install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
32 * the application is located in LuCI under 'Services' menu
33
34 ## Travelmate config options
35 * travelmate config options:
36 * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
37 * trm\_debug => enable/disable debug logging (default: '0', disabled)
38 * trm\_automatic => keep travelmate in an active state (default: '1', enabled)
39 * trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (default: '30')
40 * trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3')
41 * trm\_timeout => timeout in seconds for "automatic mode" (default: '60')
42 * trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw)
43 * trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
44 * trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: wwan)
45 * trm\_triggerdelay => additional trigger delay in seconds before travelmate processing starts (default: '2')
46
47 ## Runtime information
48
49 **receive travelmate runtime information:**
50 <pre><code>
51 root@adb2go:/tmp# /etc/init.d/travelmate status
52 ::: travelmate runtime information
53 travelmate_version : 0.7.0
54 station_connection : true
55 station_ssid : blackhole
56 station_interface : wwan
57 station_radio : radio1
58 last_rundate : 20.04.2017 08:54:48
59 system : LEDE Reboot SNAPSHOT r3974-56457dbcb7
60 </code></pre>
61
62 ## Setup
63 **1. configure a wwan interface in /etc/config/network:**
64 <pre><code>
65 [...]
66 config interface 'wwan'
67 option proto 'dhcp'
68 [...]
69 </code></pre>
70
71 **2. add this interface to your firewall configuration in /etc/config/firewall:**
72 <pre><code>
73 [...]
74 config zone
75 option name 'wan'
76 option network 'wan wan6 wwan'
77 [...]
78 </code></pre>
79
80 **3. add required ap and wwan stations to your wireless configuration in etc/config/wireless:**
81 <pre><code>
82 [...]
83 config wifi-iface
84 option device 'radio0'
85 option network 'lan'
86 option mode 'ap'
87 option ssid 'example_ap'
88 option encryption 'psk2+ccmp'
89 option key 'abc'
90 option disabled '0'
91 [...]
92 config wifi-iface
93 option device 'radio0'
94 option network 'wwan'
95 option mode 'sta'
96 option ssid 'example_01'
97 option encryption 'psk2+ccmp'
98 option key 'abc'
99 option disabled '1'
100 config wifi-iface
101 option device 'radio0'
102 option network 'wwan'
103 option mode 'sta'
104 option ssid 'example_02'
105 option encryption 'psk2+ccmp'
106 option key 'xyz'
107 option disabled '1'
108 config wifi-iface
109 option device 'radio0'
110 option network 'wwan'
111 option mode 'sta'
112 option ssid 'example_03'
113 option encryption 'none'
114 option disabled '1'
115 [...]
116 </code></pre>
117
118 **4. reload network configuration & start travelmate:**
119 <pre><code>
120 /etc/init.d/network reload
121 /etc/init.d/travelmate start
122 </code></pre>
123
124 ## Support
125 Please join the travelmate discussion in this [forum thread](https://forum.openwrt.org/viewtopic.php?id=67697) or contact me by [mail](mailto:dev@brenken.org)
126
127 ## Removal
128 * stop the travelmate daemon with _/etc/init.d/travelmate stop_
129 * optional: remove the travelmate package (_opkg remove travelmate_)
130
131 Have fun!
132 Dirk