串口怎么设置

问题描述

在我的 linux 发行版“buildroot”中,我想设置如下串行端口,但出现错误

# stty -F /dev/ttyS4 -a
stty: can't open '/dev/ttyS0': No such file or directory
# stty -F /dev/ttyS0 9600 cs8 -cstopb -parenb
stty: /dev/ttyS0: Input/output error

当我检查串口文件权限时,一切正常:

# ls -al /dev/ttyS*
crw-------    1 root     root        4,64 Jan  1 01:00 /dev/ttyS0
crw-------    1 root     root        4,65 Jan  1 01:00 /dev/ttyS1
crw-------    1 root     root        4,66 Jan  1 01:00 /dev/ttyS2
crw-------    1 root     root        4,67 Jan  1 01:00 /dev/ttyS3

我能做什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)