Teaching pack · UAT 105

A 15-week teaching plan, 5 worksheets, a scoring rubric and a map from the course description to the lessons, for instructors to evaluate and adapt before teaching.

Last updated: · 3(2-2-5) · Per week: lecture 2 h, lab 2 h, self-study 5 h; 60 contact hours per term

Coverage of the course description

The lessons fully teach 11 of 11 description topics. Each topic lists the modules and lesson sections that teach it, and incomplete topics say what is missing.

Description topicModulesWhere it is taughtStatus
Digital systemsM1Module 1: logic gates and truth tables, and from gates to an adderCovered
Computer componentsM2Module 2: the von Neumann computer, the memory hierarchy, on-board buses and storageCovered
Data representationM1Module 1: binary and hexadecimal, two's complement integers and the float 0.1 in memoryCovered
Introductory operating systemsM2Module 2: Introductory operating systems (the kernel, processes and threads, round-robin and priority scheduling, CPU utilisation, file systems and paths, the Linux command line, Examples 3–4 and the operating-system activity) · The memory hierarchy and interrupts · The two computers on a drone (real-time OS versus Linux)Covered
Data communicationsM1M2M3Module 1: error detection with parity and CRC · Module 2: on-board buses and baud rate · Module 3: protocol layers and encapsulationCovered
Computer networksM3Module 3: IPv4 addresses and subnets, and setting up a ground-station networkCovered
Internet protocolsM3M4Module 3: protocol layers, IPv4, and TCP versus UDP · Module 4: MQTT publish/subscribeCovered
Wireless networkingM3Module 3: wireless links and signal loss, the 2.4 GHz link power budget and radio frequency rulesCovered
Cloud computingM5Module 5: what the cloud is, and edge or cloudCovered
The Internet of ThingsM4Module 4: IoT architecture, QoS, retained messages and Last Will, data freshness and queuesCovered
Basic cybersecurityM4M5Module 4: Mosquitto and security (TLS and ACL) · Module 5: the CIA triad and threats, four tools, HMAC and NIST CSF 2.0Covered

Weekly teaching plan

WeekTopicPre-classLectureLabEvidence
1 M1Binary, hexadecimal and units of dataRead module 1 up to 'Binary and hexadecimal'Base conversion, bits versus bytes, and kB versus KiBWorksheet 1 part A: read the first 40 bytes of the .tlog file and pick apart the first frame header by handTable of the first frame header (length, sequence, system ID, message ID)
2 M1Two's complement, logic gates and addersRead the two's complement, logic gates and adder sections; run Example 1Negative integers, floats in memory, truth tables and the full adderWorksheet 1 part B: a base_mode flag decoder and an 8-bit adder tested on every pair 0–255Code for both functions and a test run passing every pair
3 M1Error detection with parity and CRCRead the parity and CRC section; run Example 2; take the module 1 quizThe CRC of a HEARTBEAT frame and why a CRC is not securityWorksheet 1 part C: check the CRC of every frame in the .tlog file with crc16_mcrf4xxNumber of frames with a bad CRC, and quiz result
4 M2The von Neumann computer, memory and interruptsRead module 2 up to 'The memory hierarchy and interrupts'CPU, memory and buses; polling versus interruptsWorksheet 2 part A: run lscpu and free -h on a Raspberry Pi or Linux machine and compare with the flight controllerTable comparing cores, clock and RAM
5 M2The two computers on a drone and on-board busesRead 'The two computers on a drone' and 'On-board buses'; run Example 1Real-time OS versus Linux; UART, I²C, CAN and SPI; position messages per secondWorksheet 2 part B: list the Pixhawk 6X ports with bus types and compute the data budget of a 57600 baud telemetry radioPort table and percentage of capacity used
6 M2Storage, write speed and introductory operating systemsRead the storage and introductory operating systems sections; run the code of Examples 2–3; take the module 2 quizA 128 GB V30 card against video bit rate; processes, scheduling, CPU utilisation, file systems and the Linux command lineWorksheet 2 part C: run SITL and measure CPU and RAM use during the simulationWorksheet 2 short report and quiz result
7 M3Protocol layers, encapsulation and IPv4 addressesRead module 3 up to 'IPv4 addresses and subnets'; run Example 1Header overhead at each layer, subnets and special addressesWorksheet 3 part A: capture SITL telemetry in Wireshark, filter udp.port == 14550 and find the 0xFD that starts each MAVLink framePackets per second and a byte view with each layer marked
8 M3TCP versus UDP and wireless linksRead the TCP versus UDP and wireless link sections; run Example 2Why telemetry uses UDP, the 2.4 GHz link power budget and frequency rulesWorksheet 3 part B: pause SITL data forwarding; record what QGroundControl shows and any mode change in the logRecord of the link loss with times
9 M3Setting up a ground-station network; midtermRead the ground-station network section; review modules 1–3; take the module 3 quizMidterm examination (modules 1–3)Worksheet 3 part C: build the Figure 3 network with a real router, set a static IP and ping every pairNetwork diagram with addresses and ports, and midterm score
10 M4IoT architecture and publish/subscribeRead module 4 up to 'Publish/subscribe and topics'Layers of an IoT system and topic design principlesWorksheet 4 part A: install Mosquitto; use mosquitto_sub and mosquitto_pub; try + and #Screenshots of each wildcard result
11 M4QoS, retained messages and Last WillRead the QoS and retained message sections; run Example 1The three QoS levels and duplicated commands under QoS 1Worksheet 4 part B: a paho-mqtt program simulating three drones and a subscriber showing data age; test the Last WillCode and a record of what happened when one drone was killed
12 M4Data freshness, queues and Mosquitto securityRead the data freshness and Mosquitto security sections; run Example 2; take the module 4 quizA dashboard that cannot keep up; TLS, per-device accounts and ACLsWorksheet 4 part C: enable TLS and an ACL and test that drone 1 cannot publish to drone 2's topicsConfiguration files, ACL test result and quiz result
13 M5The cloud and choosing edge processingRead module 5 up to 'Edge or cloud'; run Example 1Cloud service models; sending raw images or analysis resultsWorksheet 5 part A: build manifest.csv with SHA-256 and a program that re-checks after copyingManifest and a run that catches the altered file
14 M5The CIA triad and four security toolsRead the CIA triad and four tools sections; run Example 2; take the module 5 quizCatching forged commands with HMAC, and why MAVLink signing does not encryptWorksheet 5 part B: add an HMAC and sequence number to command messages; enable MAVLink signing in SITL and inspect it in WiresharkTest results for forged and replayed messages, and the extra bytes per frame
15 M5NIST CSF 2.0, the data life cycle and mini-project presentationsRead the NIST CSF 2.0 and data life-cycle section; prepare the mini-projectCourse wrap-up and project criteriaWorksheet 5 part C: a six-function CSF 2.0 table and a data life-cycle chart; then present the mini-project, a secure MQTT drone reporting system (building on worksheets 4–5)Mini-project report and presentation, scored with the rubric

