Skip to content

Conversation

@teizz
Copy link

@teizz teizz commented Jan 9, 2026

✨ Enhancement

I’ve implemented the ability to configure Bluetooth TX power on nRF52840 boards in the variant.h file.

I experienced frequent disconnections between my phone and my node (positioned just outside on the balcony). Signal strength before was typically -80dB indoors some 10ft away, and -95dB when placed outside.
Configuring the TX power to +8dB both numbers went up by roughly that amount. This was confirmed with the nRF Connect app which also confirms the Tx Power Level is indeed set to the configured value.

The change works as intended and the connection to my node is now stable while power usage difference seems negligible.

🔧 The implementation

  • Uses preprocessor checks to enable and validate the configured option.
  • Validates only allowed values: -20, -16, -12, -8, -4, 0, +4, and +8, as per the nRF52840 spec. 1
  • Is fully backward compatible, if NRF52_BLE_TX_POWER isn't defined, nothing changes.

🤝 Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • NRF52 Pro-micro DIY aka FakeTec v5

Footnotes

  1. https://docs.nordicsemi.com/bundle/ps_nrf52840/page/keyfeatures_html5.html

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

@teizz, Welcome to Meshtastic!

Thanks for opening your first pull request. We really appreciate it.

We discuss work as a team in discord, please join us in the #firmware channel.
There's a big backlog of patches at the moment. If you have time,
please help us with some code review and testing of other PRs!

Welcome to the team 😄

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the ability to configure Bluetooth TX power for nRF52 boards through a compile-time define (NRF52_BLE_TX_POWER) in variant.h files. The enhancement aims to improve connection stability for users experiencing weak signal strength by allowing them to increase the transmission power up to +8 dBm.

Key changes:

  • Added preprocessor validation macro to check for valid TX power values (-20, -16, -12, -8, -4, 0, +4, +8 dBm)
  • Implemented conditional TX power configuration in NRF52Bluetooth::setup()
  • Maintains full backward compatibility - default behavior unchanged when NRF52_BLE_TX_POWER is not defined

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fifieldt fifieldt added the enhancement New feature or request label Jan 9, 2026
@fifieldt
Copy link
Member

fifieldt commented Jan 9, 2026

Thanks for this! Our next step would be testing on popular NRF52 boards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request first-contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants