Document repeater validation and operating limits

This commit is contained in:
Lars Nolden
2026-09-21 12:31:22 +02:00
parent 8c44c54131
commit 3a0d342314
11 changed files with 890 additions and 267 deletions
+151 -103
View File
@@ -5,18 +5,40 @@ the development bench to a real site. Goal: run the repeater standalone
(no USB host) and verify it over RF alone. This log records what happened,
because the sequence of wrong theories is itself a finding.
## Final correction (same date, after source and IQ audit)
The late-evening conclusion that the board had an intermittent TX-chain
hardware fault is **withdrawn**. Two software/methodology faults explain
the evidence:
1. The `pa_low` diagnostic used SetPaConfig
`(0x01,0x00,0x00,0x01)`. Its PA-duty and hpMax bytes came from the
SX1261 +10 dBm row, but `deviceSel=0x00` still selected SX1262. This
undocumented hybrid is not a low SX1262 row. Same-capture A/B testing
against valid SX1262 `(0x02,0x02,0x00,0x01)` measured about 32 dB more RF.
2. The beacon verdict called RF absent from total energy alone. Spectral
reanalysis of the canonical “dead” IQ capture finds weak but repeated
FSK at all 25 TX times: median +1.5 dB over floor versus +0.2 dB in
nearby controls, with +7.6 dB FSK-selective excess.
After deleting the invalid PA row, a flashed-firmware smoke test produced
9/9 beacons at median +27.81 dB over floor (range +27.02..+27.90), nearby
controls +0.00 dB, and +40.73 dB FSK-selective excess at configured
-9 dBm. This report retains the earlier narrative as a chronology of
misdiagnosis; the final conclusions are in the corrected section below.
## Timeline of evidence
| Setup | LED (TxDone) | RF at SDR | Verdict at the time |
|---|---|---|---|
| Laptop USB, board on table (~16:07) | double-blinks | **7/7 TX clock-aligned, median +37 dB over floor** | baseline: transmits |
| Laptop USB, board on table (~16:07) | double-blinks | reported 7/7 at +37 dB; later invalidated | baseline claim came from the repeat-borrowing clock-fit bug |
| Power bank (USB-C, then USB-A) | went dark after seconds | none | bank auto-off at ~60 mA idle load |
| UGREEN 100 W GaN wall charger, C-to-C | double-blinks "sometimes" | none in 4 captures (~8 min) | *wrongly* blamed supply sag |
| LiPo pack attached | blinks, 2-4 double-pulses/90 s | none | supply theory started cracking |
| LiPo + dangling USB cable (no host) | ~9 double-pulses/90 s | none | RX rate recovered; TX still invisible |
| Mid-capture unplug (laptop -> LiPo, position frozen) | blinks throughout | **none in either phase** | laptop connection alone does NOT explain it: power theories all dead |
| Wall power, board hanging free, no LiPo | blinks | none at prior SDR-antenna position | placement of the DUT alone is not it either |
| **SDR antenna moved to ~20 cm from the hanging board** | blinks | **same-duration burst pairs at 50-54 ms: 10-10, 17-17, 16-16 ms** | repeater IS repeating standalone; radiated/received level is simply far lower than the laptop-connected reference |
| **SDR antenna moved to ~20 cm from the hanging board** | blinks | **same-duration burst pairs at 50-54 ms: 10-10, 17-17, 16-16 ms** | standalone RF exists; comparison with the invalid laptop reference is unsupported |
## What was actually established
@@ -24,23 +46,18 @@ because the sequence of wrong theories is itself a finding.
RX->50 ms->TX cycle runs (LED) and its repeats are observable at RF
(same-duration pairs at the configured delay) once the observer antenna
is close enough.
2. **The laptop-connected "+37 dB at 50 cm" reference was not a pure
radiated-field measurement.** With the board on the host's USB, the
cable shield and shared ground with the SDR dongle add counterpoise
and possibly conducted common-mode coupling. Standalone, at a similar
claimed distance, the same transmitter was invisible; at ~20 cm it shows
up at +14..+24 dB. The gap between those numbers is the combined effect
of geometry, orientation, antenna environment and the lost cable/ground
contribution -- not a firmware or supply fault.
3. **Every power-source theory failed when tested properly.**
- Power bank: real failure, but trivial (auto-off). The LED found it
in one glance.
- Wall-adapter "sag during PA burst": WITHDRAWN. The adapter is a
100 W GaN unit, and the frozen-position unplug test showed the
laptop connection failing at the same spot too. The earlier
conviction (committed to FINDINGS.md at the time) was wrong.
- LiPo (stiffest possible rail): same invisibility -> supply exonerated
entirely.
2. **The laptop-connected “+37 dB at 50 cm” reference was invalid.**
The old clock fit could align each expected repeat to its original
meter burst. It cannot establish a USB-cable counterpoise or conducted
coupling effect.
3. **No tested power source correlated with the weak RF.**
- Power bank: real failure, but trivial (low-load auto-off). The LED
identified it directly.
- Wall adapter and LiPo both showed chip-level TX with weak/invisible RF.
- The frozen-position unplug run did not isolate a supply effect.
These observations reject the original wall-adapter-sag theory, but
“supply exonerated entirely” was stronger than the available evidence.
The later PA-row bug is sufficient to explain the large RF deficit.
4. **TxDone still proves nothing about radiated power.** The task spec's
warning (§36: "TX successful is not evidence") extends beyond FEM
configuration to antenna geometry: the SX1262 completes its packet into
@@ -62,110 +79,141 @@ because the sequence of wrong theories is itself a finding.
- **A conducted RF test port would have ended this in minutes.** Half a day
of over-the-air inference replaced one attenuated SMA measurement.
Already in devboard_signals.csv; priority upgraded.
- **Antenna system design is not optional polish.** The stock whip against
a tiny PCB ground radiates so poorly, and so directionally, that
deployment placement dominates link budget. The gateway needs a real
antenna with a defined counterpoise, and the battery pack must be kept
mechanically away from the radiator.
- **On-device persistent telemetry (NVS counters, VBAT) is still the
missing piece.** The LED collapsed "is it powered/alive/repeating" from
four SDR captures to one glance, but every RF question still required
the laptop. Retained counters would have separated "not receiving" from
"not transmitting" instantly.
- **The antenna conclusion was premature.** Geometry, orientation and
counterpoise always affect over-the-air measurements, but the invalid
SX1261-derived PA configuration was not controlled and accounts
for about 32 dB by itself. A proper antenna A/B remains useful; this
session did not quantify stock-whip efficiency.
- **Persistent counters would improve, but not prove, RF diagnosis.** NVS
RX/TxDone counters and VBAT would separate power, receive, and chip-TX
failures without a host. They still could not distinguish weak RF from a
healthy radiated packet; that requires a conducted detector or external
receiver.
- **LED patterns earned their place** and should carry to the gateway
(with the FUTURE_UI.md caveat: an LED can only report chip state, never
radiated RF).
## Still open after this session
## Questions left by the afternoon run (status after audit)
- Clock-aligned close-antenna run (device on laptop serial + SDR antenna
at 20 cm) to attribute bursts per TX event and put a number on the
standalone radiated level. Protocol ready; not yet executed.
- RESOLVED for the attached-DUT method: meter-anchored event windows plus
spectral controls now attribute RF to each TX. Absolute standalone field
strength is still uncalibrated.
- Quantify laptop-cable contribution: repeat the alignment run twice at
identical geometry, cable in vs out (LiPo), antenna close.
- Proper antenna A/B (e.g. quarter-wave with radials vs stock whip) --
directly relevant to the gateway RF architecture.
## Location 3 (evening session) -- the beacon, and the real fault
## Location 3 (evening session) — corrected beacon postmortem
Coordinating physical actions with an async agent kept failing (missed
timestamps, tuner deaths mid-capture), so we changed instruments: a
firmware **beacon mode** (`set beacon_period_ms N`) transmits a synthetic
OMS frame (manufacturer SLN, ID 00000001, access_nr = sequence) every N ms.
No meter traffic, no serial coordination, dense uniform sampling.
Beacon mode (`set beacon_period_ms N`) was the right instrument: it emits
known frames at known times without relying on meter traffic. The first
verdict applied the wrong detector to that data.
The beacon caught what two days of repeat-chasing could not:
### What the retained IQ establishes
- **TX radiated power is intermittent at minute scale.** One 90 s window:
0/25 beacons produced ANY RF (max +0.5 dB over floor) while 27 ambient
meter frames in the same IQ showed median +26.8 dB (observer healthy) and
the chip reported TX_DONE, mode 6, device_errors 0 for every beacon.
Thirty minutes later, same boot, same config: repeats, test_tx and
beacons all radiated at a constant ~+10 dB.
- RX stayed healthy through dead TX windows. Chip-side diagnostics are
identical in dead and live states. The fault therefore sits between the
SX1262 PA output and the antenna: KCT8103L PA path (CPS/DIO2, CTX, PA
supply) or a mechanical/thermal TX-chain fault. Firmware cannot observe
it -- exactly the RADIO_VDD_SENSE / conducted-test-port gap in
docs/devboard_signals.csv.
- **Methodology bug found and fixed:** verify_repeats_iq's single-burst
clock fit can lock at -repeat_delay and "confirm" every repeat with its
own original's burst. The "7/7 at +37 dB" laptop confirmations were this
artifact. Trustworthy methods: structural same-duration pairs at the
configured delay, content decodes (duplicate payloads), and
hil/meter_anchored.py (clock fitted on strong meter receptions; ambient
meter levels double as per-capture observer health).
- Positive control: with a healthy observer, 30 structural pairs at
137 ms and 35 duplicate decoded payloads in 90 s -- the repeater
function itself is solid whenever the TX chain is in its live state.
- The historical capture
`captures/2026-09-01T17-35-12-beacon-diag` has a healthy observer:
27/32 strong meter anchors, 0.7 ms median clock error, meter median
+26.8 dB.
- Beacon windows are weak in total energy (median +1.5 dB; none reaches
+6 dB), but their median spectrum contains the expected approximately
+/-45 kHz FSK energy. Relative to nearby non-TX controls, FSK-selective
excess is +7.6 dB across 25 windows.
- A known-live repeat capture
(`2026-09-01T17-41-21-repeat-pair-test`) classifies strong: 29/29 above
+6 dB, median +10.9 dB, FSK-selective excess +18.8 dB.
- Therefore “0/25 produced any RF” and “genuinely zero RF” were false.
TxDone did not prove RF, but the retained spectrum does.
## Location 3, late evening -- soak verdict and physical isolation attempt
The soak's exact historical PA-row state cannot be reconstructed: serial
telemetry logged SetTxParams power but not the `pa_low` selection, and the
old soak harness deleted IQ after reducing each segment to scalar energy.
Its claimed +8 -> +6 -> zero thermal decay is consequently not auditable.
A board-level thermal/mechanical TX fault was never demonstrated.
Antenna swap + IPEX reseat performed (TX disabled during swap). Immediate
post-swap check: 74/74 TX events radiating. Beacon soak started to look
for recurrence (2-min segments, meter-anchored verdicts, observer health
gating, dongle auto-recovery).
### Source-level root cause
Soak result: **the fault recurred post-swap.**
The firmware's alleged low-power SX1262 PA row was copied from the wrong
line of Semtech table 13-21:
- Segments 1-8 (~16 min usable): alive, TX median +7.0..+8.8 dB.
- Segment 9: marginal (median +5.9) -- levels visibly sagging.
- Segment 13: **dead** -- 106 TX attempts, median +0.5 dB, observer
independently verified healthy (56/60 meter anchors at 2.2 ms clock
error, meters at +21.8 dB). Airtight.
- The decay pattern (+8 -> +7 -> +6 -> dead over ~10 min of sustained
~50 TX/min) suggests but does not prove a thermal mechanism.
```
old diagnostic row: 01 00 00 01 undocumented SX1261-values/SX1262-select hybrid
fixed SX1262 row: 02 02 00 01 documented +14 dBm-optimal PA config
SetTxParams: -9 02 configured level -9 dBm, 40 us ramp
```
**Conclusion: the old antenna and pigtail are acquitted. The intermittent
TX-kill is on the board itself**, in the chain between SX1262 PA output
and the antenna connector (KCT8103L FEM prime suspect), invisible to
every chip-level diagnostic.
Same-stream A/B measurement found about 32 dB between the two rows. The
invalid path has been removed rather than retained as a diagnostic.
Configured SX1262 power is now limited to -9..+2 dBm; the default remains
-9 dBm because the external KCT8103L adds gain and absolute e.r.p. has not
been calibrated.
Live provocation session (35 s verdict cadence):
- Baseline: marginal-alive (+5.2), died to +2.0 within ~2 min (pressure
state during death window not recorded).
- ~90 s of breath-cooling the FEM area: no recovery (+3). Weak cooling,
so thermal is not acquitted -- merely unconfirmed.
- Pressure test: not completed; session ended.
### Corrective verification
Instrument attrition tonight: the RTL-SDR dongle required one physical
replug, dropped off the USB bus once more, produced four short/empty
captures and two deaf windows. Roughly a third of tonight's wall time
went to working around the observer rather than observing the DUT.
Flashed fixed firmware, 1.6 Msps SDR, fixed 0.9 dB tuner gain:
```
scheduled beacons 9/9 TxDone
RF envelope over floor +27.81 dB median (+27.02..+27.90)
nearby non-TX controls +0.00 dB median
FSK-selective excess +40.73 dB
SDR clipped samples 0.000 %
computed airtime accounting 24,480 us = 9 x 2,720 us
```
The detector also scored nine fake event times in an off interval at
-0.16 dB FSK excess, versus +40.73 dB for the real aligned events.
`hil/meter_anchored.py` now reports `rf_state=strong|weak|not_observed`
and requires event-correlated FSK spectral excess before claiming RF.
`hil/beacon_soak.sh` retains raw IQ for every weak, absent or unclassified
segment. Strong segments alone may be reduced to a JSON verdict.
The unrelated duty-cycle bug found during the audit is also fixed: the
384-event ring silently forgot airtime at high rates. A 61-minute bucket
ledger now retains every event overlapping the rolling hour, and duty
usage is computed from packet bits rather than SPI/polling latency.
## Where this leaves the project
1. Repeater firmware: fully functional and standards-shaped -- structural
pairs, duplicate decodes, duty accounting (modulo ring saturation,
see OPEN_QUESTIONS), recovery ladder, LED patterns, beacon mode.
2. This particular board: not deployable unattended until the TX-chain
fault is fixed or understood. Next diagnostic steps in order of value:
a) proper cooling/heating provocation (freezer spray / hot-air at low
temp) with the live monitor; b) pressure/flex mapping; c) conducted
measurement through an attenuator to split FEM vs antenna-port; all
need bench equipment or at least controlled temperature, not breath.
3. The observer (NESDR SMArt v5) is end-of-life for serious use: replace
before the next HIL session.
4. Every hard-won methodology upgrade is now in the repo: beacon mode in
firmware, hil/meter_anchored.py (borrow-immune verification + observer
health), hil/beacon_soak.sh (unattended state mapping).
1. The connected board demonstrably transmits correct FSK after the PA-row
fix. No intermittent board-level TX fault is currently established.
2. TxDone and the LED remain chip-level evidence only. RF conclusions need
the spectral detector or an independent receiver/decode.
3. Absolute radiated power and regulatory e.r.p. remain uncalibrated. Keep
the configured SX1262 level at -9 dBm until a conducted measurement or
calibrated field-strength setup exists.
4. The NESDR observer remains unreliable for long unattended work; its
per-capture health gate and anomaly-IQ retention are mandatory.
## Late evening — standalone battery test with fixed firmware: PASS
First deployment after the PA-row fix and the OLED/button UI. DUT on
battery, no USB host; all verification RF-only plus the on-device screen.
Capture: `captures/2026-09-01T22-22-32-standalone-battery` (360 s IQ at
42.1 dB gain, verdicts archived alongside).
- **Repeat function confirmed standalone** by two independent methods on
one stream: 3 decoded duplicate payloads, and 3 structural RF pairs with
matching durations (10-10, 7-7, 10-10 ms) at 53-54 ms gaps against the
50 ms default delay. The +3-4 ms is the radio-preparation offset between
TX-routine entry and RF onset (standby + packet params + buffer write),
consistent with `tx_operation_us` measurements.
- **Observer health control in-capture**: 46 C1 decodes from 38 unique
meters; floor +2.9 dB.
- **Counter funnel closed from the OLED alone** (no laptop): RX 292 =
VALID 100 + CRCFAIL 63 + NOT-C1 130 + LEN 0 (one frame arrived between
page reads). TX 109/109 at 100%. The 34% valid ratio matches the site
benchmark; CRC failures are the characterized long-encrypted-Techem
sensitivity edge, not a fault.
- **UI-driven beacon toggle verified end to end** earlier in the session:
an independent wmbusmeters receiver decoded beacon ID 00000001 with
valid CRC every ~3.3-3.5 s (3000 ms + scheduling drift) after a button
press, on battery. Beacon was off during this capture (0 beacon decodes,
no comb -- matches the TX counter arithmetic).
- The 44 railed ~+40 dB short bursts in the capture are our repeats PLUS
the fingerprinted neighbour meter's singles; only delay-and-duration
matched pairs were attributed to the repeater.
- Duty note for future runs: the 3000 ms button beacon consumes 907 of
1000 ppm; running it for long alongside repeats drives `DUTYBLK` up by
design. Toggle it off when measuring repeat behaviour.