Worksheets and instructor guide

One worksheet per module. Students open it on the web, print it or download the .docx. The instructor guide under each worksheet gives the class timing, expected results, discussion questions and notes for students with different backgrounds.

1Worksheet 1 Reading a drone's bits
Analysis activity · About 6 h of class time · CLO1

Objective: Read and interpret the bytes of real MAVLink frames, build an adder from gates and check the CRC of a whole file

Equipment

  • Computer with Python and pymavlink
  • telemetry_sample.tlog from UAT 104
  • MAVLink common.xml documentation
  • Module 1 example code

Safety

  • Desk work only; no flying

Steps

  1. Read the first 40 bytes with open(..., "rb") and pick out the first frame's length, sequence, system ID and message ID by hand
  2. Write a function that turns base_mode into the names of all 8 flags from common.xml
  3. Build an 8-bit adder from full_adder
  4. Test the adder on every pair 0–255 against (x + y) % 256
  5. Get each message's CRC_EXTRA from pymavlink
  6. Check every frame's CRC with crc16_mcrf4xx and count the mismatches

Deliverables

  • Table of the first frame header
  • Flag decoder and adder code with test results
  • Number of bad-CRC frames with code

Checklist

  • Table 1 lists every header field (STX, length, incompat, compat, sequence, system ID, component ID, message ID) in both hex and decimal (Communication and reporting)
  • The adder is tested on all 65,536 pairs, the number of wrong pairs (must be 0) is reported, and runnable code is attached (Accuracy of calculations and code)
  • The base_mode decoder is tested on at least 3 values including the lesson's 0x51, with flag names matching common.xml (Accuracy of calculations and code)
  • Table 3 covers every message type in the file, the frame counts add up to the program's total, and the source of each CRC_EXTRA is stated (Communication and reporting)

Instructor guide

Class timing 360 min

  1. Review number bases, two's complement and the MAVLink 2 frame layout40 min
  2. Read the first 40 bytes by hand and fill in Table 160 min
  3. Write and test the base_mode decoder60 min
  4. Build the 8-bit adder from full_adder and test every pair70 min
  5. Check the CRC of every frame and fill in Table 390 min
  6. Wrap-up, questions and hand-in checklist40 min

