reading contents of serial port

Jun 19 2009 1:11 AM

Hi,
I am developing an application in C#.NET , for transferring data between two PC's using RS232 protocol.
For communication, i m using "SerialPort" class of "System.IO.Ports" namespace. when data is received on serial port, an event is fired where, i m reading data available on port using "ReadExisting()" method of SerialPort class.
My problem is, sometimes the method reads "\0\0?\0??\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0" charactes, instead of valid input string like "Hello".
can anybody help me on this issue?

Answers (2)