Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.1
-
None
-
Windows 8
Qt 5.3.1
Usb virtual com port
Description
I have a device plugged on a usb port and use a usb virtual com port driver.
I use the QSerialPort component to communicate with this device.
The protocol to communicate with the device is pretty simple:
You send a command and you wait for its answer.
Sometimes the answer contains the last read data of the previous answer. The readAll function returns two times the same data.
Sniffing the stream reveals that the "duplicated" data is just sent once by the device: the error does not come from the device.
The sample source code uses the ECHO command of the device.
An extract of the log that shows the error:
current read : ECHO_
current read : NUMBER_318D944\r
OK : received: ECHO_NUMBER_318D944\r
current read : NUMBER_318D944\rEC
current read : HO_NU
Received NUMBER_318D944\rECHO_NU instead of ECHO_NUMBER_319