Merged
Conversation
- 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
requested changes
Jan 27, 2026
Member
GUVWAF
left a comment
There was a problem hiding this comment.
Looks clean! I have one comment.
lib/config.py
Outdated
Member
There was a problem hiding this comment.
This should probably be 3dB lower, as the bandwidth is doubled (hence twice as much noise). Same for cad_threshold.
Contributor
Author
There was a problem hiding this comment.
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?
Member
There was a problem hiding this comment.
Yes, sorry. 3dB higher indeed, so -118.5.
Merged
GUVWAF
approved these changes
Jan 28, 2026
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.
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_loravalue. We don't implement this bandwidth change yet. Currently this is only true for theLORA_24region, the "2.4GHz WLAN band", so this probably isn't a big deal right now.