Skip to content

Added Power Saving for NRF52 companions to have extra 30% battery life - #2286

Merged
ripplebiz merged 3 commits into
meshcore-dev:devfrom
IoTThinks:MCdev-PowerSaving-for-nrf52-companion-202604
May 31, 2026
Merged

Added Power Saving for NRF52 companions to have extra 30% battery life#2286
ripplebiz merged 3 commits into
meshcore-dev:devfrom
IoTThinks:MCdev-PowerSaving-for-nrf52-companion-202604

Conversation

@IoTThinks

@IoTThinks IoTThinks commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Hi friends,
This PR is to reduce 30% power consumption for NRF52 companions.

  • From 9.3mA down to 6.5mA. Measured at battery cable.
  • It is enabled by default as there is no CLI in companion.
  • BLE connection will be maintained in any case.

Expected behavior: You will not see any differences against MeshCore dev. Except the battery life is longer.
Your NRF52 companions can virtually have extra 30% more battery capacity.
Enjoy.

@IoTThinks

IoTThinks commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

Tested internally with RAK4631 and Xiao NRF52.
Tested by friends through two releases.

Comment thread examples/companion_radio/MyMesh.h
@sean-leach

Copy link
Copy Markdown

Will this also apply to repeater firmware, or just companion for now?

@sean-leach

Copy link
Copy Markdown

Just built and flashed the repeater build to my RAK 4631. Here we go!

@IoTThinks

Copy link
Copy Markdown
Contributor Author

@sean-leach Power saving for NRF52 repeaters has been available for a while in MC 1.14.1 and PS 14.1.

CLI: powersaving on.
Reduced from 9mA down to 5.8mA.

@sean-leach

Copy link
Copy Markdown

Thank you!

@jmarcelino

jmarcelino commented Apr 20, 2026

Copy link
Copy Markdown

Great job! I see a 10mW reduction with this patch applied on the RAK4361
Screenshot 2026-04-20 at 10 11 58
Screenshot 2026-04-20 at 10 11 43

@IoTThinks

Copy link
Copy Markdown
Contributor Author

@jmarcelino Your power visualization looks cool.

Enjoy.

@IPv777

IPv777 commented May 6, 2026

Copy link
Copy Markdown

Hello @IoTThinks , gg for your incredible works with https://github.com/IoTThinks/EasySkyMesh/releases/
You'll save me a lot of power

@IPv777

IPv777 commented May 6, 2026

Copy link
Copy Markdown

Please merge <3

@IoTThinks

Copy link
Copy Markdown
Contributor Author

@IPv777 Sometimes, I feel we don't need the battery measurement at repeaters any more.
It just works with small solar panels.

Some friends with tiny / barebone RAK4631 repeaters with power saving can reduce down to 3.8mA.
It means his RAK4631 solar repeaters are very small like a palm now. He can hang them anywhere.
Enjoy.

@oltaco oltaco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change and this should be good to go 👍

Comment thread examples/companion_radio/MyMesh.cpp Outdated
@IoTThinks

Copy link
Copy Markdown
Contributor Author

Hmm, I need to rebase.
I will do that this week.

@oltaco

oltaco commented May 21, 2026

Copy link
Copy Markdown
Member

Hmm, I need to rebase. I will do that this week.

No problems, it will be good to get this merged. I'm happy to resolve the merge conflicts too if you like.

@IoTThinks
IoTThinks force-pushed the MCdev-PowerSaving-for-nrf52-companion-202604 branch from 40d3891 to da7663a Compare May 22, 2026 04:06
@IoTThinks

IoTThinks commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

@oltaco I did a merge and rebase just now.
Minor spaces are removed. Should be OK.

@mikecarper

mikecarper commented May 26, 2026

Copy link
Copy Markdown

I think WiFi companion builds fail here 7f02cbe

src/helpers/esp32/SerialWifiInterface.h

  bool isConnected() const override;
  bool isReadBusy() const override;
  bool isWriteBusy() const override;

  bool hasReceivedFrameHeader() const;

src/helpers/esp32/SerialWifiInterface.cpp

  bool SerialWifiInterface::isReadBusy() const {
    return hasReceivedFrameHeader();
  }

  bool SerialWifiInterface::hasReceivedFrameHeader() const {
    return received_frame_header.type != 0 && received_frame_header.length != 0;
  }

Also

-#else if defined(ESP32_PLATFORM)
+#elif defined(ESP32_PLATFORM)

@IoTThinks

Copy link
Copy Markdown
Contributor Author

@mikecarper Are you trying to compile PowerSaving branch or this PR?
This PR does not have your above source code.

@IoTThinks

Copy link
Copy Markdown
Contributor Author

@mikecarper I have fixed the error in PowerSaving for WiFi Companion.
Thanks a lot for alerting me. :)

I have added isReadBusy to BLE companion but forgot to add isReadBusy to WiFi companion.
IoTThinks@0f0f91c

BTW, this PR is not affected. 👯

@ripplebiz
ripplebiz merged commit 54c1116 into meshcore-dev:dev May 31, 2026
11 of 12 checks passed
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.

8 participants