0
0
Fork 0

docs: Add BLE and UART protocol specification

This commit is contained in:
Jannik Beyerstedt 2026-05-15 15:17:04 +02:00
commit 29a5d86e43
4 changed files with 196 additions and 1 deletions

20
docs/uart-protocol.md Normal file
View file

@ -0,0 +1,20 @@
# UART Protocol
If enabled using the `TODO` feature flag, all received messages are transmitted on UART using the protocol described in this document.
The serial communication can also be used to send V2X data.
## Message Format
The UART communication is using a custom framing protocol to encapsulate binary messages.
The payload is:
- a `SerialOutputMsg` for transmissions from the ESP to the host or
- a `SerialInputMsg` for transmissions from the host to the ESP
in binary [Proto](https://protobuf.dev/) serialization according to the [c_its-messages.proto](./c_its-messages.proto) definition.
Each transmission:
- starts with a Start of Frame (SOF) sequence: `0x56, 0x32, 0x58, 0x2B` ("V2X+")
- followed by a 16-bit big-endian length field
- followed by the payload
- followed by an End of Frame (EOF) sequence `0x0d, 0x0a`