Fragment large V2X_RX messages and decode road-RSU SPATEMs

The firmware dropped every received ITS message over 494 bytes (one link
message), so a road RSU's 888-byte SPATEM and 1198-byte MAPEM never reached
the phone. V2X_RX now goes out in link fragments up to 2300 bytes, best
effort and non-blocking; messages up to 494 bytes are unchanged.

The app's SPATEM decoder then refused those messages because they carry
intersection and movement names and advisory speed lists. It now reads past
both, checked against asn1tools on 718 distinct messages.

Adds the pure fragmenter with host tests and a pcap replay, a Kotlin
cross-check on the firmware's own fragments, tools/rx_size_compare.py,
docs/08-large-message-reception.md and station-link revision 3.
This commit is contained in:
Ashin Walpola
2026-11-23 17:34:56 +01:00
parent 7dd83dba3d
commit ce18a393ea
24 changed files with 3305 additions and 2305 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ installed 2026-09-11).
**Firmware unit tests (`make firmware`, `test_firmware.cpp`, 40 tests):** the station-link codec byte-exact against
the app's `StationLinkTest` hex, the 131-octet STATUS offsets, request reassembly, the V2X_RX extension
(`main/v2x_rx.hpp`; the 494-octet limit, the 14-octet prefix, TX code -> air frame -> RX path), radio operating
(`main/v2x_rx.hpp`; the 494-octet limit, the 14-octet prefix, TX code -> air frame -> RX path; the plan for large messages and `link_fragment.hpp`'s fragments, round-tripped through two reassemblers), radio operating
points, the BLE TX guard, the ITS clock, CCA counters, BLE security and the battery policy. It prints PASS or FAIL
per test and a `RESULT:` line, and exits non-zero on a failure. It cannot test the radio, BLE, NVS or USB: those are
on the bench list in `TODO.md`.