Expected results

  1. Record: Table 1 Header of the first frame in telemetry_sample.tlogTable 1 (UAT 104's telemetry_sample.tlog): the first 8 bytes are the recording time, and the first frame starts at the 9th byte (offset 8 counting from 0): STX 0xFD (253), length 0x09 (9 bytes), incompat 0x00, compat 0x00, sequence 0x00 (0), system ID 0x01 (1), component ID 0x01 (1), message ID 00 00 00 = 0, which is HEARTBEAT, then the 9-byte payload 04 00 00 00 02 03 01 03 03 and CRC 68 f7. Students who start the header at the first byte of the file get every field wrong; point out that they must find 0xFD first.
  2. Record: Table 2 Test results of the base_mode decoder and the 8-bit adderTable 2: base_mode 0x51 = 01010001 gives CUSTOM_MODE_ENABLED, STABILIZE_ENABLED and MANUAL_INPUT_ENABLED; 0xD1 adds SAFETY_ARMED; 0x01 gives CUSTOM_MODE_ENABLED only. Adder: 5 + 6 = 11 with carry 0, 200 + 100 gives 44 with carry 1 (300 - 256 = 44). All 65,536 pairs tested with 0 wrong. Even one wrong pair means the carry is not passed to the next bit correctly.
  3. Record: Table 3 CRC check of every frame by message typeTable 3: the file has 7,911 frames of 5 types: HEARTBEAT (ID 0, CRC_EXTRA 50) 396 frames, SYS_STATUS (ID 1, 124) 396, ATTITUDE (ID 30, 39) 3,955, GLOBAL_POSITION_INT (ID 33, 104) 1,582 and VFR_HUD (ID 74, 20) 1,582. Bad CRC: 0 frames (the synthetic file has no damage). If a group gets many mismatches, the usual causes are including 0xFD in the calculation, forgetting CRC_EXTRA, or using a fixed payload length instead of the length byte (in this file ATTITUDE is 16 or 12 bytes long because MAVLink 2 drops trailing zero bytes from the payload).
  4. Question 1: The first 8 bytes of the file come before 0xFD. What are they, what time do they give when read big-endian, and why are they not part of the MAVLink frame?They are the time the ground station received the message, in microseconds since 1 January 1970, big-endian: 1,773,455,400,000,000 us, which is 2026-03-14 02:30:00 UTC (09:30 Thai time). They are not part of the frame because the drone did not send them; the ground station adds them when it writes the .tlog (UAT 104 module 4). A strong answer also notes that the tlog time is big-endian while MAVLink data is little-endian.
  5. Question 2: Which base_mode value appears most often in the file, which flags does it decode to, and what does that say about the drone's state while it was recorded?0x81 appears in 384 of 396 frames (0x01 in the other 12, at the start). 0x81 = 10000001 is SAFETY_ARMED plus CUSTOM_MODE_ENABLED, so for almost the whole file the motors are armed and the autopilot uses its own modes (custom_mode says which). The early 0x01 frames are not yet armed. A strong answer uses AND with a bitmask rather than guessing from the decimal value.
  6. Question 3: How many of the 65,536 pairs gave a carry of 1 in your 8-bit adder? How does the sum in those pairs relate to (x + y) % 256, and how does this connect to MAVLink's 8-bit sequence counter?Carry 1 in 32,640 pairs (the pairs with x + y >= 256, equal to 0 + 1 + ... + 255). In these pairs the 8-bit sum equals x + y - 256, exactly (x + y) % 256. This is the same overflow that makes MAVLink's sequence counter wrap from 255 to 0, so sequence gaps must be computed modulo 256. In this file the sequence jumps from 183 to 88 during the 8.1 s link loss: plain subtraction gives -95, but modulo 256 gives 161 (160 frames missing).
  7. Question 4: If no frame had a bad CRC, can you conclude that nobody forged a message in the file? Explain using how a CRC works.No. A CRC only catches accidental errors. Anyone can compute a fresh CRC for a forged message because the formula and CRC_EXTRA are public and there is no secret key. Proving the real sender needs MAVLink signing or an HMAC (module 5). A strong answer separates protection against noise from protection against forgery.

Discussion questions

  • Why might MAVLink store numbers little-endian, and what happens if two computers interpret byte order differently?
  • If two vendors used the same message ID with different data layouts, how does CRC_EXTRA prevent harm?
  • In incident analysis, how does reading the bytes yourself differ from trusting a library's output, and when is it worth going down to the byte level?

Adapting to student background

Upper secondary (M.6)
Have them convert the Table 1 bytes by hand before checking with Python, and prove on paper that the full-adder carry is (A AND B) OR (S1 AND Cin) before coding.
Vocational certificate
Give starter code with blanks to fill and a place-value strip (128 64 32 16 8 4 2 1) for binary to decimal; pair them with a confident coder.
Diploma
Extension: write a program that finds sequence jumps in the file, computes missing frames modulo 256 and compares them with the link-loss period.

Common student mistakes: Common mistakes in the module 1 lesson

2Worksheet 2 Exploring computers and buses
Lab · About 6 h of class time · CLO1

Objective: Compare the two kinds of computer on a drone, identify the flight controller's buses and compute a telemetry radio's data budget

Equipment

  • Raspberry Pi or a Linux computer
  • Pixhawk 6X page in the PX4 user guide
  • SITL simulator
  • MAVLink common.xml documentation

Safety

  • Desk work only; no flying
  • Power off before connecting or unplugging board cables

Steps

  1. List every Pixhawk 6X port with its bus type (UART, I²C, CAN, internal SPI) and compare with Figure 2
  2. Use lscpu and free -h to see cores, clock and RAM, and compare with the flight controller
  3. Run SITL and record CPU and RAM use during the simulation
  4. Find the payload sizes of HEARTBEAT, ATTITUDE and GLOBAL_POSITION_INT in common.xml
  5. Compute the percentage of a 57600 baud radio used at 1, 10 and 4 Hz

Deliverables

  • Port and bus table
  • Comparison table of the two computers
  • Data budget calculation with working

Checklist

  • Table 1 gives a bus type for every port on the PX4 user guide page, with at least one row each for UART, I²C, CAN and internal SPI (Communication and reporting)
  • Table 2 contains real lscpu and free -h output (screenshot attached) and the CPU and RAM use while SITL runs, with units (Working system and network configuration)
  • Table 3 frame sizes include the 12 bytes of header and CRC, and capacity is 5760 bytes per second (8N1, divided by 10) (Accuracy of calculations and code)
  • The total budget percentage is worked step by step, with a unit on every value (Communication and reporting)
  • Record shows power was off every time a board cable was connected or removed (Working system and network configuration)

Instructor guide

Class timing 360 min

  1. Board safety briefing and von Neumann review30 min
  2. Read the Pixhawk 6X page and fill in the port and bus table70 min
  3. Run lscpu and free -h and compare with the flight controller50 min
  4. Run SITL and record CPU and RAM use80 min
  5. Find payload sizes in common.xml and compute the data budget90 min
  6. Wrap-up, questions and hand-in checklist40 min

Expected results

  1. Record: Table 1 Pixhawk 6X ports and bus typesTable 1: check port names against the Pixhawk 6X page of the PX4 user guide version in use. The answer pattern from the lesson: TELEM and GPS ports are UART (2 wires, TX and RX, point to point), CAN ports are twisted pairs for DroneCAN, the I²C port serves a compass or rangefinder, the IMU and barometer are on internal SPI (no external port), and Ethernet can link to the companion computer as in Figure 2. Accept if every bus type written is correct.
  2. Record: Table 2 Flight controller compared with the Linux computer, and SITL loadTable 2: the flight controller from the lesson is an STM32H753 Cortex-M7, 1 core at 480 MHz (clock period 2.083 ns), 2 MB flash, 1 MB RAM, running NuttX; a Raspberry Pi 5 has 4 Cortex-A76 cores up to 2.4 GHz and 1 to 16 GB of RAM depending on the model, running Linux. CPU and RAM use while SITL runs varies by machine and has no fixed value; check that units are given (percent, MB or GB) and that the command used, such as top, is stated.
  3. Record: Table 3 Data budget of a 57600 baud telemetry radioTable 3: HEARTBEAT payload 9 bytes, frame 21 bytes x 1 Hz = 21 B/s (0.36%); ATTITUDE 28 bytes, frame 40 x 10 Hz = 400 B/s (6.94%); GLOBAL_POSITION_INT 28 bytes, frame 40 x 4 Hz = 160 B/s (2.78%); total 581 B/s of 5760 B/s = 10.09% (accept 10.0 to 10.1%). Frame sizes are maximums (unsigned). The real telemetry_sample.tlog, which also carries other messages, measures about 622 B/s.
  4. Question 1: Why are the IMU and barometer on internal SPI while GNSS and the telemetry radio use UART? Explain from the bus properties in Table 1.SPI has a shared clock and is fast, which suits an IMU read hundreds of times a second and sitting close to the processor on the same board. UART needs no shared clock and only two wires point to point, which suits external devices that send a stream of bytes, such as GNSS and radios. A strong answer mentions speed versus cable length and choosing I²C or CAN when there are many devices or electrical noise.
  5. Question 2: From Table 2, how many times more RAM and clock speed does the Linux computer have than the flight controller? If it is that much faster, why should it not drive the motors directly?With an 8 GB Raspberry Pi 5: 8 GB / 1 MB = 8,192 times the RAM and 2.4 GHz / 480 MHz = 5 times the clock (not counting cores). But Linux does not guarantee response times, so a flight-control task that must finish every 2.5 ms (400 Hz) could miss cycles, while an RTOS uses preemptive priority so control always gets the CPU first. A strong answer also says clock speeds cannot be compared directly across architectures.
  6. Question 3: What percentage of capacity does the Table 3 budget use? What would you get if you wrongly divided the baud rate by 8 instead of 10, and why is that error dangerous when a design runs close to capacity?10.09%. Dividing 57600 by 8 gives 7200 B/s and 581/7200 = 8.07%, overstating capacity by 25%. A design calculated at 80% would really run at 100% and drop messages when noise appears, because 8N1 uses 10 bits per byte (start bit, 8 data bits, stop bit).
  7. Question 4: If the team wants ATTITUDE at 50 Hz, what is the new budget, is there still enough headroom, and what is the headroom for?ATTITUDE at 50 Hz: 21 + 40 x 50 + 160 = 2,181 B/s = 37.86%. It still fits, but headroom is needed for other messages such as SYS_STATUS, ground-station commands, resends during noise and MAVLink signing (module 5). A strong answer proposes how much to reserve and why; reserving half (at most 2,880 B/s) still leaves room for about 57 more 40-byte frames per second on top of 581 B/s.

Discussion questions

  • If an AI object-detection camera is added to the drone, which computer and which bus should it connect to, and why?
  • How can a large but slow memory card lose logs even when it still has free space?
  • Why would a flight-controller maker choose only 1 MB of RAM when memory has become so cheap?

Adapting to student background

Upper secondary (M.6)
Have them write B = baud/10 and frame = payload + 12 before calculating and explain in their own words why 8N1 uses 10 bits; give extra supervised time connecting real cables.
Vocational certificate
Start by holding the real board and pointing to each port against Figure 2, then work the data budget one message at a time in a fill-in table, checking with a calculator.
Diploma
Extension: measure real message rates from SITL or telemetry_sample.tlog, compare with the calculated budget and explain the difference (uncounted messages and payloads with trailing zeros removed).

Common student mistakes: Common mistakes in the module 2 lesson

3Worksheet 3 Capturing SITL telemetry and building a field network
Lab · About 6 h of class time · CLO2

Objective: See protocol layers in real packets, observe a link loss and set up a working ground-station network

Equipment

  • Computer with SITL and QGroundControl
  • Wireshark (with Npcap on Windows)
  • Wi-Fi router
  • Onboard computer or Raspberry Pi

Safety

  • Desk work only; no flying
  • Capture only on the lab network, never on other people's networks

Steps

  1. Run SITL and QGroundControl and capture on the loopback interface
  2. Filter udp.port == 14550, count packets per second and find 0xFD beneath the UDP and IP headers
  3. Pause SITL data forwarding; record what QGroundControl shows and any mode change in the log
  4. Build the Figure 3 network and give the onboard computer a static IP
  5. Ping every pair and draw the network with addresses and ports

Deliverables

  • Packet byte view with layers marked
  • Link-loss record
  • Network diagram with ping results

Checklist

  • Table 1 has packets per second with how it was measured, and a byte view with the IPv4, UDP and MAVLink layers clearly marked (Communication and reporting)
  • Table 2 records when forwarding was paused and resumed, with what QGroundControl showed and the mode in the log (Working system and network configuration)
  • The onboard computer has a static IP in 192.168.10.0/24 and Table 3 pings every pair (at least 3 machines plus the router) (Working system and network configuration)
  • The network diagram shows every IP address, UDP port 14550 and the direction of MAVLink traffic (Communication and reporting)
  • Capture was done only on the lab network, and the submitted file holds no data from other networks (Security and data handling)

Instructor guide

Class timing 360 min

  1. Capture rules briefing and protocol-layer review30 min
  2. Run SITL and QGroundControl and capture on loopback60 min
  3. Filter, count the rate and find 0xFD in the byte view60 min
  4. Link-loss test and event record60 min
  5. Build the field network, set the static IP, ping and draw the diagram110 min
  6. Wrap-up, questions and hand-in checklist40 min

Expected results

  1. Record: Table 1 Capture results for udp.port == 14550Table 1: packets per second depend on the message rates SITL is set to and have no fixed value; check that the value is fairly steady and was measured from Wireshark's Statistics or from the first and last packet times (with the UAT 104 file's rates, 1 + 10 + 4 + 1 Hz, about 16 frames per second). The 0xFD byte comes after the 20-byte IPv4 header and the 8-byte UDP header. Counted from the start of the packet in Wireshark, its position depends on the loopback link header (on Windows with Npcap a 4-byte header gives offset 32; on Linux a 14-byte header gives offset 42, counting from 0).
  2. Record: Table 2 Link-loss event recordTable 2: while forwarding is paused, QGroundControl reports lost communication or no vehicle, and the values on screen freeze. Whether the mode in the log changes depends on the ground-station-loss failsafe setting in SITL and the armed state, as in the knowledge unit "C2 and abnormal events in simulation". With the failsafe enabled and the vehicle flying, expect a mode change such as RTL; without it, no change. A correct answer also states the setting used.
  3. Record: Table 3 Addresses and ping results of the field networkTable 3 (Figure 3): router 192.168.10.1, laptop 192.168.10.20, tablet 192.168.10.21, onboard computer 192.168.10.30, all in 192.168.10.0/24, which has 254 host addresses (broadcast 192.168.10.255). Every pair should ping; times on indoor Wi-Fi are usually a few to a few tens of ms. If pinging a Windows laptop fails but the reverse works, think of the firewall.
  4. Question 1: In Wireshark, which headers come before the 0xFD byte and how many bytes are they? If a 21-byte HEARTBEAT frame is sent in one UDP/IPv4 packet, what percentage of what is sent is headers?After the 20-byte IPv4 header and the 8-byte UDP header, 28 bytes in total (with the link header before them). A 21-byte HEARTBEAT becomes 49 bytes, so headers are 28/49 = 57.1%. The smaller the message, the larger the header share (a 40-byte GLOBAL_POSITION_INT gives 41.2%). A strong answer says that every layer's headers must be counted when comparing with link capacity.
  5. Question 2: When the link came back, did QGroundControl get the missing data back? Explain using the properties of UDP and say why this is good for telemetry.No. UDP has no acknowledgement and no resending, so data from the gap is simply gone. When the link returns, the screen shows the latest values at once, which is good for telemetry because new values replace old ones. With TCP, new data would wait behind resent old data and the whole stream would lag.
  6. Question 3: If the ground-station laptop got the address 169.254.x.x, or 192.168.1.20/24, while the drone is at 192.168.10.30/24, can they ping each other? Which layer is the problem in, and how do you fix it?Neither can ping; the problem is in the network layer. 169.254.x.x means no DHCP address was assigned, so check the Wi-Fi connection or set an IP by hand. 192.168.1.20/24 is in a different subnet from 192.168.10.30/24, so change it to an unused address in 192.168.10.0/24, such as 192.168.10.20.
  7. Question 4: If every pair pings but QGroundControl still cannot see the drone, what should you check next, layer by layer?Check the transport layer: is the drone sending to the laptop's IP and port 14550, and does the Windows firewall allow UDP 14550? Then check the application layer in Wireshark with udp.port == 14550: do packets arrive and start with 0xFD? A strong answer goes from the bottom layer up instead of trying random fixes.

Discussion questions

  • If many people open phone hotspots near the field, how might the ground-station network be affected, and how can you reduce the effect?
  • Why is capturing traffic on other people's networks forbidden, even just for practice?
  • Which devices in the field network should use a static IP and which DHCP, and why?

Adapting to student background

Upper secondary (M.6)
Have them compute subnet sizes with 2^(32-p) - 2 and the header share before opening Wireshark, then check against the capture; give extra time on the real router and IP settings.
Vocational certificate
Focus on hands-on work: wire the router, set IPs and ping from a layer-by-layer step card; use Figure 3 as the diagram template and colour the layers in the byte view instead of calculating.
Diploma
Extension: split 192.168.10.0/24 into /26 ranges for ground stations and drones, configure them and show that traffic between the groups needs routing.

Common student mistakes: Common mistakes in the module 3 lesson

4Worksheet 4 A battery-reporting system for a drone fleet
Lab · About 6 h of class time · CLO3

Objective: Build an MQTT system that reports several drones, knows data freshness, detects lost drones and restricts rights per topic

Equipment

  • Computer with Mosquitto
  • Python and paho-mqtt
  • The MQTT and Mosquitto knowledge unit

Safety

  • Desk work only; no flying
  • Use only a local or lab broker

Steps

  1. Run mosquitto_sub -t "drone/#" -v and publish with mosquitto_pub; try + and #
  2. Write a program that simulates three drones sending battery level every second at QoS 0
  3. Add a retained online status and a Last Will of offline
  4. Write a subscriber that shows the latest value with its age, then kill one drone abruptly
  5. Enable TLS and an ACL and test that drone 1 cannot publish to drone 2's topics

