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.

139 lines
7.0 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. * continuously checks the existing uplink connection (quality), e.g. for conditional uplink (dis-) connections
  13. * captive portal detection with internet online check and a 'heartbeat' function to keep the uplink connection up & running
  14. * support of devices with multiple radios
  15. * procd init and hotplug support
  16. * runtime information available via LuCI & via 'status' init command
  17. * status & debug logging to syslog
  18. * optional: the LuCI frontend shows the WiFi QR codes from all configured Access Points. It allows you to connect your Android or iOS devices to your router’s WiFi using the QR code
  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. * optional: qrencode 4.x for QR code support
  23. ## Installation & Usage
  24. * download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/packages)
  25. * install 'travelmate' (_opkg install travelmate_)
  26. * configure your network:
  27. * recommended: use the LuCI frontend with builtin interface wizard and a wireless station manager
  28. * manual: see detailed configuration steps below
  29. * at least you need one configured AP and one STA interface
  30. ## LuCI travelmate companion package
  31. * download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/luci)
  32. * install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
  33. * the application is located in LuCI under 'Services' menu
  34. ## Travelmate config options
  35. * usually the pre-configured travelmate setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' section:
  36. * trm\_enabled => main switch to enable/disable the travelmate service (bool/default: '0', disabled)
  37. * trm\_debug => enable/disable debug logging (bool/default: '0', disabled)
  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 => overall retry timeout in seconds (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 begins (int/default: '2')
  46. ## Runtime information
  47. **receive travelmate runtime information:**
  48. <pre><code>
  49. ~# /etc/init.d/travelmate status
  50. ::: travelmate runtime information
  51. + travelmate_status : connected (net ok/37)
  52. + travelmate_version : 1.2.0
  53. + station_id : blackhole/01:02:03:04:05:06
  54. + station_interface : trm_wwan
  55. + station_radio : radio0
  56. + last_rundate : 04.04.2018 13:00:24
  57. + system : GL.iNet GL-AR750, OpenWrt SNAPSHOT r6588-16efb0c1c6
  58. </code></pre>
  59. ## Manual Setup
  60. **1. configure the travelmate wwan interface in /etc/config/network:**
  61. <pre><code>
  62. [...]
  63. config interface 'trm_wwan'
  64. option proto 'dhcp'
  65. [...]
  66. </code></pre>
  67. **2. add this interface to your firewall configuration in /etc/config/firewall:**
  68. <pre><code>
  69. [...]
  70. config zone
  71. option name 'wan'
  72. option network 'wan wan6 trm_wwan'
  73. [...]
  74. </code></pre>
  75. **3. at least add one ap and (multiple) wwan stations to your wireless configuration in etc/config/wireless:**
  76. <pre><code>
  77. [...]
  78. config wifi-iface
  79. option device 'radio0'
  80. option network 'lan'
  81. option mode 'ap'
  82. option ssid 'example_ap'
  83. option encryption 'psk2+ccmp'
  84. option key 'abc'
  85. option disabled '0'
  86. [...]
  87. config wifi-iface
  88. option device 'radio0'
  89. option network 'trm_wwan'
  90. option mode 'sta'
  91. option ssid 'example_usual'
  92. option encryption 'psk2+ccmp'
  93. option key 'abc'
  94. option disabled '1'
  95. [...]
  96. config wifi-iface
  97. option device 'radio0'
  98. option network 'trm_wwan'
  99. option mode 'sta'
  100. option ssid 'example_hidden'
  101. option bssid '00:11:22:33:44:55'
  102. option encryption 'psk2+ccmp'
  103. option key 'xyz'
  104. option disabled '1'
  105. [...]
  106. </code></pre>
  107. **4. start travelmate:**
  108. <pre><code>
  109. edit /etc/config/travelmate and set 'trm_enabled' to '1'
  110. /etc/init.d/travelmate restart
  111. </code></pre>
  112. ## FAQ
  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' and travelmate no longer attends this uplink. In this case use the builtin wireless station manager to update your wireless credentials.
  115. **Q:** How to connect to hidden uplinks?
  116. **A:** See 'example\_hidden' STA configuration above, option 'SSID' and 'BSSID' must be specified for successful connections.
  117. ## Support
  118. 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)
  119. ## Removal
  120. * stop the travelmate daemon with _/etc/init.d/travelmate stop_
  121. * optional: remove the travelmate package (_opkg remove travelmate_)
  122. Have fun!
  123. Dirk