WireFraming
Single source of truth for the Meshtastic STREAM_API wire-framing constants shared by every stream-oriented transport (TCP, USB-CDC serial, BLE).
Per protocol.md §2, the on-wire framing is:
+------+------+----------+----------+==================+
| 0x94 | 0xC3 | LEN_HI | LEN_LO | protobuf bytes |
+------+------+----------+----------+==================+The 4-byte header is followed by up to MAX_PAYLOAD_SIZE bytes of protobuf payload, giving a total wire envelope of at most MAX_FRAME_ON_WIRE bytes.
Centralising these here lets the per-transport framers avoid redefining the same magic numbers; see WireCodec for the engine encoder/decoder that uses the same values.
Properties
Fixed framing header length: MAGIC_0 MAGIC_1 LEN_HI LEN_LO.
Maximum total on-wire envelope size: HEADER_SIZE + MAX_PAYLOAD_SIZE.
Maximum payload size in bytes (exclusive of header). Enforced by the firmware's de-framer; frames whose announced length exceeds this trigger a resync rather than a buffer overflow.