I have a Beaglebone Black (SBC like a Pi) on my boat in France that I want to be able to connect to using ssh, how can/should I do it?
I have a number of possible solutions in mind but I won't give them here as that might prevent open and lateral thinking being applied.
Speed is not an issue, a 2400 baud dial up connection would be sufficient. Security is not a big issue, there is no sensitive data on the Beaglebone Black. I guess it needs to be reasonably secure against misuse but thats all. It's inside the boat in a fairly secure marina so the hardware is safe enough.
Cost is important, this isn't something I want to spend lots of money on. A solution costing £7/month seemed a bit expensive to me, I'm aiming at significantly less, one or two pounds a month is fine.
The boat is moored in an urban environment, power is (fairly) freely available. When I visit the boat I have lots of time to do fairly complicated set-up if needed but once I've left it's totally inaccessible, it has to work totally unattended, there's no one to phone up and ask to 'press the reset' or similar.
So, let your imaginations run wild and come up with some ideas! :-)
On Wed, 30 Dec 2020 at 21:34, Chris Green cl@isbd.net wrote:
So, let your imaginations run wild and come up with some ideas! :-)
Three do a free data SIM [1] which gives you 200MB/mo free data with no monthly fee. And it appears to support their Feel At Home (now called Go Roam) including France. I haven't looked hard at the terms and I'd assume you'd have to set it up in the UK first, but maybe it'll have some use to you?
[1] https://www.three.co.uk/Free_SIM_MBB/Order
On Fri, Jan 01, 2021 at 12:28:41PM +0000, Mark Rogers wrote:
On Wed, 30 Dec 2020 at 21:34, Chris Green cl@isbd.net wrote:
So, let your imaginations run wild and come up with some ideas! :-)
Three do a free data SIM [1] which gives you 200MB/mo free data with no monthly fee. And it appears to support their Feel At Home (now called Go Roam) including France. I haven't looked hard at the terms and I'd assume you'd have to set it up in the UK first, but maybe it'll have some use to you?
Yes, I ordered one of these a few days ago and it arrived yesterday.
200Mb/month is all the data I need (probably rather more).
However I suspect that it won't work long term in France, the Three 'Feel at Home' SIMs require you to be in the UK most of the time I think and there's a time limit on how long they will work overseas.
It is a zero cost option though so worth trying.
On 30/12/2020 21:33, Chris Green wrote:
I have a Beaglebone Black (SBC like a Pi) on my boat in France that I want to be able to connect to using ssh, how can/should I do it?
I have a number of possible solutions in mind but I won't give them here as that might prevent open and lateral thinking being applied.
Speed is not an issue, a 2400 baud dial up connection would be sufficient. Security is not a big issue, there is no sensitive data on the Beaglebone Black. I guess it needs to be reasonably secure against misuse but thats all. It's inside the boat in a fairly secure marina so the hardware is safe enough.
Cost is important, this isn't something I want to spend lots of money on. A solution costing £7/month seemed a bit expensive to me, I'm aiming at significantly less, one or two pounds a month is fine.
The boat is moored in an urban environment, power is (fairly) freely available. When I visit the boat I have lots of time to do fairly complicated set-up if needed but once I've left it's totally inaccessible, it has to work totally unattended, there's no one to phone up and ask to 'press the reset' or similar.
So, let your imaginations run wild and come up with some ideas! :-)
Obviously you need some sort of network to connect to. This could be a phone network (with a modem?) or a mobile phone network voice or data. Or the internet via A Wifi Network, or Satellite Internet. You could investigate LoRa, but I think you wouldn't be able to transfer enough data, even if it was fast enough.
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.
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?
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/)
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.
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.
Steve
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.
On 02/01/2021 10:53, Chris Green wrote:
On Fri, Jan 01, 2021 at 11:59:53PM +0000, steve-ALUG@hst.me.uk wrote:
As there's no-one to press reset for you (as you say), you'll need some sort of watchdog device.
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.
OK, I did a quick google. I found this.
https://www.geeksforgeeks.org/automated-login-for-captive-portals-in-linux/
It does say that you need to delve through the script to decode it. It mentions a javascript pretty-fier that may help. This sounds like the way to go to me.
The alternative is some sort of sim, but finding a cheap, persistent deal is the issue obviously.
I think it's probably worth spending some time trying to decode the captive portal code. You're likely trying to find a POST string to send to the server. You could then trigger that, say every day, or if you lost internet connection.
An alternative to a intelligent watchdog could be a simple mechanical or electronic power switch which kills the power for a period
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.
Fair enough. You could run a ping or traceroute to somewhere like google & use this to check for a valid internet connection. If it fails, reconnect to the internet.
Thanks for your long input to this.
Hope you get it sorted.
On Sat, Jan 02, 2021 at 05:34:07PM +0000, steve-ALUG@hst.me.uk wrote:
On 02/01/2021 10:53, Chris Green wrote:
On Fri, Jan 01, 2021 at 11:59:53PM +0000, steve-ALUG@hst.me.uk wrote:
As there's no-one to press reset for you (as you say), you'll need some sort of watchdog device.
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.
OK, I did a quick google. I found this.
https://www.geeksforgeeks.org/automated-login-for-captive-portals-in-linux/
It does say that you need to delve through the script to decode it. It mentions a javascript pretty-fier that may help. This sounds like the way to go to me.
The alternative is some sort of sim, but finding a cheap, persistent deal is the issue obviously.
I think it's probably worth spending some time trying to decode the captive portal code. You're likely trying to find a POST string to send to the server. You could then trigger that, say every day, or if you lost internet connection.
Yes, I've found a few similar but not the above one. I think probably a script that uses curl is the way to go. It has to wait until I can get back to France though.