Help Req: usrp_sink

hi,
If i want to send data to side A of usrp and in it TX/RX side whats the
proper syntax for it.

Regards,
Nadia

On Thu, Jan 07, 2010 at 06:19:33PM +0000, nadia raj wrote:

hi,

If i want to send data to side A of usrp and in it TX/RX side whats the proper syntax for it.

Regards,
Nadia

Nadia,

Pretty much every transmitter example implements this…
The standard way to specify which transmit daughterboard is the
-T option, like this:

-T a

Likewise the receive daughterboard can be specified with

-R a

See for example, gnuradio-examples/python/usrp/fm_tx4.py, in
particular this part:

    # 

    # Set up constants and parameters

    self.u = usrp.sink_c ()       # the USRP sink (consumes samples)

    self.dac_rate = self.u.dac_rate()                    # 128 MS/s
    self.usrp_interp = 400
    self.u.set_interp_rate(self.usrp_interp)
    self.usrp_rate = self.dac_rate / self.usrp_interp    # 320 kS/s
    self.sw_interp = 10
    self.audio_rate = self.usrp_rate / self.sw_interp    # 32 kS/s

    # determine the daughterboard subdevice we're using
    if options.tx_subdev_spec is None:
        options.tx_subdev_spec = usrp.pick_tx_subdevice(self.u)

    m = usrp.determine_tx_mux_value(self.u, options.tx_subdev_spec)
    #print "mux = %#04x" % (m,)
    self.u.set_mux(m)
    self.subdev = usrp.selected_subdev(self.u, 

options.tx_subdev_spec)
print “Using TX d’board %s” % (self.subdev.side_and_name(),)

    self.subdev.set_gain(self.subdev.gain_range()[1])    # set max 

Tx gain
if not self.set_freq(options.freq):
freq_range = self.subdev.freq_range()
print “Failed to set frequency to %s. Daughterboard
supports %s to %s” % (
eng_notation.num_to_str(options.freq),
eng_notation.num_to_str(freq_range[0]),
eng_notation.num_to_str(freq_range[1]))
raise SystemExit
self.subdev.set_enable(True) # enable
transmitter

Also, to see the entire USRP interface, take a look at:

http://gnuradio.org/doc/doxygen/classusrp__standard__tx.html
http://gnuradio.org/doc/doxygen/classusrp__basic__tx.html

Although they are talking about C++, the mapping to Python is straight
forward.

If you haven’t already, the USRP FAQ will probably be helpful too:

http://gnuradio.org/redmine/wiki/gnuradio/UsrpFAQ

and/or the PDF version:

http://gnuradio.org/redmine/attachments/129/USRP_Documentation.pdf

Eric