This is Tiny protocol implementation for microcontrollers (Arduino, Stellaris).
Introduction
This protocol is intended to be used in low-memory systems, like microcontrollers (Stellaris, Arduino). It is also can be compiled for desktop Linux systems, and it is possible to build it for Windows.
Tiny Protocol API
Linux API supports C-Style functions, while Arduino API supports both C-Style and C++ classes. Usage C++ Arduino classes makes easy use of the protocol for Arduino projects. Please refer to documentation.
Packet Structure
Full packet format:
8 16 any len None/8/16/32 8
| 7E | UID | USER DATA | FCS | 7E |
- 7E is packet delimiter (commonly used on layer 2) as defined in HDLC/PPP framing. packet delimiter is used by the protocol to find first and last byte of the frame being transmitted.
- UID mean unique identifier of the frame. For Half Duplex Tiny Protocol (HALF_DUPLEX_API) it is widely used in acknowledge frames. This field is optional, you may omit UID parameter in SIMPLE_API and ADVANCED_API functions.
- USER DATA of any length. This field contains user data with replaced 0x7D and 0x7E bytes by special sequenced as defined in HDLC/PPP framing. Length of data is now limited on buffer used to receive frames and/or 32767 bytes (Tiny Protocol using 16-bit field to store frame length).
- FCS is standard checksum. Depending on your selection, this is 8-bit, 16-bit or 32-bit field, or it can be absent at all. Refer to RFC1662 for examples. FCS field is also optional and can be disabled. But in this case transport errors are not detected.
Arduino related documentation
Arduino related API (C++)