UAT 459 UAS, Internet of Things and Smart Warehouse Systems

Worksheet 7 A mock gateway and a signal survey

Lab 4 hAssesses CLO4

Objective

Build a mock gateway with deadband, heartbeat and buffering that sends over MQTT QoS 1, test a link outage, survey radio signals and measure real packet sizes

Equipment and materials

  • Computer with Python, paho-mqtt, Mosquitto and Wireshark
  • BLE sensor or simulated data file
  • Phone or BLE receiver showing RSSI
  • Plan of a mock cold room or a room with metal walls

Safety

  • Desk and computer work, no flying
  • Test only on the laboratory's own broker and network; never scan or capture traffic on other people's networks
  • While surveying among racks, watch for falling objects and never climb racks
  • Use only frequencies and transmit power permitted by NBTC

Steps

  1. Install Mosquitto and write a mock gateway that sends QoS 1 with message IDs and measurement times
  2. Add the deadband and heartbeat rules of Example 2 and check that at least six records per hour remain
  3. Disconnect from the broker for 15 minutes, check the buffer, stored times and repeated alarms, then compare catch-up time with Example 1
  4. Survey RSSI at 15 or more points, compare with the ITU-R P.1238 model of Example 3 and propose gateway positions
  5. Capture packets with Wireshark, count bytes per reading at QoS 0, 1 and 2 and explain differences from Example 4

Record of results

Table 1 Deadband, heartbeat and outage test results
TestExpectedMeasuredPass?
Table 2 RSSI survey (at least 15 points; record points beyond 12 below the table)
PointDistance to sensor (m)Wall between? (yes/no)Measured RSSI (dBm)Predicted (dBm)Difference (dB)
Table 3 Measured versus calculated packet sizes
CaseCalculated (bytes per reading)Measured, MQTT layer only (bytes)Measured incl. TCP/IP/TLS (bytes)Explanation of the difference

Questions

  1. In the 15-minute outage test, did backfilled values carry measurement times or sending times? Did the platform raise alarms again from old values, and did catch-up time match t = B/(R − Nr)?

  2. At which point did real RSSI differ most from the ITU-R P.1238 model, why, and where does the group propose to place gateways?

  3. Why did the team choose QoS 1 rather than QoS 2, and why are the bytes measured in Wireshark including TCP/IP/TLS so much larger than calculated?

  4. Why must alarms be decided at the gateway from every value, not only from values already sent? Use the group's deadband in your explanation.

Check before you hand in

What to hand in

  • Reproducible mock gateway code
  • Outage test log
  • RSSI map and proposed gateway positions
  • Table of measured versus calculated packet sizes

CLO4 Explain the IoT architecture of smart warehouses and select sensors, edge devices, gateways and communication protocols that meet the requirements of the operation. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack