The answersDownload the PDF
Worksheet

F10.9 Project: reliable delivery

Networks · GCSE · OCR J277 1.3.2, AQA 8525 3.5, Edexcel 1CP2 4.1.6 · about 25 min

BugBotLab
NameClassDate

What this lesson is about

Deliver a report over a lossy radio with packets, acknowledgements and resending.

Questions 5 marks in all

  1. [1 mark]What does an acknowledgement tell the sender?

    1. AThat the packet arrived safely
    2. BThat the packet was lost
    3. CThe route the packet took
    4. DThe receiver's IP address
  2. [1 mark]Which protocol resends lost packets?

    1. ATCP
    2. BUDP
    3. CIP
    4. DHTTP
  3. [1 mark]Why does the sender wait for a limited time, not forever?

    1. AA reply may never come if the packet or the reply was lost
    2. BIt saves battery
    3. CProtocols require exactly one second
    4. DTo make the message shorter
  4. [1 mark]A message is sent in 3 packets and packet 2 has to be sent 3 times. How many transmissions is that?

  5. [1 mark]Why would a live video call use UDP?

    1. AA late packet is useless, so waiting to resend it only adds delay
    2. BUDP encrypts the video
    3. CUDP guarantees every packet arrives
    4. DUDP uses less electricity

The task: deliver the report

Split message into packets of 14 characters, in the form <number>/<total>:<piece>. Deliver them to the Base with stop-and-wait. Print sent <number> each time you send a packet (including when you send it again) and print each reply you get. Never send the next packet before the last one is acknowledged. When every packet is acknowledged, print delivered in <n> transmissions, and turn the LED green.

# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()

message = "robot 7 reporting: mat clear, battery ok"

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/f10-9-project-reliable-delivery/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Give up after 5 tries of the same packet, and print failed at packet <n>.
  2. Send all three packets at once, then resend only the ones not acknowledged. How many transmissions does that take?
  3. Why would a live video call use UDP rather than waiting for acknowledgements?