Skip to content

Compare WSN routes before and after relay loss

Compare delivery and parent-path length in compact and spread layouts under the same router-removal test.

Packet Pete — I trace the measured path and keep application claims separate., your practice guide

Packet Pete — I trace the measured path and keep application claims separate.
Predict the reading, then compare it with the measurement.

Contiki-NG Cooja

Third party Tool

Tier 2 · Free simulator · install required · No account

Version tested: Contiki-NG release/v4.9 c20b12cd, Cooja 4.8 (2022071901), Temurin 17.0.20.1, image sha256:b14d5afb0a2a852d9e72bbed607ead03f6ccc5f4d4dee44f0799110be2f4b609. Date: 2026-09-10.

Download the complete lab packet and follow README.md to run it in the free simulator.

Download the setup and run guide

Get the lab files

Download the complete packet for the simulation and its firmware, or download individual files for inspection. README.md gives the setup and run commands.

  • cooja-wsn-routing-compare.csc
  • README.md
  • expected-output.txt
  • lab-files.tar.gz

Steps

Screens captured against Contiki-NG Cooja Contiki-NG release/v4.9 c20b12cd, Cooja 4.8 (2022071901), Temurin 17.0.20.1, image sha256:b14d5afb0a2a852d9e72bbed607ead03f6ccc5f4d4dee44f0799110be2f4b609 on 2026-09-10; the tool may have moved on — the text steps are the contract.

  1. 1 Step 1

    Do
    Open cooja-wsn-routing-compare-compact.csc from the packet and let it finish at 180 seconds. Trace the remaining Network arrows.
    You will see
    Run: headless cooja-wsn-routing-compare-compact.csc; use the step input or filter. Serial: FAULT router=3 switched_off_us=90065000 Expected: compact layout survives router 3 removal at 90.065 s.
    Why it matters
    Meaning: A deliberately changed topology is the independent variable. Firmware, seed, traffic and fault timing are matched. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.
    Step 1: Compact topology with real one-hop parent arrows after the fault. The orange ring marks the evidence; the numbered badge is outside it.
    Step 1 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  2. 2 Step 2

    Do
    In Cooja's Mote output window, filter ^--|Received ping reply. Read mote 5’s route status and its root ping; inspect the PATH rows in expected-compact.txt.
    You will see
    Run: headless cooja-wsn-routing-compare-compact.csc; use the step input or filter. Serial: 155092408 ID:5 Received ping reply from fd00::201:1:1:1, len 4, ttl 64, delay 27 ms Expected: compact source 5 has one-hop, 27 ms root ping.
    Why it matters
    Meaning: Parent-chain length describes route state; the ping independently tests that this destination replies. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.
    Step 2: Route-status rows and the actual 27 ms ping result. The orange ring marks the evidence; the numbered badge is outside it.
    Step 2 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  3. 3 Step 3

    Do
    Bring Radio messages to the front. Compare From and To columns with compact application counts in expected-compact.txt.
    You will see
    Run: headless cooja-wsn-routing-compare-compact.csc; use the step input or filter. Serial: PATH source=5 hops=1 chain=5->1 at_us=173846000 Expected: compact source 5 reaches root directly; packet table is GUI-only.
    Why it matters
    Meaning: Do not use frame count as a substitute for useful sample count. Record both layers and their denominators. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.
    Step 3: The real compact-run radio transmission rows. The orange ring marks the evidence; the numbered badge is outside it.
    Step 3 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  4. 4 Step 4

    Do
    From Cooja's File menu, open cooja-wsn-routing-compare.csc, the spread layout, and let it finish. Trace 5 → 2 → 1; inspect the missing route at source 6.
    You will see
    Run: headless cooja-wsn-routing-compare-spread.csc; use the step input or filter. Serial: FAULT router=3 switched_off_us=90065000 Expected: spread layout loses router 3; source 5 changes via relay 2.
    Why it matters
    Meaning: An alternate path for one source is not whole-mesh recovery. Inspect the weakest region before accepting the mean. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.
    Step 4: Spread layout with source 5’s recovered path and source 6’s disconnected corner. The orange ring marks the evidence; the numbered badge is outside it.
    Step 4 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  5. 5 Step 5

    Do
    In Cooja's Mote output window, filter ^--|Received ping reply and compare with the compact run. Use the last valid PATH snapshot for source 5.
    You will see
    Run: headless cooja-wsn-routing-compare-spread.csc; use the step input or filter. Serial: 155184952 ID:5 Received ping reply from fd00::201:1:1:1, len 4, ttl 63, delay 119 ms Expected: spread source 5 has two-hop, 119 ms root ping.
    Why it matters
    Meaning: This seed and layout support a bounded comparison, not a universal protocol ranking. A stale pre-fault PATH entry for source 6 is not evidence that it is reachable now. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.
    Step 5: The measured spread-layout route status and 119 ms reply. The orange ring marks the evidence; the numbered badge is outside it.
    Step 5 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  6. 6 Step 6

    Do
    In Cooja's Mote output window, filter Received request|Received response|Not reachable yet. Complete the README’s per-source fault table and write a deployment decision.
    You will see
    Run: headless cooja-wsn-routing-compare-spread.csc; use the step input or filter. Serial: 174584000 ID:6 [INFO: App ] Not reachable yet Expected: source 6 has no reliable surviving route after the fault.
    Why it matters
    Meaning: The 86.2% post-fault ratio also hides later unattempted samples. Hold coverage for source 6 and add an alternate relay before field testing. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.
    Step 6: At least six real application and unreachable-state rows from the spread run. The orange ring marks the evidence; the numbered badge is outside it.
    Step 6 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)

Chapter checks

These questions refer to the chapter’s examples. Use the return links to review their answers.

  1. A WSN review says Trickle is working because most nodes stayed silent during a stable period. What evidence is still needed before accepting that claim?

    Return to the chapter’s knowledge check
  2. A node hears metadata that conflicts with its current route-maintenance state and resets to a short interval. Why is this not enough evidence that the repair succeeded?

    Return to the chapter’s knowledge check

Caution

This is Contiki-NG IPv6/6LoWPAN/RPL over simulated IEEE 802.15.4, not Zigbee profiles, OpenThread or Matter. Parent snapshots can become stale; count missing and unattempted samples. RPL is not running the worksheet’s query or aggregation algorithms, and one seed does not establish a universal routing winner.

Return to WSN Trickle Dissemination · Browse Labs