Travelmate support thread

I'm making a feature request then. Any chance you could implement that? Default OpenWRT behavior (disable AP if STA isn't connected) is ridicoulus.

Nope, travelmate focus solely on travel router use.

I guess it would have to be a new app - Repeatmate :wink: Anyway, I'm just throwing it out there.

After a quite long time I come up with a new travelmate pre-release, see here for details.

1 Like

I'm trying to setup in vehicle routers as I'm installing printers in my service vans.

Previously they just had laptops and would either tether to their phone or the in vehicle hotspot if it was equipped. This had plenty of issues (people would often use the slow/unreliable cellular when they were at our shop with fiber, people trying to choose networks on their devices and disabling auto-connect, etc), and making a networked printer work reliably in this kind of network where there is basically no configuration without needing to configure anything is proving impossible. So I ordered a GL-AR150 travel router, installed OpenWRT, Travelmate, and all went well. Until they started using it, and when they drive through (or maybe start the vehicle) in areas with no signal, apparently Travelmate determines the connection is bad, and stops retrying, and the max retries is only 10 and for 300 seconds, but the cellular issue could exist longer then that. Is there a way to make that unlimited or otherwise solve my issue?

To be honest, I didn't understand your problem ... anyway, to raise the maxretry range, change line 124 in /usr/bin/travelmate.sh:

Hi @dibdot,
I am currently trying to use the travelmate plugin to automatically login to a public wifi.
Therefore i caputured the login process, which is really static. It requires no cookies or tokens to be generated, just a single http POST request with the username and password.

I've created a small script out of it, that i placed in the /etc/travelmate folder

root@OpenWrt:/etc/travelmate# cat hotspot.login 
#!/bin/sh

curl --location --request POST '172.23.208.13:8000/' \
--header 'Origin: http://172.23.208.13:8000' \
--header ': ' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'auth_user=xxx' \
--data-urlencode 'auth_pass=xxx' \
--data-urlencode 'redirurl=google.com' \
--data-urlencode 'auth_voucher=' \
--data-urlencode 'accept=Weiter'

It works when i execute it manually (i added the curl package to openwrt) but it doesn't get triggered automatically when OpenWRT / Travelmate connects to the access point.
How can i change this?
Best wishes and thanks for this package :slight_smile:

Please post your travelmate config and an excerpt of your logfile in debug mode when travelmate is trying to connect to that uplink - thanks!

Of course, here you go:
Travelmate Config:

config travelmate 'global'
	option trm_captive '1'
	option trm_triggerdelay '2'
	option trm_maxretry '3'
	option trm_maxwait '30'
	option trm_timeout '60'
	option trm_rtfile '/tmp/trm_runtime.json'
	option trm_minquality '20'
	option trm_iface 'wwan'
	option trm_debug '0'
	option trm_enabled '1'

Travelmate Logfile:

