简体   繁体   中英

Serial Port Flow Control

C++ / Windows API

When specifying hardware flow control for my rs232 port via SetCommState(), I know this asks the OS to attempt flow control with CTS/DSR signaling.

Does this configuration:

1) assume that the serial device at the other end of communications already supports CTS/DSR line flow control?

2) or expect me to somehow acquire the flow control capability of the connected serial device ?

This setting assumes that the other end is signalling CTS/DSR to your end. If this is not the case, no data will flow.

Or, if the pins are hard-wired at the other end, which is sometimes the case, it will have "no flow control, CTS/DSR is always in a state that allows data to be sent/received, whether the actual device is ready or not".

Of course, it's conceivable to have a device where the latter is configured as default, and you somehow send commands/information via the serial port to say "now make your CTS/DSR pins reflect whether you can send/recieve data".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM