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

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

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
    The chain is 4 → 2 → 1. Nodes 5 and 6 use relay 3; the root is green.
    Why it matters
    Radio connectivity is different from sensing coverage: this drawing proves neither greenhouse coverage nor physical sensor accuracy.
    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
    The script queried leaf 4 at 60 s and relay 2 at 61 s. The log records MRHOF and non-storing routing; the final lines also retain the three ping outcomes.
    Why it matters
    Save the route state with its observation time so you can explain a packet’s path.
    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
    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
    Link 4–2 returns in 31 ms, link 2–1 in 45 ms, and the two-hop path in 81 ms. Link replies show TTL 64; the whole path shows TTL 63.
    Why it matters
    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.
    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
    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
    The full run has 46 sends and 46 sink receptions. Every COLLECTION row records the matched source, sequence and delay in microseconds.
    Why it matters
    Match identities before timing: repeated hello sequence numbers from different sources are different samples.
    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
    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
    All five sources reached the sink and received replies; delivery is 46/46 = 100% over this 120-second seed-1 run.
    Why it matters
    A successful short run supports this controlled collection path; it does not establish a field-season reliability or battery-life promise.
    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
    The real GUI records 404 radio transmissions. The last rows include relay 3 and sink 1, with several destinations or acknowledgements per exchange.
    Why it matters
    Radio frames include routing, acknowledgements and retransmissions; they must not be counted as 404 useful readings.
    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