Serial2 and binary transfers

Discussion in 'Bug Reports' started by agraham, Oct 19, 2008.

  1. agraham

    agraham Expert Licensed User

    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);
            
    }
     
  2. Zenerdiode

    Zenerdiode Active Member Licensed User

    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
     
  3. agraham

    agraham Expert Licensed User

    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.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice