#serial-communication #serial #serial-port #uart #messaging #send-receive

simp_protocol

simp_protocol is a simplistic protocol to communicate over serial ports. It supports ack, automated escaping and unescaping of special bytes and checksum error detection.

1 unstable release

0.2.0 Oct 24, 2024
0.1.1 Aug 25, 2024
0.1.0 Aug 25, 2024

#355 in Embedded development

Download history 162/week @ 2024-08-20 47/week @ 2024-08-27 21/week @ 2024-09-10 15/week @ 2024-09-17 23/week @ 2024-09-24 45/week @ 2024-10-01 5/week @ 2024-10-08 125/week @ 2024-10-22 2/week @ 2024-10-29

127 downloads per month

MIT license

38KB
785 lines

Simp UART Protocol Library

A simple and reliable UART communication protocol implemented in Rust. This library provides functionality to send and receive data packets over UART, with optional acknowledgment (ACK) handling, making it suitable for embedded systems like the ESP32 and standard PC applications.

Features

  • Packet-based communication with start and end delimiters.
  • Automatic escaping and unescaping of special bytes.
  • Checksum for error detection.
  • Support for sending packets with or without waiting for ACK.
  • Compatible with both embedded systems (e.g., ESP32) and standard PCs (Windows/Linux).

Getting Started

Prerequisites

  • Rust: Make sure you have Rust installed. You can install it from rust-lang.org.
  • ESP32: If you plan to use this library on an ESP32, read this guide first.

Installation

Add this library to your Cargo.toml:

[dependencies]
simp_protocol = { version = "0.2.0" }  # Adjust the path as necessary

How to use?

Please check out examples directory as it contains all you need to start using this library.

License

This library is published with MIT license.

No runtime deps