Serial port issues on Raspberry Pi 3

raspberrypi3

#1

Hi there,

I have been struggling to get get uart working properly on a Raspberry Pi 3. I have looked at these two posts (Serial port usage and Serial port on Raspberry Pi 3) pretty extensively and tried everything suggested to no avail unfortunately.

I used our own application and the serial test repo to test that the command is being sent. In the output of the process I see hundreds of newlines then “[device uuid] login: Login incorrect” then hundreds more (maybe 600) new lines. It seems like perhaps this is a result of another resin process using the port? Someone from resin stated that that shouldn’t happen in one of the above forum posts, but it seems like something strange is happening there.

Most recently, I followed what was in this comment and the one below it, with the same results (although very occasionally it does output the message, but usually does what is described above).

For reference, here are the settings for the device:
RESIN_HOST_CONFIG_enable_uart=1
TARGET_BAUDRATE=9600
TARGET_PORT=/dev/ttyAMA0
TEST_CMD=TEST

And in /resin-boot/config.txt, I added:
dtoverlay=pi3-disable-bt

Other potentially useful info:
Resin OS 2.3.0+rev1 (dev)
Hardware: BCM2709
Revision: a02082

Any help/guidance would be greatly appreciated.
Thank you!


#3

Hi @nickd, the relevant config is I think the RESIN_HOST_CONFIG_dtoverlay=pi3-miniuart-bt setting, that’s the only thing you should need for serial. See more details in the docs: https://docs.resin.io/hardware/i2c-and-spi/#using-uart-or-serial-on-raspberry-pi-3


#4

Ah, yes it worked just as the docs described for the prod version of the Resin OS, for dev I had to follow the guidances in this post to free up the serial port.

Thanks!