The problem is described in this thread http://www.basic4ppc.com/forum/questions-help-needed/3155-receiving-byte-value-0x1a.html To be able to use Serial2 for binary transfers the extra EOF event needs to be ignored so the event code needs to be something like this Code: private void sp_DataReceived(object sender, SerialDataReceivedEventArgs e) { if ([COLOR="Red"]e.EventType == SerialData.Eof [/COLOR]|| !enableOnComm) return; if (OnCom != null) OnCom(eventObject, null); }
Erel, In the article referenced by agraham - 'Serial Communicationwith Visual Basic .NET' - it metions a few more events that may be raised. I'd be grateful if you would look to see if these events may be incorporated in Serial2. I'm particularly interested in the EV_CTS, EV_DSR and EV_RLSD events. Best Regards, Christopher
You could also add SerialPort.CDHolding as a CD property and SerialPort.GetPortNames which might be useful. That might just about complete the useful exposure of SerialPort.