I’m working on with an embedded device that is connected to PC using rs232 (rs232 over USB).
I’m thinking about developing my own protocol:
<MAGIC><LENGTH><BINARY DATA><CRC>
but I don’t want to reinvent the wheel.
Please note that: I'm thinking about quite restricted device: 4kb of RAM, no kernel, nor standard C lib.
Can you think about a standard way to do this (maybe open source library)?
If you code your own solution do have any best practices?
- Do you use MAGIC bytes also at the end of packages?
- Maybe it is better to use time gaps instead of delimiters?
- How do you find the beginning of packages in a stream binary data?
- Maybe it is better to use text protocols?
UPDATE: Please re read the question. I shouldn't ask for library but for good practices.