Using a WRT1900ACS rev 1 and traveling quite a lot (in an RV) and have been successfully using travelmate and openvpn to keep online and reasonably safe.
One problem I've got is that some places where we camp have unreliable wifi and we end up getting disconnected randomly or the router ends up in a state where it thinks we're connected (radio is active and the client AP is showing good signal strength) but traffic goes nowhere.
Usually what I have to do is disable the radio, stop openvpn and then restart travelmate to bring the AP back up and then manually restart openvpn. I leave openvpn as a manual operation because sometimes I'm connected through my phone and don't feel a need to start openvpn. It's not that I trust our carriers, it's just that I'm more suspicious of camp wifi.
I'd like some recommendations on how to smoothly disable the AP, bring down openvpn and travelmate and restart them as they are through luci.
The scripting part I can handle.
It's the "right" way to bring the wifi and apps down and back up that I'm lacking.
I've found the wifi command but am unsure if I should bring the entire radio down or if I can just disable the active AP somehow. Again, I'm unsure what's happening with luci behind the scenes.
As far as the apps go, I can always 'kill' them but is there a more graceful way to end them?
I can also restart them based on how they show in 'ps' but is there a better way to bring them up the same as they would be from luci?
And yeah, I've looked for docs but either I've missed it or misunderstood what I've found. I won't be offended if you simply send me back to the right section.
TIA
I can't really start these from the service level as it bypasses the configuration settings used when I do the same kind operation from luci. I've done that manually as a test and found that for example openvpn starts with default params rather than the config I've specified in luci.
I also can't run this from the desktop (once it's working) as I need to have a kind of daemon script running on the router so that a lost connection will be automatically renewed. This part, I've got a good handle on.
Thanks. The nordvpn setup docs had me create a default.conf an reference it from the etc/config/openvpn instance. I've renamed it and things are working better.
Apparently this is the wrong way to do what I'm after. It works the first time but after the second run, something is in a bad state and I have to reboot the router
Which travelmate version did you use?
Travelmate never directly change the state of your AP, it only controls the action of the configured STAs. It's definitely wrong to start travelmate directly via /usr/bin/... please only use the init script placed in /etc/init.d for this purpose. Said that, actually I haven't understood your problem you're trying to fix with your scripting. Could you provide (debug) logs which better explain, what's going on on your machine?
Sounds to me like a 'usual' OpenVPN restart problem, after the tunnel collapsed.
Please use the latest snapshot version (1.4.1), linked in the first post of the travelmate support thread. Update both packages (backend & LuCI) and clean up the LuCI cache afterwards (rm -rf /tmp/luci-*)
You mean under System => Startup? Yep!
If your STAs are under control of travelmate, then please do not manually stop or start wireless stations - this will be done automatically by travelmate.
I would suggest, that you start with a fresh configuration ... and please start with travelmate in the first place. If the (re-)connection stuff runs smoothly go forward with openvpn - don't try both things at the same time. As a good starting point take a look at this post (Using device as "Hotspot-Router" (WISP-Mode)? - #18 by RK_aus_S), where a user described all required steps.
if you are using nordvpn guide, maybe you are missing the reconnect.sh scripts in /etc/openvpn/reconnect.sh
I've found that I can't use that script by itself. Most of the problems I've run into result in the upstream connection dying, not just openvpn.
But otherwise, you're right. I should have started with the restart method they supplied. I've done so now.
Unfortunately the wifi at our new location is completely saturated and unusable so I'll be unable to do any real testing until our next camp.
If I can get some alone time with the network I'll try scripting though since I've never had the base problem when using my phone, I doubt that I'll have any difficulty.
I just encountered these in the log. It was over a period where no TravelMate configured APs were active.
I'm using TM 1.4.1
Wed Mar 13 09:31:06 2019 daemon.err travelmate.sh[6530]: /usr/bin/travelmate.sh: line 1: /sbin/uci: Argument list too long
Wed Mar 13 09:31:06 2019 daemon.err travelmate.sh[6530]: /usr/bin/travelmate.sh: line 1: ubus: Argument list too long
I'm not. These literally appeared while I was away from the network and the script I'm working toward can only be run manually. Whatever was triggering these are part of a standard install as far as I can tell.