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

QtSerialPort::write does not send any data

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 6.5.2
    • Serial Port
    • None
    • Qt: 6.5.2 MinGW
      OS: Windows 11
      Serial Port: USB FTDI Adapter with FTDI driver 2.12.36.3
    • Windows

    Description

      We have a Qt 5.15.2 application and send data via QtSerialPort::write

      d->SerialPort->write("T\r\n");
      

      This works. Now we switched to Qt 6.5.2 and noticed, that this code does not send any data. Also calling the function multiple times or with a longer data string, does not trigger sending of data. The only solution was to modify the code in the following way:

      d->SerialPort->write("T\r\n");
      d->SerialPort->waitForBytesWritten(1);
      

      This triggers sending of data and then the driver works like in Qt 5.15.2. The SerialPort object runs in its own worker thread.

      The question is: Is this a bug or a feature?

      Attachments

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

        Activity

          People

            ivan.solovev Ivan Solovev
            ukindler Uwe Kindler
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes