Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QSerialport, cannot open pseudo terminal device port
Cat_ last edited by Cat_
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
/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 = port.open(QIODevice::ReadOnly); qWarning() << isOpened;
Could the problem be that I have already an opened connection active between
/dev/pts/5? I tried with
/dev/pts/3and it returns
true, so I could be right.
I tried to append
qWarning() << "available ports: " << QSerialPortInfo::availablePorts().size();
But it returns
available ports: 0
ptsare not serial ports. Source: https://stackoverflow.com/questions/32572400/qt-and-virtual-serial-ports
kuzulis last edited by
use tty0tty, as it is "true" virtual serial ports