Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Problems with QSerialPort
Forum Updated to NodeBB v4.3 + New Features

Problems with QSerialPort

Scheduled Pinned Locked Moved Unsolved Qt 6
6 Posts 4 Posters 1.1k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    AlbertoMonreal
    wrote on last edited by
    #1

    Hello :)
    I have several problems for QSerialPort in Windows 10 and version qt 6.6.0
    First, I have a question about using QSerialPort.
    In Windows I understand that for the communication between the program and the device to work I have to set "serialport" as open and then:
    _serial_port->setDataTerminalReady(true);
    But it is always false and never changes anywhere in the program.
    I don't know if you have modified this over time or if it is a bug or if it is the cause of:
    When I request data from the device, at "random" times, the device crashes and returns nothing.
    And I have checked with other "realterm" type programs and it works perfect so the device is fine.
    But in QT, it fails.
    Example using QT + Telnet:
    Captura.PNG
    As you can see, for example, it fails and it doesnt return "64" when i say "gf" in random moments.
    So i want to know if it its a bug from QT in windows or whatever...

    Code of the config:
    Captura2.PNG

    I hope we can solve it in case it is a bug.
    All the best.

    Ronel_qtmasterR 1 Reply Last reply
    0
    • A AlbertoMonreal

      Hello :)
      I have several problems for QSerialPort in Windows 10 and version qt 6.6.0
      First, I have a question about using QSerialPort.
      In Windows I understand that for the communication between the program and the device to work I have to set "serialport" as open and then:
      _serial_port->setDataTerminalReady(true);
      But it is always false and never changes anywhere in the program.
      I don't know if you have modified this over time or if it is a bug or if it is the cause of:
      When I request data from the device, at "random" times, the device crashes and returns nothing.
      And I have checked with other "realterm" type programs and it works perfect so the device is fine.
      But in QT, it fails.
      Example using QT + Telnet:
      Captura.PNG
      As you can see, for example, it fails and it doesnt return "64" when i say "gf" in random moments.
      So i want to know if it its a bug from QT in windows or whatever...

      Code of the config:
      Captura2.PNG

      I hope we can solve it in case it is a bug.
      All the best.

      Ronel_qtmasterR Offline
      Ronel_qtmasterR Offline
      Ronel_qtmaster
      wrote on last edited by
      #2

      @AlbertoMonreal first of all remove setDataTerminalReady because you do not need it to read data in serial port.
      Now when ready read signal is emitted, read your data.

      A 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        setDataTerminalReady is not mandatory for all serial ports.

        Did you try without it as well ?

        Another thing you can check is with a previous version of Qt to see if something has changed in between.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        A 1 Reply Last reply
        0
        • Ronel_qtmasterR Ronel_qtmaster

          @AlbertoMonreal first of all remove setDataTerminalReady because you do not need it to read data in serial port.
          Now when ready read signal is emitted, read your data.

          A Offline
          A Offline
          AlbertoMonreal
          wrote on last edited by
          #4

          @Ronel_qtmaster It doesnt matter. I tried everything(tru,false,deleting....everything) and it doesnt work correctly.
          I think that it is a bug. But i need that someone in "QT group" check it.

          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi and welcome to devnet,

            setDataTerminalReady is not mandatory for all serial ports.

            Did you try without it as well ?

            Another thing you can check is with a previous version of Qt to see if something has changed in between.

            A Offline
            A Offline
            AlbertoMonreal
            wrote on last edited by
            #5

            @SGaist yeah, but it doesnt matter. True,false or deleting. The console shows the same problem. The response is always the same, the device does not respond well to some of the requests randomly (as I show in the photo).
            By telling you about randomly, it only makes me think that it is a bug.
            But i need to be sure 100% about that because i am trying to do this for my company.

            And about testing versions, I once saw that in 5.3 there are usually no errors but it didn't work for me either. I guess I could try several versions... I don't lose anything, right? Haha
            But I would like that "QT group" could confirm 100% that it is a bug and see if it can be solved or not.
            Best regards :)

            1 Reply Last reply
            0
            • aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by aha_1980
              #6

              This lead to QTBUG-123768

              Qt has to stay free or it will die.

              1 Reply Last reply
              1

              • Login

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