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.
Predict the reading, then compare it with the measurement.
Contiki-NG Cooja
Third party ToolDownload the complete lab packet and follow README.md to run it in the free simulator.
Download the setup and run guideGet 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.
Steps
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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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-storingExpected: 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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 msExpected: 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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=31680Expected: 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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:4Expected: 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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:1Expected: 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 · 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.
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 checkA 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