Skip to content

Add per-message TX power penalty (whisper)#10417

Open
adrianpanicek wants to merge 4 commits into
meshtastic:developfrom
adrianpanicek:whisper-tx-power-penalty
Open

Add per-message TX power penalty (whisper)#10417
adrianpanicek wants to merge 4 commits into
meshtastic:developfrom
adrianpanicek:whisper-tx-power-penalty

Conversation

@adrianpanicek
Copy link
Copy Markdown

@adrianpanicek adrianpanicek commented May 8, 2026

Summary

Adds a per-packet TX power penalty so the originating device can drop its TX power for a single message. Lets a sender talk to nearby nodes without raising the noise floor for the wider mesh. Local-only; relays and rebroadcasts ignore it.

Depends on

meshtastic/protobufs#912 — adds the MeshPacket.tx_power_penalty_db field. The submodule pointer in this PR references the commit on that branch; please merge the proto PR first, then I'll bump the submodule SHA before this can merge.

Change

  • New setTransmitPower(int) virtual on RadioInterface, with overrides for SX126x, SX128x, LR11x0, RF95. Each clamps to the configured power as the upper bound and the chip's documented minimum as the lower bound, logging a warning when either clamp fires.
  • RadioInterface::applyTxPowerPenalty() runs in the send path: if tx_power_penalty_db > 0 and the local node originated the packet, the chip is set to power - penalty before TX. Restored to configured power in RadioLibInterface::completeSending() once the chip is back in standby.
  • Penalty is itself clamped to 60 dB on the upper end. Generated C field is uint8_t via mesh.options int_size:8.
  • Unit tests in test/test_radio cover the penalty math, the originator gate, the upper-bound clamp, and underflow safety on negative configured power.

Hardware validation

Tested on two SX1262 + nRF52840 boards: LilyGo T-Echo and RAK WisBlock 4631. Same behavior on both.

A regular sendText produces no Whisper: log and TX uses configured power. A second sendText with tx_power_penalty_db = 10 (injected via raw protobuf field 22) produces:

Whisper: applying 10 dB penalty (target 12 dBm)
Started Tx (id=0x075a6275 ...)

Configured power on each device was 22 dBm, so 22 - 10 = 12 dBm matches the expected target.

Checks

  • pio run -e heltec-v3 (SX1262 + SX128x + LR11x0 templates)
  • pio run -e heltec-v1 (RF95)
  • pio run -e t-echo-inkhud -t upload then on-device verification (above)
  • pio test -e native -f test_radio (18/18 passing, 6 new whisper tests)

🤝 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:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other (LilyGo T-Echo, hardware verified end-to-end)

Reasoning

The functionality is prerequisite for my advanced routing technique. The target is to get a multiple "no-retransmit" nodes to talk to a leader node with minimal TX power. This leader node would be responsible for retransmitting all it's child nodes positions, therefore reducing congestion and allowing large number of nodes in this quasi-tree structure.

It's a first step to allow me to implement a mesh network for large search parties or large open field cleaning jobs.

@github-actions github-actions Bot added the enhancement New feature or request label May 8, 2026
@adrianpanicek adrianpanicek marked this pull request as ready for review May 8, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant