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
6.6 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/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.
  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/LEDE environment
  9. * strong LuCI-Support with builtin interface wizard and a wireless station manager
  10. * fast uplink connections
  11. * manual / automatic mode support, the latter one checks the existing uplink connection regardless of ifdown event trigger actions every n seconds
  12. * support of devices with multiple radios
  13. * procd init and hotplug support
  14. * runtime information available via LuCI & via 'status' init command
  15. * status & debug logging to syslog
  16. ## Prerequisites
  17. * [LEDE](https://www.lede-project.org) 17.01 or latest snapshot
  18. * iwinfo for wlan scanning
  19. ## LEDE trunk Installation & Usage
  20. * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages)
  21. * install 'travelmate' (_opkg install travelmate_)
  22. * configure your network:
  23. * recommended: use the LuCI frontend with builtin interface wizard and a wireless station manager
  24. * manual: see detailed configure steps below
  25. * at least you need one configured AP and one STA interface
  26. ## LuCI travelmate companion package
  27. * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci)
  28. * install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
  29. * the application is located in LuCI under 'Services' menu
  30. ## Travelmate config options
  31. * usually the pre-configured travelmate setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' config section:
  32. * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
  33. * trm\_debug => enable/disable debug logging (default: '0', disabled)
  34. * trm\_automatic => keep travelmate in an active state (default: '1', enabled)
  35. * trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (default: '30')
  36. * trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3')
  37. * trm\_timeout => timeout in seconds for "automatic mode" (default: '60')
  38. * trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
  39. * trm\_iface => main uplink / procd trigger network interface (default: trm_wwan)
  40. * trm\_triggerdelay => additional trigger delay in seconds before travelmate processing starts (default: '2')
  41. ## Runtime information
  42. **receive travelmate runtime information:**
  43. <pre><code>
  44. root@adb2go:~# /etc/init.d/travelmate status
  45. ::: travelmate runtime information
  46. travelmate_version : 0.9.1
  47. station_connection : true
  48. station_ssid : blackhole.nl
  49. station_interface : trm_wwan
  50. station_radio : radio1
  51. last_rundate : 29.07.2017 18:02:01
  52. system : LEDE Reboot SNAPSHOT r4639-eb43a817f7
  53. </code></pre>
  54. ## Manual Setup
  55. **1. configure the travelmate wwan interface in /etc/config/network:**
  56. <pre><code>
  57. [...]
  58. config interface 'trm_wwan'
  59. option proto 'dhcp'
  60. [...]
  61. </code></pre>
  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 trm_wwan'
  68. [...]
  69. </code></pre>
  70. **3. at least add one ap and (multiple) wwan stations to your wireless configuration in etc/config/wireless:**
  71. <pre><code>
  72. [...]
  73. config wifi-iface
  74. option device 'radio0'
  75. option network 'lan'
  76. option mode 'ap'
  77. option ssid 'example_ap'
  78. option encryption 'psk2+ccmp'
  79. option key 'abc'
  80. option disabled '0'
  81. [...]
  82. config wifi-iface
  83. option device 'radio0'
  84. option network 'trm_wwan'
  85. option mode 'sta'
  86. option ssid 'example_01'
  87. option encryption 'psk2+ccmp'
  88. option key 'abc'
  89. option disabled '1'
  90. [...]
  91. config wifi-iface
  92. option device 'radio0'
  93. option network 'trm_wwan'
  94. option mode 'sta'
  95. option ssid 'example_02'
  96. option encryption 'psk2+ccmp'
  97. option key 'xyz'
  98. option disabled '1'
  99. [...]
  100. </code></pre>
  101. **4. start travelmate:**
  102. <pre><code>
  103. edit /etc/config/travelmate and set 'trm_enabled' to '1'
  104. /etc/init.d/travelmate restart
  105. </code></pre>
  106. ## FAQ
  107. **Q:** What's about 'manual' and 'automatic' mode?
  108. **A:** In "manual" 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.
  109. **Q:** What happen with misconfigured uplinks, e.g. due to outdated wlan passwords?
  110. **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.
  111. **Q:** Is travelmate compatible with CC/Openwrt?
  112. **A:** Travelmate was never tested with an ancient CC/OpenWrt release ... it should still work, but no promises.
  113. [...] to be continued [...]
  114. ## Support
  115. 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)
  116. ## Removal
  117. * stop the travelmate daemon with _/etc/init.d/travelmate stop_
  118. * optional: remove the travelmate package (_opkg remove travelmate_)
  119. Have fun!
  120. Dirk