Problem setting transmit gain values

Hi,

I tried out a simple script to get the gain range of the USRP (I had
read in earlier mail archive
that we were provided a single gain knob to tune over the entire range
of 0 to 90 dB):


from gnuradio import gr, usrp
u = usrp.sink_c(0)
subdev = usrp.selected_subdev(u, (0,0)) #I use an RFX 2400
subdev.gain_range()

I get the following (0.0, 0.0, 1.0). This doesn’t make sense. I even
actually tried setting the gain
to subdev.gain_range()[1]/subdev.gain_range()[0], but was still
transmitting at a constant power
level of around 11-12 dBm. Could someone please help me out with this.
Thanks in advance.

Regards,
Kshitij

Kshitij Kumar S. wrote:

Hi,

I tried out a simple script to get the gain range of the USRP (I had read in earlier mail archive
that we were provided a single gain knob to tune over the entire range of 0 to 90 dB):

There is no gain control on transmit with the RFX boards. There is 90dB
of gain range on the RECEIVE side.

To change transmit power, you need to lower the level of the signal you
send. So +/-32767 is max power, +/-16383 is 6dB less power, +/-8192 is
12 dB less power, etc.

Matt

On Thu, 2008-01-31 at 11:33 -0800, Matt E. wrote:

To change transmit power, you need to lower the level of the signal you
send. So +/-32767 is max power, +/-16383 is 6dB less power, +/-8192 is
12 dB less power, etc.

Matt
Thanks Matt … I was just trying out things by myself after reading
usrp_siggen.py and got had these few doubts.
I had another question regarding the ‘u.tune()’ method. Let me explain
my problem. I tried generating a sinusoid at 2.39G. I got a DUC
frequency of -43M. The tuning results were: Baseband: 2.396G, DUC freq =
-6M. I understand that since we use an IF, our LO on the RFX board was
tuned to 2.396G ( goes from 2.3 to 2.7G in steps of 4M), the IF came in
at around 6M so we got 2.396+0.006 and 2.396-0.006 and chose the latter.
Is this correct? But what about the -43M from usrp.calc_dxc_freq() ?
I also tried transmitting at 2.396+6= 2.402G but then the tuning results
were:
Baseband:2.408,DUC=-6M. Why always a negative DUC freq(why not 2.396
+0.006)?
Could you please explain this “tuning is a two step process” using a
small numerical example? Thanks in advance and sorry for bugging you
guys constantly. I tried reading usrp.py but got confused.

Regards,
Kshitij