Skip to content

Set agc_reset_interval default to 3 (12s) for M5Stack Unit C6L - #20

Merged
jirogit merged 1 commit into
devfrom
fix/c6l-agc-reset-default
Aug 15, 2026
Merged

Set agc_reset_interval default to 3 (12s) for M5Stack Unit C6L#20
jirogit merged 1 commit into
devfrom
fix/c6l-agc-reset-default

Conversation

@jirogit

@jirogit jirogit commented Aug 15, 2026

Copy link
Copy Markdown
Owner

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 via sx126xResetAGC(), 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_int in companion_radio NodePrefs so the parameter is accessible via future CLI in companion_radio_ble/usb firmware.

Tested

  • M5Stack Unit C6L, JP firmware
  • Send Advert confirmed reaching Wio Tracker L1 Pro after fix

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
jirogit force-pushed the fix/c6l-agc-reset-default branch from 889df88 to cbdb1d1 Compare August 15, 2026 17:48
@jirogit
jirogit merged commit 63ac5a4 into dev Aug 15, 2026
15 checks passed
@jirogit
jirogit deleted the fix/c6l-agc-reset-default branch August 15, 2026 17:52
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.

1 participant