Jetson Orin Nano RS485串口二次连接失败问题求助
reComputer J30(Jetson Orin Nano Industrial)RS485串口连接异常:首次连接正常,后续连接失败报IO错误
在Seeed Studio reComputer J30(Jetson Orin Nano Industrial)设备上使用RS485连接显示屏时遇到以下问题:
- 设备重启后第一次串口连接正常,但不重启再次尝试连接时失败,报错:
Error opening the port: Could not configure port: (5, 'Input/output error')
- 仅能成功发送一次数据(无ACK响应),后续发送尝试均失败。
运行测试脚本前执行的操作:
sudo su echo 460 > /sys/class/gpio/export echo out > /sys/class/gpio/PR.04/direction sudo python test_serial.py
测试用最小脚本test_serial.py内容:
import serial try: ser = serial.Serial( port='/dev/ttyTHS0', baudrate=1200, bytesize=serial.SEVENBITS, parity=serial.PARITY_EVEN, stopbits=serial.STOPBITS_ONE, timeout=0.5 ) print("Port opened successfully.") ser.close() print("Port closed.") except serial.SerialException as e: print(f"Error opening the port: {e}")
附加信息
- 设备:reComputer J30(Jetson Orin Nano Industrial)
- 端口:
/dev/ttyTHS0 - 波特率:1200
- 数据位:7
- 奇偶校验:Even
- 停止位:1
- 连接类型:RS485
补充信息
- Jetson上的DIP开关设置:010
strace输出:
openat(AT_FDCWD, "/dev/ttyTHS0", O_RDWR|O_NOCTTY|O_NONBLOCK|O_CLOEXEC) = 3 ioctl(3, TCGETS, 0xffffd842f3a0) = -1 EIO (Input/output error) write(1, "Erreur lors de l'ouverture du po"..., 88Erreur lors de l'ouverture du port: Could not configure port: (5, 'Input/output error'))
恳请帮忙分析问题原因并提供解决方法,感谢!
内容的提问来源于stack exchange,提问作者Luc Lagarde
相关产品推荐
相关产品推荐

