Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.5.0
-
None
-
Windows 7 x64, Qt 5.4, Qt 5.5. Exar VCP driver v. 2.2
Description
QSerialPort fails to open virtual com ports from Exar using latest official drivers or Windows Update drivers.
The problem in QSerialPortPrivate::initialize function.
It calls GetCommState driver returns DCB struct with DCB.BaudRate set to 0, which is reasonable since port is not yet configured. After that it set some flags and calls to updateDcb() which tries to set new settings with SetCommState. And SetCommState returns false if DCB.BaudRate is 0.
Solution is simple. Just set DCB.BaudRate some non-zero value before trying to call SetCommState.