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

QSerialPort: synchronous read fails as waitForReadyRead() always times out.

    XMLWordPrintable

Details

    • Windows
    • 4ff9993d9f2e991f2da1885a694d4f3a61c9af73 01e0371f9d (qt/tqtc-qtserialport/5.15) f3a306a30f (qt/qtserialport/dev) f3a306a30f (qt/tqtc-qtserialport/dev) b71e60fbed (qt/tqtc-qtserialport/6.2) 6d5b4b3d71 (qt/qtserialport/6.3)

    Description

      In synchronous Read this code doesn't work. waitForReadyRead always return false, "buff" will be empty always.

       

      while (m_serialPort->waitForReadyRead(TOUT_MS))
      {
          buff.append(m_serialPort->readAll());
      }

       

      Instead async Read work properly. Signal ReadyRead generated properly.

      In 5.12.9 , 5.6 all work correctly.

      Attachments

        1. asyn_ok.cpp
          0.7 kB
          noksel J
        2. async_ok.jpg
          306 kB
          noksel J
        3. sync1_fail.cpp
          0.7 kB
          noksel J
        4. sync1_fail.jpg
          312 kB
          noksel J
        5. sync2_ok.cpp
          0.8 kB
          noksel J
        6. sync2_ok.jpg
          308 kB
          noksel J

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              noksel noksel J
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes