Rssi and noise floor improvements - #2842
Open
yg-ht wants to merge 13 commits into
Open
Conversation
This was referenced Jun 25, 2026
yg-ht
force-pushed
the
rssi_and_noise_floor_improvements
branch
from
July 5, 2026 15:02
ba66877 to
bafa673
Compare
|
I checked your implementation in comparison to my #2933 that goes into the same direction. |
ACETyr
added a commit
to ACETyr/MeshCore
that referenced
this pull request
Aug 9, 2026
The fork carries meshcore-dev#2933 (usrflo's median noise-floor estimator) ahead of mainline merging it. Nothing in the repo said so, and the commit that applied it (a028adc) is authored by this fork with the provenance only in its message body -- easy to lose track of, and easy to mistake for fork-original work. Records for each carried patch: who wrote it upstream, which PR, why we are not waiting, and what has to happen to drop it again. Also notes meshcore-dev#2797 as resolved, since 1.17 landed it and the replant deduplicated the fork copy automatically. Calls out that meshcore-dev#2842 is a competing fix for the same root cause, roughly thirty times the size, and that if it is the one that lands this is not a clean revert -- it rewrites the estimator our patch touches, so the bench stimulus has to be re-run against its clamp defaults rather than assumed equivalent. Explicitly: do not re-submit meshcore-dev#2933 upstream under fork authorship.
|
@yg-ht Bench comparison of this PR against #2933 and their common base, requested on #2933 — full data
Two merge notes, neither about behaviour:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves RSSI and noise-floor instrumentation. This should then re-enable the use of the interference threshold configuration, but I think this PR needs wider testing before that is done. So at the moment, it doesn't change the
int.thresh/_prefs.interference_thresholdfrom 0.It enables
stats-radioover Mesh as I have been diagnosing the RSSI behaviour from a number of sites concurrently. This might not be desirable, for example owing to concerns over bandwidth usage, but I am not sure I see any real harm in this. This particular stats call now has last_rssi and last_snr come from cached last-packet metrics rather than later instantaneous RSSI sampling. It also exposesstats-noiseover the Mesh which goes into more detail about the noise floor sampling results. This reports the current approved noise floor, along with details about the current sampling for the next noise floor calibration. Details include: accepted sample count, sample min/median/max values, and rejected sample counts as the sample was erroneously low/high.Noise floor calibration is performed after a small number of event triggers, as well as on a periodic basis. The rough execution flow is:
flowchart TD A[Periodic trigger<br/>or scheduled refresh] -- Start batch --> B0{batch loop} B0 -- Start sample --> B1{Batch maximum window size elapsed?} B1 -- No --> C{Radio idle in RX mode?} B1 -- Yes --> A C -- No --> B0 C -- Yes --> D{Sample rate limit interval elapsed?} D -- No --> B0 D -- Yes --> E[Read RSSI sample] E --> F{Sample acceptable?} F -- No --> G[Reject sample<br/>Update reject counters] G --> B0 F -- Yes --> H[Accept sample<br/>Update min/median/max] H --> I{64 accepted samples?} I -- No --> B0 I -- Yes --> J{Completed batch sane?} J -- No --> A J -- Yes --> K[Publish new noise floor] K --> ASo that people can tweak and understand the noise floor sampling process, there are now a few additional configuration options: sampling interval, calibration window, and clamp settings:
noise.sample.ms- in a calibration batch, how long do we sleep between samples (default: 50ms)noise.window.secs- maximum time of a calibration batch (default: 60s)noise.clamp.low- the "ludicrous" low RSSI value that can't be true (default: -125dBm)noise.clamp.high- the "ludicrous" high RSSI value that can't be true (default: -80dBm)I have been testing this on a few different repeaters in different locations and using different boards. I haven't seen any anomalous behaviour anywhere and wherever possible I have checked the noisefloor with a calibrated VNA. The values that are being generated by the VNA agree with those established by this codebase.