Deliverables

  • Simulated drone and subscriber code
  • Last Will test record
  • TLS and ACL configuration with test result

Checklist

  • Table 1 has at least 4 cases, including + failing to match several levels and # matching the parent level (Accuracy of calculations and code)
  • Table 2 shows the data age of all three drones at each time and a row where the status turns offline from the Last Will (Working system and network configuration)
  • The Mosquitto config has a listener on 8883 with certificates, allow_anonymous off, and an ACL letting each drone write only to drone/<id>/# (Security and data handling)
  • No password or private key appears in submitted code or files (read from environment variables) (Security and data handling)
  • Runnable simulated-drone and subscriber code is attached, showing the lines that set QoS, retain and the will (Communication and reporting)

Instructor guide

Class timing 360 min

  1. Lab broker rules and publish/subscribe review30 min
  2. Try mosquitto_sub and mosquitto_pub with + and #45 min
  3. Write the three simulated drones with retained status and Last Will90 min
  4. Write the data-age subscriber and run the kill test75 min
  5. Enable TLS and ACL and test the rights80 min
  6. Wrap-up, questions and hand-in checklist40 min

Expected results

  1. Record: Table 1 Wildcard tests with mosquitto_sub and mosquitto_pubTable 1: drone/+/battery receives drone/1/battery but not drone/1/status or drone/1/gps/fix; drone/# receives every topic under drone, including the topic drone itself; drone/+ does not receive drone/1/battery (two levels). Every actual result should match the expectation; mismatches usually come from wrong letter case or stray spaces in the topic.
  2. Record: Table 2 Subscriber display before and after one drone is killedTable 2: normally each drone sends every 1 s, so data age stays between about 0 and 1 s (accept up to about 1.5 s on one computer). After one drone is killed, its battery value freezes and its data age rises by 1 s every second; its status turns offline when the Last Will arrives. The other two stay normal.
  3. Record: Table 3 TLS and ACL test resultsTable 3: connecting on port 8883 with ca.crt succeeds; connecting without a username is refused; drone 1 publishing to drone/1/battery succeeds; drone 1 publishing to drone/2/battery delivers nothing to a subscriber on drone/# (the broker drops it; with logging on, the denial appears in the log). The last result is the key evidence.
  4. Question 1: Does a subscriber on drone/+/battery receive a message on drone/1/status, and does one on drone/#? Explain from your Table 1 results.drone/+/battery does not receive drone/1/status because the last level must be exactly battery and + stands only for the second level. drone/# does receive it because # stands for all remaining levels. A strong answer cites the Table 1 rows.
  5. Question 2: After one drone was killed abruptly, how did its data age change and how quickly did the Last Will arrive? Why must the subscriber still show data age when Last Will exists?When the program is killed, the operating system closes the connection at once without sending DISCONNECT, so the broker sends the Last Will almost immediately (usually under 1 s). If the cable or signal is simply lost, the broker must wait for the keep-alive timeout first (with 60 s set, possibly about 90 s). Meanwhile the screen looks normal but keeps getting older, which is why data age must always be shown.
  6. Question 3: Why should the online status be retained but the battery level not?Status changes rarely and a late subscriber must know at once whether the drone is online, so it should be retained. Battery level changes every second; if retained, a new subscriber could get a very old value without knowing, such as 76% from a drone that dropped off long ago.
  7. Question 4: If your subscriber can process 2 messages per second while 3 drones each send 1 per second, how long is the queue after one minute, how long does a new message wait, and how would you fix it?3 messages per second in and 2 out, so the queue grows by 1 per second: after 60 s it holds 60 messages and a new one waits about 60/2 = 30 s (after 5 minutes, 300 messages and 150 s). Fix it by lowering the send rate, batching, adding processing power or using message expiry to drop stale messages.
  8. Question 5: What does the ACL test prove, and how does the threat TLS stops differ from what the ACL stops?The ACL proves drone 1 cannot pose as drone 2 (it stops impersonation at the topic level). TLS encrypts data in transit and stops eavesdropping on the network. TLS does not limit who may write which topic, and an ACL does not hide data from an eavesdropper, so both are needed, together with one account per device.