Mon Oct  5 07:35:08 2020 user.info travelmate-1.2.2[869]: travelmate instance started ::: action: start, pid: 869
Mon Oct  5 07:35:14 2020 user.debug travelmate-1.2.2[869]: f_jsnup::: config: @wifi-iface[0], status: not connected, sta_iface: wwan, sta_radio: radio0, sta_essid: Akademie, sta_bssid: -, faulty_list: -
Mon Oct  5 07:35:14 2020 user.debug travelmate-1.2.2[869]: f_check::: mode: initial, name: -, status: false, quality: 0, connection: -, wait: 1, max_wait: 30, min_quality: 20, captive: 1
Mon Oct  5 07:35:15 2020 user.debug travelmate-1.2.2[869]: f_prep ::: config: cfg023579, mode: sta, network: wwan, eap_rc: 0, radio: radio0, trm_radio: -, disabled: 0
Mon Oct  5 07:35:16 2020 user.debug travelmate-1.2.2[869]: f_prep ::: config: cfg033579, mode: sta, network: wwan, eap_rc: 0, radio: radio0, trm_radio: -, disabled: 1
Mon Oct  5 07:35:17 2020 user.debug travelmate-1.2.2[869]: f_prep ::: config: cfg043579, mode: sta, network: trm_wwan, eap_rc: 0, radio: radio0, trm_radio: -, disabled: 1
Mon Oct  5 07:35:17 2020 user.debug travelmate-1.2.2[869]: f_prep ::: config: cfg053579, mode: sta, network: wwan_guro, eap_rc: 0, radio: radio0, trm_radio: -, disabled: 1
Mon Oct  5 07:35:18 2020 user.debug travelmate-1.2.2[869]: f_prep ::: config: cfg063579, mode: sta, network: wwan_vodafone, eap_rc: 0, radio: radio0, trm_radio: -, disabled: 1
Mon Oct  5 07:35:18 2020 user.debug travelmate-1.2.2[869]: f_prep ::: config: cfg073579, mode: sta, network: wwan_vodafone_beste, eap_rc: 0, radio: radio0, trm_radio: -, disabled: 1
Mon Oct  5 07:35:19 2020 user.debug travelmate-1.2.2[869]: f_jsnup::: config: -, status: running, sta_iface: -, sta_radio: -, sta_essid: -, sta_bssid: -, faulty_list: -
Mon Oct  5 07:35:31 2020 user.debug travelmate-1.2.2[869]: f_check::: mode: dev, name:  radio0, status: running, quality: 0, connection: -, wait: 13, max_wait: 30, min_quality: 20, captive: 1
Mon Oct  5 07:35:31 2020 user.debug travelmate-1.2.2[869]: f_main ::: iwinfo: /usr/bin/iwinfo, dev_list:  radio0, sta_list:  cfg023579_radio0 cfg033579_radio0, faulty_list: -
Mon Oct  5 07:35:33 2020 user.debug travelmate-1.2.2[869]: f_main ::: dev: radio0, scan_list: 78,44:4E:6D:9D:6F:E4,"LauRou",60,90:5C:44:A5:4D:02,"UPC59C4D57",55,72:06:EE:17:8B:70,"Freifunk",54,92:5C:14:A5:4D:02,"Vodafone Hotspot",52,F0:86:20:B0:83:44,"WLAN-864065",51,B0:6E:BF:3C:56:F8,"Martin Router King",50,E0:28:6D:3C:A8:D5,"FRITZ!Box 7560 XV",50,90:5C:44:2E:7B:5D,"UPC4CCB8A7",47,5E:6F:8C:82:F0:68,"Akademie",45,2C:3A:FD:A3:F9:36,"FRITZ!Box 6591 Cable IP",42,F0:86:20:8F:F1:96,"Telekom_FON",41,5C:E2:8C:84:B1:8D,"Akademie",40,5E:B6:80:EE:32:B7,"Akademie",38,5E:8D:8C:84:B1:8E,"Akademie",37,9C:C7:A6:9F:B1:A6,"MyWiFi_APV",37,5C:E2:8C:9F:2B:AA,"Akademie",37,5C:E2:8C:7D:6F:D7,"Akademie",35,16:0A:C5:2B:63:92,unknown,34,CC:CE:1E:90:5F:00,"big-g",34,98:9B:CB:15:75:99,"FRITZ!Box 7520 AQ",32,78:DD:12:8A:5A:04,, cnt: 1, max_cnt: 3
Mon Oct  5 07:35:33 2020 user.debug travelmate-1.2.2[869]: f_main ::: scan_quality: 47, scan_bssid: 5E:6F:8C:82:F0:68, scan_essid: "Akademie"
Mon Oct  5 07:35:46 2020 user.debug travelmate-1.2.2[869]: f_check::: mode: sta, name: wlan0, status: true, quality: 42, connection: -, wait: 12, max_wait: 30, min_quality: 20, captive: 1
Mon Oct  5 07:35:47 2020 user.debug travelmate-1.2.2[869]: f_jsnup::: config: @wifi-iface[0], status: connected (net cp '172.23.208.13'/42), sta_iface: wwan, sta_radio: radio0, sta_essid: Akademie, sta_bssid: -, faulty_list: -
Mon Oct  5 07:35:47 2020 user.debug travelmate-1.2.2[869]: f_check::: mode: initial, name: wlan0, status: true, quality: 42, connection: net cp '172.23.208.13'/42, wait: 1, max_wait: 30, min_quality: 20, captive: 1
Mon Oct  5 07:35:47 2020 user.info travelmate-1.2.2[869]: connected to uplink 'radio0/Akademie/-' (TP-Link CPE210 v1.1, OpenWrt 18.06.4 r7808-ef686b7292)

Well, travelmate 1.2.2 is really old stuff and doesn't support auto-logins ... auto-login support has been added with 1.4.10:

image

And "no", I've never tested that with 18.06 ... :wink:

Oh well that was obvious... :laughing:
I was always wondering where the hell i can enable the login script.
Thanks you, i updated Travelmate and OpenWRT and now everything works as expected.
Great plugin :+1:

Seems like I didn't test it enough.
The captive portal just reappeared
Here are the logs

Mon Oct  5 09:12:41 2020 user.info travelmate-1.5.4[1010]: travelmate instance started ::: action: start, pid: 1010
Mon Oct  5 09:13:05 2020 user.info travelmate-1.5.4[1010]: connected to uplink 'radio0/Akademie Gut Rosenberg/-' (1/3, TP-Link CPE210 v1.1, OpenWrt 19.07.4 r11208-ce6496d796)
Mon Oct  5 09:15:35 2020 user.info travelmate-1.5.4[2544]: travelmate instance stopped ::: action: stop, pid: 1010
Mon Oct  5 09:15:36 2020 user.info travelmate-1.5.4[2603]: travelmate instance started ::: action: start, pid: 2603
Mon Oct  5 09:16:17 2020 user.debug travelmate-1.5.4[2853]: f_prepdev ::: config: radio0, disabled: -
Mon Oct  5 09:16:17 2020 user.debug travelmate-1.5.4[2853]: f_env     ::: trm_eapcheck: 1, trm_saecheck: 1, trm_owecheck: 1, trm_wificmd: reload
Mon Oct  5 09:16:17 2020 user.info travelmate-1.5.4[2853]: travelmate instance stopped ::: action: stop, pid: 2603
Mon Oct  5 09:16:17 2020 user.debug travelmate-1.5.4[2914]: f_prepdev ::: config: radio0, disabled: -
Mon Oct  5 09:16:17 2020 user.debug travelmate-1.5.4[2914]: f_env     ::: trm_eapcheck: 1, trm_saecheck: 1, trm_owecheck: 1, trm_wificmd: reload
Mon Oct  5 09:16:18 2020 user.info travelmate-1.5.4[2914]: travelmate instance started ::: action: start, pid: 2914
Mon Oct  5 09:16:18 2020 user.debug travelmate-1.5.4[2914]: f_prepdev ::: config: radio0, disabled: -
Mon Oct  5 09:16:18 2020 user.debug travelmate-1.5.4[2914]: f_env     ::: trm_eapcheck: 1, trm_saecheck: 1, trm_owecheck: 1, trm_wificmd: reload
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_net     ::: fetch: /bin/uclient-fetch, timeout: 5, url: http://captive.apple.com, result: net ok
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_jsnup   ::: uci_section: radio0_Akademie_Gut_Rosenberg_, status: connected (net ok/45), sta_iface: wwan, sta_radio: radio0, sta_essid: Akademie Gut Rosenberg, sta_bssid: -, faulty_list: -, list_expiry: 0
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_check   ::: mode: initial, name: wlan0, status: true, connection: net ok/45, wait: 1, max_wait: 30, min_quality: 20, captive: 1, netcheck: 0
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_main    ::: status: true, proactive: 1
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_prepif  ::: config: radio0_Akademie_Gut_Rosenberg_, mode: sta, network: wwan, radio: radio0, trm_radio: -, trm_active_sta: radio0_Akademie_Gut_Rosenberg_, proactive: 1, disabled: 0
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_prepif  ::: config: trm_Vodafone_Hotspot, mode: sta, network: wwan, radio: radio0, trm_radio: -, trm_active_sta: radio0_Akademie_Gut_Rosenberg_, proactive: 1, disabled: 1
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_prepif  ::: config: trm_Freifunk, mode: sta, network: wwan, radio: radio0, trm_radio: -, trm_active_sta: radio0_Akademie_Gut_Rosenberg_, proactive: 1, disabled: 1
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_prepif  ::: config: trm_Telekom_FON, mode: sta, network: wwan, radio: radio0, trm_radio: -, trm_active_sta: radio0_Akademie_Gut_Rosenberg_, proactive: 1, disabled: 1
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_check   ::: mode: dev, name: radio0, status: true, connection: net ok/45, wait: 1, max_wait: 30, min_quality: 20, captive: 1, netcheck: 0
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_main    ::: active_radio: radio0, active_essid: "Akademie Gut Rosenberg", active_bssid: -
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_main    ::: iwinfo: /usr/bin/iwinfo, dev_list: radio0, sta_list: radio0_Akademie_Gut_Rosenberg_-radio0 trm_Vodafone_Hotspot-radio0 trm_Freifunk-radio0 trm_Telekom_FON-radio0, faulty_list: -
Mon Oct  5 09:16:19 2020 user.debug travelmate-1.5.4[2914]: f_main    ::: active station prioritized 'radio0/Akademie Gut Rosenberg/-' - break
Mon Oct  5 09:16:20 2020 user.debug travelmate-1.5.4[2914]: f_net     ::: fetch: /bin/uclient-fetch, timeout: 5, url: http://captive.apple.com, result: net ok
Mon Oct  5 09:16:20 2020 user.debug travelmate-1.5.4[2914]: f_jsnup   ::: uci_section: radio0_Akademie_Gut_Rosenberg_, status: connected (net ok/45), sta_iface: wwan, sta_radio: radio0, sta_essid: Akademie Gut Rosenberg, sta_bssid: -, faulty_list: -, list_expiry: 0
Mon Oct  5 09:16:20 2020 user.debug travelmate-1.5.4[2914]: f_check   ::: mode: initial, name: wlan0, status: true, connection: net ok/45, wait: 1, max_wait: 30, min_quality: 20, captive: 1, netcheck: 0
Mon Oct  5 09:16:43 2020 user.debug travelmate-1.5.4[3174]: f_prepdev ::: config: radio0, disabled: -
Mon Oct  5 09:16:43 2020 user.debug travelmate-1.5.4[3174]: f_env     ::: trm_eapcheck: 1, trm_saecheck: 1, trm_owecheck: 1, trm_wificmd: reload
Mon Oct  5 09:16:43 2020 user.info travelmate-1.5.4[3174]: travelmate instance stopped ::: action: stop, pid: 2914
Mon Oct  5 09:16:43 2020 user.debug travelmate-1.5.4[3235]: f_prepdev ::: config: radio0, disabled: -
Mon Oct  5 09:16:43 2020 user.debug travelmate-1.5.4[3235]: f_env     ::: trm_eapcheck: 1, trm_saecheck: 1, trm_owecheck: 1, trm_wificmd: reload
Mon Oct  5 09:16:43 2020 user.info travelmate-1.5.4[3235]: travelmate instance started ::: action: start, pid: 3235
Mon Oct  5 09:16:44 2020 user.debug travelmate-1.5.4[3235]: f_prepdev ::: config: radio0, disabled: -
Mon Oct  5 09:16:44 2020 user.debug travelmate-1.5.4[3235]: f_env     ::: trm_eapcheck: 1, trm_saecheck: 1, trm_owecheck: 1, trm_wificmd: reload
Mon Oct  5 09:16:44 2020 user.debug travelmate-1.5.4[3235]: f_net     ::: fetch: /bin/uclient-fetch, timeout: 5, url: http://captive.apple.com, result: net ok
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_jsnup   ::: uci_section: radio0_Akademie_Gut_Rosenberg_, status: connected (net ok/45), sta_iface: wwan, sta_radio: radio0, sta_essid: Akademie Gut Rosenberg, sta_bssid: -, faulty_list: -, list_expiry: 0
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_check   ::: mode: initial, name: wlan0, status: true, connection: net ok/45, wait: 1, max_wait: 30, min_quality: 20, captive: 1, netcheck: 0
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_main    ::: status: true, proactive: 1
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_prepif  ::: config: radio0_Akademie_Gut_Rosenberg_, mode: sta, network: wwan, radio: radio0, trm_radio: -, trm_active_sta: radio0_Akademie_Gut_Rosenberg_, proactive: 1, disabled: 0
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_prepif  ::: config: trm_Vodafone_Hotspot, mode: sta, network: wwan, radio: radio0, trm_radio: -, trm_active_sta: radio0_Akademie_Gut_Rosenberg_, proactive: 1, disabled: 1
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_prepif  ::: config: trm_Freifunk, mode: sta, network: wwan, radio: radio0, trm_radio: -, trm_active_sta: radio0_Akademie_Gut_Rosenberg_, proactive: 1, disabled: 1
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_prepif  ::: config: trm_Telekom_FON, mode: sta, network: wwan, radio: radio0, trm_radio: -, trm_active_sta: radio0_Akademie_Gut_Rosenberg_, proactive: 1, disabled: 1
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_check   ::: mode: dev, name: radio0, status: true, connection: net ok/45, wait: 1, max_wait: 30, min_quality: 20, captive: 1, netcheck: 0
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_main    ::: active_radio: radio0, active_essid: "Akademie Gut Rosenberg", active_bssid: -
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_main    ::: iwinfo: /usr/bin/iwinfo, dev_list: radio0, sta_list: radio0_Akademie_Gut_Rosenberg_-radio0 trm_Vodafone_Hotspot-radio0 trm_Freifunk-radio0 trm_Telekom_FON-radio0, faulty_list: -
Mon Oct  5 09:16:45 2020 user.debug travelmate-1.5.4[3235]: f_main    ::: active station prioritized 'radio0/Akademie Gut Rosenberg/-' - break
Mon Oct  5 09:16:46 2020 user.debug travelmate-1.5.4[3235]: f_net     ::: fetch: /bin/uclient-fetch, timeout: 5, url: http://captive.apple.com, result: net ok
Mon Oct  5 09:16:46 2020 user.debug travelmate-1.5.4[3235]: f_jsnup   ::: uci_section: radio0_Akademie_Gut_Rosenberg_, status: connected (net ok/48), sta_iface: wwan, sta_radio: radio0, sta_essid: Akademie Gut Rosenberg, sta_bssid: -, faulty_list: -, list_expiry: 0
Mon Oct  5 09:16:46 2020 user.debug travelmate-1.5.4[3235]: f_check   ::: mode: initial, name: wlan0, status: true, connection: net ok/48, wait: 1, max_wait: 30, min_quality: 20, captive: 1, netcheck: 0

