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/4and/dev/pts/5aka/tmp/loop0and/tmp/loop1. I am trying to open a port with the following code, but the bool control variable I putted there, returns mefalse, 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/4and/dev/pts/5? I tried with/dev/pts/3and it returnstrue, so I could be right.update
I tried to appendqWarning() << "available ports: " << QSerialPortInfo::availablePorts().size();But it returns
available ports: 0UPDATE 2
ptsare not serial ports. Source: https://stackoverflow.com/questions/32572400/qt-and-virtual-serial-ports -
use tty0tty, as it is "true" virtual serial ports