Skip to content

Conversation

@weebl2000
Copy link

@weebl2000 weebl2000 commented Dec 19, 2025

I was experiencing very bad RX with my heltec v4 so I investigated and debugged.

Turns out everything handling the LNA/PA is completely fine, the only problem was the SX1262 boosted gain was enabled. If you disable this the RX is golden. 🥇

Actually, the problem was radiolib was trying to manage things.

Summary of Changes

  1. HeltecV4Board.cpp - Enhanced RF Switch Control

Added detailed comments explaining the GC1109 FEM chip operation:

  • PA_POWER (pin 7): Always HIGH to power the GC1109
  • PA_EN (pin 2): Always HIGH (enables both RX and TX)
  • PA_TX_EN (pin 46): The actual RF switch - LOW=RX/LNA, HIGH=TX/PA
  1. platformio.ini

Added RF switch pin definitions at variants/heltec_v4/platformio.ini:34-35:
-D SX126X_RXEN=RADIOLIB_NC ; No separate RX enable pin
-D SX126X_TXEN=46 ; TX enable pin controls RF switch

How This Fix Works

The root cause was that RadioLib didn't know about the external GC1109 RF switch. Without the SX126X_RXEN/TXEN definitions, RadioLib never called setRfSwitchPins(), so it couldn't automatically manage PA_TX_EN during RX/TX transitions.

Now when you initialize the radio, CustomSX1262.h will automatically call:
radio.setRfSwitchPins(RADIOLIB_NC, 46); // RX=not used, TX=pin 46

This tells RadioLib to:

  • Set pin 46 LOW when receiving (RX path through LNA)
  • Set pin 46 HIGH when transmitting (TX path through PA)

@fschrempf
Copy link
Contributor

According to @jbrazio here, it depends on the antenna whether RX boosted gain is benefitial or not. So if you disable it, it might help you but make things worse for others. If that's true, then we should leave this as is an go for the solution in #1164.

@weebl2000 weebl2000 force-pushed the heltec_v4_fix_RX_sensitivity branch from 7dcc916 to d84784e Compare December 19, 2025 18:56
@weebl2000
Copy link
Author

According to @jbrazio here, it depends on the antenna whether RX boosted gain is benefitial or not. So if you disable it, it might help you but make things worse for others. If that's true, then we should leave this as is an go for the solution in #1164.

Yeah maybe, I haven't tested with a lot of antennas yet. There's definitely something funky going on with the PA/LNA and the RX gain though.

@weebl2000 weebl2000 force-pushed the heltec_v4_fix_RX_sensitivity branch from d84784e to dcfea36 Compare December 19, 2025 19:58
@weebl2000
Copy link
Author

According to @jbrazio here, it depends on the antenna whether RX boosted gain is benefitial or not. So if you disable it, it might help you but make things worse for others. If that's true, then we should leave this as is an go for the solution in #1164.

It'

According to @jbrazio here, it depends on the antenna whether RX boosted gain is benefitial or not. So if you disable it, it might help you but make things worse for others. If that's true, then we should leave this as is an go for the solution in #1164.

Yeah maybe, I haven't tested with a lot of antennas yet. There's definitely something funky going on with the PA/LNA and the RX gain though.

@fschrempf It gets more tricky. But I think we actually might just need to set SX126X_DIO2_AS_RF_SWITCH=false since we are handling the TX/RX mode on the PA/LNA. But I am getting variying results with improvements or not. I will try running tests for longer to really see a difference 👀

@weebl2000
Copy link
Author

weebl2000 commented Dec 20, 2025

Updated with latest finding. I have tested for limited time but RX is heaps better, so others please do test!

The root cause was that RadioLib didn't know about the external GC1109
RF switch. Without the SX126X_RXEN/TXEN definitions, RadioLib never
called setRfSwitchPins(), so it couldn't automatically manage PA_TX_EN
during RX/TX transitions.
@weebl2000 weebl2000 force-pushed the heltec_v4_fix_RX_sensitivity branch from bc5e4be to 044505d Compare December 20, 2025 17:43
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.

2 participants