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下好用内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复