title: Not receiving data with C# serial port class (4800bps, Even parity, 2 stopbits, 7 databits)
body: <p>I have to communicate with a MarCator digital Indicator via serial (I usb a serial to USB adaptor).
  The protocol is:
  DTR to -Vdd for 100ms to 1s.
  Then the frame of 9 bytes is emitted 15ms to 160ms later.</p>
  
  <p>With TeraTerm, it works like a charm but I'm not able to make it work with C#.</p>
  
  <pre><code>Char[] buff = new Char[9];
  SerialPort port = new SerialPort("COM25", 4800, Parity.Even, 7, StopBits.Two);
  
  Console.WriteLine("Created");
  port.Open();
  port.DtrEnable = true;
  Console.WriteLine("Open");
  Thread.Sleep(500);
  
  port.DtrEnable = false;
  Thread.Sleep(500);
  port.DtrEnable = true;
  
  Thread.Sleep(200);
  if (port.BytesToRead != 0) {
      port.Read(buff, 0, 9);
      Console.WriteLine(buff);
  }
  else {
      Console.WriteLine("Fail...");
  }
  port.Close();
  </code></pre>
  
  <p>I see that the MarCator is receiving the DTR command but port.BytesToRead is always 0.</p>
  
  <p>Regards,
  Val'</p>