Add a receive path switch: V2X_RX or the spec's RAW_FRAME, with fragment reassembly

Settings > Connection > ESP32-C5 > Receive path chooses where received ITS messages come from.
V2X_RX (default) is the MicrOBU extension the board builds with gn_unwrap.c. Raw frames is the
station-link RAW_FRAME debug capture: the app switches RAW_CAPTURE on (mode 3), reassembles
fragmented link messages as the spec defines (LinkReassembly), parses the ITS5 record
(RawFrame) and unwraps the 802.11 frame with GnUnwrap, a Kotlin port of gn_unwrap.c. Both end
as the same V2X_RX frames, so nothing above the link changes, and the firmware keeps both.

GnUnwrapTest checks the port against the C code on 602 recorded, cut and corrupted frames
(corpus from obu-firmware/test/host: make corpus). 145 app tests. Fix the Connection text that
claimed the app picks the strongest micrOBU.
This commit is contained in:
Ashin Walpola
2026-11-11 16:19:32 +01:00
parent c96fd0086f
commit 1697091d3a
20 changed files with 1503 additions and 7 deletions
+5
View File
@@ -23,6 +23,11 @@ on the bench with the COM3 board as a listener:
Still open:
- [x] Receive path switch (2026-11-11, over BLE): `Raw frames` gave `RAW_CAPTURE mode 3 -> accepted` and the simulated car kept
arriving through the app's own unwrapper; back to `V2X_RX` gave mode 0 and it kept arriving.
- [ ] Fragmentation on air: a RAW_FRAME above one link message (a large MAPEM or SPATEM from a road RSU) reassembled in the
app over BLE and over USB; only unit-tested so far.
- [ ] Count both paths on the same traffic to see how many frames the raw copy drops on a busy link.
- [x] Bond persistence (2026-11-11): the board was reflashed (MTU 517) with its NVS kept; the phone reconnected to
micrOBU-66AA without a pairing prompt.
- [ ] Verify a captured signature with `test/verify_signed_pcap.py` (needs the sniffer firmware).