Skip to content

Measure a multi-hop WSN collection path

Measure delivery, sample delay and each link’s round-trip latency in a six-node greenhouse collection model.

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-data-collection.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
    Download and open the prepared CSC; let it stop at 120 simulated seconds. Trace the Network arrows from leaf 4 to sink 1.
    You will see
    Run: headless cooja-wsn-data-collection.csc; use the step input or filter. Serial: 60065000 ID:4 -- Preferred parent: fe80::202:2:2:2 (last DTSN: 240) Expected: leaf 4 routes through relay 2 to sink 1.
    Why it matters
    Meaning: Radio connectivity is different from sensing coverage: this drawing proves neither greenhouse coverage nor physical sensor accuracy. Boundary: The delays and deliveries are from one 120 s deterministic simulation.
    Step 1: Six real motes and their selected parent arrows. 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
    Filter Mote output for ^--|Received ping reply. Compare the rpl-status snapshots and identify the root, relay and leaf roles in your README ledger.
    You will see
    Run: headless cooja-wsn-data-collection.csc; use the step input or filter. Serial: 60065000 ID:4 -- MOP: Non-storing Expected: leaf 4 reports non-storing RPL mode.
    Why it matters
    Meaning: Save the route state with its observation time so you can explain a packet’s path. Boundary: The delays and deliveries are from one 120 s deterministic simulation.
    Step 2: Actual route-status and ping rows, with at least six visible lines. 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
    In Cooja's Mote output window, read the scheduled ping rows in the same filter. Write a separate round-trip latency for link 4–2, link 2–1 and the whole 4–1 path.
    You will see
    Run: headless cooja-wsn-data-collection.csc; use the step input or filter. Serial: 65096120 ID:4 Received ping reply from fe80::202:2:2:2, len 4, ttl 64, delay 31 ms Expected: leaf 4 to relay 2 ping returns in 31 ms, TTL 64.
    Why it matters
    Meaning: These are round-trip measurements taken at different times. They are not one-way per-hop delays, and their sum need not equal the end-to-end result. Boundary: The delays and deliveries are from one 120 s deterministic simulation.
    Step 3: The three real ping results remain visible with surrounding route 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
    In Cooja's Mote output window, filter Sending request|Received request. Match sequence and source, then subtract the send timestamp from the matching sink timestamp in expected-output.txt.
    You will see
    Run: headless cooja-wsn-data-collection.csc; use the step input or filter. Serial: COLLECTION source=4 sequence=0 latency_us=31680 Expected: leaf 4 sequence 0 arrives at sink after 31680 us.
    Why it matters
    Meaning: Match identities before timing: repeated hello sequence numbers from different sources are different samples. Boundary: The delays and deliveries are from one 120 s deterministic simulation.
    Step 4: The final send and receive rows show source addresses and sample sequences. 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 request|Received response. Compare the returning replies and calculate the whole-run delivery ratio. Fill the missing-source and limitations fields.
    You will see
    Run: headless cooja-wsn-data-collection.csc; use the step input or filter. Serial: 43827680 ID:1 [INFO: App ] Received request 'hello 0' from fd00::204:4:4:4 Expected: sink receives leaf 4 sequence 0; whole run delivers 46 of 46.
    Why it matters
    Meaning: A successful short run supports this controlled collection path; it does not establish a field-season reliability or battery-life promise. Boundary: The delays and deliveries are from one 120 s deterministic simulation.
    Step 5: At least the last six application request and reply rows. 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
    Bring Radio messages to the front by clicking its title bar behind Network. Compare its From and To columns with the application log.
    You will see
    Run: headless cooja-wsn-data-collection.csc; use the step input or filter. Serial: 30639008 ID:3 [INFO: IPv6 ] Forwarding packet to next hop, dest: fd00::201:1:1:1 Expected: relay 3 forwards toward sink 1; GUI frame total is capture-only.
    Why it matters
    Meaning: Radio frames include routing, acknowledgements and retransmissions; they must not be counted as 404 useful readings. Boundary: The delays and deliveries are from one 120 s deterministic simulation.
    Step 6: Radio messages shows the real frame count and final packet rows. 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 sizing review finds 80 sensors satisfy the point-target list, but gateway-path tests show weak delivery unless two extra relay locations are added. What should the reviewer conclude?

    Return to the chapter’s knowledge check
  2. A deployment predicts two years of life from average node energy, but the gateway-adjacent relays fail in months. What should the sizing review require?

    Return to the chapter’s knowledge check

Caution

This runs real Contiki-NG IPv6/6LoWPAN/RPL over simulated IEEE 802.15.4 radios. It does not run Zigbee profiles, OpenThread or Matter. hello N is a synthetic sample, and UDGM is an idealized link model. RTT is not one-way hop delay; no sensing accuracy, field coverage or battery lifetime is proven.

Return to WSN Deployment Sizing · Browse Labs