Serial2 and binary transfers

agraham

Expert
Licensed User
Longtime User
The problem is described in this thread http://www.b4x.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

B4X:
        private void sp_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            if ([COLOR="Red"]e.EventType == SerialData.Eof [/COLOR]|| !enableOnComm)
                return;
            if (OnCom != null)
                OnCom(eventObject, null);
        }
 

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
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…