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.

132 lines
5.7 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. * fast uplink connections
  10. * manual / automatic mode support, the latter one checks the existing uplink connection regardless of ifdown event trigger every n seconds
  11. * support of devices with multiple radios
  12. * procd init and hotplug support
  13. * runtime information available via LuCI & via 'status' init command
  14. * status & debug logging to syslog
  15. ## Prerequisites
  16. * [LEDE](https://www.lede-project.org) 17.01 or latest snapshot
  17. * iw (default) or iwinfo for wlan scanning
  18. ## LEDE trunk Installation & Usage
  19. * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages)
  20. * install 'travelmate' (_opkg install travelmate_)
  21. * configure your network to support (multiple) wlan uplinks and set travelmate config options (see below)
  22. * set 'trm\_enabled' option in travelmate config to '1'
  23. * travelmate starts automatically during boot and will be triggered by procd interface triggers
  24. ## LuCI travelmate companion package
  25. * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci)
  26. * install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
  27. * the application is located in LuCI under 'Services' menu
  28. ## Travelmate config options
  29. * travelmate config options:
  30. * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
  31. * trm\_debug => enable/disable debug logging (default: '0', disabled)
  32. * trm\_automatic => keep travelmate in an active state (default: '1', enabled)
  33. * trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (default: '30')
  34. * trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3')
  35. * trm\_timeout => timeout in seconds for "automatic mode" (default: '60')
  36. * trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw)
  37. * trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
  38. * trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: wwan)
  39. * trm\_triggerdelay => additional trigger delay in seconds before travelmate processing starts (default: '2')
  40. ## Runtime information
  41. **receive travelmate runtime information:**
  42. <pre><code>
  43. root@adb2go:/tmp# /etc/init.d/travelmate status
  44. ::: travelmate runtime information
  45. travelmate_version : 0.7.0
  46. station_connection : true
  47. station_ssid : blackhole
  48. station_interface : wwan
  49. station_radio : radio1
  50. last_rundate : 20.04.2017 08:54:48
  51. system : LEDE Reboot SNAPSHOT r3974-56457dbcb7
  52. </code></pre>
  53. ## Setup
  54. **1. configure a wwan interface in /etc/config/network:**
  55. <pre><code>
  56. [...]
  57. config interface 'wwan'
  58. option proto 'dhcp'
  59. [...]
  60. </code></pre>
  61. **2. add this interface to your firewall configuration in /etc/config/firewall:**
  62. <pre><code>
  63. [...]
  64. config zone
  65. option name 'wan'
  66. option network 'wan wan6 wwan'
  67. [...]
  68. </code></pre>
  69. **3. add required ap and wwan stations to your wireless configuration in etc/config/wireless:**
  70. <pre><code>
  71. [...]
  72. config wifi-iface
  73. option device 'radio0'
  74. option network 'lan'
  75. option mode 'ap'
  76. option ssid 'example_ap'
  77. option encryption 'psk2+ccmp'
  78. option key 'abc'
  79. option disabled '0'
  80. [...]
  81. config wifi-iface
  82. option device 'radio0'
  83. option network 'wwan'
  84. option mode 'sta'
  85. option ssid 'example_01'
  86. option encryption 'psk2+ccmp'
  87. option key 'abc'
  88. option disabled '1'
  89. config wifi-iface
  90. option device 'radio0'
  91. option network 'wwan'
  92. option mode 'sta'
  93. option ssid 'example_02'
  94. option encryption 'psk2+ccmp'
  95. option key 'xyz'
  96. option disabled '1'
  97. config wifi-iface
  98. option device 'radio0'
  99. option network 'wwan'
  100. option mode 'sta'
  101. option ssid 'example_03'
  102. option encryption 'none'
  103. option disabled '1'
  104. [...]
  105. </code></pre>
  106. **4. reload network configuration & start travelmate:**
  107. <pre><code>
  108. /etc/init.d/network reload
  109. /etc/init.d/travelmate start
  110. </code></pre>
  111. ## Support
  112. 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)
  113. ## Removal
  114. * stop the travelmate daemon with _/etc/init.d/travelmate stop_
  115. * optional: remove the travelmate package (_opkg remove travelmate_)
  116. Have fun!
  117. Dirk