UAT 459 UAS, Internet of Things and Smart Warehouse Systems
Worksheet 7 A mock gateway and a signal survey
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
- Install Mosquitto and write a mock gateway that sends QoS 1 with message IDs and measurement times
- Add the deadband and heartbeat rules of Example 2 and check that at least six records per hour remain
- Disconnect from the broker for 15 minutes, check the buffer, stored times and repeated alarms, then compare catch-up time with Example 1
- Survey RSSI at 15 or more points, compare with the ITU-R P.1238 model of Example 3 and propose gateway positions
- Capture packets with Wireshark, count bytes per reading at QoS 0, 1 and 2 and explain differences from Example 4
Record of results
| Test | Expected | Measured | Pass? |
|---|---|---|---|
| Point | Distance to sensor (m) | Wall between? (yes/no) | Measured RSSI (dBm) | Predicted (dBm) | Difference (dB) |
|---|---|---|---|---|---|
| Case | Calculated (bytes per reading) | Measured, MQTT layer only (bytes) | Measured incl. TCP/IP/TLS (bytes) | Explanation of the difference |
|---|---|---|---|---|
Questions
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)?
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?
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?
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