Meshtasticator icon indicating copy to clipboard operation
Meshtasticator copied to clipboard

Sync modem presets with current firmware

Open powersjcb opened this issue 5 months ago • 3 comments

  • Replace array-based modem configuration with preset dictionary
  • Add missing SHORT_TURBO preset (500kHz, SF=7, CR=5)
  • Fix coding rates to match firmware (CR=5 for most, CR=8 for LONG_MODERATE/SLOW)
  • Add current_preset property for cleaner access throughout codebase
  • Update all references from array indices to string-based preset names
  • Add Docker support for testing without local environment setup

This brings the simulator in sync with the current Meshtastic firmware modem presets and improves maintainability with string-based configuration.

powersjcb avatar Jul 25 '25 19:07 powersjcb

It looks like the coding rate (CR) was wrong for some of the configs.

Modem Preset Configuration Differences

Preset Name Index Parameter Original (Array-based) New (Firmware-synced) Change
SHORT_TURBO 8 Bandwidth Not Available 500 kHz ✅ Added
SF Not Available 7 ✅ Added
CR Not Available 5 ✅ Added
Sensitivity Not Available -121.5 dBm ✅ Added
SHORT_FAST 0 Bandwidth 250 kHz 250 kHz No change
SF 7 7 No change
CR 8 5 ⚠️ Fixed
Sensitivity -121.5 dBm -121.5 dBm No change
SHORT_SLOW 1 Bandwidth 250 kHz 250 kHz No change
SF 8 8 No change
CR 8 5 ⚠️ Fixed
Sensitivity -124.0 dBm -124.0 dBm No change
MEDIUM_FAST 2 Bandwidth 250 kHz 250 kHz No change
SF 9 9 No change
CR 8 5 ⚠️ Fixed
Sensitivity -126.5 dBm -126.5 dBm No change
MEDIUM_SLOW 3 Bandwidth 250 kHz 250 kHz No change
SF 10 10 No change
CR 8 5 ⚠️ Fixed
Sensitivity -129.0 dBm -129.0 dBm No change
LONG_FAST 4 Bandwidth 250 kHz 250 kHz No change
SF 11 11 No change
CR 8 5 ⚠️ Fixed
Sensitivity -131.5 dBm -131.5 dBm No change
LONG_MODERATE 5 Bandwidth 125 kHz 125 kHz No change
SF 11 11 No change
CR 8 8 No change
Sensitivity -134.5 dBm -134.5 dBm No change
LONG_SLOW 6 Bandwidth 125 kHz 125 kHz No change
SF 12 12 No change
CR 8 8 No change
Sensitivity -137.0 dBm -137.0 dBm No change
VERY_LONG_SLOW 7 Bandwidth 62.5 kHz 62.5 kHz No change
SF 12 12 No change
CR 8 8 No change
Sensitivity -140.0 dBm -140.0 dBm No change

powersjcb avatar Jul 25 '25 20:07 powersjcb

Looking good @powersjcb, thanks. Before merging I would like to keep the original Meshtastic logic only, so when you're ready can you remove the Burning Man-specific things?

It looks like the coding rate (CR) was wrong for some of the configs.

True, actually we changed this somewhere in firmware 2.4 I think. It's a non-breaking change as the CR is in the LoRa header, so you can change it on the fly even.

GUVWAF avatar Jul 26 '25 18:07 GUVWAF

Hey @powersjcb, hope you had a good time at Burning Man.

If you have time, could you separate the optimizations from the Burning Man-specific changes so we could get this merged?

GUVWAF avatar Sep 20 '25 12:09 GUVWAF