Skip to content

fix: enable radio.rxgain CLI command for LR1110 (T1000-E)#2235

Open
jirogit wants to merge 1 commit intomeshcore-dev:devfrom
jirogit:fix/lr1110-rxgain-cli-guard
Open

fix: enable radio.rxgain CLI command for LR1110 (T1000-E)#2235
jirogit wants to merge 1 commit intomeshcore-dev:devfrom
jirogit:fix/lr1110-rxgain-cli-guard

Conversation

@jirogit
Copy link
Copy Markdown

@jirogit jirogit commented Apr 3, 2026

Problem

radio.rxgain get/set commands were broken on T1000-E (LR1110).

The CLI branches in CommonCLI.cpp were guarded by
#if defined(USE_SX1262) || defined(USE_SX1268), but USE_LR1110 was
not defined in the T1000-E build, so both branches were compiled out.

This caused two different failure modes:

  • get radio.rxgain → returned the full radio config string (e.g.
    > 921.000,125.0,10,5) because memcmp("radio", 5) matched the
    next branch
  • set radio.rxgain on → returned unknown config: radio.rxgain on
    because no branch matched

Fix

  • Add -D USE_LR1110 to variants/t1000-e/platformio.ini
  • Add USE_LR1110 to the #if guard on both get and set branches

CustomLR1110Wrapper already implements setRxBoostedGainMode() and
getRxBoostedGainMode() via the RadioLibWrapper virtual interface —
no radio-layer changes required.

Testing (T1000-E)

  • get radio.rxgain> off
  • set radio.rxgain onOK
  • get radio.rxgain after reboot → > on

USE_LR1110 was missing from the preprocessor guard in CommonCLI.cpp,
causing both get and set to fail silently on T1000-E:

- get radio.rxgain returned the full radio config string (fell through
  to the memcmp("radio", 5) branch)
- set radio.rxgain returned "unknown config" (no branch matched)

Fix: add -D USE_LR1110 to variants/t1000-e/platformio.ini and include
USE_LR1110 in the #if guard on both get and set branches.

CustomLR1110Wrapper already implements setRxBoostedGainMode() and
getRxBoostedGainMode() via the RadioLibWrapper virtual interface,
so no radio-layer changes are required.

Tested on T1000-E: get/set/persist all confirmed working.
@jirogit
Copy link
Copy Markdown
Author

jirogit commented Apr 3, 2026

This also partially addresses #2118.
The root cause of that issue (rxgain defaulting to OFF on upgrade)
is separate, but on T1000-E (LR1110) the CLI command was completely
non-functional, so users had no way to restore the setting even manually.
This fix enables set radio.rxgain on to work on T1000-E.

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