[USRP-users] Problems with setting gain

Sean Nowlan sean.nowlan at gtri.gatech.edu
Tue Apr 9 14:06:07 EDT 2013


Update 2: I enabled UHD logging and attached an excerpt from uhd.log. It 
shows that the gain gets set to 10 dB, as I requested, but then 
something else calls set_tx_gain() immediately after and overwrites it. 
The only thing I can think of is that something happens when 
gr_uhd_usrp_sink::start() gets called, but I can't say what that might 
be. As far as I can tell, fetching the tx_streamer, setting the send 
mode, etc. wouldn't have any affect on the gain setting.

On 04/09/2013 01:15 PM, Sean Nowlan wrote:
> 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.
>>
>> Setup:
>> USRP N200 r4
>> WBX r3
>> UHD
>> 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!
>>
>> --sean
>>
>> _______________________________________________
>> USRP-users mailing list
>> USRP-users at lists.ettus.com
>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


------------------------------

*Sean M. Nowlan*
Research Engineer I
ICL/CNSD
Georgia Tech Research Institute
250 14th St NW, Suite 470
Atlanta, GA 30318

404.407.7952
sean.nowlan at gtri.gatech.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20130409/063040a1/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uhd.log
Type: text/x-log
Size: 2271 bytes
Desc: not available
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20130409/063040a1/attachment.log>


More information about the USRP-users mailing list