# RF RSSI and digital RSSI for AGC

**URL:** <https://discourse.myriadrf.org/t/rf-rssi-and-digital-rssi-for-agc/12948>\
**Category:** LimeSDR\
**Created:** [21 October 2025 07:39 UTC](https://discourse.myriadrf.org/t/rf-rssi-and-digital-rssi-for-agc/12948 "2025-10-21T07:39:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kushal1](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@Kushal1](https://discourse.myriadrf.org/u/Kushal1)\
**Post date:** [21 October 2025 07:39 UTC](https://discourse.myriadrf.org/t/rf-rssi-and-digital-rssi-for-agc/12948/1 "2025-10-21T07:39:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ricardas](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/ricardas/32/86_2.png) [@ricardas](https://discourse.myriadrf.org/u/ricardas)\
**Post date:** [22 October 2025 07:19 UTC](https://discourse.myriadrf.org/t/rf-rssi-and-digital-rssi-for-agc/12948/2 "2025-10-22T07:19:01Z")

</div>

Hi,

> [@Kushal1](#):
>
> Is there a **direct function in LimeSuite** to read the RF RSSI?

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](https://github.com/myriadrf/LimeSuite/blob/524cd2e548b11084e6f739b2dfe0f958c2e30354/src/lms7002m/LMS7002M.cpp#L2793-L2844)

> [@Kushal1](#):
>
> 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?

Yes, it’s possible.

---

<div class="post-metadata">

**Author:** ![Kushal1](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@Kushal1](https://discourse.myriadrf.org/u/Kushal1)\
**Post date:** [22 October 2025 23:04 UTC](https://discourse.myriadrf.org/t/rf-rssi-and-digital-rssi-for-agc/12948/3 "2025-10-22T23:04:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ricardas](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/ricardas/32/86_2.png) [@ricardas](https://discourse.myriadrf.org/u/ricardas)\
**Post date:** [23 October 2025 09:57 UTC](https://discourse.myriadrf.org/t/rf-rssi-and-digital-rssi-for-agc/12948/4 "2025-10-23T09:57:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kushal1](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@Kushal1](https://discourse.myriadrf.org/u/Kushal1)\
**Post date:** [14 November 2025 10:53 UTC](https://discourse.myriadrf.org/t/rf-rssi-and-digital-rssi-for-agc/12948/5 "2025-11-14T10:53:18Z")

</div>

Hi Ricardas,

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

```auto
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](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

---

<div class="post-metadata">

**Author:** ![Prajwal](https://avatars.discourse-cdn.com/v4/letter/p/858c86/32.png) [@Prajwal](https://discourse.myriadrf.org/u/Prajwal)\
**Post date:** [6 August 2026 07:01 UTC](https://discourse.myriadrf.org/t/rf-rssi-and-digital-rssi-for-agc/12948/6 "2026-08-06T07:01:34Z")

</div>

Hi Ricardas,

Following this thread, I’ve been reading the analog RSSI value from register `0x0605` on a LimeSDR-Mini v2.4.

Here’s what I’m observing while sweeping input power at a fixed frequency:

 ![image](https://canada1.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/1/1bbded2d725f6d83a4a33934890a9c32d5cf9745.png)  
Below -50 dBm, the reading stops moving — it stays flat at ~117-118 regardless of how much further I reduce the input power.

According to the LMS7002M datasheet, the RF RSSI should be able to read power levels from -70 dBm to -20 dBm, but on the board I’m only able to see it respond down to about -50 dBm to - 20 dBm gap from the specified lower limit.

My question: Is the ~-50 dBm floor I’m seeing a fixed hardware sensitivity limit of the RF RSSI detector circuit itself, or is there some other register/setting that controls or shifts this lower threshold? Given the datasheet specifies down to -70 dBm, I’d expect to be able to resolve lower than what I’m currently seeing — trying to understand if I’m missing a configuration step, or if there’s a board-specific reason for the reduced range.

Thanks!

---

<div class="post-metadata">

**Author:** ![ricardas](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/ricardas/32/86_2.png) [@ricardas](https://discourse.myriadrf.org/u/ricardas)\
**Post date:** [14 August 2026 11:51 UTC](https://discourse.myriadrf.org/t/rf-rssi-and-digital-rssi-for-agc/12948/7 "2026-08-14T11:51:40Z")

</div>

Hi Prajwal,

I’m not familiar with the hardware aspect of analog RSSI functionality, tagging @Karolis , he might be able to comment about your measurements.
