Problem
Our determineSignalQuality() in LoraSignalIndicator.kt uses fixed SNR/RSSI thresholds:
SNR_GOOD_THRESHOLD = -7f
SNR_FAIR_THRESHOLD = -15f
RSSI_GOOD_THRESHOLD = -115
RSSI_FAIR_THRESHOLD = -126
This means a node with SNR of -10 dB shows as "BAD" regardless of modem preset, even though on LongFast (SNR limit = -17.5 dB) that's actually 7.5 dB above the demodulation threshold — excellent signal.
Proposed Fix
Adopt modem-preset-relative thresholds (matching Meshtastic-Apple's approach):
| Preset |
SNR Limit |
Good |
Fair |
Bad |
None |
| LongFast |
-17.5 dB |
> limit |
> limit - 5.5 |
≥ limit - 7.5 |
< limit - 7.5 |
| LongSlow |
-7.5 dB |
> limit |
> limit - 5.5 |
≥ limit - 7.5 |
< limit - 7.5 |
| ShortFast |
-7.5 dB |
> limit |
> limit - 5.5 |
≥ limit - 7.5 |
< limit - 7.5 |
| MedSlow |
-15.0 dB |
> limit |
> limit - 5.5 |
≥ limit - 7.5 |
< limit - 7.5 |
SNR limits per preset (from LoRa spreading factor physics):
- LongFast (SF11 BW250): -17.5
- LongModerate (SF11 BW125): -17.5
- LongSlow (SF12 BW125): -7.5
- LongTurbo (SF9 BW500): -12.5
- MedSlow (SF10 BW250): -15.0
- MedFast (SF9 BW250): -12.5
- ShortSlow (SF8 BW250): -10.0
- ShortFast (SF7 BW250): -7.5
- ShortTurbo (SF7 BW250): -7.5
Implementation Notes
- Requires plumbing the active modem preset from the connected device's LoRa config through to
determineSignalQuality()
- The modem preset is available in the device's
Config.LoRaConfig.modem_preset
- Cross-platform parity with Meshtastic-Apple (
getSnrColor(snr:preset:) in LoRaSignalStrengthIndicator.swift)
- Affects:
LoraSignalIndicator.kt, NodeItem.kt, NodeItemCompact.kt, BuildNodeDescription.kt
Ref: Apple implementation — https://github.com/meshtastic/Meshtastic-Apple/blob/main/Meshtastic/Views/Helpers/LoRaSignalStrengthIndicator.swift
Problem
Our
determineSignalQuality()inLoraSignalIndicator.ktuses fixed SNR/RSSI thresholds:SNR_GOOD_THRESHOLD = -7fSNR_FAIR_THRESHOLD = -15fRSSI_GOOD_THRESHOLD = -115RSSI_FAIR_THRESHOLD = -126This means a node with SNR of -10 dB shows as "BAD" regardless of modem preset, even though on LongFast (SNR limit = -17.5 dB) that's actually 7.5 dB above the demodulation threshold — excellent signal.
Proposed Fix
Adopt modem-preset-relative thresholds (matching Meshtastic-Apple's approach):
SNR limits per preset (from LoRa spreading factor physics):
Implementation Notes
determineSignalQuality()Config.LoRaConfig.modem_presetgetSnrColor(snr:preset:)inLoRaSignalStrengthIndicator.swift)LoraSignalIndicator.kt,NodeItem.kt,NodeItemCompact.kt,BuildNodeDescription.ktRef: Apple implementation — https://github.com/meshtastic/Meshtastic-Apple/blob/main/Meshtastic/Views/Helpers/LoRaSignalStrengthIndicator.swift