Skip to content

[TEST] Follow-up to #3746: LR1121 LBT masks and Gemini telemetry retries - #1

Draft
Raffi1202 wants to merge 2 commits into
fhss-gnss-avoidance-rebasedfrom
test/gnss-3746-lr1121-lbt
Draft

Raffi1202 wants to merge 2 commits into
fhss-gnss-avoidance-rebasedfrom
test/gnss-3746-lr1121-lbt

Conversation

@Raffi1202

@Raffi1202 Raffi1202 commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Draft test PR in this fork, targeting fhss-gnss-avoidance-rebased. The original upstream PR is ExpressLRS#3746 . This is a follow-up for testing, not a replacement or request to close the upstream PR.

Based on upstream PR head 8df59e056aeeb872c579cca593476e50aca2db77, retaining the original commits and authorship, including pkendall64's GNSS-avoidance work from ExpressLRS#3390.

Scope

Preserve the existing Gemini / Gemini X-Band architecture, two-radio payload split, OTA packet formats, modes and controls. Fix specific defects in that existing path. This draft does not introduce a single-band fallback or time-separated telemetry protocol.

1. LR1121 transmit masks

The receiver passes the mask returned by LbtChannelIsClear() into LR1121Driver::TXnb(). Previously, the split-Gemini path started both radios whenever that mask was nonzero, including a radio excluded by LBT.

Gate each combined buffer-write/start-TX command on its corresponding allowed-radio bit and retain the correct payload for each permitted radio. When both radios are allowed, both still transmit their original halves.

2. Gemini downlink retry integrity

LINKSTATS and DATA have different payload lengths. After a lost half, Stubborn can retry the same package index using a different packet type and therefore a different split point.

ProcessOtaDataDl() previously matched cached halves only by package index. It could combine a half from the earlier short payload with a half from the later long payload (or vice versa), accept the assembled bytes and advance the ACK despite incompatible split points.

Invalidate cached half indices when the per-radio payload length changes. Equal-length halves can still arrive in separate attempts, and complete two-radio packets keep the existing behaviour. No change to the wire format or sender-side splitting is required.

Validation

  • The LR1121 recording-HAL regression passes all eight mask/payload combinations. The original method fails the two split-payload/partial-mask cases.
  • The new downlink host regression compiles the actual production merger, actual link-statistics structure and actual StubbornSender/StubbornReceiver implementations.
  • All 96 host scenarios pass: standard/full payloads, both radio arrival orders, simulated telemetry opportunities at 1:2, 1:4, 1:8 and 1:32, normal transfers, both directions of payload-length change after opposite-half loss, equal-length delayed halves, temporary total/one-band loss with recovery, and the existing non-Gemini path.
  • The original upstream PR merger fails the 32 mixed-length scenarios by acknowledging incompatible halves; its 64 control scenarios pass.
  • Completed transfers are compared byte-for-byte with the original 65-byte message and must finish the sender's ACK exchange.
  • Both host regressions are included in CI. git diff --check passes.
  • GitHub Actions on current head e2b9ea1 completed successfully, including the firmware/build matrix; no failing or still-running checks remain.
  • These host tests substitute reception and scheduling. They do not measure RF timing, channel occupancy, GNSS performance or real-device recovery. No hardware or flight testing has been performed.

Reproduce from the repository root:

python3 src/python/test_tools/test_lr1121_tx_mask.py
python3 src/python/test_tools/test_gemini_downlink.py

Bench comparison still required

Use matching firmware at both link ends and compare the original upstream PR against this draft on XR4 / TX16S MK3, with the same GPS, antenna positions, regional profile and measured power.

  • Test X150 and X100 Full at telemetry 1:2, 1:4, 1:8 and 1:32.
  • Under controlled channel occupancy, confirm that excluded radios stay silent and temporarily missing halves recover without corrupting telemetry.
  • Record telemetry integrity, retries, link quality, reconnection, GNSS signal quality and fixes; repeat with clear channels.
  • Verify ordinary two-radio Gemini behaviour and existing modes against the original.

Remaining limitations

The GNSS keep-out window, hopping tables, initial/sync frequency pairing, regional flags, power settings and telemetry timing are unchanged by this follow-up. The previously identified initial/sync pairing issue remains open.

A permanently unavailable band still cannot provide its half of the existing split downlink; this was already true in the original. The host recovery tests cover temporary loss, not permanent-band failover.

EU/Swiss sub-GHz spectrum access and FCC channel-occupancy/classification questions remain open. No blanket conformity claim or reliable-GNSS-at-1:2/1:4 claim is made. Those need the applicable equipment approval basis and hardware measurements.

Please keep this PR as a draft for testing.

Gate split-payload transmissions per radio and add a host regression test
covering every radio mask with shared and split payloads. Run it in CI.

Experimental follow-up to ExpressLRS#3746 for bench testing.
Discard cached halves when LINKSTATS/DATA retries change the payload split point. Preserve the existing two-radio transport and packet format.

Add 96 host regression scenarios using the production merger and Stubborn transport, covering both packet sizes, radio orders, temporary loss and telemetry ratios 1:2/1:4/1:8/1:32. The original merger fails all 32 mixed-length cases.
@Raffi1202 Raffi1202 changed the title [TEST] Follow-up to ExpressLRS/ExpressLRS#3746: LR1121 LBT transmit masks [TEST] Follow-up to #3746: LR1121 LBT masks and Gemini telemetry retries Sep 6, 2026
@Raffi1202
Raffi1202 force-pushed the fhss-gnss-avoidance-rebased branch from 8df59e0 to 4c05862 Compare September 8, 2026 05:09
@Raffi1202
Raffi1202 force-pushed the test/gnss-3746-lr1121-lbt branch from e2b9ea1 to e5ddf4a Compare September 8, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant