Simple protocol for sending minimal length serial messages for devices using RS-232 directly or over USB. Messages are minimized by sending data as raw binary with only symbols 0xFF and 0xFE defined as special. 0xFF is the message start symbol and 0xFE is the escape symbol. Data values 0x00 to 0xFD are sent verbatim. Data value 0xFF is sent as byte pair 0xFE, 0xFD and 0xFE is sent as byte pair 0xFE, 0xFE.
Data messages are minimized by maximizing the common knowledge of the sender and receiver. The escape symbol followed with one or more bytes is used to create a 'hint' by the sender for how the receiver should interpret the following data bytes. Both sender and receiver have perfect knowledge of how hints should be interpreted, therefore only a minimal amount of data needs to be sent.
The message receiver is a state machine. When it receives 0xFF it resets its output buffer and waits for the message hint. The message hint is then used to select a function to receive the message.

Project Activity

See All Activity >

Follow simple_serial_protocol

simple_serial_protocol Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of simple_serial_protocol!

Additional Project Details

Registered

2023-03-12