Networks · GCSE · OCR J277 1.3.2, AQA 8525 3.5, Edexcel 1CP2 4.1.6 · about 25 min
Deliver a report over a lossy radio with packets, acknowledgements and resending.
[1 mark]What does an acknowledgement tell the sender?
[1 mark]Which protocol resends lost packets?
[1 mark]Why does the sender wait for a limited time, not forever?
[1 mark]A message is sent in 3 packets and packet 2 has to be sent 3 times. How many transmissions is that?
[1 mark]Why would a live video call use UDP?
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.
failed at packet <n>.