Skip to content

Fix LR2021 hot frequency change over BLE - #3692

Open
WayenWeng wants to merge 1 commit into
meshcore-dev:devfrom
Seeed-Studio:dev
Open

WayenWeng wants to merge 1 commit into
meshcore-dev:devfrom
Seeed-Studio:dev

Conversation

@WayenWeng

Copy link
Copy Markdown

LR2021 only accepts RF/modulation config commands in STANDBY mode. When
CMD_SET_RADIO_PARAMS arrived over BLE, the radio was in continuous RX, so
setParams() calls were silently rejected with -706 and the new frequency
was never applied. Since the new value was already saved to flash, it only
took effect after a reboot.

Fix: call standby() before any config command in
CustomLR2021Wrapper::setParams() (covers setPreambleLength() inside
updatePreamble() as well), and log the return code of each call under
MESH_DEBUG instead of discarding it. The internal idle() of
applySideDetectorConfig() still restarts RX on the new parameters.

This branch has not been deployed

No deployments
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