Remote access for the beagle bone black (BBB) to modify /upgrade file from cloud server

107 views
Skip to first unread message

Niresh

unread,
Oct 14, 2020, 11:38:23 PM10/14/20
to BeagleBoard
Hi,
I am using Beagle Bone Black with Debian image and kernel version 4.4.30-ti-r64. Please anyone suggest how to access the beagle bone black remotely. Let me explain the requirement, I have an application running on BBB and connected to AWS cloud server through web socket. Now, just in case want to upgrade the application remotely from cloud server, how do I do that?

Thanks and regards,
NK

Atique Rehman

unread,
Oct 14, 2020, 11:54:32 PM10/14/20
to BeagleBoard
You need some sort of client application running on the beaglebone which can receive new apps from server.
To access to beagle-bone remotely you should have its static IP address.

Niresh

unread,
Oct 15, 2020, 12:28:20 AM10/15/20
to beagl...@googlegroups.com
Hi,
Could you please help me the best utility to implement this and procedure to do so, and also how to use a static IP address in beagle-bone-black?

Thanks and regards,
NK

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/dMyq5C7HGyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/a5da3147-9939-448a-b89e-8e1f32bfed18n%40googlegroups.com.

Shafeek Ashraf

unread,
Oct 15, 2020, 12:57:31 AM10/15/20
to beagl...@googlegroups.com
Hi,
You can use services like Pitunnel for accesing and modifying beaglebone through remote acess

You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAF7-PaSkswyoUsWWpfHm%3DezHURqLT1kEsLdrihmZ12y-EDVPVg%40mail.gmail.com.

Niresh

unread,
Oct 15, 2020, 1:13:33 AM10/15/20
to beagl...@googlegroups.com
Hi,
I googled and understand pitunnel is for raspberry pi, what is the similar thing for beagle bone. Please share a good link to understand the process in a better way.
Do I need to register on a server for remote access? 
How do I differentiate multiple beagle-bones for remote access?
What is the limitation on the number of beagle-bones?  

Regards,
NK

Atique Rehman

unread,
Oct 15, 2020, 1:17:47 AM10/15/20
to BeagleBoard
If you can put some effort here is an most common solution for remote access OpenVPN

Shafeek Ashraf

unread,
Oct 15, 2020, 1:27:49 AM10/15/20
to beagl...@googlegroups.com
Hi,
You can use pi tunnel for beaglebone also if you have a debian os running in the bbb. Just follow the steps in the pitunnel page, create an account and add device, while adding device they will ask you to download and install pitunnel files, ie that will be running in background in the bbb.

Niresh

unread,
Oct 15, 2020, 1:43:46 AM10/15/20
to beagl...@googlegroups.com
Is there a way to access the beagle-bone using SSH or something like that without registering the device to another server?
This is for commercial purposes and data protection is very important. Right now, it is connected to the AWS cloud server where our web application is running.


Thanks and regards,
NK

Chris Green

unread,
Oct 15, 2020, 8:18:35 AM10/15/20
to beagl...@googlegroups.com
Niresh <nireshs...@gmail.com> wrote:
> [-- text/plain, encoding 7bit, charset: UTF-8, 144 lines --]
>
> Is there a way to access the beagle-bone using SSH or something like that
> without registering the device to another server?
> This is for commercial purposes and data protection is very important.
> Right now, it is connected to the AWS cloud server where our web
> application is running.
>
You can use ssh but you need to get some help from whoever administers
the "AWS cloud server".

Things needed:-

The ssh daemon in the BBB needs to be running (I can't remember if
this is default or not)

You need to know the BBB's IP address, presumably it will be on a
LAN connected to the "AWS cloud server".

You need the "AWS cloud server" or the router 'behind' it to
forward connections from the internet (i.e. you) on port 22 to the
BBB

Looking at what "AWS cloud server" I suspect that the IOT services
there might be what you need to talk to your BBB.

--
Chris Green
·

Tarmo

unread,
Oct 15, 2020, 9:39:14 AM10/15/20
to BeagleBoard
On Thursday, October 15, 2020 at 8:43:46 AM UTC+3 Niresh wrote:
Is there a way to access the beagle-bone using SSH or something like that without registering the device to another server?

This is a network setup issue. Any remote access solution requires that a network route exist from your computer to the BBB. If you and the BBB are in the same local network, it's routable and you can connect to it. If the BBB has a public IP address (or port forwarding is set up to it), it's routable and you can connect to it. If the BBB is behind a NAT and no port forwarding is set up, it's not routable and you cannot connect to it. 

Here's where the various tunnelling and VPN solutions come in. You can choose one which is best for your requirements, but you cannot get remote access to a non-routable device without them.

I've used a simple jumpbox in the form of an SSH server where all the different BBB-s connect to. Each opens a remote tunnel on a specific port which leads back to it. Eg. port 20013 would have a tunnel to device nr 13, port 20014 to nr 14 etc. There's a Debian package called autossh with a script which maintains a persistent SSH connection to the jumpbox. This is a fairly simple solution to set up and use initially, but not a very good one - mainly because it doesn't scale beyond a few dozen devices. I'd go for a VPN next time. 

