# Compare RPL mesh evidence with Thread claims

This packet runs real Contiki-NG RPL and 6LoWPAN firmware on Cooja's simulated IEEE 802.15.4 radio. It does **not** run OpenThread, Thread MLE, or Matter. The exercise asks what the RPL trace proves and what a separate Thread test must still show.

## Version and files

Tested on Contiki-NG `release/v4.9` commit `c20b12cd2db707d6c07918f8b26cfeb52cf298ca`, Cooja submodule `33d41ae9f8acd6075fb903b0bcd5b4122bad8d8f`, Cooja 4.8, Temurin 17.0.20.1, and `contiker/contiki-ng` image digest `sha256:b14d5afb0a2a852d9e72bbed607ead03f6ccc5f4d4dee44f0799110be2f4b609`. `UPSTREAM.md` identifies the firmware source. `expected-output.txt` is an unaltered headless run from this packet. Times are simulated microseconds.

Download `lab-files.tar.gz` from the lab and extract it in a new `cooja-lab` directory. On Linux x86-64 with Docker and X11, use the following recipe. The image, firmware, Java, and simulator were exercised under Apptainer on the capture host; the Docker launcher is provided for learners and has not been tested on a learner laptop.

```bash
mkdir cooja-lab && cd cooja-lab
tar -xzf ~/Downloads/lab-files.tar.gz
git clone --depth 1 --branch release/v4.9 https://github.com/contiki-ng/contiki-ng.git contiki-ng
test "$(git -C contiki-ng rev-parse HEAD)" = c20b12cd2db707d6c07918f8b26cfeb52cf298ca
git -C contiki-ng submodule update --init --depth 1 tools/cooja
test "$(git -C contiki-ng/tools/cooja rev-parse HEAD)" = 33d41ae9f8acd6075fb903b0bcd5b4122bad8d8f
mkdir -p jdk17 home/contiki-ng
curl -fL 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.20.1%2B1/OpenJDK17U-jdk_x64_linux_hotspot_17.0.20.1_1.tar.gz' -o jdk17.tar.gz
echo '3808d1d15e3ec6bd5b84057fb5d84c33d8a1536a258146bcea2e603fc726e08e  jdk17.tar.gz' | sha256sum -c -
tar -xzf jdk17.tar.gz --strip-components=1 -C jdk17
xhost +si:localuser:$(id -un)
bash cooja-mesh-thread-comparison/docker-launch.sh
# After closing Cooja:
xhost -si:localuser:$(id -un)
```

The GUI pauses at 89 seconds of simulated time. Inspect the baseline, then click **Start/Pause** once to run through the relay removal at 90.065 seconds. The ScriptRunner stops at 210 seconds and reports `TEST OK` only after the prefix, four ping replies, and a changed parent were observed. Reopen the CSC for a fresh run. In **Mote output**, type the filter named in a step and press Enter; clear it to inspect every line. **Radio messages** displays actual simulated frame bytes.

## Comparison worksheet

Record these from your own run before using `expected-output.txt` as a check:

| Evidence | Baseline | After relay removal |
|---|---|---|
| Mote 5 preferred parent and rank | | |
| Mote 4 ICMP reply delay and TTL | | |
| Mote 5 ICMP reply delay and TTL | | |
| Failed relay ID and simulated time | | |
| First new-parent time; elapsed time since removal | | |

Copy one hexadecimal radio-message row and identify its **From**, **To**, and byte count. This is simulated 802.15.4 traffic from the running stack; one short row alone does not decode an entire IPv6 route.

Then mark these claims separately: **Cooja RPL reachability** (tested here); **Thread role, parent/child, MLE, dataset, and Border Router behavior** (needs OpenThread or a Thread device run); **Matter commissioning, fabric, cluster interactions, and application state** (needs a Matter run). The Cooja border router receives an `fd00::/64` prefix through SLIP, but no host TUN or external controller path is tested. Background UDP clients generate ICMPv6 type-1 errors because this packet has no UDP echo service. Preserve that limit even when ICMP pings succeed.
