Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Wdk111 opened this issue Oct 16, 2024 · 3 comments

Comments

@Wdk111
Copy link

Wdk111 commented Oct 16, 2024

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

@Neutree
Copy link
Owner

Neutree commented Oct 16, 2024

问题应该是pyserial 没法检测到串口,3568这种自带的串口是 /ttyS0 这种吧, pyserial 貌似会忽略,可以手动改一下代码加上
找串口的代码在

def findSerialPort(self):

@Wdk111
Copy link
Author

Wdk111 commented Oct 22, 2024

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

@Neutree
Copy link
Owner

Neutree commented Oct 22, 2024

你自己用可以临时改成

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

即手动把你要的加上去

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants