Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
2.73/5 (10 votes)
See more:
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. but now i have a problems in recieveing the data and sending the data. even one major problem is whenever i'll recieve at that time i have to identify the begining of message and ending of message as well as if two messagees are recieveing at thae same time then how to differentiate that messagees. please help me i nthat. i really stuck in that. thank you in advance

Posted

To parse individual messages out of a stream of them there needs to be a start message flag that signals the beginning of a message. Just pick a unique character or pattern of characters and put that at the beginning of each message. Pick a different flag and put it at the end to identify where each message stops.


 
Share this answer
 
while sending Create a Signature (pattern) at the begenning and end of the packet. so that you can identify the packet at the receiving end.
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900