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
+66 -14
View File
@@ -5,36 +5,88 @@ repeater. Known deviations:
| # | Experimental behavior | Standard requirement |
|---|---|---|
| 1 | Repeats the raw telegram bit-exact, including hop-related fields | EN 13757-5 repeaters must manage the hop counter / C-field semantics so telegrams are not repeated endlessly |
| 2 | Fixed development repeat delay 20-200 ms (default 50 ms) | OMS repeaters use randomized delays in the seconds range to avoid collisions |
| 3 | Repeats every CRC-valid C1 telegram (optional dev whitelist) | Real repeaters filter by installation list |
| 1 | Marks supported OMS uplinks with H=1 and repairs the affected CRC; unsupported layouts are skipped | Full repeater behavior still requires installation handling and timing compliance; see implementation notes below |
| 2 | Fixed repeat delay 20-1000 ms (persisted; 500 ms in current field testing) | OMS repeaters use randomized delays in the seconds range to avoid collisions |
| 3 | Repeats CRC-valid C1/T1 uplinks passing C-field, hop/access-bit and supported-header checks (optional dev whitelist) | Real repeaters filter by installation list |
| 4 | Rolling-hour duty-cycle guard, default 0.1 % (1000 ppm), suppresses repeats over budget and counts them (`tx_suppressed_duty`) | A production repeater needs proper duty-cycle management, or LBT+AFA, plus per-sub-band awareness |
| 5 | Duplicate suppression is a 2.5 s hash ring | Standard requires proper duplicate/loop protection semantics |
| 5 | H=1/R=1 frames are suppressed; a 2.5 s hash ring also suppresses duplicate originals | Full installation and duplicate-management policy still needs review |
| 6 | No AES, no decryption, payload treated as opaque | OMS security profiles apply to end devices; a transparent repeater may pass ciphertext, but production behavior needs review |
| 7 | T1 telegrams are detected (shared 0x543D sync) but dropped | A combined C/T repeater would need 3-of-6 decode/encode |
| 8 | Format B frames >128 bytes CRC-checked but rare path untested | -- |
| 7 | C1 and T1 both received and repeated in their native mode (3-of-6 codec in software, per-TX deviation swap). S-mode out of scope | A production repeater still needs reviewed mode policy (e.g. never re-air T1 as C1) |
| 8 | Format B >128 bytes and format A up to L=200 host-tested and verified on air (2026-09-02) | -- |
None of these shortcuts may be carried into the production Solenos/Gebos
gateway without explicit review.
Scope decision (2026-09-02): S-mode support is explicitly OUT OF SCOPE --
no S-mode traffic observed at either test site. T-mode receive/repeat and
long-frame support were implemented and RF-verified 2026-09-02. Site
finding from that verification: this site has NO ambient T-mode traffic
either (all ambient decodes are C1); the firmware's historical `rx_not_c1`
bucket is mode-byte-corrupted C1 plus false syncs, not T1 meters.
Persistence exception (2026-09-02): `duty_budget_ppm` and
`repeat_delay_ms` survive power cycles (NVS), because battery-standalone
testing needs settings that outlive reboots. **A persisted
`duty_budget_ppm` of 0 disables the duty guard indefinitely** -- the
device transmits over the ERC/REC 70-03 budget whenever traffic exceeds
it, until `set duty_budget_ppm 1000` is sent again. The OLED config page
shows the effective values (`DUTYCAP`, `DELAY`); boot logs `cfg_restore`.
Re-enable the guard after every guard-off test session.
## OMS hop marking (2026-09-09)
`wmbus_mark_repeated()` in `firmware/main/wmbus.c` operates on a CRC-validated
raw format A/B frame, before C1 framing or T1 3-of-6 encoding. It accepts
only C-fields `44` (SND_NR) and `46` (SND_IR), with H=0 and R=0:
- ELL CI `8C` or `8E`: set bit 4 of the Communication Control byte.
ELL takes precedence over any inner Transport Layer configuration.
- Without ELL: an explicitly recognized short/long uplink TPL header in
security mode 0 or 5 uses bit 0 of the Configuration field.
- Already-repeated/access-marked frames, truncated headers, and unsupported
layouts are left unchanged and not transmitted. Unsupported includes
headerless CI `78`, ELL `8D`/`8F`, and AFL without a supported outer ELL.
There is no bit-exact fallback.
Only H and its enclosing block's CRC change. The helper maps logical header
offsets across raw CRC boundaries; it neither decrypts nor copies the payload.
Frame length, meter identity, access number and ciphertext remain unchanged.
The original RX hash remains the RX/TX log correlation key; TX `raw` contains
the actual modified physical payload. Verbose mode reports policy rejection
as `tx_suppressed` with reason `hop_policy`.
H identifies a repeated copy, not a repeater ID, and does not enable multihop.
Synthetic `test_tx`, `test_tx_t1`, beacons and `test_burst` remain unchanged
PHY probes, not examples of received-frame repeater policy. Existing delay,
whitelist and duty-cycle settings are unchanged.
Reference: [OMS Volume 2, issue 5.0.1](https://oms-group.org/wp-content/uploads/2024/10/OMS-Spec_Vol2_Primary_v501_01.pdf),
sections 5.2.2.2, 5.2.5.2 and 7.2.4. Setting H alone does not establish full
OMS compliance. The new marking path has not yet been verified over RF.
## Duty cycle — measured, and why it matters
868.95 MHz falls in the 868.7-869.2 MHz sub-band, which ERC/REC 70-03
(annex h1.6) limits to 25 mW e.r.p. with **<= 0.1 % duty cycle**, unless the
device implements LBT+AFA.
Measured on this bench:
Absolute e.r.p. from the SX1262 plus KCT8103L and antenna has not been
calibrated. The default -9 dBm SetTxParams value is the minimum chip setting,
not proof of compliance with the 25 mW e.r.p. cap.
Current computed occupancy for the historical bench traffic:
```
TX airtime per repeat : 10.4-14.6 ms (median 13.4 ms), frame-length dependent
observed repeat rate : ~5-6 repeats/min when repeating every valid telegram
resulting duty cycle : ~0.11-0.13 %
RF occupancy per repeat : ~5.8-9.8 ms (8.8 ms for 102 radio bytes)
observed repeat rate : ~5-6 repeats/min when repeating every valid telegram
resulting duty cycle : roughly 0.07-0.09 % at the representative length
```
That is at or slightly above the 0.1 % ceiling — while repeating only the
CRC-valid C1 telegrams audible at a single indoor location. A production
repeater in a denser environment, or one that also handles T-mode, would
exceed the budget substantially.
An older report used 10.4-14.6 ms TX-operation latency (median 13.4 ms)
as if it were RF airtime and consequently reported 0.11-0.13 %. That was a
safe overestimate but not channel occupancy. Even the corrected site rate
is close to 0.1%; traffic variation, longer frames, a denser environment,
or adding T-mode can exceed the budget.
Consequences for the production gateway: