Using 2 UARTS on Trixie

I need to use two serial ports on a Raspberry Pi 4 running Trixie.

I edited config.txt by adding the following lines to config.txt under the [all] section

dtoverlay=uart2

dtoverlay=disable-bt

enable_uart2

the first uart works great using either serial0 or ttyAMA0 as the device.

the second port does not output any serial data on pin 27, ID SD, but there is no error

My two port commands are:

port1=serial.Serial(“/dev/ttyAMA0”,baudrate=9600,timeout=3.0)

port2=serial.Serial(“/dev/ttyAMA2”,baudrate=9600,timeout=3.0)

I would much appreciate any help!

Hello,

please be cognicent that this is a Python forum in support of the Python language itself and not a Rasberry Pi forum which has to do with a product manufactured and sold by an independent company for profit. If you have additional Rasberry Pi questions, you can direct your questions to the following RPi forum:

I performed a quick google search and I found the following video which may be of help:

Good luck!

1 Like

Paul,

Thanks much for your reply. I am now going to watch the video.

Wallis