概述
To install socat on Ubuntu (I'm using 12.04) just run the following command:
- # sudo apt-get install socat
Setting up two serial lines
now on a terminal window run socat
- # socat -d -d PTY PTY
The output should look like the following one:
- 2013/09/20 14:07:10 socat[6871] N PTY is /dev/pts/5
- 2013/09/20 14:07:10 socat[6871] N PTY is /dev/pts/6
- 2013/09/20 14:07:10 socat[6871] N starting data transfer loop with FDs [3,3] and [5,5]
Now you have two "serial" ports connected back to back
Testing the ports
open a new terminal and issue the following command
- # sudo cat /dev/pts/5
open a new terminal and issue the following command
- # sudo echo "Hello World" > /dev/pts/6
On the first terminal you should see the string "Hello World".
That's all,nothing more.
最后
以上就是潇洒老虎为你收集整理的ubuntu下好用的虚拟串口工具的全部内容,希望文章能够帮你解决ubuntu下好用的虚拟串口工具所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复