Back to Protocols Overview
Protocol Blueprint

LoRa, MeshCore & LoRaWAN Protocol Architecture

LoRa transceivers encode data into continuous mathematical chirps, allowing signals to be pulled from 20 dB below the noise floor. But physical modulation is only step one: how your firmware frames packets, routes across hops, and manages airtime determines whether your network scales or collapses under packet collisions.

01 · Chirp Spread Spectrum (CSS) Physics & Spreading Factors

Standard FSK modulation requires an incoming signal to be at least +6 to +10 dB stronger than background thermal noise. LoRa uses Chirp Spread Spectrum (CSS), sweeping carrier frequency linearly across the channel bandwidth (up-chirps and down-chirps).

The Spreading Factor (SF) defines the number of chirps used to encode each individual symbol (2SF chirps per symbol). Higher spreading factors give receivers massive mathematical processing gain:

Spreading FactorSNR ThresholdSymbol Time (125 kHz)50-Byte AirtimeRaw BitrateField Role & Battery Tradeoff
SF7-7.5 dB1.024 ms102 ms5.47 kbpsFast sensor bursts, moving vehicles, battery conservation, high-density areas
SF8-10.0 dB2.048 ms184 ms3.13 kbpsGood balance for suburban nodes with moderate packet volume
SF9-12.5 dB4.096 ms328 ms1.76 kbpsDefault for regional telemetry, MediumFast presets, and light mesh hops
SF10-15.0 dB8.192 ms616 ms0.98 kbpsChallenging links through dense timber, multiple buildings, or rolling terrain
SF11-17.5 dB16.384 ms1,150 ms0.54 kbpsMeshtastic LongFast default. Extreme range, but 1.15s on air per 50-byte burst
SF12-20.0 dB32.768 ms2,138 ms0.29 kbpsMaximum sensitivity. Burns 20x more battery than SF7; easily saturates airtime

The Airtime Trap

Notice that moving from SF7 to SF12 increases packet airtime from 102 ms to over 2.1 seconds — a 20× increase in channel occupancy. A single sensor sending telemetry at SF12 every 30 seconds will completely jam the local channel for everyone else and deplete its 18650 lithium battery in a couple of weeks. Always default to SF7 or SF8, only stepping up when signal margin drops.


02 · Forward Error Correction & Sync Words

LoRa radios inject redundant parity bits into every transmission using Hamming Forward Error Correction (FEC). If electromagnetic interference flips a bit in transit, the receiver’s hardware decoder reconstructs the original symbol without requiring an airtime-wasting retransmission:

Coding RatePacket Airtime OverheadError Correction CapabilityRecommended Field Use
CR 4/51.25x (+25%)Detects 2-bit errors, corrects 1-bit per nibbleStandard field telemetry with clean line-of-sight
CR 4/61.50x (+50%)Higher error recovery marginFading channels and moderate multipath reflection
CR 4/71.75x (+75%)Heavy redundancyIndustrial environments near high-voltage switching
CR 4/82.00x (+100%)Maximum Hamming code protectionMission-critical alarm packets through severe RF noise

Hardware Sync Words

Immediately following the preamble, the transmitter emits a two-chirp hardware pattern called the Sync Word. If the sync word does not match what the receiver is programmed to expect, the radio frontend immediately aborts decoding at the silicon level:

  • 0x12 (Private / Default): Used by Meshtastic, MeshCore, Reticulum, and custom point-to-point firmware. Prevents private packets from triggering false interrupts on public gateways.
  • 0x34 (Public LoRaWAN): Reserved for public networks (The Things Network, Helium, ChirpStack).

03 · MeshCore vs. Meshtastic: Flood vs. Structured Mesh

In off-grid communications, getting packets across hills and trees requires multi-hop relaying. Two primary philosophies dominate open-source LoRa development:

Architectural FeatureMeshtastic (Flood-Based)MeshCore (Structured Roles)
Routing MechanismManaged Flood Routing (Nodes repeat all heard packets up to hop limit)Structured Multi-Hop Routing (Packets routed across dedicated backbone repeaters)
Client Device RoleActs as both user terminal and active mesh repeater by defaultClient nodes only send/receive; leaf clients never rebroadcast packets
Battery ConservationClients wake to repeat stranger packets, draining mobile batteries fasterClients sleep between transmissions, preserving handheld/phone batteries
High-Density ScalabilityCan experience channel saturation in dense urban areas due to packet cascadesMinimizes redundant transmissions; designed for scalable multi-tier network backbones
Offline MessagingReal-time broadcast only; if recipient node is asleep or out of range, packet dropsDedicated Room Server nodes store and forward messages when client reconnects
Packet AcknowledgmentsHop-by-hop duplicate suppression with optional end-to-end routing ACKBuilt-in path-aware acknowledgments (ACKs) confirming delivery across nodes

The MeshCore Node Role Model

MeshCore was engineered specifically to solve the “broadcast storm” problem of pure flood routing in dense population centers:

1. Client Node

A pocket radio or phone companion (paired via BLE). Clients send user text messages, telemetries, and ACK requests. They never repeat stranger packets, keeping power draw to microamps and leaving the spectrum quiet.

2. Repeater Node

Dedicated relay nodes mounted on towers, rooftops, or mountain ridges with solar panels. Repeaters listen on the backbone channel and forward packets across structured hops using path tables.

3. Room Server

Persistent mailbox nodes with flash storage. When a client goes out of range or powers down, messages addressed to group rooms are stored. When the client returns to RF range, it syncs missed history.


04 · Over-the-Air Packet Framing

Meshtastic Packet Header (16 Bytes)

To (4B)From (4B)Packet ID (4B)Flags (1B)Channel (1B)Next Hop (1B)Relay Node (1B)Payload (Var)
0xFFFFFFFF (Broadcast)Node ID (Hex)Random 32-bit IDHopLimit (3b) | WantACKHash of PSKRouting byteRelay byteProtobuf + AES

LoRaWAN Uplink MAC Frame Format

MHDR (1B)DevAddr (4B)FCtrl (1B)FCnt (2B)FOpts (0–15B)FPort (1B)FRMPayload (Var)MIC (4B)
MAC HeaderDevice AddressFrame ControlFrame CounterMAC CommandsPort IndexAES-128 PayloadCMAC Integrity

05 · Exact Airtime Calculation Formula

The total time a LoRa transmitter remains active over the air (Tpacket) is the sum of the preamble duration and the payload duration:

T_packet = T_preamble + T_payload

  • Symbol Duration: Tsym = 2SF / BW (e.g. at SF7 and 125 kHz BW, Tsym = 1.024 ms).
  • Preamble Duration: Tpreamble = (Npreamble + 4.25) × Tsym. For an 8-symbol preamble, that is 12.25 × 1.024 ms = 12.54 ms.
  • Payload Duration: Calculated by the number of payload symbols multiplied by Tsym, accounting for payload bytes, header presence, and coding rate FEC expansion.

Site search