New to SDR, BladeRF 2.0 xA4 gain question

Discussions related to embedded firmware, driver, and user mode application software development
Post Reply
danKen01
Posts: 1
Joined: Sat Sep 04, 2021 8:05 pm

New to SDR, BladeRF 2.0 xA4 gain question

Post by danKen01 »

Hello all,

I am developing a simple SDR transmission platform for learning purposes using Nuand's BladeRF 2.0 xA4. I have been successful in getting the device to transmit using a boilerplate, but have been confounded by the gain setting.

Using the terminal bladeRF-cli program the software reports (by using the command print tx1 gain) that the device (2.0 xA4) has a gain range of -23.5 to 66. Is this in db? A gain of 66 db seems like it should be consuming a fair amount of power but the maximum output of the device is only 8dbm according to Nuand's datasheet. Am I misunderstanding something fundamental here? Is the device outputting a -58dbm signal (8-66) with 0 gain? Or is the gain range smaller and the bladeRF-cli client is feeding me bad information.

If someone could clear my misunderstanding up or point me to some resources for further reading I would greatly appreciate it.
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

Re: New to SDR, BladeRF 2.0 xA4 gain question

Post by robert.ghilduta »

On the bladeRF 2.0 micro, a TX gain of 66 should correspond to a TX DSA of 0. One thing to check is the magnitude of the IQ samples. The bladeRF 2.0 micro's full scale IQ samples are in a range of [-2048, 2047].
[email protected]
Posts: 6
Joined: Fri May 20, 2022 4:42 pm

Re: New to SDR, BladeRF 2.0 xA4 gain question

Post by [email protected] »

Sorry this is so late but I've recently wondered the same thing about the tx gain. This isn't documented anywhere that I have found, and even in the code there isn't much in the way of comments explaining this. But I've just spent some time tracing through the code and data sheet and here's what I found:
1) The AD9361 doesn't have a variable gain amplifier or adjustable attenuator in the tx channel.
2) The fpga does some baseband processing and applies an adjustable amount of attenuation to the incoming tx data digitally.
3) The attenuation it applies is obtained by subtracting 66 dB from whatever the user inputs as the tx "gain". You can find where this offset is defined in src/bladeRF/fpga_common/include/bladerf2_common.h.
And yes, the units are in dB.
Post Reply