Data Transmission, Error Checking and Encryption: Question 4

Syllabus 2.2

Structured 9 marks

An automated irrigation system has a soil-moisture sensor node buried in a field. Once every hour, the node measures moisture at four different probe depths and sends the four readings to a base station in the farm office. Each reading is a denary (base 10) value between 0 and 255.

One hour, the four readings measured by the node are: 58, 175, 12, 201.

(a) Calculate the checksum value that the sensor node transmits alongside these four readings, given that the checksum is the sum of the four readings. [2]

(b) Describe what the base station does with the received readings and the received checksum value in order to check for a transmission error. [2]

(c) Due to interference, the base station actually receives the readings 58, 143, 12 and 201, but the checksum value it receives is still 446. Show, with a calculation, how the base station is able to tell that an error has occurred. [2]

(d) Describe how automatic repeat query (ARQ) allows the base station to obtain a correct copy of the readings after detecting this error. [3]

Show worked solution Hide worked solution

Worked solution

Part (a): Calculating the checksum

The checksum is defined as the sum of the four readings:

58 + 175 + 12 + 201 = 446

So the sensor node transmits the value 446 alongside the four readings.

Part (b): How the base station uses the checksum

On receiving the data, the base station adds up the readings it actually received to produce its own recalculated checksum. It then compares this recalculated value with the checksum value it received from the sensor node. A match suggests the data arrived correctly; a mismatch tells the base station that at least one of the readings has been corrupted during transmission.

Part (c): Detecting the error

The base station received the readings 58, 143, 12 and 201. Recalculating the checksum from these received values:

58 + 143 + 12 + 201 = 414

The received checksum is still 446, but the recalculated value is 414. Since 414 does not equal 446, the base station knows that the received data does not match the received checksum, so an error has occurred somewhere during transmission (in this case, the second reading was corrupted from 175 to 143).

Part (d): Using ARQ to obtain a correct copy

Automatic repeat query does not repair the corrupted reading directly, it obtains a fresh, correct copy instead. Once the base station detects the checksum mismatch, it sends a request back to the sensor node asking for the readings to be transmitted again. The sensor node also keeps a timeout running after every transmission: if it does not receive an acknowledgement that the data arrived correctly before this timeout expires, or if it receives an explicit request to resend, it transmits the same set of readings again. This send-and-check cycle repeats, if necessary more than once, until the checksums finally match, at which point the base station can be confident it holds an accurate copy of that hour’s readings.

Final answers

  • (a) Checksum = 446
  • (b) The base station recalculates the sum of the received readings and compares it with the received checksum; a mismatch indicates an error.
  • (c) Recalculated sum = 58 + 143 + 12 + 201 = 414, which does not match the received checksum of 446, so an error is detected.
  • (d) The base station requests retransmission (and/or a timeout expires without an acknowledgement), and the sensor node resends the readings until the checksums match.