Switch Freq when packet transmitting

Hi:

Lately, I have tried to modify tunnel.py to switch freq in the middle of
packet transmitting. But I have two problems.

  1. When I tried to switch freq in the same daughterboard, should I have
    to stop the original transmission thread(tb.start) and start a new
    thread with new freq? Or are there any way to change the setting without
    stop the original thread?
  2. Also, I wanna switch freq between different daughterboards, e.g.,
    switching between 400MHz and 2.4GHz. How should I do? I first tried to
    assign a string “B” to “options.tx_subdev_spec”, but it turns out not a
    string format. If we don’t assign the value to this options, how could
    we do to switch different daughterboard?

Thanks in advance!
KC

On Mon, Jun 02, 2008 at 10:29:22PM -0400, KC Huang wrote:

Hi:

Lately, I have tried to modify tunnel.py to switch freq in the
middle of packet transmitting. But I have two problems.

  1. When I tried to switch freq in the same daughterboard, should I
    have to stop the original transmission thread(tb.start) and start a
    new thread with new freq? Or are there any way to change the setting
    without stop the original thread?

There’s no need to stop the graph to change the frequency. Just call
the tune method like you do at initialization time.

  1. Also, I wanna switch freq between different daughterboards, e.g.,
    switching between 400MHz and 2.4GHz. How should I do? I first tried
    to assign a string “B” to “options.tx_subdev_spec”, but it turns out
    not a string format. If we don’t assign the value to this options,
    how could we do to switch different daughterboard?

First, be sure you understand what’s really going on and how the Tx
and Rx muxes work. See http://gnuradio.org/trac/wiki/UsrpRfxDiagrams

Also if you haven’t already, it would be good to work through the
python tutorial Our Documentation | Python.org, and look at the rest of the
python docs there as well.

The daughterboard objects (u._db) are instances of subclasses of
db_base.py (gr-usrp/src/db_base.py) To change from one side to the
other on the fly you need to configure the muxes properly.
Documentation on the muxes can be found in
usrp/host/lib/legacy/usrp_standard.h
Search for set_mux. There are two classes that implement set_mux,
usrp_standard_rx and usrp_standard_tx. The arguments are interpretted
differently for each of them.

Eric