Search code examples
c++serial-portflow-control

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 ?


Solution

  • 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".