# Lms7002m agc/rssi

**URL:** <https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895>\
**Category:** RAN Forum\
**Created:** [8 June 2018 10:26 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895 "2018-06-08T10:26:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![shao](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@shao](https://discourse.myriadrf.org/u/shao)\
**Post date:** [8 June 2018 10:26 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895/1 "2018-06-08T10:26:03Z")

</div>

Hello Lime,

We are trying to setup high power PA and LNA on LimeSDR for the LTE project.

We want to know how to make use of the on-chip AGC. Is it controlled by the RSSI automatically, or do we need to configure in LimeSuiteGUI?

I know there is an option in srsLTE to choose rx\_gain automatically, but we are not sure whether it talks with LMS7002 well since there are too many intermediate layers like Soapy.

Thanks!

---

<div class="post-metadata">

**Author:** ![milo](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@milo](https://discourse.myriadrf.org/u/milo)\
**Post date:** [8 June 2018 12:40 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895/2 "2018-06-08T12:40:32Z")

</div>

You might find the following helps:

For MCU AGC testing, there is an option (checkbox) labeled 'Enable MCU  
AGC ’ in LimeSuiteGUI ‘TRX Gain tab’.

From code it can be started/stopped using LMS7\_Device::MCU\_AGCStart()  
and LMS7\_Device::MCU\_AGCStart() functions:

The code that is executed when toggling ‘Enable AGC’ checkbox in  
LimeSuiteGUI can be found here:

> <https://github.com/myriadrf/LimeSuite/blob/master/src/lms7002_wxgui/lms7002_pnlGains_view.cpp#L150>

LMS chip settings can not be changed while MCU AGC is running, so MCU  
AGC should probably be started after finishing configuring the chip.

---

<div class="post-metadata">

**Author:** ![shao](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@shao](https://discourse.myriadrf.org/u/shao)\
**Post date:** [8 June 2018 13:38 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895/3 "2018-06-08T13:38:20Z")

</div>

Thanks Milo, will try that.

---

<div class="post-metadata">

**Author:** ![milo](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@milo](https://discourse.myriadrf.org/u/milo)\
**Post date:** [8 June 2018 14:53 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895/4 "2018-06-08T14:53:53Z")

</div>

…actually thanks to Lime’s team. They’ve shared these information with us in the past 🙂

---

<div class="post-metadata">

**Author:** ![shao](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@shao](https://discourse.myriadrf.org/u/shao)\
**Post date:** [9 June 2018 07:23 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895/5 "2018-06-09T07:23:16Z")

</div>

After reading the documents. I still have some doubts.

According to LimeSDR Made simple series 2. There are 3 stages of amplifiers in the receiving path. primary LNA, RxTIA and RxPGA. Which amplifier stage is the MCU\_AGCStart() function actually tuning? And this MCU\_AGC is based on the digital rssi instead of the analog rssi right?

---

<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:** [9 June 2018 09:19 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895/6 "2018-06-09T09:19:32Z")

</div>

It uses LNA and PGA stages, and it’s based on digital RSSI

---

<div class="post-metadata">

**Author:** ![shao](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@shao](https://discourse.myriadrf.org/u/shao)\
**Post date:** [9 June 2018 10:40 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895/7 "2018-06-09T10:40:11Z")

</div>

Thanks Ricardas!

---

<div class="post-metadata">

**Author:** ![shao](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@shao](https://discourse.myriadrf.org/u/shao)\
**Post date:** [15 June 2018 06:27 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895/8 "2018-06-15T06:27:04Z")

</div>

Hello Milo,

I enabled the AGC checkbox in LimeSuiteGUI, and then I put a walkie-talkie nearby the LimeSDR, but when I move the walkie-talkie around, the amplitude of its signal on fftviewer is always changing. It is supposed to be maintained almost as constant right?

How do I evaluate the effect of AGC?

Thanks!

---

<div class="post-metadata">

**Author:** ![shao](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@shao](https://discourse.myriadrf.org/u/shao)\
**Post date:** [15 June 2018 08:18 UTC](https://discourse.myriadrf.org/t/lms7002m-agc-rssi/2895/9 "2018-06-15T08:18:01Z")

</div>

It seems to be a version problem.

I was using LimeSuite 18.01 and AGC isn’t working properly.

Now I am using with LimeSuite 18.04 and 18.06, the AGC is working now.

I tested for LimeSDR-USB with walkie-talkie, now it really maintain constant power level regardless of distance. But LimeSDR-Mini seems not supported yet.
