Repository navigation
Do not switch RX rate if RX cant do rate from SYNC packet - #3610
Merged
Merged
Conversation
pkendall64
approved these changes
Apr 17, 2026
pkendall64
left a comment
Collaborator
There was a problem hiding this comment.
Much better user experience, thanks @CapnBry
mha1
approved these changes
Apr 18, 2026
mha1
left a comment
Contributor
There was a problem hiding this comment.
Looking good. Tested this in a mixed PR on RX and master on TX setup (Nomad/SuperP). Looks good. I can step through all supported rates. When selecting a non-supported rate the RX disconnects and will (only) connect again if the supported rate it was previously connected to is selected again.
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.
Changes SYNC behavior to prevent a receiver from switching to a Packet Rate it can't do. Currently it will always soft-brick the receiver, and this PR changes the behavior to just not switch at all.
This was discovered during like 4.0.0-RC4 but everything was so stable I didn't want to throw in all these changes to an interrupt function and possibly breaking something for a relatively minor fix.
Steps to Reproduce
Details
When the receiver receives a SYNC packet for a rate that isn't in its ModParams table, it instead selects index 0. For LR1121 receivers this will be SubGHz FSK K1000 Full, which SX1280 transmitters can not do. For SX1280 receivers this will be F1000 FLRC, which LR1121 transmitters can not do.
This is mitigated on single band LR1121 receivers, as there was code to prevent it from switching to K1000 Full due to it not being supported (even though this wasn't the mode the transmitter requested), so it tries to bounce back to the previous rate and usually can do so. However, all the other parameters from the SYNC packet will be accepted anyway, meaning the switch mode could flip unintentionally, or the serial output mode might change as well which could also be unrecoverable.
The issue is that enumRatetoIndex() is always is expected to return a valid Index into the ModParams table, even if the rate isn't supported. They SYNC packet tries to find the unsupported rate, it instead returns index 0 which is valid, and the receiver is now locked itself in a room and won't come out.
Solution
Use a different function to see if the rate is in the ModParams table first, and also verify that the rate is supported by the frontend hardware-- ignoring the entire sync packet entirely if both of these aren't true. The receiver stays at the old rate and disconnects, but the transmitter can still go back to the previous rate to reconnect.