diff --git a/libsrc/leddevice/dev_serial/ProviderRs232.cpp b/libsrc/leddevice/dev_serial/ProviderRs232.cpp index 295dc4913..711a53539 100644 --- a/libsrc/leddevice/dev_serial/ProviderRs232.cpp +++ b/libsrc/leddevice/dev_serial/ProviderRs232.cpp @@ -201,7 +201,9 @@ bool ProviderRs232::tryOpen(const int delayAfterConnect_ms) if ( ! _rs232Port.isOpen() ) { _frameDropCounter = 0; - if (QFile::exists(_deviceName)) + + QSerialPortInfo serialPortInfo(_deviceName); + if (! serialPortInfo.isNull()) { if ( _preOpenDelayTimeOut > QDateTime::currentMSecsSinceEpoch() ) { @@ -223,6 +225,8 @@ bool ProviderRs232::tryOpen(const int delayAfterConnect_ms) } else { + QString errortext = QString("Invalid serial device name: [%1]!").arg(_deviceName); + this->setInError(errortext); _preOpenDelayTimeOut = QDateTime::currentMSecsSinceEpoch() + _preOpenDelay; return false; }