Hello, EveryBody.
I write the app for NORTEL ATS, wich connected to PC by COM. This ATS sending data to COM about every 30 mins. i recieve strange chars... 1006, 288, 992, 1312... some garbage, and then app crashed, with exception on readchar(). may be something with encoding i chosed UTF8.
for reading data i use DataReceived Event handler
and then:
char ch;
if (SerialData.Chars == e.EventType){
while (serialPort1.BytesToRead>0){
try
{
ch = Convert.ToChar(serialPort1.ReadChar());
}
.NET Development19
|