Run minicom (or similar) on device?


I am completely new to balena so forgive me if this is a stupid question…

I have just set up a raspberry pi 3 with balena and I can see it as “online” on my balena cloud page.

I have another device (not connected to balena at all) which has a serial console to which I have connected the raspberry pi througha USB-to-serial converter.

Now, had I been running Ubuntu or something on this raspberry pi, I would have been able to ssh into it and start minicom (or picocom) on it with:

picocom -b 115200 /dev/ttyUSB0

Is there a way to do this through balena? I find the structure of balena very useful, it is easy to reach the device, but can I run a terminal program on it an connect to another device like this?

Hey, that should certainly be possible, and our “Development” images, they start up a serial console that you can connect to, see more in our documentation:

On Production images that serial console is not started, but you can add an SSH key to your device configuration file (config.json), and thus would be able to connect to the device locally over SSH as well. The required config.json entry is documented here

Hope this helps!

No, that’s not what I mean.

I don’t want to connect to the serial console on the raspberry pi, I want to use the raspberry pi, to connect to the serial console on a different electronic device.

Then that should work fine, of course. You have to have your application install the relevant tools (minicom, etc), and make sure that your serial device is available for the relevant application container, see this part in the docs:

Yes, right, that’s what I am looking for.

Do you know if minicom exists pre-packaged for balena somwhere?

Oh, so maybe I can put the docker image “ubuntu” on the device? In that, I can install picocom/minicom or so.

Would that be a reasonable way to get access to this functionality?

@frepe360 it depends on what base image you are using for your application. See our documentation regarding the base images we maintain here: There are Debian, Ubuntu, Alpine, Fedora base images to choose from, and all of them should have minicom packages.

And not sure what you mean weather it’s a “reasonable” way to get this functionality - creating your application image is the way of deploying an application onto a balena device. We’d recommend checking out the “Develop” section of our documentation to learn about how to create your application and get it onto a balena device. If you run into any issues, don’t hesitate to ask!

Thank you imrehg. Starting with an ubuntu base image and altering it for my needs appears to be exactly what I need to do.

I will proceed now with the link to the documentation that you provided.