Qt Forum

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

    Forum Updated on Feb 6th

    Unsolved How to configure the software flow control

    General and Desktop
    3
    6
    1120
    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.
    • S
      SurplusCJ last edited by

      Dear All:
      Currently i am developing a tool which used to catch the data from serialport, in the porject i use the QSerialPort class. But the remote device wish the PC tool (which i am coding now) need support software flow control, and wish the xOn char is 0x11, the xoff char is 0x13, the escape char is 0x77. so here is my question:

      1. what's the default values of the xon/xff/escape char,
      2. how to set the values of the xon/xoff/escape char as my expected.

      because i do not found any public APIs to set the values, the only API is setFlowControl, and the value is QSerialPort::FlowControl.

      JKSH 1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        1. xOn and xOff have standardised values
        2. Nothing to do since these values are known.

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

        1 Reply Last reply Reply Quote 2
        • S
          SurplusCJ last edited by

          Thanks SGaist.
          so the xOn and the xOff has the default value, do you know what's the default value of escape data ?

          currenlty, i have to write the uart driver with C program. and packet to be a dll which should be used in the Qt project.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            What escape char do you have in mind ? Because 0x77 is w.

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

            1 Reply Last reply Reply Quote 1
            • JKSH
              JKSH Moderators @SurplusCJ last edited by

              @SurplusCJ said in How to configure the software flow control:

              the escape char is 0x77

              Do you mean "escape character" or "termination character"? They are different things.

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              S 1 Reply Last reply Reply Quote 3
              • S
                SurplusCJ @JKSH last edited by

                @JKSH
                escape character is used by the software flow control.
                while the UART of PC is full to receive any more data, the PC should send the xOff char to device, then the device should stop sending. when PC is ready to receive data again, the PC should send the xOn char to device, then the device should send the data again.

                but if the data from device to PC contains the xOn char, the device should replace the xOn char with escape char, then the PC must convert it (escape char) to xOn char (value - 0x11) for data.

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