Serial interface development image

Hi all,

I’m trying to get the development image to work with the serial interface on a Raspberry Pi 3B+. I’m using the /dev/serial0 interface for serial communication. On production images, this works great! I’ve no problem with using the serial interface stable on the production image. But for development, using a production image is not really the way to go.

The problem with the development image is that it has some interference, I guess. Because after a few seconds of writing to the /dev/serial0 interface, I get some input/output errors and it stops working, which is not the case on the production image. I’ve enabled uart on the Raspberry Pi via the balenaCloud dashboard, but I can’t seem to make it work stable on the development image. I’m developing via local mode, if that’s any useable information.

I’m using the Raspberry Pi 3 development image with version 2.31.5+rev1.

I’m happy to share some more details if necessary!

Anyone that can help me with this issue? It’s really hard to develop like this…

Hey @bversluijs, I believe the problem is that the .dev images write kernel logs to the to the serial console. I believe you can disable that by changing the cmdline.txt in /mnt/boot/ on the running device. Find the console entry that refers to the serial0 device, and remove it, including the baud rate setting. It will look something like console=serial0,115200 . Make sure the rest of the line remains the same, as errors in this configuration can stop the Raspberry Pi from booting.

I have a feature request to make this opt out which you can follow here https://github.com/balena-os/meta-balena/issues/1387, but for now the best way is to manually change the cmdline.txt

Let me know if that sorts things out for you.

ah, you also might need to remove console=tty1 from cmdline.txt too.

How can I find this file?

I believe you can disable that by changing the cmdline.txt in /mnt/boot/

If I ssh into the Host OS or into a container, it is not there.