Skip to content

meetanthony/SerialMessageReceiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 

Repository files navigation

Serial Message Receiver

This script reads and parses structured messages from a serial (COM) port.
It is designed to work with a specific binary protocol based on a start flag, payload length, 8-byte counter, CRC-8, and an end flag.

πŸ›  Message Structure

  • Start flag (0xAA)
  • Payload length (1 byte)
  • 8-byte counter (payload)
  • CRC-8 checksum (calculated over counter (payload))
  • End flag (0x55)
+------------+--------+----------------+--------+------------+
| Start Flag | Length |    Counter     |   CRC  |  End Flag  |
|   (0xAA)   | 1 Byte |    8 bytes     | 1 Byte |   (0x55)   |
+------------+--------+----------------+--------+------------+

CRC is calculated using the CRC-8-CCITT algorithm.

πŸ“¦ Requirements

Before running the script, make sure you have Python 3 and install pySerial:

python -m pip install pyserial

Serial Message Sender

Use the companion sender script available at:

πŸ‘‰ https://github.com/meetanthony/SerialMessageSender

This script is designed to send properly formatted packets compatible with this receiver.

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages