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:
@@ -86,6 +86,7 @@ firmware is what counts; the current spec table lists the same UUIDs).
|
||||
| phone → board | `STATUS_REQUEST` | once a second; the answer is the heartbeat |
|
||||
| board → phone | `CONFIRM` | answer to a request; for `STATUS_REQUEST` its detail is the 131-octet snapshot: counters, tickets, signed/refused counts, battery |
|
||||
| board → phone | `V2X_RX` (0x90, MicrOBU) | every ITS message heard on air |
|
||||
| board → phone | `RAW_FRAME` (0x85, spec) | debug copy of each radio frame, only while `RAW_CAPTURE` is on; the app can use it instead of `V2X_RX` (Settings > Receive path) |
|
||||
|
||||
The app side is `Esp32Link.kt` (session), `StationLink.kt` (codec, pinned by unit tests to bytes
|
||||
from Niklas Dathe's Python implementation), `UsbSerialTransport.kt` and `BleLinkTransport.kt`.
|
||||
@@ -95,6 +96,9 @@ spec retires but the station still decodes, and revision 2 documents): a ride ro
|
||||
pinger keeps one fixed MAC, and a new MAC reconfigures the station. Without one a signed station takes its address from the
|
||||
ticket and an unsigned one draws a random MAC per configuration. With one, signed and unsigned frames both leave from it.
|
||||
|
||||
The app also **reassembles fragmented link messages** (flags 1-3 of the spec) and has two receive paths: `V2X_RX`
|
||||
(default) and `RAW_FRAME`, which it unwraps itself with `GnUnwrap.kt`; see the README for the comparison.
|
||||
|
||||
## Redundancy and recovery
|
||||
|
||||
| Situation | What notices | What happens |
|
||||
|
||||
Reference in New Issue
Block a user