Skip to content

Added PowerSaving for all ESP32-based repeaters#1687

Open
IoTThinks wants to merge 9 commits intomeshcore-dev:devfrom
IoTThinks:MCdev-PowerSaving-for-all-esp32-repeaters-202602
Open

Added PowerSaving for all ESP32-based repeaters#1687
IoTThinks wants to merge 9 commits intomeshcore-dev:devfrom
IoTThinks:MCdev-PowerSaving-for-all-esp32-repeaters-202602

Conversation

@IoTThinks
Copy link
Contributor

@IoTThinks IoTThinks commented Feb 13, 2026

Hi friends,
This is the cleanup PR for this old PR #1353
The changes are below:

  1. (New) Let ESP32-based repeaters to sleep immediately receiving and process a LoRa packet
  2. (New) Added detailed response for powersaving CLI
  3. Supported sleep for all ESP32-based repeaters
  4. (New) Reduced time drift ESP32-based repeaters in power saving
  5. Added getIRQGpio to return DIO1 (SX1262) and DIO0 (SX127x)
  6. Fixed DIO0, DIO1 and RESET for Heltec v2. This is to allow Heltec v2 to do power saving. Well, I have a lot of requests to support Heltec v2.
  7. Added getIRQGpio to return DIO0 for Lilygo T3S3 SX1276
  8. Added getIRQGpio to return DIO0 for Lilygo TLoRa SX1276

I have tested with RAK4631, Heltec v3, Heltec v4 and Heltec V4 with ESPNOW.
I will set this as Draft to see if I miss anything and let all of my repeaters to run for a while.

Thanks a lot and have a nice day.

@IoTThinks
Copy link
Contributor Author

IoTThinks commented Feb 13, 2026

Still need to fix for those TBeam boards.
Will do it tomorrow.

@IoTThinks IoTThinks marked this pull request as ready for review February 14, 2026 13:54
@IoTThinks IoTThinks marked this pull request as draft February 14, 2026 14:11
IoTThinks added a commit to IoTThinks/EasySkyMesh that referenced this pull request Feb 14, 2026
@IoTThinks
Copy link
Contributor Author

IoTThinks commented Feb 14, 2026

@towerviewcams Here you go.
These files are for UPGRADE from existing repeater firmware.
https://github.com/IoTThinks/EasySkyMesh/tree/main/firmware/Testing/PR-1687

This PR should be for ESP32-based repeaters only.
I have tested RAK4631 to ensure the PR does not break PowerSaving in NRF52.

  • powersaving on => It should tell you to have effect immediately.

Testing steps for ESP32-based repeaters

  • powersaving on => It should tell you to to wait 2 minutes to see the power reduction. Around 14mA for Heltec v4. Around 10mA for Heltec v3.
    When receiving a LoRa packet, it will process and sleep again immediately.
  • For heltecv4 with bridge, it will say "Bridge not supported" and will not go to sleep.
  • powersaving off => Returns Off
  • powersaving => To see status On or Off
  • start ota => It will skip sleep and stay at 120mA. You can do OTA as normal. After automatically reboot, the powersaving will automatically run after 2 minutes from boot.
  • clock => for time drift, around 1 minute/24 hours.

Please help to test.
Thanks a lot.

@IoTThinks
Copy link
Contributor Author

IoTThinks commented Feb 14, 2026

For Heltec v4, when doing "start ota", the current may jump to ...750mA then down to 124mA.
So if the power supply is not stable for spike or set at low voltage (3.6-3.8v) the "start ota" may fail to start.
I see this happen even if "powersaving off".

It should be ok for battery.

@IoTThinks IoTThinks marked this pull request as ready for review February 15, 2026 03:20
@cra0
Copy link

cra0 commented Feb 15, 2026

+1 testing atm

@towerviewcams
Copy link

towerviewcams commented Feb 15, 2026

V4 testing on two boards results:

*fresh flash 1.13 firmware, powersaving delay is 22 seconds, then drops to 11.6mA sleep.
**testing/PR-1687 flashed over the 1.13 firmware and sleep is FAST! after packet process, sleep is immediate. 11.6mA
(version shows 1.12 29-Jan-2026) on the test bin for PR1687) FYI. I know this file is new because powersaving now reply with "On - After 2 minutes".

I have also verified that the receiver sensitivity remains normal with my lab test companion set to -9 power and the V4 has rssi of my test signals at -117 setup in a RF cage (normal RX level for V4 in my test cage). Also checked to make sure GC1109 has power on VCC pin full time-yes. So the LNA is always on.

Now running live on the mesh here in Oregon USA. repeating packets normally working good.

Next for Rak!

**Update
Testing 2, 4631 rak boards with new stock 1.13 works great and sleep is immediate at 4mA

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.

3 participants