Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to set nRF24l01 LNA gain #1392

Open
BLLuis opened this issue Jan 17, 2025 · 0 comments
Open

Add support to set nRF24l01 LNA gain #1392

BLLuis opened this issue Jan 17, 2025 · 0 comments

Comments

@BLLuis
Copy link

BLLuis commented Jan 17, 2025

Implementing a channel scanner and due to the lack of nRF24l01 signal meter I turn off the LNA to reduce in 1.5 db signal sensitivity getting at least 3 levels for signal strength.
The library don't have a function to set LNA or sensitivity so I'm using RADIOLIB_GODMODE and RADIOLIB_LOW_LEVEL to have acces to Module pointer using getMod and writting to nRF24 to change this setting.

These are some lines of my code as example:

`

#define RADIOLIB_NRF24_RF_LNA_OFF                           0b00000000  //  0     0   LNA gain: Off
#define RADIOLIB_NRF24_RF_LNA_ON                            0b00000001  //  0     0             On

/*
getMod is available defining

#define RADIOLIB_GODMODE    (1)
#define RADIOLIB_LOW_LEVEL  (1)

in component/src/BuildOptUser.h file
*/

Module * pModuleRadio0 = m_pRadio0->getMod();
radioState = pModuleRadio0->SPIsetRegValue(RADIOLIB_NRF24_REG_RF_SETUP, RADIOLIB_NRF24_RF_LNA_ON, 0, 0);

`

This is good not only to reduce sensitivity but also to reduce current consumption in 0.8ma, my code is not tested on a real device yet.
Wish to see this in the library to avoid using God mode.

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

No branches or pull requests

1 participant