Skip to content

Update firmware presets#40

Merged
GUVWAF merged 6 commits intomeshtastic:masterfrom
zandi:update-firmware-presets
Jan 28, 2026
Merged

Update firmware presets#40
GUVWAF merged 6 commits intomeshtastic:masterfrom
zandi:update-firmware-presets

Conversation

@zandi
Copy link
Contributor

@zandi zandi commented Jan 23, 2026

cherry-picked just the parameter preset changes from #33 along with adding in all the regions present in firmware, with all their data rather than just a subset.

In the firmware, the presets conditionally choose a bandwidth based on the region's wide_lora value. We don't implement this bandwidth change yet. Currently this is only true for the LORA_24 region, the "2.4GHz WLAN band", so this probably isn't a big deal right now.

powersjcb and others added 5 commits January 19, 2026 14:51
- 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.
Added some explanatory comments that were removed and explained where
'sensitivity' and 'cad_threshold' came from. Reorder spreading factor and
coding rate parameters to match firmware. Add missing LONG_TURBO preset.

Also it looks like the VERY_LONG_SLOW preset is no longer present in firmware
sources. Keep it, but leave an explanatory comment.
Also add explanatory comment about the bandwidth preset parameter and the
region's 'wide_lora' value. The firmware expands bandwidth when the region
allows it ('wide_lora' is true), but this is not implemented yet.
@GUVWAF GUVWAF self-requested a review January 23, 2026 19:29
Copy link
Member

@GUVWAF GUVWAF left a comment

Choose a reason for hiding this comment

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

Looks clean! I have one comment.

lib/config.py Outdated
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be 3dB lower, as the bandwidth is doubled (hence twice as much noise). Same for cad_threshold.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran the numbers through this calculator https://www.rfwireless-world.com/calculators/LoRa-Sensitivity-Calculator.html with a noise figure of 6 and got about -118.5. Just to confirm, is that what you meant by 3dB lower?

Copy link
Member

@GUVWAF GUVWAF Jan 27, 2026

Choose a reason for hiding this comment

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

Yes, sorry. 3dB higher indeed, so -118.5.

@GUVWAF GUVWAF mentioned this pull request Jan 27, 2026
@GUVWAF GUVWAF merged commit 7aff9e7 into meshtastic:master Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments