Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
257 views
in Technique[技术] by (71.8m points)

linux - How set serial port

In my linux distribution "buildroot" I'd like to set up the serial port as below but I get errors:

# 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

When I check the serial port file permissions, everything looks fine:

# 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

What could I do?

question from:https://stackoverflow.com/questions/66060508/how-set-serial-port

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...