--
Kind regards,
Tarmo

Niresh

unread,
Oct 20, 2020, 12:18:07 AM10/20/20
to beagl...@googlegroups.com
Thank you for the information. I remember my ex-colleague used to download a file from a server using curl utility and run those files. So, I would like to know any similar simple procedure to download and upgrade BBB binary files which are stored in the server.


Regards,
NK

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/dMyq5C7HGyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Tarmo

unread,
Oct 20, 2020, 4:01:52 AM10/20/20
to BeagleBoard
Hi Niresh,

On Tuesday, October 20, 2020 at 7:18:07 AM UTC+3 Niresh wrote:
Thank you for the information. I remember my ex-colleague used to download a file from a server using curl utility and run those files. So, I would like to know any similar simple procedure to download and upgrade BBB binary files which are stored in the server.

You're looking to automatically upgrade your custom software? There's a bunch of ways to do it, depending on how your thing is distributed (e.g. binary executable, Java bytecode, Python, ...). The obvious solution would be to package your software as a Debian .deb package, and run "apt update && apt -y install yourpackage" from a cron script. This would attempt to upgrade to a fresh version of "yourpackage" with whatever frequency you set up the cron script.

--
Kind regards,
Tarmo

Niresh

unread,
Oct 20, 2020, 8:25:22 AM10/20/20
to beagl...@googlegroups.com
I have a binary file that is basically compiled C application code. If I send an upgrade command to the controller from the server, the controller should take that binary file from the server, replace the old one and run with the updated binary file.


Regards,
NK

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/dMyq5C7HGyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Tarmo Kuuse

unread,
Oct 20, 2020, 10:36:44 AM10/20/20
to beagl...@googlegroups.com
On 20.10.20 15:24, Niresh wrote:
> I have a binary file that is basically compiled C application code. If I
> send an upgrade command to the controller from the server, the
> controller should take that binary file from the server, replace the old
> one and run with the updated binary file.

I've distributed custom software as deb packages hosted by a private apt
repository (Sonatype Nexus OSS). Mass-updates got manually triggered via
ansible (which required the aforementioned SSH jumphost).

You can do something similar - package your binaries as a deb package,
host an apt repository and figure out how to trigger updates. Or you can
roll your own update scripts and repo. Or you can search for third-party
solutions. I assume most of the underlying problems are the same - a
trigger mechanism, a hosted package repository, authenticated data pipe,
service restarting, recovery from botched upgrades etc.

--
Kind regards,
Tarmo

Niresh

unread,
Oct 20, 2020, 11:27:42 PM10/20/20
to beagl...@googlegroups.com
Thank you Tamro. I hope a trigger mechanism is not a problem because continuous data exchange is happening between the AWS server and controller through websocket. I can create a separate data packet to initiate this trigger command to a controller to which I wish to upgrade. In my case, only two executable binary files are required for firmware update and  which I must keep in the AWS server because data privacy is very important. 

I'm a newbie to the Linux environment. So, It would be very grateful if you can explain to me with an example for better understanding or a link.

Regards,
NK

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/dMyq5C7HGyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Mark Lazarewicz

unread,
Oct 21, 2020, 5:01:34 AM10/21/20
to beagl...@googlegroups.com
Reading your questions that ignore previous suggestions I'd suggest this link


You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

To view this discussion on the web visit

Tarmo Kuuse

unread,
Oct 21, 2020, 5:56:25 AM10/21/20
to beagl...@googlegroups.com
On 21.10.20 06:27, Niresh wrote:
> Thank you Tamro. I hope a trigger mechanism is not a problem because
> continuous data exchange is happening between the AWS server and
> controller through websocket. I can create a separate data packet to
> initiate this trigger command to a controller to which I wish to
> upgrade. In my case, only two executable binary files are required for
> firmware update and  which I must keep in the AWS server because data
> privacy is very important.

It's not terribly relevant where the files are stored - it's hosting
them that requires some thinking. E.g. googling for "amazon aws host apt
repository" seems to come up with a few solutions - e.g.
https://www.aptly.info. I can't vouch for any of them.

> I'm a newbie to the Linux environment. So, It would be very grateful if
> you can explain to me with an example for better understanding or a link.

I'm sorry to say that automatic upgrades of running services on a Debian
box is quite the deep end to get thrown into as a newbie :) Mark's
suggestion is not an improper one in this case.

If you go the route of deb package and apt repository, I'd suggest
reading chapters 5, 6 and Debian Administrator's handbook
https://debian-handbook.info/browse/stable/ - this briefly explains how
they are used.

https://wiki.debian.org/DebianRepository/Setup has some info on how
repositories are set up. AWS-friendly Aptly is in there somewhwere.

Depending on your circumstances, you might want to look into creating a
systemd service out of your application:
https://linuxconfig.org/how-to-create-systemd-service-unit-in-linux

--
Kind regards,
Tarmo

Niresh

unread,
Oct 21, 2020, 8:22:17 AM10/21/20
to beagl...@googlegroups.com
Thank you for your support. I will go through the link and get back to you.

Regards,
NK

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/dMyq5C7HGyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages