# SoapySDR setGain() issue with LimeSDR

**URL:** <https://discourse.myriadrf.org/t/soapysdr-setgain-issue-with-limesdr/7247>\
**Category:** LimeSDR\
**Created:** [9 July 2021 16:50 UTC](https://discourse.myriadrf.org/t/soapysdr-setgain-issue-with-limesdr/7247 "2021-07-09T16:50:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![esuter](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@esuter](https://discourse.myriadrf.org/u/esuter)\
**Post date:** [9 July 2021 16:50 UTC](https://discourse.myriadrf.org/t/soapysdr-setgain-issue-with-limesdr/7247/1 "2021-07-09T16:50:13Z")

</div>

I apologize if this has been asked before as I am new to the SDR community.

I recently installed SoapySDR in an Anaconda environment on Ubuntu 18.04. I am trying to get a basic transmitter working but whenever setGain() is called, the SDR transmits a constant stream even without being setup. The python code is literally just:

```
import SoapySDR
from SoapySDR import *
import time

uhf = SoapySDR.Device({'driver': 'lime'})
uhf.setSampleRate(SOAPY_SDR_TX, 0, 10e6)
uhf.setFrequency(SOAPY_SDR_TX, 0, 437.29e6)
uhf.setGain(SOAPY_SDR_TX, 0, 40)
time.sleep(3)

```

I have a waterfall plot running in the background and the fact that the LimeSDR is transmitting at all without being setup is concerning.

 ![Capture](https://canada1.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/1/118066cc96881196fb461315e4861628f9c6057a.png)

Should this behavior be expected or is it some underlying problem that needs to be dealt with? Any advice would be appreciated.

---

<div class="post-metadata">

**Author:** ![RightHalfPlane](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@RightHalfPlane](https://discourse.myriadrf.org/u/RightHalfPlane)\
**Post date:** [12 July 2021 22:45 UTC](https://discourse.myriadrf.org/t/soapysdr-setgain-issue-with-limesdr/7247/2 "2021-07-12T22:45:42Z")

</div>

> [@esuter](#):
>
> `uhf.setGain(SOAPY_SDR_TX, 0, 40)`

In the SoapySDR lib, one of the first things they do is basically -

uhf.setGain(SOAPY\_SDR\_TX, 0, 0)

Do not up the gain until you are ready to transmit.
