lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

README.md (5999B)


      1 # travelmate, a wlan connection manager for travel router
      2 
      3 ## Description
      4 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.  
      5 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.  
      6 To avoid these kind of deadlocks, travelmate set all station interfaces in an "always off" mode and connects automatically to available/configured hotspots.  
      7 
      8 ## Main Features
      9 * STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible
     10 * easy setup within normal OpenWrt/LEDE environment
     11 * fast uplink connections
     12 * manual / automatic mode support, the latter one checks the existing uplink connection regardless of ifdown event trigger every n seconds
     13 * support of devices with multiple radios
     14 * procd init and hotplug support
     15 * runtime information accessible via ubus service call
     16 * status & debug logging to syslog
     17 
     18 ## Prerequisites
     19 * [OpenWrt](https://openwrt.org) or [LEDE](https://www.lede-project.org) trunk
     20 * iw (default) or iwinfo for wlan scanning
     21 
     22 ## OpenWrt / LEDE trunk Installation & Usage
     23 * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages)
     24 * install 'travelmate' (_opkg install travelmate_)
     25 * configure your network to support (multiple) wlan uplinks and set travelmate config options (see below)
     26 * set 'trm\_enabled' option in travelmate config to '1'
     27 * travelmate starts automatically during boot and will be triggered by procd interface triggers
     28 
     29 ## LuCI travelmate companion package
     30 * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci)
     31 * install 'luci-app-travelmate' (_opkg install luci-app-travelmate_)
     32 * the application is located in LuCI under 'Services' menu
     33 * _Thanks to Hannu Nyman for this great LuCI frontend!_
     34 
     35 ## Travelmate config options
     36 * travelmate config options:
     37     * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
     38     * trm\_debug => enable/disable debug logging (default: '0', disabled)
     39     * trm\_automatic => keep travelmate in an active state (default: '1', enabled)
     40     * trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (default: '30')
     41     * trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3')
     42     * trm\_timeout => timeout in seconds for "automatic mode" (default: '60')
     43     * trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw)
     44     * trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
     45     * trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: wan wwan)
     46 
     47 
     48 ## Runtime information
     49 
     50 **receive travelmate information via ubus:**
     51 <pre><code>
     52 ubus call service get_data '{"name":"travelmate"}'
     53 This will output the current connection status, e.g.:
     54 {
     55     "travelmate": {
     56         "travelmate": {
     57             "last_rundate": "02.04.2017 07:22:03",
     58             "online_status": "true",
     59             "station_interface": "wwan",
     60             "station_radio": "radio1",
     61             "station_ssid": "blackhole",
     62             "system": "LEDE Reboot SNAPSHOT r3888-8fb39f1682",
     63             "travelmate_version": "0.6.0"
     64         }
     65     }
     66 }
     67 </code></pre>
     68 
     69 ## Setup
     70 **1. configure a wwan interface in /etc/config/network:**
     71 <pre><code>
     72 [...]
     73 config interface 'wwan'
     74         option proto 'dhcp'
     75 [...]
     76 </code></pre>
     77 
     78 **2. add this interface to your firewall configuration in /etc/config/firewall:**
     79 <pre><code>
     80 [...]
     81 config zone
     82         option name 'wan'
     83         option network 'wan wan6 wwan'
     84 [...]
     85 </code></pre>
     86 
     87 **3. add required ap and wwan stations to your wireless configuration in etc/config/wireless:**
     88 <pre><code>
     89 [...]
     90 config wifi-iface
     91         option device 'radio0'
     92         option network 'lan'
     93         option mode 'ap'
     94         option ssid 'example_ap'
     95         option encryption 'psk2+ccmp'
     96         option key 'abc'
     97         option disabled '0'
     98 [...]
     99 config wifi-iface
    100         option device 'radio0'
    101         option network 'wwan'
    102         option mode 'sta'
    103         option ssid 'example_01'
    104         option encryption 'psk2+ccmp'
    105         option key 'abc'
    106         option disabled '1'
    107 config wifi-iface
    108         option device 'radio0'
    109         option network 'wwan'
    110         option mode 'sta'
    111         option ssid 'example_02'
    112         option encryption 'psk2+ccmp'
    113         option key 'xyz'
    114         option disabled '1'
    115 config wifi-iface
    116         option device 'radio0'
    117         option network 'wwan'
    118         option mode 'sta'
    119         option ssid 'example_03'
    120         option encryption 'none'
    121         option disabled '1'
    122 [...]
    123 </code></pre>
    124 
    125 **4. reload network configuration & start travelmate:**
    126 <pre><code>
    127 /etc/init.d/network reload
    128 /etc/init.d/travelmate start
    129 </code></pre>
    130 
    131 ## Support
    132 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)  
    133 
    134 ## Removal
    135 * stop the travelmate daemon with _/etc/init.d/travelmate stop_
    136 * optional: remove the travelmate package (_opkg remove travelmate_)
    137 
    138 Have fun!  
    139 Dirk