Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSerialPort not working asynchronously under Windows
Forum Updated to NodeBB v4.3 + New Features

QSerialPort not working asynchronously under Windows

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 326 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fe.sc
    wrote on last edited by fe.sc
    #1

    Hello.

    The QSerialPort terminal example, which connects to the signals like readyRead do not function under Windows for Qt 5.12.5. The serial port is found and connected to, but the read signals are not caught at all. However, the synchronous reader example works fine. Is there a known issue for certain development environments, or, is there specific setup, order or configuration to get it running with the signals?

    Thank you.

    JonBJ 1 Reply Last reply
    0
    • F fe.sc

      Hello.

      The QSerialPort terminal example, which connects to the signals like readyRead do not function under Windows for Qt 5.12.5. The serial port is found and connected to, but the read signals are not caught at all. However, the synchronous reader example works fine. Is there a known issue for certain development environments, or, is there specific setup, order or configuration to get it running with the signals?

      Thank you.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #3

      @fe-sc
      You might want to read through https://forum.qt.io/topic/108848/terminal-example-for-qserialport-doesn-t-work-correctly and https://bugreports.qt.io/browse/QTBUG-78086, readyRead() broken under Windows, perhaps under some circumstances including Terminal example? The bug seems to indicate that one affected version was 5.12.5, which is yours? It claims fixed at 5.12.6 or 5.13.2 ?

      P.S.
      I believe for Qt5 it is suggested you should be on a stable 5.15.x, why not upgrade to that?

      F 1 Reply Last reply
      3
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #2

        Just a guess, but it could be because your USB-to-serial adapter does not support or generate interrupts, for example the FT232H USB-to-serial converter exhibits this problem.

        1 Reply Last reply
        0
        • F fe.sc

          Hello.

          The QSerialPort terminal example, which connects to the signals like readyRead do not function under Windows for Qt 5.12.5. The serial port is found and connected to, but the read signals are not caught at all. However, the synchronous reader example works fine. Is there a known issue for certain development environments, or, is there specific setup, order or configuration to get it running with the signals?

          Thank you.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #3

          @fe-sc
          You might want to read through https://forum.qt.io/topic/108848/terminal-example-for-qserialport-doesn-t-work-correctly and https://bugreports.qt.io/browse/QTBUG-78086, readyRead() broken under Windows, perhaps under some circumstances including Terminal example? The bug seems to indicate that one affected version was 5.12.5, which is yours? It claims fixed at 5.12.6 or 5.13.2 ?

          P.S.
          I believe for Qt5 it is suggested you should be on a stable 5.15.x, why not upgrade to that?

          F 1 Reply Last reply
          3
          • JonBJ JonB

            @fe-sc
            You might want to read through https://forum.qt.io/topic/108848/terminal-example-for-qserialport-doesn-t-work-correctly and https://bugreports.qt.io/browse/QTBUG-78086, readyRead() broken under Windows, perhaps under some circumstances including Terminal example? The bug seems to indicate that one affected version was 5.12.5, which is yours? It claims fixed at 5.12.6 or 5.13.2 ?

            P.S.
            I believe for Qt5 it is suggested you should be on a stable 5.15.x, why not upgrade to that?

            F Offline
            F Offline
            fe.sc
            wrote on last edited by
            #4

            Thanks for your answers.

            @JonB Thank you, this looks like the most possible reason for the situation. Unfortunately, I am implementing this as small part of a big code base, and I do not think altering Qt version is a viable option. Luckily, the waitForReadyRead blocking approach works, and I can stick with that. If necessary, I can think of moving it to a separate QThread to simulate a similar solution.

            JonBJ 1 Reply Last reply
            0
            • F fe.sc

              Thanks for your answers.

              @JonB Thank you, this looks like the most possible reason for the situation. Unfortunately, I am implementing this as small part of a big code base, and I do not think altering Qt version is a viable option. Luckily, the waitForReadyRead blocking approach works, and I can stick with that. If necessary, I can think of moving it to a separate QThread to simulate a similar solution.

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #5

              @fe-sc
              I do respect what you are saying and your decision. I would just say that I would expect a program running with Qt 5.12.5 to move to 5.15.x without any source changes or altered behaviour, just taking advantage of the bug fixes. But if you have it working now that is good.

              1 Reply Last reply
              0
              • F fe.sc has marked this topic as solved on

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved