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.

125 lines
5.6 KiB

  1. # travelmate, a 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. * install 'travelmate' (_opkg install travelmate_)
  18. * configure your network to support (multiple) wlan uplinks and set travelmate config options (details see below)
  19. * travelmate starts automatically during boot, triggered by procd as soon as the wireless subsystem is up & running
  20. ## Chaos Calmer installation notes
  21. * 'travelmate' is _not_ available as an ipk package in the Chaos Calmer download repository
  22. * download the package from a development snapshot package directory:
  23. * for 'travelmate' look [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages/)
  24. * manually transfer the package to your routers temp directory (with tools like _sshfs_ or _winscp_)
  25. * install the package as described above
  26. ## Travelmate config options
  27. * mandatory config options:
  28. * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
  29. * trm\_loop => loop timeout in seconds for wlan monitoring (default: '30')
  30. * trm\_maxretry => how many times should travelmate try to connect to uplink xyz (default: '3')
  31. * optional config options:
  32. * trm\_debug => enable/disable debug logging (default: '0', disabled)
  33. * trm\_device => limit travelmate to a dedicated radio, i.e 'radio0' (default: '', use all radios)
  34. * trm\_iw => force travelmate to use iwinfo (even if iw is installed) set this option to 'none' (default: '', use iw if found)
  35. ## Setup
  36. **1. configure (multiple) wwan interfaces in /etc/config/network:**
  37. <pre><code>
  38. [...]
  39. config interface 'wwan01'
  40. option proto 'dhcp'
  41. config interface 'wwan02'
  42. option proto 'dhcp'
  43. config interface 'wwan03'
  44. option proto 'dhcp'
  45. [...]
  46. </code></pre>
  47. **2. add these interfaces to your firewall configuration in /etc/config/firewall:**
  48. <pre><code>
  49. [...]
  50. config zone
  51. option name 'wan'
  52. option input 'REJECT'
  53. option output 'ACCEPT'
  54. option forward 'REJECT'
  55. option masq '1'
  56. option mtu_fix '1'
  57. option network 'wan wan6 wwan01 wwan02 wwan03 [...]'
  58. [...]
  59. </code></pre>
  60. **3. add required station interfaces to your wireless configuration in etc/config/wireless:**
  61. <pre><code>
  62. [...]
  63. config wifi-iface
  64. option device 'radio0'
  65. option network 'wwan01'
  66. option mode 'sta'
  67. option ssid 'example_01'
  68. option ifname 'wlan1'
  69. option encryption 'psk2+ccmp'
  70. option key 'abc'
  71. option disabled '1'
  72. config wifi-iface
  73. option device 'radio0'
  74. option network 'wwan02'
  75. option mode 'sta'
  76. option ssid 'example_02'
  77. option ifname 'wlan2'
  78. option encryption 'psk2+ccmp'
  79. option key 'xyz'
  80. option disabled '1'
  81. config wifi-iface
  82. option device 'radio0'
  83. option network 'wwan03'
  84. option mode 'sta'
  85. option ssid 'Telekom_ICE'
  86. option ifname 'wlan3'
  87. option encryption 'none'
  88. option disabled '1'
  89. [...]
  90. </code></pre>
  91. **4. configure & start travelmate:**
  92. <pre><code>
  93. /etc/init.d/network reload
  94. /etc/init.d/travelmate start
  95. </code></pre>
  96. **Common runtime outputs**
  97. **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"
  98. **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
  99. **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
  100. **Uplink disappeared:** Sun Oct 9 19:00:28 2016 user.notice root: travelmate-0.2.1[3876] info : uplink "Neffos C5L" get lost
  101. ## Support
  102. 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)
  103. ## Removal
  104. * stop the travelmate daemon with _/etc/init.d/travelmate stop_
  105. * optional: remove the travelmate package (_opkg remove travelmate_)
  106. Have fun!
  107. Dirk