Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42292

Duplicated data from last readAll()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0
    • 5.3.1
    • Serial Port
    • 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

      Attachments

        1. main.cpp
          2 kB
        2. spamEcho.txt
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kuzulis Denis Shienkov
            quentind Quentin Doussot
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes