Files
heltec-repeater/docs/RF_FRONTEND_TESTS.md
T

6.0 KiB

RF Front-End (KCT8103L) Observations

Important caveat about the observer

The Nooelec dongle used as reference receiver is not a stable instrument on this bench. Measured with hil/sdr_health.py:

fresh after replug : mean power @42.1 dB gain ~ +22 dB, spectrum span ~51 dB,
                     noise tracks gain by ~25 dB          -> "full"
after minutes of
continuous streaming: mean power ~ +5 dB, span ~18-21 dB,
                     noise tracks gain by ~8 dB           -> "degraded"
wedged / bypassed  : railed ~ +40 dB, span < 10 dB,
                     noise does not track gain            -> "deaf"

The drop from "full" to "degraded" is roughly 17 dB of sensitivity and happens within minutes. Every reported comparison therefore carries the observer state, and cross-run comparisons at "the same gain" are invalid. This is why hil/capture_both.sh derives meter decodes and our own TX measurements from a single rtl_sdr stream.

An earlier draft of this document claimed a 97 % Heltec-vs-SDR match rate. That number was taken while the dongle was degraded (it decoded far fewer originals, so the Heltec matched nearly all of them) and is withdrawn.

Measured RX performance vs the SDR

600 s run, captures/2026-09-01T09-22-28-hil, gain 42.1 dB, observer state "degraded", CSD high (FEM enabled in RX):

SDR classified originals : 41
Heltec RX candidates     : 122   (CRC ok: 56)
matched originals        : 24    -> 58.5 % of SDR originals
unique meters seen       : 35 (union of both receivers)

Neither receiver dominates. In the per-meter table of that run:

  • meters where both agree, e.g. 61471660 (6 SDR / 6 Heltec / 6 matched), 04774139 (3/3/3), 04769582 (2/2/2);
  • meters only the SDR decoded, e.g. 04766714 (3/0), 04766710 (3/0), 04769365 (2/0), 04766705 (2/0);
  • meters only the Heltec decoded, e.g. 20898871 (0/4), 67537334 (0/3), 04767753 (0/3).

So the SX1262 + KCT8103L chain is broadly comparable to an R820T dongle with a whip antenna at this location, with per-meter differences that are most likely antenna-pattern and multipath effects rather than a systematic sensitivity gap.

RSSI vs CRC success (Heltec, chip-referred RSSI)

15-minute run, 166 candidate frames:

RSSI bucket CRC ok CRC fail success
>= -50 dBm 3 0 100 %
-60..-51 38 3 93 %
-70..-61 24 86 22 %
-80..-71 0 11 0 %
<= -100 0 1 0 %

Interpretation: the usable working point with the current configuration is about -65 dBm chip-referred and better. Below that, frames are still detected (sync matches, length parses) but accumulate bit errors. Failures concentrate in long (100-118 byte) Techem frames, consistent with errors accumulating over frame length rather than a hard sensitivity floor.

Firmware counters from the 600 s run corroborate the shape: rx_candidates=178, rx_valid=58, rx_crc_fail=66, rx_not_c1=54 (rx_not_c1 are sync matches that are not C-mode: T1 traffic and false syncs from the deliberately short 8-bit preamble detector).

LNA / CSD experiment

set fem_rx_csd 0|1 controls the KCT8103L CSD level while in RX (high = FEM enabled/LNA path, low = FEM disabled). TX always forces CSD high. hil/lna_ab.sh runs two equal-length RX-only arms and reports frame counts, CRC success and RSSI distribution per arm.

Results: see the "KCT8103L RX front-end A/B" section appended below once a run has completed. Do not assume a direction before measuring - meter traffic varies between arms, so only large differences are meaningful.

Bench dynamic-range limitation

Measured on a single stream (iq_proof.json of the 600 s run):

our transmissions  : median +12.9 dB over noise floor (min 6.2, max 38.5)
meter transmissions: median  +9.8 dB over noise floor (min 6.0, max 37.2)
clipped ADC samples: 0.006 % of the capture

In the degraded observer state the levels overlap and clipping is negligible. In the full state, however, an earlier IQ capture showed our repeat at +44.8 dB over floor with IQ amplitude at the dongle's full scale (rms 88.6 of 127) while the meter original sat at +8.4 dB - a ~36 dB gap.

Consequence: with a fully sensitive dongle, meter originals decode well at high gain but our own transmission is driven into compression and rtl-wmbus receives it with a few byte errors (CRC fails). Observed directly - the decoded hex differed from the transmitted frame in 1-2 bytes, e.g. transmitted ...78534f4c5458... received ...78514f4c5448..., with the rest of a 113-byte frame bit-exact.

Mitigations applied in firmware: SX1262 at its minimum configured power (-9 dBm) and the lowest documented PA table (paDutyCycle 0x01, hpMax 0x00, SX1262 datasheet table 13-21). Remaining mitigation is physical (antenna separation or an inline attenuator) and is not scriptable from this host.

Note: rtl_sdr -g 0 selects automatic gain, not 0 dB. The lowest real fixed gain on this tuner is 0.9 dB. At 0.9 and 7.7 dB fixed gain the degraded dongle decoded nothing at all (neither meters nor our TX), so low gain is not a usable workaround in that state.

Repeat-delay dependence of observer decoding

Same bench, same gain (42.1 dB), only the repeat delay changed:

repeat delay repeats decoded by SDR
50 ms 2 / 63 (3 %)
200 ms 6 / 20 (30 %)

A longer gap gives the rtl-wmbus demodulator time to recover its level estimate after the weak original before the much stronger repeat arrives. The HIL default is therefore 200 ms, still inside the 20-200 ms development range. This is an artefact of the observer, not the repeater: the firmware's own repeat delay measures 200.0 ms min/median/max.

Verification strategy that follows from all this

  1. Meter originals and Heltec RX match rate: rtl-wmbus decodes at high gain.
  2. Heltec TX framing is decodable as C1: proven with synthetic bursts that are not preceded by a weak frame (hil/verify_tx.py).
  3. Real repeats: proven at RF level from the same stream's IQ by aligning firmware TX timestamps to observed bursts (hil/verify_repeats_iq.py), which is immune to both compression and observer sensitivity drift.