Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serial port handshake. What the difference between Hardware and None handshaking?

I'm trying to determine the difference when I open serial port with hardware handshake and none handshake.

It seems that in both cases I have to control RTS/CTS signals (just tested it with one COM device). So what the difference between opening serial port with hardware handshake and without handshaking?

From my previous understanding, when we work without handshaking, we don't care about RTS/CTS and DTR/DSR signals. Just send and receive data whenever we want. Was I wrong?

One more question. Can we work without handshaking in full duplex mode only?

like image 516
Alex Klaus Avatar asked Sep 28 '11 05:09

Alex Klaus


People also ask

What is hardware handshaking?

Hardware handshaking is a communication process in which two devices or systems are connected. Two corresponding data signals are sent over different wires, cables or hardware elements to set up communication protocols.

What is handshake in serial port?

A handshaking exchange begins the flow of data on an RS232 link. Successful transmission of data on an RS232 link requires handshake lines, i.e. control signals that indicate data is ready to be sent and received across equipment. There are several types of handshake lines, including: RTS – Request to Send.

Does RS232 use hardware handshaking?

with the best hardware handshake, you will have no problem managing the flow of data across all devices using a serial connection. In RS232, there are two types of handshakes. Hardware handshake and a software handshake.

What is hardware flow control for serial port?

Hardware flow control is sometimes referred to as RTS / CTS flow control. This term mentions the extra input and outputs used on the serial device to perform this type of handshaking. RTS / CTS in its original outlook is used for handshaking between a computer and a device connected to it such as a modem.


1 Answers

As you probably know, the issue is "flow control". Like the Clash song "Should I stay or should I go?".

RTS/CTS is hardware control. XON/XOFF is software control. Otherwise, "just keep going".

This link might explain further:

http://www.lammertbies.nl/comm/info/RS-232_flow_control.html

I suspect that when you were asking about "handshaking" with respect to "duplex", perhaps you meant this:

http://en.wikipedia.org/wiki/RS-232

In older versions of the specification, RS-232's use of the RTS and CTS lines is asymmetric: The DTE asserts RTS to indicate a desire to transmit to the DCE, and the DCE asserts CTS in response to grant permission. This allows for half-duplex modems that disable their transmitters when not required, and must transmit a synchronization preamble to the receiver when they are re-enabled.

'Hope that helps!

like image 144
paulsm4 Avatar answered Sep 21 '22 13:09

paulsm4