Duplicate data received on Serial Port
<p>I am reading data from a police scanner using C# and serial ports (USB to Serial). When I view the data in a different program there's no problem. When I use the following code I get repeat (duplicate) lines for everything. What am I doing wrong?</p>

<pre><code>SerialPort _sp = new SerialPort();
_sp.BaudRate = 115000;
_sp.DataBits = 8;
_sp.Parity = Parity.None;
_sp.StopBits = StopBits.One;
</code></pre>

<p>and the function to start serial port reading...</p>

<pre><code>public void StartSerial()
{
    _sp.PortName = comboPorts.SelectedItem.ToString();
    _sp.DataReceived += new SerialDataReceivedEventHandler(serialPort_DataReceived);
    _sp.Open();
}
</code></pre>

<p>and the read function...</p>

<pre><code>private void serialPort_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
    try
    {
        String strLine = _sp.ReadLine();
        // Handle Data
    }
    catch { }
}
</code></pre>

<p>The manual states the following is required:</p>

<blockquote>
  <p>To view CCDump data, connect the radio to a personal computer using the USB PC/IF cable. Start a terminal program or your third party application software. Configure the communications parameters for “115200, N, 8, 1” as follows:</p>
  
  <p>COM Port: The COM port number assigned to the USB cable by your computer. If you are running a Windows operating system, you can find this information under “Ports” in the Device Manager.</p>
  
  <p>Parity: None</p>
  
  <p>Baud Rate: 115,000 bits per second</p>
  
  <p>Word: 8 bits</p>
  
  <p>Stop Bits: 1</p>
</blockquote>
