Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange gain behaviors #731

Closed
KarlL2 opened this issue Feb 15, 2019 · 1 comment
Closed

Strange gain behaviors #731

KarlL2 opened this issue Feb 15, 2019 · 1 comment

Comments

@KarlL2
Copy link

KarlL2 commented Feb 15, 2019

Hi,

I opened an issue on SoapyBladeRF pothosware/SoapyBladeRF#30 but it seems to be linked to libBladeRF.

I tried setting the gain of the RX but it would always return 60. It seems that I first need to set the gain mode to manual, and then set the gain. I would have expected the gain to automatically go to manual if I set it.

A strange thing though, is that it seems the gain doesn't get set at once. I roughly do

SoapySDRDevice *sdr = SoapySDRDevice_make(&args);      // open device
SoapySDRDevice_setGainMode(sdr, dir, chan, false);     // set gain to manual
SoapySDRDevice_setGain(sdr, dir, chan, gain);          // set gain
returnedGain = SoapySDRDevice_getGain(sdr, dir, chan); // get gain
SoapySDRDevice_unmake(sdr);                            // close device

Each time I run it, getGain returns the gain set at the previous run. So I ask for 10 and I get 0, then 15 and I get 10, 20 and I get 15, ...

Also SoapySDRDevice_getGainMode returns always false, whether the gain is set to auto or manual (for this I'm not sure if SoapyBladeRF should check against BLADERF_GAIN_MGC or BLADERF_GAIN_MANUAL instead).

@KarlL2
Copy link
Author

KarlL2 commented Jul 11, 2019

This issue doesn't happen anymore. I opened a different one for another gain issue https://github.com/Nuand/bladeRF/issues/746 .

@KarlL2 KarlL2 closed this as completed Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant