Merge pull request #6531 from jow-/privoxy-fix-uci-parsing
[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 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 environment
11 * strong LuCI-Support with builtin interface wizard and a wireless station manager
12 * fast uplink connections
13 * support all kinds of uplinks, incl. hidden and enterprise uplinks
14 * continuously checks the existing uplink connection (quality), e.g. for conditional uplink (dis-) connections
15 * captive portal detection with internet online check and a 'heartbeat' function to keep the uplink connection up & running
16 * support of devices with multiple radios
17 * procd init and hotplug support
18 * runtime information available via LuCI & via 'status' init command
19 * status & debug logging to syslog
20 * optional: the LuCI frontend shows the WiFi QR codes from all configured Access Points. It allows you to connect your Android or iOS devices to your router’s WiFi using the QR code
21
22 ## Prerequisites
23 * [OpenWrt](https://openwrt.org), tested with the stable release series (17.01.x) and with the latest OpenWrt snapshot
24 * iwinfo for wlan scanning, uclient-fetch for captive portal detection
25 * optional: qrencode 4.x for QR code support
26
27 ## Installation & Usage
28 * download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/packages)
29 * install 'travelmate' (_opkg install travelmate_)
30 * configure your network:
31 * recommended: use the LuCI frontend with builtin interface wizard and a wireless station manager
32 * manual: see detailed configuration steps below
33 * at least you need one configured AP and one STA interface
34
35 ## LuCI travelmate companion package
36 * download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/luci)
37 * install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
38 * the application is located in LuCI under 'Services' menu
39
40 ## Travelmate config options
41 * usually the pre-configured travelmate setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' section:
42 * trm\_enabled => main switch to enable/disable the travelmate service (bool/default: '0', disabled)
43 * trm\_debug => enable/disable debug logging (bool/default: '0', disabled)
44 * trm\_captive => enable/disable the captive portal detection (bool/default: '1', enabled)
45 * trm\_minquality => minimum signal quality threshold as percent for conditional uplink (dis-) connections (int/default: '35', valid range: 20-80)
46 * trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (int/default: '30', valid range: 20-40)
47 * trm\_maxretry => how many times should travelmate try to connect to an uplink (int/default: '3', valid range: 1-10)
48 * trm\_timeout => overall retry timeout in seconds (int/default: '60', valid range: 30-300)
49 * trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
50 * trm\_iface => main uplink / procd trigger network interface (default: trm_wwan)
51 * trm\_triggerdelay => additional trigger delay in seconds before travelmate processing begins (int/default: '2')
52
53 ## Runtime information
54
55 **receive travelmate runtime information:**
56 <pre><code>
57 ~# /etc/init.d/travelmate status
58 ::: travelmate runtime information
59 + travelmate_status : connected (net ok/78)
60 + travelmate_version : 1.2.1
61 + station_id : radio1/blackhole/01:02:03:04:05:06
62 + station_interface : trm_wwan
63 + faulty_stations :
64 + last_rundate : 28.07.2018 21:17:45
65 + system : TP-LINK RE450, OpenWrt SNAPSHOT r7540+5-20c4819c7b
66 </code></pre>
67
68 ## Manual Setup
69 **1. configure the travelmate wwan interface in /etc/config/network:**
70 <pre><code>
71 [...]
72 config interface 'trm_wwan'
73 option proto 'dhcp'
74 [...]
75 </code></pre>
76
77 **2. add this interface to your firewall configuration in /etc/config/firewall:**
78 <pre><code>
79 [...]
80 config zone
81 option name 'wan'
82 option network 'wan wan6 trm_wwan'
83 [...]
84 </code></pre>
85
86 **3. at least add one ap and (multiple) wwan stations to your wireless configuration in etc/config/wireless:**
87 <pre><code>
88 [...]
89 config wifi-iface
90 option device 'radio0'
91 option network 'lan'
92 option mode 'ap'
93 option ssid 'example_ap'
94 option encryption 'psk2+ccmp'
95 option key 'abc'
96 option disabled '0'
97 [...]
98 config wifi-iface
99 option device 'radio0'
100 option network 'trm_wwan'
101 option mode 'sta'
102 option ssid 'example_usual'
103 option encryption 'psk2+ccmp'
104 option key 'abc'
105 option disabled '1'
106 [...]
107 config wifi-iface
108 option device 'radio0'
109 option network 'trm_wwan'
110 option mode 'sta'
111 option ssid 'example_hidden'
112 option bssid '00:11:22:33:44:55'
113 option encryption 'psk2+ccmp'
114 option key 'xyz'
115 option disabled '1'
116 [...]
117 </code></pre>
118
119 **4. start travelmate:**
120 <pre><code>
121 edit /etc/config/travelmate and set 'trm_enabled' to '1'
122 /etc/init.d/travelmate restart
123 </code></pre>
124
125 ## FAQ
126 **Q:** What happen with misconfigured, faulty uplinks, e.g. due to outdated wlan passwords?
127 **A:** Travelmate tries n times (default 3) to connect, then the respective uplink will be marked as "faulty" in the JSON runtime file and hereafter ignored. To reset the JSON runtime file, simply restart travelmate.
128 **Q:** How to connect to hidden uplinks?
129 **A:** See 'example\_hidden' STA configuration above, option 'SSID' and 'BSSID' must be specified for successful connections.
130
131 ## Support
132 Please join the travelmate discussion in this [forum thread](https://forum.lede-project.org/t/travelmate-support-thread/5155) or contact me by [mail](mailto:dev@brenken.org)
133
134 ## Removal
135 * stop the travelmate daemon with _/etc/init.d/travelmate stop_
136 * optional: remove the travelmate package (_opkg remove travelmate_)
137
138 Have fun!
139 Dirk