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

QSerialPort::waitForBytesWritten() does not work properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.3.1
    • 5.2.1
    • Serial Port
    • None
    • Qt5.2.1, Windows 7 64bit, Qt 5.2.1 for Windows 32-bit (MinGW 4.8, OpenGL, 634 MB)

      Now, in Qt5.2.1 QTBUG-33987 seems to be fixed, I have no longer the problem that waitForReadyRead returns true although the following readAll() returns an empty QByteArray.

      Unfortunately, the method waitForBytesWritten seems to be broken now. Sometimes, not always, the function timeouts and therefore returns false. At the moment I have two solutions:

      1. Don't call waitForBytesWritten. I've a handshake based communication, so every write causes a response, that I check by calling waitForReadyRead. Instead of
        write -> waitForBytesWritten -> waitForReadyRead -> readAll
        I just use it this way now:
        write -> waitForReadyRead -> readAll
      2. Return to Qt5.2.0

        For Gerrit Dashboard: QTBUG-36758
        # Subject Branch Project Status CR V

            kuzulis Denis Shienkov
            rene René Keimling
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes