We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi. My name is Rodrigo and I'm working in a project that contains 2 device connected by means of a serial line. Now, I need to implement a protocol that will support a common communication between these devices. I'm using RS-232, I have a rate = 9600bps and my receiver device contains a buffer of 70 bytes. The communication will be asynchronous and I'm thinking about to use blocks of messages with 64 KBytes. What protocol should I use in this case? Is the BSCM protocol appropriate to it? Is there a simpler protocol to my case? I'm new in this subject and I need a help. Any hint will be very helpful. Thanks, Rodrigo Pimenta Brazil.
I guess, you are talking about message blocks of 64Byte and not 64kByte, right? I mean, if you only have a buffer of 70 bytes. I think, you also don't need an acknowledge window of more than one frame. So I'd think of an easy protocol with a CRC byte at the end and a short header to synchronize to the packet start. You could use a byte sequence of FF FF to indicate the packet start and every time you have FF in your data, you can send FE after that, to indicate, it is a real FF data byte and not part of the header. This way, you can prevent something like a header like sequence in your data. And then you shure need ackknowledge messages that should be short. They could look like FF 00, because that wouldn't occure in the data either (because you send an FE after each real FF. The FE will be dismissed by the receiver). I think, that is a pretty simple protocol. Maybe you can make the messages short, so you can have an acknowledge frame of 2. This way, you can send the next message before you have received an acknowledge for the last frame. The advantage is, that it is faster, but the protocol will be more complex. Take care Sven