Module 5/5 · Weeks 13–15 · 27 h

LoRa mesh and field networks

UAT 207 Communication and Data Network Systems

About 90 minDraft, awaiting reviewLast updated 28 September 2026

Lesson

By the end of this module you will be able to

  1. Explain LoRa parameters, namely spreading factor, bandwidth and coding rate
  2. Compute LoRa time on air and the maximum message count under a duty-cycle limit
  3. Compute end-to-end delivery probability in a mesh by hop count and retries
  4. Explain throughput limits of multi-hop networks and the rules for the 920–925 MHz band

Prerequisites: UAT 207 Modules 1–4 · UAT 105 Module 4 (MQTT and IoT)

Why this matters

There is no mobile coverage in the mangroves, so the team must build its own network to bring sensor data and people’s positions back to the station. LoRa reaches far on little power but trades that for very low data rates, and a mesh lets each node relay data onwards. The drone knowledge base’s deep-dive units on LoRa/Mesh and on swarm coordination over LoRa mesh give an overview of real use; this module goes into the numbers used for design.

LoRa parameters

LoRa uses spread-spectrum modulation. The spreading factor (SF), 7 to 12, sets how long each symbol lasts: one step up doubles the symbol length, reaching farther and resisting noise better, but taking longer on air. The SX1276 datasheet, section 4.1.1.7, gives the time-on-air formula in the formula box, where is the payload in bytes, the coding rate (1 = 4/5), = 1 without a header and = 1 with low data rate optimisation on.

Thailand uses the AS923-1 channel plan in 920–925 MHz under the LoRa Alliance’s LoRaWAN Regional Parameters (RP002). For NBTC rules in this band, the Telecommunications Association of Thailand summarises that IoT devices may use up to 500 mW e.i.r.p. without a licence and that the band maximum is 4 W e.i.r.p. This comes from a secondary source and must be checked against the NBTC announcement in the Royal Gazette before real use. The 10% duty cycle in the example is Meshtastic’s setting for the TH region, not a requirement checked against the announcement.

Example 1 Time on air and messages per hour

A 20-byte position message, BW 125 kHz, CR 4/5, preamble 8, CRC on, explicit header, and DE on at SF11–12.

import math

def time_on_air(pl, sf, bw=125e3, cr=1, n_pre=8, crc=1, ih=0):
    de = 1 if sf >= 11 else 0
    t_sym = 2 ** sf / bw
    n_pay = 8 + max(math.ceil((8 * pl - 4 * sf + 28 + 16 * crc - 20 * ih) / (4 * (sf - 2 * de))) * (cr + 4), 0)
    return (n_pre + 4.25) * t_sym + n_pay * t_sym

for sf in range(7, 13):
    t = time_on_air(20, sf)
    per_hour = {dc: int(dc * 3600 / t) for dc in (0.10, 0.01)}
    print(f"SF{sf:<2}: {t * 1000:7.1f} ms, max {per_hour[0.10]:>5} msgs/h at 10% duty, {per_hour[0.01]:>4} at 1%")
SF7 :    56.6 ms, max  6363 msgs/h at 10% duty,  636 at 1%
SF8 :   102.9 ms, max  3498 msgs/h at 10% duty,  349 at 1%
SF9 :   185.3 ms, max  1942 msgs/h at 10% duty,  194 at 1%
SF10:   370.7 ms, max   971 msgs/h at 10% duty,   97 at 1%
SF11:   741.4 ms, max   485 msgs/h at 10% duty,   48 at 1%
SF12:  1318.9 ms, max   272 msgs/h at 10% duty,   27 at 1%

SF12 takes over twenty times as long as SF7. If 20 people in the field each send a position every minute at SF12, that is 1,200 messages an hour, more than one channel can carry even at a 10% duty cycle. Reduce the reporting rate, lower SF where the signal is good, or split channels.

Bar chart of time on air in milliseconds for a 20-byte payload at 125 kilohertz bandwidth: SF7 57, SF8 103, SF9 185, SF10 371, SF11 741 and SF12 1319 milliseconds. Each bar is nearly double the previous one
Figure 1 LoRa time on air by spreading factor

Mesh networks

In a mesh, nodes pass messages along until they reach the gateway; each pass is one hop. Meshtastic sets a default hop limit of 3, with a maximum of 7. A drone can act as a temporary airborne relay, but every hop adds loss and delay and reuses the same channel.

Li et al. (2001) analysed chains of wireless nodes on one channel and found that in the ideal case a long chain carries only about 1/4 of a single link’s throughput, and about 1/7 in 802.11 simulations, because relaying nodes interfere with each other.

Network diagram. A station gateway on the left links to relay 1 and relay 2, which link to relay 3 in the centre. Relay 3 links to sensor 1 and sensor 2 on the right. A drone relay at the top is joined with dashed lines between relay 1 and sensor 1
Figure 2 Field station LoRa mesh network

Example 2 What share reaches the destination

Each hop succeeds 90% of the time independently, using SF9 and a 20-byte message; on failure each hop may retry up to R times.

P_HOP, TOA_S = 0.90, 0.185                 # success chance per hop, SF9 time on air

for hops in (1, 2, 3, 5):
    row = []
    for retries in (0, 2):
        hop_ok = 1 - (1 - P_HOP) ** (retries + 1)
        tries = sum((1 - P_HOP) ** k for k in range(retries + 1))      # mean attempts per hop
        row.append(f"R={retries}: {hop_ok ** hops:6.1%}, airtime {hops * tries * TOA_S:.2f} s")
    print(f"{hops} hop(s): " + " | ".join(row))
1 hop(s): R=0:  90.0%, airtime 0.18 s | R=2:  99.9%, airtime 0.21 s
2 hop(s): R=0:  81.0%, airtime 0.37 s | R=2:  99.8%, airtime 0.41 s
3 hop(s): R=0:  72.9%, airtime 0.55 s | R=2:  99.7%, airtime 0.62 s
5 hop(s): R=0:  59.0%, airtime 0.93 s | R=2:  99.5%, airtime 1.03 s

Without retries, fewer than three in five messages survive five hops. Two retries deliver almost every message while adding only about 11% airtime. This does not yet include collisions, which increase as the network gets busier and cut real throughput, as Li et al. showed.

Module lab

Lab: designing a field network

  1. Use the code from Example 1 to choose an SF and position rate for a team of 20, using no more than half of the configured duty cycle.
  2. Set up three LoRa nodes (for example Meshtastic) in the TH region and measure delivery over one and two hops.
  3. Compare with Example 2 and explain the differences.
  4. Have a hovering drone carry a relay node and watch messages change route.
  5. Check the actual NBTC rules for 920–925 MHz and record transmit power and settings that comply.

Common mistakes

Watch out

  • SF12 on every node, filling the channel.
  • A high hop limit without considering collisions and delay.
  • The wrong region or frequency for Thailand.
  • Assuming mesh throughput equals a single link.
  • Sending personal data over an open network unencrypted.

Summary

  • One SF step nearly doubles time on air, reaching farther but carrying fewer messages.
  • Thailand uses AS923-1 in 920–925 MHz; check power and conditions against the NBTC announcement.
  • Delivery probability falls exponentially with hop count; retries help a lot.
  • A single-channel chain carries only a fraction of a single link’s throughput (about 1/4 ideally).

Check your understanding

  1. What is the symbol time at SF10 and BW 125 kHz?
  2. A message takes 0.5 s on air with a 1% duty cycle. How many messages per hour at most?
  3. Each hop succeeds 80% of the time; three hops without retries succeed how often?
  4. What is Meshtastic’s default hop limit?
  5. Why does a single-channel chain of wireless nodes carry less than a single link?
Answers
  1. ms
  2. messages
  3. 3
  4. Relaying nodes share one channel, so they cannot transmit at the same time and interfere with each other.

Key formulas

LoRa symbol time
Payload symbol count
Time on air

Key references

  1. Semtech Corporation. (2015). SX1276/77/78/79 – 137 MHz to 1020 MHz low power long range transceiver (Datasheet Rev. 4). link
  2. LoRa Alliance. (2021). RP002-1.0.3 LoRaWAN regional parameters. link
  3. สมาคมโทรคมนาคมแห่งประเทศไทย. การใช้งาน IoT และ RFID ย่าน 920–925 MHz (สรุปประกาศ กสทช.). link
  4. Meshtastic. LoRa configuration. Meshtastic documentation. link
  5. Li, J., Blake, C., De Couto, D. S. J., Lee, H. I., & Morris, R. (2001). Capacity of ad hoc wireless networks. In Proceedings of the 7th Annual International Conference on Mobile Computing and Networking (MobiCom '01). ACM. link

Further reading

Study the assigned knowledge units in advance, review media and take the module quiz

In class / field

Lab or field practice from worksheets with a safety checklist

Learning evidence: Checked worksheets and quiz results

Module quiz

This is a formative self-check, not a graded exam

Knowledge domain: Communications, networks and IoT · Public safety and disasters · Automation, robotics and swarms