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:
@@ -101,6 +101,15 @@ eFuse-based gates, an on-device TS 102 941 client (enrolment and authorisation r
|
||||
update), the `RAW_CAPTURE` debug path, fragmentation of link messages, the XIAO and `mainboard-v5` boards, and the
|
||||
battery reading.
|
||||
|
||||
### Both receive paths stay
|
||||
|
||||
`V2X_RX` (ours) and `RAW_FRAME` / `RAW_CAPTURE` (Niklas Dathe's, in the spec) both stay in the firmware, and the app has a switch
|
||||
(Settings > Connection > ESP32-C5 > Receive path) that chooses which one it consumes. The firmware does not know which: it
|
||||
always sends `V2X_RX`, and sends `RAW_FRAME` while `RAW_CAPTURE` is on (the app turns it on, mode 0x03, only in raw mode). In raw
|
||||
mode the app unwraps the frame itself with `GnUnwrap.kt`, a port of `gn_unwrap.c` that `GnUnwrapTest` checks against the C code
|
||||
on a corpus (`make corpus` in `test/host` writes `app/src/test/resources/gn_unwrap_corpus.tsv`). The app also reassembles
|
||||
fragmented link messages as the spec defines them, so a raw frame or an indication above one link message works.
|
||||
|
||||
### Measured on the bench, 2026-11-11
|
||||
|
||||
Production XIAO on COM10, Pixel 9 Pro on BLE, COM3 board as an on-air listener (details and open points in `TODO.md`):
|
||||
|
||||
Reference in New Issue
Block a user