You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
7.1 KiB

  1. # travelmate, a wlan connection manager for travel router
  2. ## Description
  3. 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.
  4. 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.
  5. To avoid these kind of deadlocks, travelmate set all station interfaces in an "always off" mode and connects automatically to available/configured hotspots.
  6. ## Main Features
  7. * STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible
  8. * easy setup within normal OpenWrt environment
  9. * strong LuCI-Support with builtin interface wizard and a wireless station manager
  10. * fast uplink connections
  11. * support all kinds of uplinks, incl. hidden and enterprise uplinks
  12. * trigger- or automatic-mode support, the latter one is the default and checks the existing uplink connection regardless of ifdown event trigger actions every n seconds
  13. * checks continuously the signal quality for conditional uplink (dis-) connections
  14. * captive portal detection with internet online check and a 'heartbeat' function to keep the uplink connection up & running
  15. * support of devices with multiple radios
  16. * procd init and hotplug support
  17. * runtime information available via LuCI & via 'status' init command
  18. * status & debug logging to syslog
  19. ## Prerequisites
  20. * [OpenWrt](https://openwrt.org), tested with the stable release series (17.01.x) and with the latest OpenWrt snapshot
  21. * iwinfo for wlan scanning, uclient-fetch for captive portal detection
  22. ## Installation & Usage
  23. * download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/packages)
  24. * install 'travelmate' (_opkg install travelmate_)
  25. * configure your network:
  26. * recommended: use the LuCI frontend with builtin interface wizard and a wireless station manager
  27. * manual: see detailed configure steps below
  28. * at least you need one configured AP and one STA interface
  29. ## LuCI travelmate companion package
  30. * download the package [here](https://downloads.openwrt.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. ## Travelmate config options
  34. * usually the pre-configured travelmate setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' section:
  35. * trm\_enabled => main switch to enable/disable the travelmate service (bool/default: '0', disabled)
  36. * trm\_debug => enable/disable debug logging (bool/default: '0', disabled)
  37. * trm\_automatic => keep travelmate in an active state (bool/default: '1', enabled)
  38. * trm\_captive => enable/disable the captive portal detection (bool/default: '1', enabled)
  39. * trm\_minquality => minimum signal quality threshold as percent for conditional uplink (dis-) connections (int/default: '35', valid range: 20-80)
  40. * trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (int/default: '30', valid range: 20-40)
  41. * trm\_maxretry => how many times should travelmate try to connect to an uplink (int/default: '3', valid range: 1-10)
  42. * trm\_timeout => timeout in seconds for "automatic mode" (int/default: '60', valid range: 30-300)
  43. * trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
  44. * trm\_iface => main uplink / procd trigger network interface (default: trm_wwan)
  45. * trm\_triggerdelay => additional trigger delay in seconds before travelmate processing starts (int/default: '2')
  46. ## Runtime information
  47. **receive travelmate runtime information:**
  48. <pre><code>
  49. ::: travelmate runtime information
  50. + travelmate_status : connected (net ok/55)
  51. + travelmate_version : 1.1.0
  52. + station_id : Turris/-
  53. + station_interface : trm_wwan
  54. + station_radio : radio1
  55. + last_rundate : 19.02.2018 17:02:25
  56. + system : GL.iNet GL-AR750, OpenWrt SNAPSHOT r5988+25-60e07ffec5
  57. </code></pre>
  58. ## Manual Setup
  59. **1. configure the travelmate wwan interface in /etc/config/network:**
  60. <pre><code>
  61. [...]
  62. config interface 'trm_wwan'
  63. option proto 'dhcp'
  64. [...]
  65. </code></pre>
  66. **2. add this interface to your firewall configuration in /etc/config/firewall:**
  67. <pre><code>
  68. [...]
  69. config zone
  70. option name 'wan'
  71. option network 'wan wan6 trm_wwan'
  72. [...]
  73. </code></pre>
  74. **3. at least add one ap and (multiple) wwan stations to your wireless configuration in etc/config/wireless:**
  75. <pre><code>
  76. [...]
  77. config wifi-iface
  78. option device 'radio0'
  79. option network 'lan'
  80. option mode 'ap'
  81. option ssid 'example_ap'
  82. option encryption 'psk2+ccmp'
  83. option key 'abc'
  84. option disabled '0'
  85. [...]
  86. config wifi-iface
  87. option device 'radio0'
  88. option network 'trm_wwan'
  89. option mode 'sta'
  90. option ssid 'example_01'
  91. option encryption 'psk2+ccmp'
  92. option key 'abc'
  93. option disabled '1'
  94. [...]
  95. config wifi-iface
  96. option device 'radio0'
  97. option network 'trm_wwan'
  98. option mode 'sta'
  99. option ssid 'example_02'
  100. option encryption 'psk2+ccmp'
  101. option key 'xyz'
  102. option disabled '1'
  103. [...]
  104. </code></pre>
  105. **4. start travelmate:**
  106. <pre><code>
  107. edit /etc/config/travelmate and set 'trm_enabled' to '1'
  108. /etc/init.d/travelmate restart
  109. </code></pre>
  110. ## FAQ
  111. **Q:** What's about 'trigger' and 'automatic' mode?
  112. **A:** In "trigger" mode travelmate will be triggered solely by procd interface down events, whenever an uplink disappears travelmate tries n times (default 3) to find a new uplink or reconnect to the old one. The 'automatic' mode keeps travelmate in an active state and checks every n seconds the connection status / the uplink availability regardless of procd event trigger.
  113. **Q:** What happen with misconfigured uplinks, e.g. due to outdated wlan passwords?
  114. **A:** Travelmate tries n times (default 3) to connect, then the respective uplink SSID will be marked / renamed to '_SSID_\_err'. In this case use the builtin wireless station manager to update your wireless credentials.
  115. ## Support
  116. 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)
  117. ## Removal
  118. * stop the travelmate daemon with _/etc/init.d/travelmate stop_
  119. * optional: remove the travelmate package (_opkg remove travelmate_)
  120. Have fun!
  121. Dirk