Packet protocols

Simple or more advanced packet protocols

Byte stuffing protocol

A fully functional prototype in C here

It does not take into account

  • timeout in tx and rx due to tx rx buffers stuffed

    • maybe just wait a litle time

  • no error checking

    • you have to add this by your self

  • No limit on how much you will receive before stopping before received end-of-fra,e symbol

  • Maybe an idea to reset receive if we do get a start-of-frame when we are looking for stop

    • v 0.13 now has user setable number of restart before giving up in rxPkg

  • maybe much more

Cobs

  • A very nice protocol with only 1 byte overhead in stuffing

  • Limitation on packetlength (opup to 253 ot 254)

  • You need to have whole data before encoding in the cobs packet

look here cobs.html

maybe more to come

Code

Code examples Src folder list: here