Skip to content

Fix RX_EN handling during RX power saving - #12

Merged
IoTThinks merged 2 commits into
IoTThinks:PowerSaving-v16from
Dom4n:rx-powersaving
Aug 12, 2026
Merged

Fix RX_EN handling during RX power saving#12
IoTThinks merged 2 commits into
IoTThinks:PowerSaving-v16from
Dom4n:rx-powersaving

Conversation

@Dom4n

@Dom4n Dom4n commented Aug 10, 2026

Copy link
Copy Markdown

This PR adds fix for rx enable pin, previously it was not enabled.

Additionally I'm curious if in high interference sites this firmware worked much better for some unknown reason anyway. So I have added cli commands:
get radio.rxps.rfrx_disabled - check if rx_en pin is enabled or disabled
set radio.rxps.rfrx_disabled on/off - enable and disable rx_en pin.

Default state is "rx_en pin always enabled" - even after restart, these commands are not persisted in memory across restarts. So for testing purposes you can enable repeater auto-restart and enable this commad to see if there is any difference, if the repeater becomes unavailable because it lost it's hearing after restart it will be good again.

Minimal fix for rx_en pin if this whole sheningas with new commands are not welcome:

file CustomSX1262.h

  int16_t startReceiveDutyCycle(uint32_t rxPeriod, uint32_t sleepPeriod,
                                RadioLibIrqFlags_t irqFlags,
                                RadioLibIrqFlags_t irqMask) {
    int16_t state =
        SX1262::startReceiveDutyCycle(rxPeriod, sleepPeriod, irqFlags, irqMask);

    if (state == RADIOLIB_ERR_NONE) {
      this->mod->setRfSwitchState(Module::MODE_RX);
    }

    return state;
  }

@IoTThinks

Copy link
Copy Markdown
Owner

set radio.rxps.rfrx_disabled on => Before fix
set radio.rxps.rfrx_disabled off => Fix
get radio.rxps.rfrx_disabled

@IoTThinks
IoTThinks merged commit c08b3ff into IoTThinks:PowerSaving-v16 Aug 12, 2026
1 check passed
@IoTThinks

Copy link
Copy Markdown
Owner

I have merged it.
Thanks alot for the PR.

Just put a note so we can track the changes.
This PR may be required for other LoRa chip (besides SX1262)
image

For now, RXEN is available for sx126x only.
image

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.

2 participants