views:

1055

answers:

1

How are RTSEnable and DtrEnable used? I am finding that some balances can communicate with my app but others can't even though the settings match. (baud rate, parity, data bits, stop bits and handshake)

The serial port settings are saved in the configurations file and the idea is to support different combinations of the possible settings, if needed. Normally, our devices are programmer to have handshake = NONE, but in case some odd device can't have handshake=NONE, should I insert a condition such as

   if (serialport.Handshake != NONE) {

serialport.RTSEnable = true; serialport.DtrEnable = true; }

Or rather, will other handshakes (other than NONE) work without RTSEnable and DtrEnable being set to true?

A: 

Whether or not hardware handshaking is required is based solely on the serial device you're attaching to. You would have to read the OEM specs for the device and see if the device needs handshaking and if it needs any special handling of RTS or DTR.

ctacke
The serial port settings (baud rate, parity etc) are stored inside a configuration file, so they can be changed. In general all our balances are configured the same, but there are some that aren't. If a device doesn't support Hanshake = None, would it work if I am not setting these flags in my code?
gnomixa
I guess a better way to ask this would be: if a device is configured to use handshake = none and I am doing serialPort.Open() with Hanshake=None, do I need these set to true? Provided the actual device SUPPORTS hanshake=none, of course
gnomixa