Important: Please read the Qt Code of Conduct -

QSerialport, cannot open pseudo terminal device port

  • Hi there! I am playing with QtSerialport on Fedora 26, and since I don't have a real device to try,
    I created two serial ports using nullmodem then to simulate a communication I used minicom on one side, and screen on the other.
    So the connection has been setted up between /dev/pts/4 and /dev/pts/5 aka /tmp/loop0 and /tmp/loop1. I am trying to open a port with the following code, but the bool control variable I putted there, returns me false, so it looks like the Qt program is not able to open such device.

    QSerialPort port("/dev/pts/4");
    bool isOpened =;
    qWarning() << isOpened;

    Could the problem be that I have already an opened connection active between /dev/pts/4 and /dev/pts/5? I tried with /dev/pts/3 and it returns true, so I could be right.

    I tried to append

    qWarning() << "available ports: " << QSerialPortInfo::availablePorts().size();

    But it returns available ports: 0

    UPDATE 2
    pts are not serial ports. Source:

  • use tty0tty, as it is "true" virtual serial ports

Log in to reply