title: c# Handling handshake RTS/CTS
body: <p>So just a bit of context I have 2 devices that communicate with each other by rs232 with RTS/CTS and i need to replace one of the devices with my own device and software.</p>
  <p>I am trying to achieve this by using the System.IO.Ports.SerialPort library that from what i could gather online this library handles the handshaking by itself if we set the RtsEnable property to &quot;true&quot; and the Handshake property to &quot;RequestToSend&quot; but I am facing some issues receiving data from the device.</p>
  <p>When testing my software i am not being able to receive anything from the device <strong>but</strong> if I change the wiring to simply work as a sniffer between the two original devices I can receive the data properly. From what I can gather it must be something I am doing wrong to handle the handshaking.</p>
  <p>Here is the code i am trying:</p>
  <pre><code>stationPort = new SerialPort(stationPortNumber, baudRate, parity, dataBits, stopBits);
  stationPort.RtsEnable = true;
  stationPort.Handshake = Handshake.RequestToSend;
  stationPort.DataReceived += StationPort_DataReceived;
  stationPort.Open();
  
  private static void StationPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
  {
      byte[] bytes = new byte[20];
      stationPort.Read(bytes, 0, stationPort.BytesToRead);
      string hexConvert = BitConverter.ToString(bytes);
      Console.WriteLine(&quot;Station OUT &gt;&gt;&gt; &quot; + hexConvert);
  }
  </code></pre>
  <p>I also double checked the wiring to make sure it was properly connected and also changed the converter because sometimes these are not wired properly so I chose a MOXA UPort 1150 which is more reliable.</p>
  <p>With that being said, my question is what am I doing wrong with my implementation?
  Am I supposed to do more to guarantee the handshaking?</p>