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. How to configure the software flow control
Forum Updated to NodeBB v4.3 + New Features

How to configure the software flow control

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.9k Views 3 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.
  • S Offline
    S Offline
    SurplusCJ
    wrote on last edited by
    #1

    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.

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

      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
      2
      • S Offline
        S Offline
        SurplusCJ
        wrote on last edited by
        #3

        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
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          1
          • S SurplusCJ

            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.

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            @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
            3
            • JKSHJ JKSH

              @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.

              S Offline
              S Offline
              SurplusCJ
              wrote on last edited by
              #6

              @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
              0

              • Login

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