QSerialPort manipulating RequestToSend signal freely



  • 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



  • 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?



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.