我需要在Linux上测试串口应用程序,但是,我的测试机只有一个串口.
有没有办法向Linux添加虚拟串口并通过shell或脚本模拟设备来测试我的应用程序?
注意:我无法重新映射端口,它在ttys2上硬编码,我需要在编写时测试应用程序.
linux serial-port virtual-serial-port
我在windows中使用com0com进行程序测试,是否有像linux中的com0com这样的程序?
我知道有pts/ptmx,但我想要的是一个独立的程序,提供2个虚拟串口...
然后我可以打开2个程序,每个注意一个...
linux serial-port com0com
linux ×2
serial-port ×2
com0com ×1
virtual-serial-port ×1