USRP2 TX Gain


#1

Hi All,

I have a question. In the USRP2 “tx_samples.cc”, the tx gain is not
set. Can the USRP2 set the tx gain? If can, what is the tx gain range?
I would appreciated it if anybody can answer my question.

Regards,
Yabo


#2

On Sun, Dec 21, 2008 at 12:19:00AM -0800, Yabo Li wrote:

Hi All,

I have a question. In the USRP2 “tx_samples.cc”, the tx gain is not
set. Can the USRP2 set the tx gain? If can, what is the tx gain range?
I would appreciated it if anybody can answer my question.

Regards,
Yabo

Scale your samples before transmitting.
Samples must be in the range -1.0 to +1.0.

Eric


#3

Hi Eric,

Thanks. So the USRP2 can not adjust hardware gain, right? But I found
that the “set_tx_gain” is provided in the lib. Doesn’t it work or not?

Yabo


#4

On Sun, Dec 21, 2008 at 09:09:53AM -0800, Yabo Li wrote:

Hi Eric,

Thanks. So the USRP2 can not adjust hardware gain, right? But I found
that the “set_tx_gain” is provided in the lib. Doesn’t it work or not?

Yabo

/*!
 * Set transmitter gain
 */
bool set_tx_gain(double gain);

//! return minimum Tx gain
double tx_gain_min();

//! return maximum Tx gain
double tx_gain_max();

//! return Tx gain db_per_step
double tx_gain_db_per_step();

It may be possible for a daughterboard to provide transmit gain
adjustment. IIRC, at this time none of them do. In any event,
tx_gain_min() and tx_gain_max() will return sensible answers.
If tx_gain_min() and tx_gain_max() return the same value, then
there’s only a single valid value that you can pass to set_tx_gain.

Eric