Dirk Brenken 1aa4518dfc | 5 years ago | |
---|---|---|
.. | ||
README.md | 5 years ago | |
generic-user-pass.login | 5 years ago | |
travelmate.conf | 5 years ago | |
travelmate.init | 5 years ago | |
travelmate.sh | 5 years ago | |
wifionice.login | 5 years ago |
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.
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.
To avoid these kind of deadlocks, travelmate will set all station interfaces to an "always off" mode and connects automatically to available/configured hotspots.
For automated captive portal logins you could reference external shell scripts. All login scripts should be executable and located in '/etc/travelmate' with the extension '.login'. The provided 'wifionice.login' script example requires curl and automates the login to german ICE hotspots, it also explains the principle approach to extract runtime data like security tokens for a successful login. Hopefully more scripts for different captive portals will be provided by the community ...
A typical/successful captive portal login looks like this:
[...]
Mon Aug 5 10:15:48 2019 user.info travelmate-1.4.10[1481]: travelmate instance started ::: action: start, pid: 1481
Mon Aug 5 10:16:17 2019 user.info travelmate-1.4.10[1481]: captive portal login '/etc/travelmate/wifionice.login' for 'www.wifionice.de' has been executed with rc '0'
Mon Aug 5 10:16:23 2019 user.info travelmate-1.4.10[1481]: connected to uplink 'radio1/WIFIonICE/-' (1/5, GL.iNet GL-AR750S, OpenWrt SNAPSHOT r10644-cb49e46a8a)
[...]
receive travelmate runtime information:
~# /etc/init.d/travelmate status
::: travelmate runtime information
+ travelmate_status : connected (net ok/100)
+ travelmate_version : 1.4.10
+ station_id : radio1/blackhole/-
+ station_interface : trm_wwan
+ faulty_stations :
+ last_rundate : 2019.08.03-20:37:19
+ system : GL.iNet GL-AR750S, OpenWrt SNAPSHOT r10644-cb49e46a8a
To debug travelmate runtime problems, please always enable the 'trm_debug' flag, restart travelmate and scan the system log (logread -e "travelmate")
1. configure the travelmate wwan interface in /etc/config/network:
[...]
config interface 'trm_wwan'
option proto 'dhcp'
[...]
2. add this interface to your firewall configuration in /etc/config/firewall:
[...]
config zone
option name 'wan'
option network 'wan wan6 trm_wwan'
[...]
3. at least add one ap and (multiple) wwan stations to your wireless configuration in etc/config/wireless:
[...]
config wifi-iface
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'example_ap'
option encryption 'psk2+ccmp'
option key 'abc'
option disabled '0'
[...]
config wifi-iface
option device 'radio0'
option network 'trm_wwan'
option mode 'sta'
option ssid 'example_usual'
option encryption 'psk2+ccmp'
option key 'abc'
option disabled '1'
[...]
config wifi-iface
option device 'radio0'
option network 'trm_wwan'
option mode 'sta'
option ssid 'example_hidden'
option bssid '00:11:22:33:44:55'
option encryption 'psk2+ccmp'
option key 'xyz'
option disabled '1'
[...]
4. start travelmate:
edit /etc/config/travelmate and set 'trm_enabled' to '1'
/etc/init.d/travelmate restart
Please join the travelmate discussion in this forum thread or contact me by mail
Have fun!
Dirk