On Fri, Jan 01, 2021 at 11:59:53PM +0000, steve-ALUG@hst.me.uk wrote:
So, let your imaginations run wild and come up with some ideas! :-)
Without knowing what facilities & networks are at the marina, it's impossible to know the correct way to go, but if there's no wifi in the marina, then I would expect some sort of widgit that uses a data sim to connect to the local mobile phone's data network would be the way to go.
It's an inland marina, not on the coast. It has WiFi but as I said (maybe not here) it's a "Captive Portal" which means that it's difficult to automate the login so as soon as the WiFi is reset for any reason or they just decide my connection has been on too long the Beaglebone Black loses its connection.
Just as an aside - is there public or payable for wifi anywhere near - close enough that you could connect to it with a long-range wifi antenna?
I use an external WiFi aerial already, stuck up on a mast outside. There are a few 'piggy backed' WiFi connections available but again it's difficult/impossible to automate the login process.
Connecting to it, you'll either need a VPN, to run an SSH Server, or some other proprietary remote control/connection software. (e.g. Dataplicity https://guide.openenergymonitor.org/setup/remote-access/)
I use ssh tunnels via the marina WiFi at the moment, they work OK for as long as the connection holds up. I use a little utility called autossh which is a sort of ssh watchdog.
As there's no-one to press reset for you (as you say), you'll need some sort of watchdog device. This monitors that everything is OK. Typically this wouldn't be run on the main device, because if the main device crashes, then the watchdog will crash and not be able to restart the machine. You might be able to use the beaglebone to send a signal to some simple electronics that provided it gets a signal at a regular interval, either keeps the power connected, or perhaps doesn't press a reset button. Possibly a more plausible device would be an arduino. It must receive some sort of regular signal from the beaglebone. If it doesn't get one, it should presumably attempt to shutdown the beaglebone, then kill it's power, then restart it. Restart must automatically attempt to reconnect to your network/the internet. This attempting to reconnect must repeat until connected, or eventually give up and reboot.
The Beaglebone doesn't really need a watchdog, it's never died over the many years I've had it running on the boat. All it really needs is a reliable connection to the internet. If I could automate the WiFi Captive Portal login then the Beaglebone could re-connect every 24 hours or every week to keep its connection up. I have searched for "automatic login to Captive Portal" but I've not found anything that seems to fill the bill. The obvious approach of using Lynx (or similar) is no good because the Captive Portal uses loads of Javascript.
An alternative to a intelligent watchdog could be a simple mechanical or electronic power switch which kills the power for a period (10 mins, 15 mins, 1 hour, whatever the minimum is as long as it's at least minute), once a day or once a week. This would ensure the device would try and reconnect to the networking solution every day. It would mean that the device would be inaccessible regularly, but it should mean that it comes back to you afterwards, even if it's crashed. Given a mechanical switch that switched off for 15 minutes once per day, you'd have to run an up-time monitor on the beaglebone. Once it got close to the power-kill time (i.e. after 23 hours and 40 minutes say), it would have to do a controlled software shutdown - that way when the timer kills the power, the machine has already safely saved everything and has logged off. My thinking on this is based on a Raspberry Pi - software shutdown before killing the power.
As I said it's not really the Beaglebone that needs a watchdog, I can easily tell it to reboot at daily or weekly intervals, it's the internet connection that needs some sort of reset.
Thanks for your long input to this.