2

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 ?

dsolimano
  • 8,870
  • 3
  • 48
  • 63
cazicss
  • 25
  • 3
  • 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 Jul 10 '14 at 05:42

1 Answers1

1

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

Mats Petersson
  • 126,704
  • 14
  • 140
  • 227
  • Thanks for the reply. I'm merely reading from a serial device that's kicking data out to me. I set all the flow control values to zero in the initial memset and data is still flowing so should I assume that the device applies no flow control ? – cazicss Jul 09 '14 at 23:29
  • Mmh "requiring".. fun word. This means I will turn on hardware flow control on my end and find out if the device gets pissed or not lol.-- Thanks again :3 ! – cazicss Jul 09 '14 at 23:37