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

QSerial property settingsRestoredOnClose to control the RTS line

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.0, 6.1, 6.4, 6.2
    • Serial Port
    • None
    • Windows 11
    • Windows

    Description

      For a project that interfaces a micro controller, we rely on controlling the RTS line of a serial port.

      In Qt versions <6 we could ensure that the RTS line stayed in its state after closing the port by setting the (deprecated) property settingsRestoredOnClose to false. Then it was possible to control the state of RTS by our program but after closing the port the line stayed silent.

      With Qt6 the setters for settingsRestoredOnClose were removed. I read that it was planned that the property is set to false by default with Qt6 (https://forum.qt.io/topic/52613/qserialport-sets-dtr-to-high-upon-closing-port-won-t-emit-readyready-when-dtr-is-otherwise-held-high/11 ), which is not the case, as I could read from the sources: https://code.qt.io/cgit/qt/qtserialport.git/tree/src/serialport/qserialport_p.h?h=6.4.0 line 166.

      On a Windows PC after closing the port there are always some pulses on the RTS line (20 ms) because Qt or windows tries to restore the initial state. The removal of the API for setting settingsRestoredOnClose makes it impossible for us to upgrade to Qt6 without breaking our product.

      Is there a workaround? - I did some hours of research on the topic. But there seems to be nothing.

      Is there any reason against including the setters for settingsRestoredOnClose again?

      Attachments

        Issue Links

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

          Activity

            People

              ablasche Alex Blasche
              pr2384 Philipp Rosendahl
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes