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
Enterprise-grade ITSM, for every business Icon
Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.

Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Try it Free
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