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 ToolMeasure delivery, sample delay and each link’s round-trip latency in a six-node greenhouse collection model.
Download 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
- 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 · 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
- 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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 · 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
- 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 · 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