I’ve got a Nodejs server running on a Raspberry Pi 4 and I’m wanting it to serial communicate with an Arduino device for a Proof of Concept (using npm serialport). How do I get connection to the serial port inside the container? When I run ls /dev/* in the host-os I can see /dev/serial1 and /dev/AMA0 which I think might be symlinked. When I run the same command in the container I can’t see /dev/serial1 nor /dev/ttyS0 which I was also expecting, but can see /dev/AMA0. How would I allow connection to the mini serial port? I need WiFi so I know I can’t use the PL011 UART as that’s used by the Bluetooth/wireless module.
Single container fleets run in privileged mode by default, so if you just have this Dockerfile (and no docker-compose file) then it should already be privileged. What base image are you using? (I don’t see a FROM in your Dockerfile) Also, are you using a production or development version of balenaOS? I believe the “mini” UART is disabled by default on production versions and enabled by default on development. Please see this for enabling the mini UART: I2C and Other Interfaces - Balena Documentation