Hi
I have 4 uart ports on my pi 5, enabled in config.txt:With a jumper from pin 12 (uart4 tx) to pin 1 (uart1 rx) I can receive on uart1 fine using minicom. The same with screen.
However with python I get little or no data and then get an error:My python test is very simple:I seem to be able to use uart2 and uart4 with no problem in python, just uart1 is causing me trouble. Why is minicom fine but python is not?
I have 4 uart ports on my pi 5, enabled in config.txt:
Code:
dtoverlay=uart1-pi5dtoverlay=uart2-pi5dtoverlay=uart3-pi5dtoverlay=uart4-pi5
However with python I get little or no data and then get an error:
Code:
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Code:
import serial,time,randomser1 = serial.Serial("/dev/ttyAMA1",19200,timeout=0)ser1.close() #without this I get "port is already open"ser1.open()while True: print(ser1.read().decode())
Statistics: Posted by jimseng — Fri Feb 21, 2025 5:23 pm