AGC in GRC always enabled

Discussions related to schematic capture, PCB layout, signal integrity, and RF development

Moderator: robert.ghilduta

Post Reply
marianoboragno
Posts: 1
Joined: Sun Nov 08, 2020 9:44 am

AGC in GRC always enabled

Post by marianoboragno »

Hi guys,

I've got a new BladeRF xA4. Installed GNU Radio 3.7.13.5, latest BladeRF libraries and utilities in Windows and Linux. I can't seem to be able to disable the AGC with Osmocom Source in GRC. I've tried, as I found in a thread in this forum and read in the documentation as well, setting agc_mode='manual' in the device arguments, but nothing seems to work.
I also tried disabling the AGC and setting a fixed gain in bladerf-cli, and then running the GRC flow, but it reactivates the AGC.

Any idea/suggestions?

For reference, the versions below:

bladeRF-cli version: 1.8.0
libbladeRF version: 2.2.1

Firmware version: 2.3.2
FPGA version: 0.11.0 (configured by USB host)

Thank you!
robert.ghilduta
Posts: 93
Joined: Thu Feb 28, 2013 11:14 pm

Re: AGC in GRC always enabled

Post by robert.ghilduta »

Prior to specifying "agc_mode", you may have to add a specified like "bladerf=0", so the string is something like "bladerf=0,agc_mode=..."
thrillscience
Posts: 2
Joined: Thu Mar 25, 2021 11:43 am

Re: AGC in GRC always enabled

Post by thrillscience »

Going through the osmocom source, rf_gain has an effect when I vary it while a flowgraph is running with a slider GUI control, but I don't see any effect from varying "bb_gain". I'm going from 0 to 60 and nothing changes.

Are my ranges right? I have the osmocom source if gain set to "0"
robert.ghilduta
Posts: 93
Joined: Thu Feb 28, 2013 11:14 pm

Re: AGC in GRC always enabled

Post by robert.ghilduta »

Try RF gain instead of BB gain. By the way, might be worth giving gr-bladeRF a try: https://github.com/Nuand/gr-bladeRF . The bladeRF 2.0 micro's AGC and gains should be able to be more easily controlled from there.
cytrinox
Posts: 1
Joined: Wed Sep 01, 2021 4:58 am

Re: AGC in GRC always enabled

Post by cytrinox »

I've the same issue with BladeRF 2.0 Micro XA4

I set gain for 'system' and 'full' with:

Code: Select all

source.set_gain(20, "system", 0)
source.set_gain(15, "full", 0)
But when getting the gain, it is unchanged:

Code: Select all

source.get_gain("system", 0) # returns 60
source.get_gain("full", 0) # returns 71
My device string is:

Code: Select all

bladerf=0,agc_mode=manual,buffers=128,buflen=8192,transfers=32,biastee=1
Version info:

Code: Select all

 bladeRF-cli version:        1.8.0-0.2021.03-1
  libbladeRF version:         2.4.0-0.2021.03-1

  Firmware version:           2.4.0-git-a3d5c55f
  FPGA version:               0.11.0 (configured by USB host)
gr-osmosdr is 0.2.2-1 from Debian.

Any ideas what is missing here?
robert.ghilduta
Posts: 93
Joined: Thu Feb 28, 2013 11:14 pm

Re: AGC in GRC always enabled

Post by robert.ghilduta »

What happens if you use gr-osmosdr block's RF gain combobox? I'm not sure what the gr-osmosdr gain variable name corresponds to the RF gain.
Also, it might be worth calling set_gain() at a point after initialization, to ensure the AGC has been set to manual.
Post Reply