4cd39d60d285fdbff831b6a9baac6d3fdb414fea
[librecmc/package-feed.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 * procd init system support
13 * procd based hotplug support, the travelmate start will be triggered by interface triggers
14 * status & debug logging to syslog
15
16 ## Prerequisites
17 * [OpenWrt](https://openwrt.org) or [LEDE](https://www.lede-project.org) trunk
18 * iw (default) or iwinfo for wlan scanning
19
20 ## OpenWrt / LEDE trunk Installation & Usage
21 * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages)
22 * install 'travelmate' (_opkg install travelmate_)
23 * configure your network to support (multiple) wlan uplinks and set travelmate config options (details see below)
24 * set 'trm\_enabled' option in travelmate config to '1'
25 * travelmate starts automatically during boot and will be triggered by procd interface triggers
26
27 ## LuCI travelmate companion package
28 * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci)
29 * install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
30 * the application is located in LuCI under 'Services' menu
31 * _Thanks to Hannu Nyman for this great LuCI frontend!_
32
33 ## Chaos Calmer installation notes
34 * 'travelmate' and 'luci-app-travelmate' are _not_ available as ipk packages in the Chaos Calmer download repository
35 * download the packages from a development snapshot directory (see download links above)
36 * manually transfer the packages to your routers temp directory (with tools like _sshfs_ or _winscp_)
37 * install the packages as described above
38
39 ## Travelmate config options
40 * travelmate config options:
41     * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
42     * trm\_debug => enable/disable debug logging (default: '0', disabled)
43     * trm\_maxwait => how long (in seconds) should travelmate wait for wlan interface reload action (default: '20')
44     * trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3')
45     * trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw)
46     * trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: not set, disabled)
47
48 ## Setup
49 **1. configure a wwan interface in /etc/config/network:**
50 <pre><code>
51 [...]
52 config interface 'wwan'
53         option proto 'dhcp'
54 [...]
55 </code></pre>
56
57 **2. add this interface to your firewall configuration in /etc/config/firewall:**
58 <pre><code>
59 [...]
60 config zone
61         option name 'wan'
62         option input 'REJECT'
63         option output 'ACCEPT'
64         option forward 'REJECT'
65         option masq '1'
66         option mtu_fix '1'
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 ifname 'wlan0'
78         option mode 'ap'
79         option ssid 'example_ap'
80         option encryption 'psk2+ccmp'
81         option key 'abc'
82         option disabled '0'
83 [...]
84 config wifi-iface
85         option device 'radio0'
86         option network 'wwan'
87         option mode 'sta'
88         option ssid 'example_01'
89         option ifname 'wwan01'
90         option encryption 'psk2+ccmp'
91         option key 'abc'
92         option disabled '1'
93 config wifi-iface
94         option device 'radio0'
95         option network 'wwan'
96         option mode 'sta'
97         option ssid 'example_02'
98         option ifname 'wwan02'
99         option encryption 'psk2+ccmp'
100         option key 'xyz'
101         option disabled '1'
102 config wifi-iface
103         option device 'radio0'
104         option network 'wwan'
105         option mode 'sta'
106         option ssid 'example_03'
107         option ifname 'wwan03'
108         option encryption 'none'
109         option disabled '1'
110 [...]
111 </code></pre>
112
113 **4. reload network configuration & start travelmate:**
114 <pre><code>
115 /etc/init.d/network reload
116 /etc/init.d/travelmate start
117 </code></pre>
118
119 ## Support
120 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)  
121
122 ## Removal
123 * stop the travelmate daemon with _/etc/init.d/travelmate stop_
124 * optional: remove the travelmate package (_opkg remove travelmate_)
125
126 Have fun!  
127 Dirk