Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QSerialPort manipulating RequestToSend signal freely

    General and Desktop
    2
    3
    955
    Loading More Posts
    • 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.
    • K
      Kloohtroosht last edited by

      Hi qt guys

      I have embedded linux machine with Qt application which uses QSerialPort class.
      On the other side of the uart link is a MCU running without operating system.
      The communication uses no handshake, only RxD and TxD lines are used.
      This is working properly.

      But i need to use serial port's RTS line for switching the MCU's power ON and OFF and to perform a reset.

      I am trying to use

      @serialPort->setRequestToSend(true);@

      but it does nothing if it was previously configured as

      @serialPort->setFlowControl(QSerialPort::NoFlowControl);@

      I found that it partially works with

      @serialPort->setFlowControl(QSerialPort::UnknownFlowControl);@

      which is not recommended to use and the bigger problem is that it starts to work only after some data is received by QSerialPort.

      Is there a correct way to use no handshaking and be able to set the RTS freely?

      Thank you for help (or even redirecting me to better place for this question)

      Best regards
      Jakub Ladman

      1 Reply Last reply Reply Quote 0
      • K
        kuzulis Qt Champions 2020 last edited by

        Hmm.. it is very strange, because in

        @serialPort->setFlowControl(QSerialPort::NoFlowControl);@

        mode, the RTS should be able to change at using

        @serialPort->setRequestToSend(true/false);@

        So:

        1. Can you please provide an simple complete example to reproduce a problem?

        2. What version of QtSerialPort do you use? From Qt 5.2, 5.3, or from Git sources?

        1 Reply Last reply Reply Quote 0
        • K
          Kloohtroosht last edited by

          QSerialPort was built for arm-linux device (nvidia tegra) from sources bundled with Qt-5.2.1

          I must prepare a little example, hopefully i will be able to do it tomorrow.

          Thank you

          1 Reply Last reply Reply Quote 0
          • First post
            Last post