Forum: GNU Radio USRP2 TX Gain

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Yabo Li (Guest)
on 2008-12-21 10:19
(Received via mailing list)
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
Eric B. (Guest)
on 2008-12-21 17:30
(Received via mailing list)
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
Yabo Li (Guest)
on 2008-12-21 19:10
(Received via mailing list)
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
Eric B. (Guest)
on 2008-12-21 19:44
(Received via mailing list)
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
This topic is locked and can not be replied to.