USRP in TDD mode

Hello.
I’m trying to build a two-way TDD system with two USRP1 boxes in pure
C++
using libusrp and inband_2rxhb_2tx.rbf firmware.

Now I have working system where one USRP1 box transmits data and other
box
receives.
I try to make the second box transmit data after it received certain
frames.
The issue is that when I try to enable transmitter on the second box the
receive signal level significantly decreases. Typically received samples
are
in range [-15000; 15000], after enabling transmitter they are in range
[-1000; 1000].

Does anyone have a clue of what I’m doing wrong?

Thanks.

The code I’m using:

    std::string rbf_fname = "inband_2rxhb_2tx.rbf";

    m_uTx = usrp_standard_tx::make(m_usrpNumber,
                   (unsigned int)m_interpolationRate,
                   1,
                   -1,
                   4096,
                   4096,
                   rbf_fname);

    if (!m_uTx.get())
    throw std::runtime_error("Couldn't create TX");

    usrp_subdev_spec tx_spec(0, 0);
    unsigned int tx_mux = m_uTx->determine_tx_mux_value(tx_spec);
    m_uTx->set_mux(tx_mux);

    db_base_sptr tx_subdev = m_uTx->selected_subdev(tx_spec);

    m_txGain = tx_subdev->gain_max();
    tx_subdev->set_gain(m_txGain);

    if (!m_uTx->tune(tx_subdev->which(), tx_subdev, g_tuneFrequency,

&m_txTuneResult))
throw std::runtime_error(“TX tune failed\n”);

    tx_subdev->set_enable(true);

    // Enable RX
    m_uRx = usrp_standard_rx::make(m_usrpNumber,
                   (unsigned int)m_decimationRate,
                   1,
                   -1,
                   usrp_standard_rx::FPGA_MODE_NORMAL,
                   4096,
                   4096,
                   rbf_fname);

    if (!m_uRx.get())
    throw std::runtime_error("Couldn't create RX");

    // Select dautherboard
    usrp_subdev_spec rx_spec(0, 0);

    unsigned int rx_mux = m_uRx->determine_rx_mux_value(rx_spec);
    m_uRx->set_mux(rx_mux);
    m_rxGain = 60.0;

    db_base_sptr rx_subdev = m_uRx->selected_subdev(rx_spec);

    rx_subdev->set_gain(m_rxGain);

    if(!m_uRx->tune(rx_subdev->which(), rx_subdev, g_tuneFrequency,

&m_rxTuneResult))
throw std::runtime_error(“RX tune failed\n”);

    rx_subdev->set_enable(true);

On Tuesday 22 September 2009 19:47:10 Andrey A wrote:

Hello.
I’m trying to build a two-way TDD system with two USRP1 boxes in pure C++
using libusrp and inband_2rxhb_2tx.rbf firmware.

IIRC the ib firmware has a bug not switching the antennaes correctly.
Workaround: set RX antennae to RX2 and connect an antenna to each port.

Stefan


Stefan Brüns / Bergstraße 21 / 52062 Aachen
phone: +49 241 53809034 mobile: +49 151 50412019

Hello.
I tried connecting antenna to RX2 and signal strength increased.
I use std_2rxhb_2tx.rbf with RFX2400 DB.
Am I correct assuming that if only RX is enabled then RX/TX antenna is
used
and if with TX and RX are both enabled TX samples go to TX/RX antenna,
and
RX samples go thru RX2 ?

If previous assumption is right, how to make TX and RX samples to thru
the
same antenna?

Thanks.

Stefan,
Thanks for reply. I tried std_2rxhb_2tx.rbf firmware from gnuradio 3.2.2
and
results are the same. Without enabling transmitter at the receiver the
received signal range is [-15e3; +15e3], and after enabling transmitter
it
became [-2400; +2400].
The workaround you mentioned is not applicable in my situation, since I
need
to receive and transmit from the same antenna.

I’m not sure if I enable receiver and transmitter simultaneously in the
right way.

Thanks.

On Tue, Sep 22, 2009 at 9:55 PM, Stefan Brüns

Hi.
I finally figured it out.
To automatically switch between TX and RX paths it’s needed to call

subdev->select_rx_antenna(“TX/RX”);
subdev->set_auto_tr(true);

Hello Andrea,

It would be great if you can share a little more information. Which code
you have used and how you resolved the issue.

Thanks