To me it seems like it is checking captive.apple.com for connectivity and thinks that everything is fine. But when I try to access this site it just forwards me to the caprive portal.

Please post the output of (with active captive portal):

uclient-fetch --timeout=5 "http://captive.apple.com" -O /dev/null 2>&1

and

curl --silent --show-error --connect-timeout 5 "http://captive.apple.com" 2>&1

I will as soon as I have again access to the router.
Thanks for your help

Here you go, like I described it.
Its just redirecting me to the captive portal.
https://pasteboard.co/JurvOcZy.jpg

OK, thanks. The captive portal detection has been reworked in travelmate 2.x (parses a structured json result set which is hopefully much more reliable) - but this version does not work with 19.x (only with snapshots).

For you, as a really quick & dirty and untested workaround for this captive portal change line 231 in /usr/bin/travelmate.sh:

old:
	raw="$(${trm_fetch} --timeout=$((trm_maxwait/6)) "${trm_captiveurl}" -O /dev/null 2>&1 | tail -n 1)"
new:
	raw="$(${trm_fetch} --timeout=$((trm_maxwait/6)) "${trm_captiveurl}" -O /dev/null 2>&1 | tail -n 2 | head -n 1)"

This will analyze the second last line (and not the last one).

Great plugin, Kudos.

Couple of questions:

  1. Is there any repository of auto login scripts outside of the src code repo?

  2. Is there a recommended router to run the latest travelmate? I have gl-inet AR750, but it is on Openwrt 18.x.

Just install latest snapshot image: https://openwrt.org/toh/gl.inet/gl-ar750

Not I'm aware of.

I've got a problem with a Hotel Wi-Fi, that uses a simple form to submit some login data. When I try to open the login page locally on a client I get an DNS_PROBE_FINISHED_NXDOMAIN error in Chrome and when I try to access the page directly from the router I get an Couldn't resolve host 'login.xxxxxx.de' error from curl, when I tried to prepare an auto-login script.
But the router redirects me correctly, when I open a Captive-Portal test site (that opens automatically on Windows and iOS).

So why can the router not access the login subdomain, but the main domain works fine from the router and clients?

Router: Maginon WL-755
OpenWrt: SNAPSHOT r14685-60c9a27cbc
Travelmate: 2.0.2-1

So the captive portal detection works correctly, it's only a problem in scripting?
Try the curl parameter "-L" to follow redirects (that's disabled by default).