RF RSSI and digital RSSI for AGC

Hello all,

I want to experiment with long-range transmit (TX) and receive (RX) using the LimeSDR Mini 2.4. To do this, I need to establish an Automatic Gain Control (AGC) loop by observing both:

  • The RF RSSI (pre-RXLNAW), and
  • The digital RSSI.

Current Status:
I’ve been able to find the LimeSuite functions that read the digital RSSI, but I haven’t been able to find any LimeSuite function for reading the RF RSSI.


Questions:

  1. Is there a direct function in LimeSuite to read the RF RSSI?
  • If yes, please direct me to it.
  • If no, how can I access or calculate the RF RSSI?
  1. I would like to make these functions into Octave-callable C++ binding, since the rest of my project is implemented in Octave.
  • Is it possible to wrap these LimeSuite functions (if they exist) into Octave-callable C++ binding and use them from within Octave?

Hi,

There is no dedicated function for it, analog RSSI value can be read from LMS7002M SPI register:
0x0605[15-8] channel B analog RSSI
0x0605[7-0] channel A analog RSSI
But the analog RSSI has to be calibrated, the calibration procedure: LimeSuite/src/lms7002m/LMS7002M.cpp at 524cd2e548b11084e6f739b2dfe0f958c2e30354 · myriadrf/LimeSuite · GitHub

Yes, it’s possible.

Thank you, Ricardas.
Do I need to perform calibration and read the corresponding SPI registers every time I want to read the analog RSSI

The calibration needs to be done once. After that you can read just the analog rssi values.

Hi Ricardas,

I am trying to use the analog RSSI feature as you suggested earlier — by first calling:

LMS7002M::CalibrateAnalogRSSI_DC_Offset()

before reading register 0x0605 during streaming.

I am implementing this through an Octave-callable C++ binding, using the standard lms_device_t* lmsDev from the LimeSuite C API.

However, I’ve discovered that in an installed LimeSuite build (/usr/local/include/lime), the C API does not expose any way to access the LMS7002M object or the LMS7_Device class. As a result:

  • CalibrateAnalogRSSI_DC_Offset() is not exposed through the public API
  • There is no C API wrapper that calls it
  • lms_device_t cannot be cast to LMS7_Device
  • None of the existing exposed functions (including LMS_Calibrate) appear to call this calibration internally

So at the moment, I cannot reach the calibration routine from an external application (Octave/GNU Radio), even though the function is present in LMS7002M.cpp:

https://github.com/myriadrf/LimeSuite/blob/524cd2e548b11084e6f739b2dfe0f958c2e30354/src/lms7002m/LMS7002M.cpp#L2793-L2844

Could you please clarify:

  1. How should external applications call CalibrateAnalogRSSI_DC_Offset() if it is not exposed in the C API?
  2. Is there a recommended way to trigger this calibration via the LimeSuite GUI or the .ini file, so that loading Rx.ini in Octave would perform it automatically?
  3. Or is there another API call that already performs this calibration implicitly? (From the code it appears that none of the exposed APIs call it.)

My goal is simply:

  1. Run the analog RSSI DC offset calibration once
  2. Then continuously poll register 0x0605 for analog RSSI while streaming

Thank you