Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1306

Python • Pi 5 Uarts not Exposed to PySerial?

$
0
0
I'm working on connecting a serial device to a raspberry pi 5 over UART3, but I haven't been able to find the COM port with PySerial. I have the following in my /boot/firmware/config.txt file

Code:

dtparam=uart0=ondtoverlay=uart0-pi5dtoverlay=uart3-pi5dtoverlay=miniuart-bt
and when running

Code:

import serialimport serial.tools.list_portsports = list(serial.tools.list_ports.comports())for port in ports:    print(port.device)
only /dev/ttyAMA10 is shown. I ended up doing some testing by connecting the UART3 TX and RX pins together with a wire and running

Code:

cat < /dev/ttyAMA3

Code:

echo "hello" > /dev/ttyAMA3
At first, it wasn't working, but then I figured out that I had SPI turned on and it was conflicting with use of UART3. Turning it off

Code:

dtparam=spi=off
I was able to send over the UART3 TX pin and receive it on the RX pin. After these efforts, PySerial still isn't able to use UART3 (whether it detects it self or I force it to use /dev/ttyAMA3). Is there something special about the UARTs on the pi 5 that PySerial can't use the UARTs, or is there something that I'm missing on my end?

Statistics: Posted by Arrange7400 — Sun May 19, 2024 5:31 pm



Viewing all articles
Browse latest Browse all 1306

Trending Articles