|
F439_CPP_TX-RX_LoRa_Project
|
Part 18 introduced a focused protocol-verification harness for exercising the hardened Wire v3 RX path with hostile and boundary-condition inputs.
The intent of this harness is to verify that RX continues operating safely when presented with malformed, malicious, replayed, or boundary-value frames.
The verification model intentionally separates roles:
This approach validates the real RX rejection path rather than a test-only RX path.
Protocol verification is enabled by defining:
#define RADIOLINK_QA_TEST
When enabled:
During QA execution, RX must:
Truncated Frame Rejection
Frames shorter than the expected Wire v3 header were injected.
Expected RX behavior:
Frame Length Mismatch
Frames where the declared payload length did not match the received frame size were injected.
Expected RX behavior:
CMAC Authentication Failure
Frames with intentionally corrupted authentication tags were injected.
Expected RX behavior:
Replay Rejection
Duplicate frames with identical (nodeId, sessionSeqId, msgCounter) values were injected.
Expected RX behavior:
Maximum Payload Boundary Acceptance
Frames containing the maximum legal plaintext size were transmitted.
Expected RX behavior:
Oversized Payload Rejection
Frames declaring a plaintext length larger than RADIOLINK_WIRE_V3_MAX_PLAINTEXT_LEN were injected.
Expected RX behavior:
Invalid NodeId Rejection
Frames with nodeId >= RADIOLINK_MAX_NODE_ID were injected.
Expected RX behavior:
Rejected protocol frames must be discarded without invoking Error_Handler().
The verified RX contract is:
This verification work also establishes the categories that should eventually map to unique structured logging identifiers for remote syslog forwarding, for example: