Skip to content

Teaching the radio the law

Sub-GHz ISM spectrum is free to use precisely because it comes with rules: duty-cycle caps in Europe, per-channel dwell limits in the US, mandatory listen-before-talk in Japan and Korea, EIRP ceilings everywhere — each band a different bargain between “no license needed” and “don’t hog the commons.” Most hobby radio firmware handles this with a region enum that sets frequency and power, and leaves the behavioral rules — the percentages, the milliseconds, the listen-first obligations — as a gentleman’s agreement with the README.

LoRa Relay Chat decided to treat regulatory compliance as protocol machinery.

Before writing enforcement code, the project wrote a worldwide regulatory survey — RP002 regional parameters read in full, ETSI sub-band tables, FCC Part 15.247, ARIB STD-T108, cross-checked against what Meshtastic’s region table actually encodes. Two things about it are unusual enough to be worth copying:

  • Disagreements between sources are written out, not resolved by guessing. Where the LoRa Alliance’s own document contradicts itself about India’s duty cycle, or where Meshtastic’s Japan profile encodes 100% duty with no LBT while ARIB requires LBT for exactly that allowance, the survey says so and marks the item UNVERIFIED rather than picking a number that looks confident.
  • It’s explicitly labeled non-normative until code implements it — and the moment a region table landed in core, the relationship flipped: now the survey is the spec the table must match, and deviation is a bug.

The shipped result (Radio) enforces at TX-decision time, not in documentation:

  • An airtime ledger — a per-lane sliding-window token bucket charged with the Semtech time-on-air formula — sits in front of every transmit decision. EU868’s 10%/1%/0.1% sub-bands, dwell-time caps, all denominated in actual computed airtime. When the budget is spent, the transmission defers and a counter increments; the telemetry surface exports the duty fraction live.
  • EIRP vs. ERP accounting. Regulations mix the two units (they differ by 2.15 dB — an antenna-model subtlety that silently overshoots limits when ignored). Every sub-band’s ceiling is tagged with its unit, and the legal conducted power is computed from the operator’s actual antenna gain — a high-gain antenna clamps PA output down to hold the same EIRP.
  • LBT as a first-class mechanism where law requires it (Japan, Korea) or offers it as an alternative to duty cycling.

And the part users notice: it won’t transmit until you tell it where it is

Section titled “And the part users notice: it won’t transmit until you tell it where it is”

LoRa Relay Chat firmware has always shipped receive-onlytx on is an explicit operator action, taken after confirming an antenna is attached. The region engine extends that: tx on now refuses until a regulatory region has been explicitly set, with its own refusal counter so the event is observable. A freshly flashed board physically cannot transmit under an unspecified regulatory regime. That’s two deliberate human steps between “downloaded firmware” and “emitting RF”, and both are safety features to brag about, not friction to apologize for.

One more neighborly detail: LRC’s frequency planner dodges the other networks on purpose — it computes every Meshtastic modem preset’s default frequency (using Meshtastic’s own hash algorithm) plus three coordinated MeshCore metro channels, and keeps LRC lanes off them with bandwidth-scaled guard bands. Shared spectrum, treated as shared.

Deeper reading: Radio: lanes & presets, the regulatory survey.