Unsolved How to configure the software flow control
-
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:- what's the default values of the xon/xff/escape char,
- 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.
-
Hi and welcome to devnet,
- xOn and xOff have standardised values
- Nothing to do since these values are known.
-
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.
-
What escape char do you have in mind ? Because
0x77
isw
. -
@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.
-
@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.