Set agc_reset_interval default to 3 (12s) for M5Stack Unit C6L - #20
Merged
Conversation
On M5Stack Unit C6L (JP region), SX1262 AGC drifts to maximum gain on each RX re-entry. Once the AGC latches at high gain (e.g. after exposure to a noisy environment), raw RSSI stays at -72~-74 dBm even after moving away from the noise source. This permanently exceeds the JP LBT threshold of -80 dBm, creating a deadlock: isChannelActive() always returns busy, TX never occurs, and without TX there is no opportunity for the AGC to reset. Setting agc_reset_interval=3 (12 seconds) causes periodic AGC resets via sx126xResetAGC(), breaking the deadlock by creating regular transmission windows regardless of prior noise exposure. Verified on M5Stack Unit C6L with jp firmware. The 12-second interval was chosen from basic field testing and is not optimized; more rigorous testing may yield a better value. Also expose agc_int in companion_radio NodePrefs so the parameter is accessible via future CLI in companion_radio_ble/usb firmware. Add agc_reset_interval field to companion_radio NodePrefs The field existed in CommonCLI.h but was missing from the companion_radio NodePrefs class, causing a build error when agc_int was exposed via CLI. Add agc_reset_interval field to companion_radio NodePrefs The field existed in CommonCLI.h but was missing from the companion_radio NodePrefs class, causing a build failure. Default set to 3 (12s) to match CommonCLI.h and resolve the AGC deadlock on companion_radio firmware.
jirogit
force-pushed
the
fix/c6l-agc-reset-default
branch
from
August 15, 2026 17:48
889df88 to
cbdb1d1
Compare
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.
Problem
On M5Stack Unit C6L (JP region), SX1262 AGC drifts to maximum gain on each RX re-entry. Once the AGC latches at high gain (e.g. after exposure to a noisy environment), raw RSSI stays at -72~-74 dBm even after moving away from the noise source. This permanently exceeds the JP LBT threshold of -80 dBm, creating a deadlock:
isChannelActive()always returns busy, TX never occurs, and without TX there is no opportunity for the AGC to reset.Fix
Setting
agc_reset_interval=3(12 seconds) causes periodic AGC resets viasx126xResetAGC(), breaking the deadlock by creating regular transmission windows regardless of prior noise exposure.The 12-second interval was chosen from basic field testing and is not optimized; more rigorous testing may yield a better value.
Also exposes
agc_intin companion_radio NodePrefs so the parameter is accessible via future CLI in companion_radio_ble/usb firmware.Tested