2
votes

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 ?

1
CTS/DSR isn't a thing. There is RTS/CTS, or DTR/DSR. You can use one or the other, or both. You have to manually ensure that both ends are using the same method; there's no autodetection. If you don't want to use flow control and the other end does, you can set your pins to "always ready" . Then you can receive OK; but sending may not work if the other end has a buffer capacity and expects you to pause when it lowers its flag.M.M

1 Answers

1
votes

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