Fake serial communication under Linux

后端 未结 3 1012
予麋鹿
予麋鹿 2020-12-29 07:43

I have an application where I want to simulate the connection between a device and a \"modem\". The device will be connected to a serial port and will talk to the software m

3条回答
  •  灰色年华
    2020-12-29 07:57

    It's probably best to use pyserial to communicate with the serial port, and you can just create a mock version of the serial.Serial class which implements read, readline, write and any other methods you need.

提交回复
热议问题