2016-10-27 12:11:01 +00:00
# travelmate, a wlan connection manager for travel router
2016-10-16 15:54:48 +00:00
## Description
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.
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.
2016-12-31 13:14:29 +00:00
To avoid these kind of deadlocks, travelmate set all station interfaces in an "always off" mode and connects automatically to available/configured hotspots.
2016-10-16 15:54:48 +00:00
## Main Features
* STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible
2017-01-09 18:46:57 +00:00
* easy setup within normal OpenWrt/LEDE environment
2017-05-06 05:33:52 +00:00
* strong LuCI-Support to simplify the interface setup
2016-10-16 15:54:48 +00:00
* fast uplink connections
2017-06-16 19:29:34 +00:00
* manual / automatic mode support, the latter one checks the existing uplink connection regardless of ifdown event trigger actions every n seconds
2017-03-03 13:39:38 +00:00
* support of devices with multiple radios
2017-04-02 05:41:57 +00:00
* procd init and hotplug support
2017-04-20 07:22:22 +00:00
* runtime information available via LuCI & via 'status' init command
2016-12-31 13:14:29 +00:00
* status & debug logging to syslog
2016-10-16 15:54:48 +00:00
## Prerequisites
2017-04-20 07:22:22 +00:00
* [LEDE ](https://www.lede-project.org ) 17.01 or latest snapshot
2017-06-16 19:29:34 +00:00
* iwinfo for wlan scanning
2016-10-16 15:54:48 +00:00
2017-04-20 07:22:22 +00:00
## LEDE trunk Installation & Usage
2016-11-06 17:58:09 +00:00
* download the package [here ](https://downloads.lede-project.org/snapshots/packages/x86_64/packages )
2016-10-16 15:54:48 +00:00
* install 'travelmate' (_opkg install travelmate_)
2017-05-06 05:33:52 +00:00
* configure your network:
2017-06-10 05:56:32 +00:00
* automatic: use the LuCI frontend with automatic STA interface setup, that's the recommended way
2017-05-06 05:33:52 +00:00
* manual: see detailed configure steps below
2017-06-16 19:29:34 +00:00
* at least you need one configured AP and one STA interface
2016-10-16 15:54:48 +00:00
2016-11-06 17:58:09 +00:00
## LuCI travelmate companion package
* 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
2016-10-16 15:54:48 +00:00
## Travelmate config options
2016-12-31 13:14:29 +00:00
* travelmate config options:
2016-10-16 15:54:48 +00:00
* trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
* trm\_debug => enable/disable debug logging (default: '0', disabled)
2017-04-02 05:41:57 +00:00
* trm\_automatic => keep travelmate in an active state (default: '1', enabled)
* trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (default: '30')
2016-12-31 13:14:29 +00:00
* trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3')
2017-04-02 05:41:57 +00:00
* trm\_timeout => timeout in seconds for "automatic mode" (default: '60')
2017-02-17 18:01:20 +00:00
* trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
2017-05-06 05:33:52 +00:00
* trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: trm_wwan)
* trm\_triggerdelay => additional trigger delay in seconds before travelmate processing starts (default: '1')
2017-04-02 05:41:57 +00:00
## Runtime information
2017-04-20 07:22:22 +00:00
**receive travelmate runtime information:**
2017-04-02 05:41:57 +00:00
< pre > < code >
2017-05-06 05:33:52 +00:00
root@adb2go:~# /etc/init.d/travelmate status
2017-04-20 07:22:22 +00:00
::: travelmate runtime information
2017-05-06 05:33:52 +00:00
travelmate_version : 0.7.2
2017-04-20 07:22:22 +00:00
station_connection : true
station_ssid : blackhole
2017-05-06 05:33:52 +00:00
station_interface : trm_wwan
2017-04-20 07:22:22 +00:00
station_radio : radio1
2017-05-06 05:33:52 +00:00
last_rundate : 06.05.2017 06:58:22
system : LEDE Reboot SNAPSHOT r4051-3ddc1914ba
2017-04-02 05:41:57 +00:00
< / code > < / pre >
2016-10-16 15:54:48 +00:00
2017-06-10 05:56:32 +00:00
## Manual Setup
2017-05-06 05:33:52 +00:00
**1. configure the travelmate wwan interface in /etc/config/network:**
2016-10-16 15:54:48 +00:00
< pre > < code >
[...]
2017-05-06 05:33:52 +00:00
config interface 'trm_wwan'
2016-10-16 15:54:48 +00:00
option proto 'dhcp'
[...]
< / code > < / pre >
2016-10-27 12:11:01 +00:00
**2. add this interface to your firewall configuration in /etc/config/firewall:**
2016-10-16 15:54:48 +00:00
< pre > < code >
[...]
config zone
option name 'wan'
2017-05-06 05:33:52 +00:00
option network 'wan wan6 trm_wwan'
2016-10-16 15:54:48 +00:00
[...]
< / code > < / pre >
2017-06-10 05:56:32 +00:00
**3. at least add one ap and (multiple) wwan stations to your wireless configuration in etc/config/wireless:**
2016-10-16 15:54:48 +00:00
< pre > < code >
[...]
2016-11-13 18:32:40 +00:00
config wifi-iface
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'example_ap'
option encryption 'psk2+ccmp'
option key 'abc'
option disabled '0'
[...]
2016-10-16 15:54:48 +00:00
config wifi-iface
option device 'radio0'
2017-05-06 05:33:52 +00:00
option network 'trm_wwan'
2016-10-16 15:54:48 +00:00
option mode 'sta'
option ssid 'example_01'
option encryption 'psk2+ccmp'
option key 'abc'
option disabled '1'
config wifi-iface
option device 'radio0'
2017-05-06 05:33:52 +00:00
option network 'trm_wwan'
2016-10-16 15:54:48 +00:00
option mode 'sta'
option ssid 'example_02'
option encryption 'psk2+ccmp'
option key 'xyz'
option disabled '1'
config wifi-iface
option device 'radio0'
2017-05-06 05:33:52 +00:00
option network 'trm_wwan'
2016-10-16 15:54:48 +00:00
option mode 'sta'
2016-10-27 12:11:01 +00:00
option ssid 'example_03'
2016-10-16 15:54:48 +00:00
option encryption 'none'
option disabled '1'
[...]
< / code > < / pre >
2016-10-27 12:11:01 +00:00
**4. reload network configuration & start travelmate:**
2016-10-16 15:54:48 +00:00
< pre > < code >
/etc/init.d/network reload
/etc/init.d/travelmate start
< / code > < / pre >
## Support
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 )
## Removal
* stop the travelmate daemon with _/etc/init.d/travelmate stop_
* optional: remove the travelmate package (_opkg remove travelmate_)
Have fun!
Dirk