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:
@@ -27,7 +27,7 @@ CFLAGS = -std=c11 -O2 -g -Wall -Wextra -Wpedantic -Werror -I$(FW) -I. \
|
||||
FW_SRCS = $(FW)/geonet.c dot11p.c $(FW)/gn_unwrap.c
|
||||
DEPS = test_util.c test_util.h dot11p.h $(FW_SRCS) $(wildcard $(FW)/*.h)
|
||||
|
||||
.PHONY: all check chain replay fuzz battery firmware clean
|
||||
.PHONY: all check chain replay fuzz battery firmware corpus clean
|
||||
|
||||
all: check
|
||||
|
||||
@@ -82,3 +82,14 @@ $(BUILD)/test_firmware$(EXE): test_firmware.cpp $(FW_CXX_SRCS) $(wildcard $(FW)/
|
||||
|
||||
firmware: $(BUILD)/test_firmware$(EXE)
|
||||
$(BUILD)/test_firmware$(EXE)
|
||||
|
||||
# Corpus for the app's GnUnwrapTest (the Kotlin port of gn_unwrap.c): recorded frames, cut and corrupted copies of
|
||||
# them, with the verdict and fields of the firmware's own code. Writes ../../../app/src/test/resources/gn_unwrap_corpus.tsv
|
||||
CORPUS_OUT = ../../../app/src/test/resources/gn_unwrap_corpus.tsv
|
||||
|
||||
$(BUILD)/dump_corpus$(EXE): dump_corpus.c test_util.c test_util.h $(FW)/gn_unwrap.c $(FW)/gn_unwrap.h | $(BUILD)
|
||||
$(CC) $(CFLAGS) -o $@ dump_corpus.c test_util.c $(FW)/gn_unwrap.c
|
||||
|
||||
corpus: $(BUILD)/dump_corpus$(EXE)
|
||||
mkdir -p $(dir $(CORPUS_OUT))
|
||||
$(BUILD)/dump_corpus$(EXE) $(CORPUS_OUT) $(RECORDINGS)
|
||||
|
||||
Reference in New Issue
Block a user