[USRP-users] Problems with setting gain

Sean Nowlan sean.nowlan at gtri.gatech.edu
Tue Apr 9 13:15:35 EDT 2013

Update: upgrading to 3.5.2 (including reflashing firmware and FPGA) did not fix the problem.

Sean Nowlan <sean.nowlan at gtri.gatech.edu> wrote:

>I am having trouble with setting gain consistently on the WBX board. 
>Sometimes it is set correctly as requested. Many times it is set to the 
>minimum gain for WBX (0 dB) and occasionally it is set to the maximum 
>(31 dB).
>I've observed this problem in several of my own applications, but I also 
>observed it using GNU Radio's benchmark_tx. Some examples:
>./benchmark_tx.py -m cpm --excess-bw=3 --non-differential -r 2e5 -M 10 
>-f 1.36e9 --tx-amplitude=0.2 --tx-gain=10
>./benchmark_tx.py -m gmsk --bt=3 --non-differential -r 2e5 -M 10 -f 
>1.36e9 --tx-amplitude=0.2 --tx-gain=10
>./benchmark_tx.py -m bpsk --non-differential -r 2e5 -M 10 -f 1.36e9 
>--tx-amplitude=0.2 --tx-gain=10
>I verified that my GNU Radio application is producing samples with 
>"sane" values, i.e., complex floats with I and Q in [-1.0, 1.0] and with 
>typical values in [-0.2, 0.2]. The problem doesn't go away if I remove 
>IQ & DC calibration files (mv ~/.uhd ~/.uhd_backup). Power cycling the 
>USRP doesn't help.
>My application follows the paradigm of a Python script generated by GRC. 
>In the top block __init__() function I instantiate a uhd_usrp_sink 
>object and set its freq and gain. Then I instantiate other GNU Radio 
>objects and connect them. Finally in the main function I call start() on 
>my top block. I called get_gain() after setting it in __init__() and 
>verified it was set correctly. However in the main function when I call 
>get_gain() again, sometimes the value is changed to 0 or 31. I can force 
>it to behave by setting the gain again, but it concerns me that the 
>value is getting blown away in some cases and I don't know the root cause.
>My next step will be to upgrade to the 3.5.2 release and see if the 
>problem goes away, but I wanted to get this message on the list as soon 
>as I could.
>USRP N200 r4
>WBX r3
>GNU C++ version 4.6.3
>Boost 104800
>UHD 3.5.0 (003.005.000-0-g5cb9779d)
>GNU Radio 3.6.2
>Thanks for your help!
>USRP-users mailing list
>USRP-users at lists.ettus.com

More information about the USRP-users mailing list