Files
heltec-repeater/docs/FIELD_TEST_2026-09-01.md

220 lines
12 KiB
Markdown

# Field test — first onsite standalone deployment (2026-09-01, afternoon)
Setting: the repeater and the HIL laptop (with the Nooelec SDR) moved from
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 | 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** | standalone RF exists; comparison with the invalid laptop reference is unsupported |
## What was actually established
1. **The repeater works standalone.** On wall power, hanging free, its
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 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
a mismatched/shadowed antenna exactly as happily as into a good one.
The LED inherits this limit: double-blink = chip-level TX, not RF.
5. **The observer's antenna position is as much a variable as the DUT's.**
Half of today's captures compared "device moved" against "SDR antenna
wherever it happened to be". The decisive experiments were the ones
that froze one side: mid-capture unplug (DUT frozen) and antenna-close
(DUT untouched, observer moved).
6. **Neighbour-meter fingerprint** (for future correlation at this site):
23-24 ms bursts in trains at ~28-32 ms spacing, plus 10-17 ms singles up
to +42 dB that rail the dongle and produce no rtl-wmbus output. Their
rate is invariant across our firmware versions, reboots and power
sources -- definitively not the repeater.
## Field lessons for the Solenos gateway
- **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.
- **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).
## Questions left by the afternoon run (status after audit)
- 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) — corrected beacon postmortem
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.
### What the retained IQ establishes
- 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.
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.
### Source-level root cause
The firmware's alleged low-power SX1262 PA row was copied from the wrong
line of Semtech table 13-21:
```
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
```
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.
### Corrective verification
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. 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.