Discussion questions

  • Which is safer to send at QoS 1, "climb another 10 m" or "set altitude to 50 m", and why?
  • If the command centre has several screens, how should measurement and command topics be separated so rights are easy to set?
  • What happens to the whole system if the broker fails, and how should you prepare for it?

Adapting to student background

Upper secondary (M.6)
Have them write Q = (λ - μ)t and W ≈ Q/μ and predict results before testing, and draw the QoS 1 message sequence when a PUBACK is lost.
Vocational certificate
Start with mosquitto_pub and mosquitto_sub typed from an example card, then give starter drone code where only topics and values change; use a table instead of formulas for the queue.
Diploma
Extension: add MQTT 5.0 message expiry to the battery messages and test that a slow subscriber no longer receives messages older than the limit.

Common student mistakes: Common mistakes in the module 4 lesson

5Worksheet 5 Sending mission data securely
Lab · About 6 h of class time · CLO3, CLO2

Objective: Use hashes and HMACs to protect data and command integrity, and frame an organisation's cybersecurity

Equipment

  • Sample image folder
  • Python (hashlib and hmac)
  • SITL and Wireshark from worksheet 3
  • MQTT programs from worksheet 4

Safety

  • Desk work only; no flying
  • Keep secret keys out of code and out of submitted files

