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.

128 lines
5.9 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, connects automatically to available hotspots and monitor & change these uplink connections automatically if required.
  6. ## Main Features
  7. * STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible
  8. * fast uplink connections
  9. * reliable connection tracking
  10. * easy setup within normal OpenWrt/LEDE environment
  11. * status & debug logging to syslog
  12. * procd init system support
  13. ## Prerequisites
  14. * [OpenWrt](https://openwrt.org) or [LEDE](https://www.lede-project.org) trunk
  15. * iw (default) or iwinfo for wlan scanning
  16. ## OpenWrt / LEDE trunk Installation & Usage
  17. * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages)
  18. * install 'travelmate' (_opkg install travelmate_)
  19. * configure your network to support (multiple) wlan uplinks and set travelmate config options (details see below)
  20. * set 'trm\_enabled' option in travelmate config to '1'
  21. * travelmate starts automatically during boot, triggered by procd as soon as the wireless subsystem is up & running
  22. ## LuCI travelmate companion package
  23. * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci)
  24. * install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
  25. * the application is located in LuCI under 'Services' menu
  26. * _Thanks to Hannu Nyman for this great LuCI frontend!_
  27. ## Chaos Calmer installation notes
  28. * 'travelmate' and 'luci-app-travelmate' are _not_ available as ipk packages in the Chaos Calmer download repository
  29. * download the packages from a development snapshot directory (see download links above)
  30. * manually transfer the packages to your routers temp directory (with tools like _sshfs_ or _winscp_)
  31. * install the packages as described above
  32. ## Travelmate config options
  33. * mandatory config options:
  34. * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
  35. * trm\_loop => loop timeout in seconds for wlan monitoring (default: '30')
  36. * trm\_maxretry => how many times should travelmate try to connect to a certain uplink, to disable this check at all set it to '0' (default: '3')
  37. * optional config options:
  38. * trm\_debug => enable/disable debug logging (default: '0', disabled)
  39. * trm\_device => limit travelmate to a dedicated radio, i.e 'radio0' (default: use all radios)
  40. * trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw)
  41. ## Setup
  42. **1. configure a wwan interface in /etc/config/network:**
  43. <pre><code>
  44. [...]
  45. config interface 'wwan'
  46. option proto 'dhcp'
  47. [...]
  48. </code></pre>
  49. **2. add this interface to your firewall configuration in /etc/config/firewall:**
  50. <pre><code>
  51. [...]
  52. config zone
  53. option name 'wan'
  54. option input 'REJECT'
  55. option output 'ACCEPT'
  56. option forward 'REJECT'
  57. option masq '1'
  58. option mtu_fix '1'
  59. option network 'wan wan6 wwan'
  60. [...]
  61. </code></pre>
  62. **3. add required wwan stations to your wireless configuration in etc/config/wireless:**
  63. <pre><code>
  64. [...]
  65. config wifi-iface
  66. option device 'radio0'
  67. option network 'wwan'
  68. option mode 'sta'
  69. option ssid 'example_01'
  70. option ifname 'wwan01'
  71. option encryption 'psk2+ccmp'
  72. option key 'abc'
  73. option disabled '1'
  74. config wifi-iface
  75. option device 'radio0'
  76. option network 'wwan'
  77. option mode 'sta'
  78. option ssid 'example_02'
  79. option ifname 'wwan02'
  80. option encryption 'psk2+ccmp'
  81. option key 'xyz'
  82. option disabled '1'
  83. config wifi-iface
  84. option device 'radio0'
  85. option network 'wwan'
  86. option mode 'sta'
  87. option ssid 'example_03'
  88. option ifname 'wwan03'
  89. option encryption 'none'
  90. option disabled '1'
  91. [...]
  92. </code></pre>
  93. **4. reload network configuration & start travelmate:**
  94. <pre><code>
  95. /etc/init.d/network reload
  96. /etc/init.d/travelmate start
  97. </code></pre>
  98. **Common runtime outputs (visible via logread)**
  99. **Success:** Sun Oct 9 17:02:21 2016 user.notice root: travelmate-0.2.1[712] info : wlan interface "wwan06" connected to uplink "blackhole.nl"
  100. **Disabled service:** Sun Oct 9 18:06:32 2016 user.notice root: travelmate-0.2.1[2379] info : travelmate is currently disabled, please set 'trm_enabled' to use this service
  101. **Misconfigured/broken uplink:** Sun Oct 9 18:56:42 2016 user.notice root: travelmate-0.2.1[2435] info : uplink "blackhole.nl" disabled due to permanent connection failures
  102. **Uplink disappeared:** Sun Oct 9 19:00:28 2016 user.notice root: travelmate-0.2.1[3876] info : uplink "Neffos C5L" get lost
  103. ## Support
  104. 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)
  105. ## Removal
  106. * stop the travelmate daemon with _/etc/init.d/travelmate stop_
  107. * optional: remove the travelmate package (_opkg remove travelmate_)
  108. Have fun!
  109. Dirk