Skip to content

Fix RX Boosted Gain setting after AGC reset is triggered - #3158

Merged
oltaco merged 1 commit into
meshcore-dev:devfrom
mepholic:bug/fix-rxgain-setting-post-agc-reset
Aug 10, 2026
Merged

Fix RX Boosted Gain setting after AGC reset is triggered#3158
oltaco merged 1 commit into
meshcore-dev:devfrom
mepholic:bug/fix-rxgain-setting-post-agc-reset

Conversation

@mepholic

@mepholic mepholic commented Aug 10, 2026

Copy link
Copy Markdown

The AGC reset actually seems to just reset the entire SX1262. When the "AGC reset" function is called, the firmware needs to re-initialize settings on the radio. One of these settings is the RX Boosted Gain.

HerculesMulligan pointed out in the discord that when the AGC reset is triggered, it appears to reset the RX boosted gain value to the compiled in default rather than the setting set by the user. https://discord.com/channels/1495203904898728149/1495410606985969765/1536169618794877018

This seemed like a simple fix after a quick look at the code. I haven't tested this PR at the time of creation, but will work on doing so afterwards. I'll comment on the PR once I've tested it out.

… current/flash value set by the user when the ACG reset is triggered. This commit fixes this.
@mepholic mepholic changed the title RX Boosted Gain was set back to the compiled in value rather than the… Fix RX Boosted Gain setting after AGC reset is triggered Aug 10, 2026
@mepholic

Copy link
Copy Markdown
Author

Builds and links for the Station G2:

Linking .pio\build\Station_G2_companion_radio_wifi\firmware.elf
Retrieving maximum program size .pio\build\Station_G2_companion_radio_wifi\firmware.elf
Checking size .pio\build\Station_G2_companion_radio_wifi\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [======    ]  56.1% (used 183872 bytes from 327680 bytes)
Flash: [========= ]  85.7% (used 1123429 bytes from 1310720 bytes)
Building .pio\build\Station_G2_companion_radio_wifi\firmware.bin
esptool.py v4.5.1
Creating esp32s3 image...
Merged 3 ELF sections
Successfully created esp32s3 image.
========================================================================================================== [SUCCESS] Took 59.03 seconds ==========================================================================================================

Environment                      Status    Duration
-------------------------------  --------  ------------
Station_G2_companion_radio_wifi  SUCCESS   00:00:59.028
=========================================================================================================== 1 succeeded in 00:00:59.028 ===========================================================================================================
 *  Terminal will be reused by tasks, press any key to close it. 

@IoTThinks

Copy link
Copy Markdown
Contributor

We will test this PR too.
AGC is useful in areas with high RF noise.

@oltaco oltaco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me 👍

@oltaco
oltaco merged commit f6c25e6 into meshcore-dev:dev Aug 10, 2026
15 checks passed
@oltaco

oltaco commented Aug 10, 2026

Copy link
Copy Markdown
Member

Thanks @mepholic 👍

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