Soapy_power --specific gains not working

Hey guys, this might be the wrong forum to post this question, but here goes.

I’m using a LimeSDR with QSpectrumAnalyzer, which is using soapy_power and I’m trying to set the gains of the LNA, TIA and PGA. This is done in the additional parameters box, which currently looks as follows:

–even --fft-window boxcar --remove-dc --channel=0 --antenna LNAH --specific-gains LNA=28,TIA=12,PGA=0

But each time I do, I get the following error:

soapy_power: error: argument -G/–specific-gains: not allowed with argument -g/–gain

That’s telling me that I’m setting the gain elsewhere, which is probably QSpectrumAnalyzer doing it, but I’m not sure how to turn that off.

Any help would be appreciated.

One more thing, while I have you. I’m connecting the Lime straight to a dipole inside a cylindrical waveguide, no external LNA (yet). What are sort of gains would you recommend for detecting the Hydrogen line (or at the very least, noticing a drop in radiation as the sun sets)?

It’s coded into qspecreumanalyzer/qspectrumanalyzer/backends/soapy_power.py.
It starts out as “-1” and looks like you don’t get a command line extension unless it is >=0. It seems as if by default it should not have the -g on the command line.

What would you suggest as a solution? Editting the soapy_power.py file?

I don’t have the code in front of me but there are two lines that are like ‘if gain >=0 then extend command line with -g …’ that may be commented out and then try the -G option.
I would suggest first to open an issue on Github because the writer of the code knows it best.

I see xmicos has not answered your issue.

Lines 27 and 28 set up the min and max for gain.
Line 53 initializes gain to -1.
Line 65 sets “gain” to gain. This may be where it gets a value other than -1. From the init.py file?
Lines 111 and 112 apply a -g option to the command line if the value is not negative.

You can just throw a # in front of lines 111 and 112, then rebuild and try. Or comment line 65. Or comment out that “gain = 37” at line 18 in the init file and retry. I think the third option would work best.

Commenting out lines 111 and 112 worked great, thanks!

How about using soapy_power, by itself, on the command line? What would the proper string be to set the gains there?

Note that we now have similar tools which directly integrate with LMS API, so don’t require SoapySDR: