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.

143 lines
7.4 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. * proactively scan and switch to a higher prioritized uplink, despite of an already existing connection
  15. * support devices with multiple radios in any order
  16. * procd init and hotplug support
  17. * runtime information available via LuCI & via 'status' init command
  18. * status & debug logging to syslog
  19. * 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
  20. ## Prerequisites
  21. * [OpenWrt](https://openwrt.org), tested with the stable release series (18.06.x) and with the latest OpenWrt snapshot
  22. * iwinfo for wlan scanning, uclient-fetch for captive portal detection
  23. * optional: qrencode 4.x for QR code support
  24. ## Installation & Usage
  25. * download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/packages)
  26. * install 'travelmate' (_opkg install travelmate_)
  27. * configure your network:
  28. * recommended: use the LuCI frontend with builtin interface wizard and a wireless station manager
  29. * manual: see detailed configuration steps below
  30. * at least you need one configured AP and one STA interface
  31. ## LuCI travelmate companion package
  32. * download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/luci)
  33. * install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
  34. * the application is located in LuCI under 'Services' menu
  35. ## Travelmate config options
  36. * usually the pre-configured travelmate setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' section:
  37. * trm\_enabled => main switch to enable/disable the travelmate service (bool/default: '0', disabled)
  38. * trm\_debug => enable/disable debug logging (bool/default: '0', disabled)
  39. * trm\_captive => enable/disable the captive portal detection (bool/default: '1', enabled)
  40. * trm\_proactive => enable/disable the proactive uplink switch (bool/default: '1', enabled)
  41. * trm\_minquality => minimum signal quality threshold as percent for conditional uplink (dis-) connections (int/default: '35', valid range: 20-80)
  42. * trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (int/default: '30', valid range: 20-40)
  43. * trm\_maxretry => how many times should travelmate try to connect to an uplink (int/default: '3', valid range: 1-10)
  44. * trm\_timeout => overall retry timeout in seconds (int/default: '60', valid range: 30-300)
  45. * trm\_radio => limit travelmate to a single radio (e.g. 'radio1') or change the overall scanning priority (e.g. 'radio1 radio2 radio0') (default: not set, use all radios 0-n)
  46. * trm\_iface => main uplink / procd trigger network interface (default: trm_wwan)
  47. * trm\_triggerdelay => additional trigger delay in seconds before travelmate processing begins (int/default: '2')
  48. ## Runtime information
  49. **receive travelmate runtime information:**
  50. <pre><code>
  51. ~# /etc/init.d/travelmate status
  52. ::: travelmate runtime information
  53. + travelmate_status : connected (net ok/78)
  54. + travelmate_version : 1.2.3
  55. + station_id : radio1/blackhole/01:02:03:04:05:06
  56. + station_interface : trm_wwan
  57. + faulty_stations :
  58. + last_rundate : 07.09.2018 17:22:37
  59. + system : TP-LINK RE450, OpenWrt SNAPSHOT r8018-42f158314e
  60. </code></pre>
  61. ## Manual Setup
  62. **1. configure the travelmate wwan interface in /etc/config/network:**
  63. <pre><code>
  64. [...]
  65. config interface 'trm_wwan'
  66. option proto 'dhcp'
  67. [...]
  68. </code></pre>
  69. **2. add this interface to your firewall configuration in /etc/config/firewall:**
  70. <pre><code>
  71. [...]
  72. config zone
  73. option name 'wan'
  74. option network 'wan wan6 trm_wwan'
  75. [...]
  76. </code></pre>
  77. **3. at least add one ap and (multiple) wwan stations to your wireless configuration in etc/config/wireless:**
  78. <pre><code>
  79. [...]
  80. config wifi-iface
  81. option device 'radio0'
  82. option network 'lan'
  83. option mode 'ap'
  84. option ssid 'example_ap'
  85. option encryption 'psk2+ccmp'
  86. option key 'abc'
  87. option disabled '0'
  88. [...]
  89. config wifi-iface
  90. option device 'radio0'
  91. option network 'trm_wwan'
  92. option mode 'sta'
  93. option ssid 'example_usual'
  94. option encryption 'psk2+ccmp'
  95. option key 'abc'
  96. option disabled '1'
  97. [...]
  98. config wifi-iface
  99. option device 'radio0'
  100. option network 'trm_wwan'
  101. option mode 'sta'
  102. option ssid 'example_hidden'
  103. option bssid '00:11:22:33:44:55'
  104. option encryption 'psk2+ccmp'
  105. option key 'xyz'
  106. option disabled '1'
  107. [...]
  108. </code></pre>
  109. **4. start travelmate:**
  110. <pre><code>
  111. edit /etc/config/travelmate and set 'trm_enabled' to '1'
  112. /etc/init.d/travelmate restart
  113. </code></pre>
  114. ## FAQ
  115. **Q:** What happen with misconfigured, faulty uplinks, e.g. due to outdated wlan passwords?
  116. **A:** Travelmate tries n times (default 3) to connect, then the respective uplink will be marked as "faulty" in the JSON runtime file and hereafter ignored. To reset the JSON runtime file, simply restart travelmate.
  117. **Q:** How to connect to hidden uplinks?
  118. **A:** See 'example\_hidden' STA configuration above, option 'SSID' and 'BSSID' must be specified for successful connections.
  119. **Q:** Any recommendations regarding suitable DNS settings to easily connect to captive portals?
  120. **A:** Use a simple DNS forwarder like dnsmasq and disable the option 'rebind_protection'.
  121. ## Support
  122. 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)
  123. ## Removal
  124. * stop the travelmate daemon with _/etc/init.d/travelmate stop_
  125. * optional: remove the travelmate package (_opkg remove travelmate_)
  126. Have fun!
  127. Dirk