Search code examples
c++qtserial-portttypty

Serial port emulation that works with QSerialPort


So I need some sort of connected pseudo tty that mimics an actual pair of serial ports. That will make my application test way more easier. There is of course socat that works perfectly on Linux:

sudo socat PTY,link=/dev/ttyS10,crnl PTY,link=/dev/ttyS11,crnl

But for some reason, QSerialPort and QSerialPortInfo refuse to list them as serial devices.

Any workaround to make QSerialPortInfo believe that my pty is an actual serial port will help me a lot.


Solution

  • Pseudo terminals is not a serial ports. Use the tty0tty project as a kernel module instead (it is supported by QSP{I}.