QSerialPort Issues after upgrading from QT 5.11 to QT 5.13
-
After upgrading from QT 5.11 to QT 5.13 my serial ports on windows 10 have broken. I can no longer send or receive data in the program i have created or in the terminal example program provided by QT. I have used realterm to verify that serial data is coming in form my device. I am setting up the device in a QObject constructor like this:
SerialDevice::SerialDevice(QString const &PORTNAME, QObject *parent) : QObject(parent), _device(new QSerialPort(PORTNAME)) { _device->setBaudRate(38400); _device->setParity(QSerialPort::NoParity); _device->setDataBits(QSerialPort::Data8); _device->setStopBits(QSerialPort::StopBits::OneStop); _device->setFlowControl(QSerialPort::FlowControl::NoFlowControl); _device->open(QIODevice::ReadWrite); QSerialPortInfo info(*_device.get()); //other values initialized from info here QObject::connect(_device.get(), &QSerialPort::readyRead, this, &SerialDevice::dataRead);
In version 5.11 QSerialPort::readyRead is being emitted and data can be read from the serial port, in 5.13 QSerialPort::readyRead is not being emitted and as a result no data is being read from the serial port. I have attempted reinstalling QT 5.13 and i currently have QT versions 5.11, 5.12 and 5.13 installed on my system.
Any ideas or suggestions anyone has for what could be causing this problem would be appreciated.
Thanks,
Dan -
-