travelmate: release 0.4.0
[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 * "active mode" support, where travelmate will be restarted every n seconds (default 60) and checks the existing uplink connection regardless of ifdown event trigger
13 * support of devices with multiple radios
14 * procd init system support
15 * procd based hotplug support, the travelmate start will be triggered by interface triggers
16 * status & debug logging to syslog
17
18 ## Prerequisites
19 * [OpenWrt](https://openwrt.org) or [LEDE](https://www.lede-project.org) trunk
20 * iw (default) or iwinfo for wlan scanning
21
22 ## OpenWrt / 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 * _Thanks to Hannu Nyman for this great LuCI frontend!_
34
35 ## Chaos Calmer installation notes
36 * 'travelmate' and 'luci-app-travelmate' are _not_ available as ipk packages in the Chaos Calmer download repository
37 * download the packages from a development snapshot directory (see download links above)
38 * manually transfer the packages to your routers temp directory (with tools like _sshfs_ or _winscp_)
39 * install the packages as described above
40
41 ## Travelmate config options
42 * travelmate config options:
43 * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
44 * trm\_debug => enable/disable debug logging (default: '0', disabled)
45 * trm\_active => keep travelmate in an active state (default: '0', disabled)
46 * trm\_maxwait => how long (in seconds) should travelmate wait for wlan interface reload action (default: '20')
47 * trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3')
48 * trm\_timeout => timeout in seconds for "active mode" (default: '60')
49 * trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw)
50 * trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
51 * trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: not set, disabled)
52
53 ## Setup
54 **1. configure a wwan interface in /etc/config/network:**
55 <pre><code>
56 [...]
57 config interface 'wwan'
58 option proto 'dhcp'
59 [...]
60 </code></pre>
61
62 **2. add this interface to your firewall configuration in /etc/config/firewall:**
63 <pre><code>
64 [...]
65 config zone
66 option name 'wan'
67 option network 'wan wan6 wwan'
68 [...]
69 </code></pre>
70
71 **3. add required ap and wwan stations to your wireless configuration in etc/config/wireless:**
72 <pre><code>
73 [...]
74 config wifi-iface
75 option device 'radio0'
76 option network 'lan'
77 option mode 'ap'
78 option ssid 'example_ap'
79 option encryption 'psk2+ccmp'
80 option key 'abc'
81 option disabled '0'
82 [...]
83 config wifi-iface
84 option device 'radio0'
85 option network 'wwan'
86 option mode 'sta'
87 option ssid 'example_01'
88 option encryption 'psk2+ccmp'
89 option key 'abc'
90 option disabled '1'
91 config wifi-iface
92 option device 'radio0'
93 option network 'wwan'
94 option mode 'sta'
95 option ssid 'example_02'
96 option encryption 'psk2+ccmp'
97 option key 'xyz'
98 option disabled '1'
99 config wifi-iface
100 option device 'radio0'
101 option network 'wwan'
102 option mode 'sta'
103 option ssid 'example_03'
104 option encryption 'none'
105 option disabled '1'
106 [...]
107 </code></pre>
108
109 **4. reload network configuration & start travelmate:**
110 <pre><code>
111 /etc/init.d/network reload
112 /etc/init.d/travelmate start
113 </code></pre>
114
115 ## Support
116 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)
117
118 ## Removal
119 * stop the travelmate daemon with _/etc/init.d/travelmate stop_
120 * optional: remove the travelmate package (_opkg remove travelmate_)
121
122 Have fun!
123 Dirk