Raise host frame payload limit so multi-client UART replies fit.

Use a uint16 LE length and 1024-byte max payload so CLIENT_INFO and BATTERY_STATUS no longer fail encoding past ~10 connected pods.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-01 23:43:33 +01:00
co-authored by Cursor
parent 73f48c8002
commit 9046677460
11 changed files with 72 additions and 39 deletions
+2 -2
View File
@@ -225,12 +225,12 @@ Unabhängig von Protobuf — reines Bytestream-Framing:
| Feld | Wert |
|------|------|
| Start | `0xAA` |
| Länge | 1 Byte (1–252) |
| Länge | 2 Bytes little-endian (1–1024) |
| Payload | `length` Bytes |
| Prüfsumme | XOR aller Payload-Bytes |
| Stopp | `0xCC` |
**Parameter:** `main/uart.h` — `UART_NUM_1`, `921600` Baud, TX GPIO **2**, RX GPIO **3**, `MAX_PAYLOAD_SIZE` 248.
**Parameter:** `main/uart.h` — `UART_NUM_1`, `921600` Baud, TX GPIO **2**, RX GPIO **3**, `MAX_PAYLOAD_SIZE` 1024.
### 5.2 Nutzlast (Anwendung)
+4 -4
View File
@@ -124,10 +124,10 @@ idf.py -p /dev/ttyUSB0 flash monitor
| Byte | Inhalt |
|------|--------|
| 0 | `0xAA` Start |
| 1 | Länge N (1–252) |
| 2…N+1 | Payload |
| N+2 | XOR-Checksum über Payload |
| N+3 | `0xCC` Stopp |
| 1–2 | Länge N little-endian (1–1024) |
| 3…N+2 | Payload |
| N+3 | XOR-Checksum über Payload |
| N+4 | `0xCC` Stopp |
Implementierung: `uart.c` — `parse_uart_byte()`, `uart_send_framed()`.
+1 -1
View File
@@ -287,7 +287,7 @@ Entspricht `main/README.md`:
| Byte | Inhalt |
|------|--------|
| Frame | `0xAA`, Länge, Payload, XOR-Checksum, `0xCC` |
| Frame | `0xAA`, Länge (uint16 LE), Payload, XOR-Checksum, `0xCC` |
| Payload[0] | `MessageType` (z.B. `22` = FIND_ME) |
| Payload[1…] | Nanopb-`UartMessage` |