COMTool icon indicating copy to clipboard operation
COMTool copied to clipboard

RK3568编译后没有串口选项,显示“port must be configured before it can be used”

Open Wdk111 opened this issue 1 year ago • 3 comments

c2 c3 c1 测试的工控机,代码不太懂。

Wdk111 avatar Oct 16 '24 08:10 Wdk111

问题应该是pyserial 没法检测到串口,3568这种自带的串口是 /ttyS0 这种吧, pyserial 貌似会忽略,可以手动改一下代码加上 找串口的代码在 https://github.com/Neutree/COMTool/blob/3f6acaf5e30f8d1464a4f9cc43aa403239b2cebb/COMTool/conn/conn_serial.py#L408

Neutree avatar Oct 16 '24 13:10 Neutree

大学只学过一点C语言,查了AI试过几个方法都没成功。如有大佬们看见请指点下小弟谢谢 Orz

Wdk111 avatar Oct 22 '24 03:10 Wdk111

你自己用可以临时改成

    def findSerialPort(self):
        self.port_list = list(serial.tools.list_ports.comports())
        return self.port_list + ["/dev/ttyS0", "/dev/ttyS1"]

即手动把你要的加上去

Neutree avatar Oct 22 '24 05:10 Neutree