Steps

  1. Build manifest.csv with the name, size and SHA-256 of every file
  2. Copy the folder, alter one file and make the checker catch it
  3. Add an HMAC and sequence number to commands; the receiver rejects bad or repeated messages
  4. Enable MAVLink signing in SITL and use Wireshark to see the extra bytes and whether content is readable
  5. Draw a six-function CSF 2.0 table and a survey mission data life-cycle chart naming the owner at each step

Deliverables

  • Manifest code and check result
  • HMAC code with an explanation of the attack the sequence number stops
  • MAVLink signing observations
  • CSF table and data life-cycle chart

Checklist

  • manifest.csv lists every file in the folder, and the checker names the exact file that was altered (not just that something differs) (Accuracy of calculations and code)
  • Table 2 has at least 4 cases: genuine command, altered command, replayed command and a new valid sequence number (Accuracy of calculations and code)
  • The secret key is read from an environment variable or a file outside the repository and does not appear in submitted code, screenshots or report (Security and data handling)
  • The write-up correctly separates the jobs of hash, HMAC, signing and encryption, at least one sentence per tool (Security and data handling)
  • Table 3 covers all six functions including Govern, and the data life-cycle chart names an owner at every step (Communication and reporting)

Instructor guide

Class timing 360 min

  1. Secret-key handling briefing and review of CIA and the four tools30 min
  2. Build the manifest, re-check and alter a file70 min
  3. Add an HMAC and sequence number to MQTT commands and test90 min
  4. Enable MAVLink signing in SITL and inspect with Wireshark60 min
  5. Build the CSF 2.0 table and the data life-cycle chart70 min
  6. Wrap-up, questions and hand-in checklist40 min

