title: How can I send STX and ETX over serial port in C#?
body: <p>I'm trying to receive a chain from a serial port, and writing it to another serial port
  easy right?
  receiving the data is no problem, but when i try to write exactly the same byte array to the other port, STX and ETX dissapear, and I really can't figure  why.<br>
  the chain format is:</p>
  
  <pre><code>&lt;STX&gt;&lt;VALUE&gt;&lt;ETX&gt;&lt;LRC&gt;
  </code></pre>
  
  <p>when converting  the byte array to string, the 02 and 03, values of STX and ETX still there, but when i send the byte array to the other port, it only sends <code>&lt;VALUE&gt;&lt;LRC&gt;</code> </p>
  
  <p>Example:</p>
  
  <p>received chain byte array, converted to string.</p>
  
  <pre><code>026131300360
  </code></pre>
  
  <p>ascii representation</p>
  
  <pre><code>.a10.`
  </code></pre>
  
  <p>ascii received in the second port</p>
  
  <pre><code>a10`
  </code></pre>
  
  <p>My code</p>
  
  <pre><code>Queue&lt;Byte[]&gt; Port1Tail= Port1.lista; // a queue of byte arrays received
  
  if (volumTail.Count &gt; 0)
              {
                  Byte[] cadena = Port1Tail.Dequeue(); 
                  StringBuilder tramabuild = new StringBuilder();
                  foreach (Byte b in cadena)
                  {
                      tramabuild.Append(((Int16)b).ToString("x"));
                  }
                  String trama = tramabuild.ToString();  
                  Byte[] cale = ToByteArray(trama);
  
                  inputlistbox.Items.Insert(0, trama); 
  
  
                  Port2.Send(cale, 0, cale.Length);
                  //Port2.Send(cadena, 0, cadena.Length);
  
              }
  </code></pre>
  
  <p>As you could notice, I already try to send the received chain exactly as i received it, and even try to convert it to string, and then back to byte array with the exactly same result.</p>
  
  <p>Can somebody please tell me  what im doing wrong?  </p>