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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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