Expected results

  1. Record: Table 1 Manifest and re-check after copyingTable 1: every file has a 64-character hex SHA-256 (the table shows only the first 8). Before the change all files match; after altering one file, that file alone fails and all others match. Hash values differ between groups because the images differ. Check the program with the lesson's text "survey-2026-03-14 block A", which must give b21608ab...
  2. Record: Table 2 Tests of commands with an HMAC and sequence numberTable 2: genuine command with a new sequence number, accepted; altered command (for example RTL to LAND), HMAC fails, rejected; replayed command, HMAC passes but the sequence number is repeated or older, rejected; new command with a higher number, accepted. The HMAC-SHA256 tag is 32 bytes, and the receiver must compare with hmac.compare_digest.
  3. Record: Table 3 CSF 2.0 frame of an imaginary operations unitTable 3: Govern names owners of mission data and sets a retention policy; Identify keeps an inventory of drones, ground stations, keys and datasets; Protect uses TLS, one account per device, MAVLink signing and firmware updates; Detect watches broker logs and alerts on unknown connections; Respond has a procedure for a possibly leaked key, such as revoking accounts and replacing keys; Recover restores data from hash-checked backups and reviews lessons learned. The life-cycle chart must have five steps (collect, transfer, store, use or share, review or delete) with an owner at every step.
  4. Question 1: In your tests, if a file is changed without changing its size, does the program still catch it, and why? Why can a hash alone not stop someone forging on purpose?Yes, because the hash is computed from every bit of the content; change one bit and the whole hash changes, whatever the size. But a hash has no key, so a deliberate forger can alter the file and put a fresh hash in the manifest, just like the CRC in module 1. You need an HMAC or a digital signature, or the manifest must be kept where the attacker cannot change it.
  5. Question 2: Which attack does the sequence number stop that the HMAC alone cannot? Explain with a test case from Table 2.Replay: an attacker records a genuine command with a valid HMAC and sends it again later. The HMAC still passes because the content is unchanged, but the sequence number is repeated or older than one already received, so the receiver rejects it (the replayed-command row in Table 2). It is the same idea as the always-increasing timestamp in MAVLink signing.
  6. Question 3: With MAVLink signing on, how many bytes longer is each frame, is the content still readable in Wireshark, and which CIA objective does signing protect and which does it not?13 bytes longer per frame (the MAVLink 2 signature block: 1-byte link ID, 6-byte timestamp and the 48-bit, 6-byte signature), for example HEARTBEAT from 21 to 34 bytes and GLOBAL_POSITION_INT from 40 to 53 bytes. The content is still readable because signing does not encrypt, so it protects integrity and proves the source but not confidentiality, which needs encryption at another layer.
  7. Question 4: If signing is turned on for the worksheet 2 data budget (HEARTBEAT 1 Hz, ATTITUDE 10 Hz, GLOBAL_POSITION_INT 4 Hz on a 57600 baud radio), what percentage of capacity is used, compared with before?Before: 581 B/s = 10.09%. After: (21 + 13) x 1 + (40 + 13) x 10 + (40 + 13) x 4 = 776 B/s = 13.47% of 5760 B/s, about 3.4 points more, with plenty of room left. A strong answer notes that small messages pay the largest share (HEARTBEAT grows by 61.9%).

Discussion questions

  • If one drone's secret key leaks, how does the damage differ between a system with one key for every drone and one with a key per drone?
  • Should aerial photos that show houses and people be processed at the edge or in the cloud, and which parts should be shared? Why?
  • Of the six CSF 2.0 functions, which should a small unit with few staff start with?

Adapting to student background

Upper secondary (M.6)
Have them fill in a comparison table of the four tools (key needed or not, which CIA objective) before coding, and explain why compare_digest is safer than ==.
Vocational certificate
Give starter manifest code using hashlib and let them alter files and see the result themselves, favouring doing over theory; use picture cards of the six CSF functions for Table 3.
Diploma
Extension: carry out a real Respond step in the lab: replace one drone's HMAC key and show that commands using the old key are rejected while the other drones keep working.

Common student mistakes: Common mistakes in the module 5 lesson

Scoring rubric

For worksheets and the mini-project. Each criterion scores level (1–4) ÷ 4 × weight.

CriterionWeightExcellent (4)Good (3)Fair (2)Needs work (1)
Accuracy of calculations and code30%All calculations and code correct, reproducible and testedNearly all correct, method shownSome errors or missing testsMany errors or does not run
Working system and network configuration25%System fully works with test evidence for every part; faults traced layer by layerNearly all works, most evidence presentPartly works or evidence missingDoes not work
Security and data handling20%Tools matched to their jobs (TLS, ACL, HMAC, hash) with the threats they stop explained correctlyNearly all correctConfuses the job of some toolsSecurity not considered
Communication and reporting25%Clear, with correct diagrams and tables and units on every valueClear with minor flawsHard to follow or missing partsDoes not communicate results

Assessment map: CLOs and how they are assessed Draft

The CLOs are a web-team draft; the course owner sets the final ones (curriculum book, part 4). This table is built from the worksheet and module-quiz data, so it follows any change to the CLOs.

CLOWorksheetsModule quizzes
CLO1 Explain digital systems and basic computer architectureW 1W 2M1M2
CLO2 Configure and test TCP/IP networks for ground stationsW 3W 5M3M5
CLO3 Explain IoT architecture and publish/subscribe messagingW 4W 5M4M5