AGC in GRC always enabled

Discussions related to schematic capture, PCB layout, signal integrity, and RF development
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: 156
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: 156
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: 156
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.
Sameer11422
Posts: 1
Joined: Thu Feb 24, 2022 10:25 am

Re: AGC in GRC always enabled

Post by Sameer11422 »

Hi,
I'm using bladeRF xA9 to transmit and receive using GNU Radio 3.8 but when I change the gain in the osmocom blocks there is no change in the plots. I think this is because of the automatic gain control in the BladeRF. can any one help how to turn off AGC in gnu radio.
P.S. im a newbie hence dosen't now much about SDRs.
cmunikat
Posts: 1
Joined: Fri Nov 25, 2022 2:21 pm

Re: AGC in GRC always enabled

Post by cmunikat »

Hello,

I am using 2 receive channels and GNU radio 3.10.3.0, and gr-osmocom.

For the osmocom source, I am using the following config / device arguments, but is seems to only be affecting one of the channels. Below I copy the GNUradio output.

bladerf=0,nchan=2,agc_mode=manual,buffers=128,buflen=16384,transfers=32

Could you help me explaining the setting to make this agc_mode affect the 2 receive channels? Also, is there a common information source to properly understand all the possible settings within the osmocom source and sink and their meaning (Specifically, osmocom settings for bladeRF Micro A4)



gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.3.0
built-in source types: file rtl rtl_tcp uhd hackrf bladerf airspy airspyhf soapy
[bladeRF common] bladerf_common::init: DEBUG: entering initialization
[bladeRF source] bladerf_common::init: Opening Nuand bladeRF with device identifier string '*:instance=0'
[bladeRF source] Device: Nuand bladeRF 2.0 Serial
[bladeRF source] bladerf_common::init: Buffers: 128, samples per buffer: 16384, active transfers: 32
[bladeRF source] bladerf_source_c::set_agc_mode: DEBUG: Setting gain mode to 1 (manual)
[bladeRF source] bladerf_source_c::bladerf_source_c: DEBUG: initialization complete
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.3.0
built-in sink types: uhd hackrf bladerf soapy file
[bladeRF common] bladerf_common::init: DEBUG: entering initialization
[bladeRF sink] bladerf_common::init: Opening Nuand bladeRF with device identifier string '*:instance=0'
[bladeRF sink] Device: Nuand bladeRF 2.0 Serial
[bladeRF sink] bladerf_common::init: Buffers: 128, samples per buffer: 16384, active transfers: 32
[bladeRF sink] bladerf_sink_c::bladerf_sink_c: DEBUG: initialization complete
pagesize :error: no info; setting pagesize = 4096
[bladeRF sink] bladerf_sink_c::start: DEBUG: starting sink
[bladeRF source] bladerf_source_c::start: DEBUG: starting source
[bladeRF source] bladerf_source_c::stop: DEBUG: stopping source
[bladeRF sink] bladerf_sink_c::stop: DEBUG: stopping sink
Larisabrownb
Posts: 1
Joined: Tue Oct 03, 2023 1:14 am
Location: United States
Contact:

Re: AGC in GRC always enabled

Post by Larisabrownb »

AGC in GRC always enabled​​ Going through the osmocom source, rf_gain has an effect when I vary it while a flowgraph is running with a slider ... In this paper, Proportional Integral Derivative with Filter (PIDF) is proposed for Automatic Generation Control (AGC) of a multi-area power system in ...
This paper presents the design and analysis of Proportional-Integral-Double love language test Derivative (PIDD) controller for Automatic Generation Control (AGC) of ... I am hoping that this functionality gets exposed in gr-uhd, so that I can toggle AGC on/off using GNU Radio. from GRC. I have checked the flow graph generated and there's no > > set_rx_agc enable option (I checked the c++ definition ...
adelebrown68
Posts: 1
Joined: Thu Feb 15, 2024 9:34 pm

Re: AGC in GRC always enabled

Post by adelebrown68 »

AGC being enabled is better suited for applications when you know a signal exists on the frequency you are tuned to. papa's games
Post Reply