[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Tx/Rx using one USRP board

From: pratik hetamsaria
Subject: Re: [Discuss-gnuradio] Tx/Rx using one USRP board
Date: Thu, 2 Aug 2007 22:24:47 +0100 (BST)


I am facing a few problems in making USRP work as relay.

I use rx_voice.py and tx_voice.py for reception and transmission of audio files.If i transmit at 910MHz and relay it at 950MHz then after relaying , very few packets are received on another node. Infact, most of the packets are not received.

What i know is that the usrp is working as a relay to some extent because if i transmit a sine wave using usrp_siggen.py and see the wave after relaying then i do observe the sine wave. But, the sine wave has a lot of variation. i.e it is continuously changing its amplitude .I observed it to change from 2500-15000 on oscope. The original wave was at a perfect amplitude of ard 15000. Now, is the problem in reception of packets coming because of this kind of variation?? Or is it that the USB is playing the limiting factor role. The data rates used in audio transmission is

Bitrate- 50,000
Samples per symbol = 5

Also, Even if i receive a few packets then, i get the error message

terminate called after throwing an instance of 'std::runtime_error'
 what():  msg length is not a multiple of d_itemsize
Aborted (core dumped)

Please tell me how to handle the above problems.

Pratik Hetamsaria

On Wed, Aug 01, 2007 at 05:52:56AM +0100, pratik hetamsaria wrote:
> hi,

> I am posting this again as i havent got any concrete replies.I have
> been stuck making the usrp work as a relay for a very long time. I
> am giving the code which i am using for making it work as a
> relay. Can somebody please point out where is the mistake. I am
> trying to receive a signal sent by usrp_siggen.py at 910MHz and
> retransmit it at 950MHz. However, when i view the signal at 950MHz
> using usrp_oscope.py then i am able to see only noise. There is no
> sine wave present at that frequency. I am not able to understand
> what is the usrp transmitting at 950 MHz then. What i know is that
> the usrp does receive the sine wave at 910MHz.

Are you using one or two daughterboards?

What kind of daughterboard(s)?

Is your rx-subdev-spec the same as tx-subdev-spec?

Checking to see if r is None is highly recommended.

If you're using a RFX-900 for TX, is the saw filter still in?
(It comes with a 902 to 928 MHz ISM band filter.)

Does the data in usrp_data_receive.dat look reasonable?
What are the min and max values that you see?

What's your tx-amplitude?

Depending on the tx daughterboard, you may need


If you're trying to use a single RFX-* daughterboard, you'll need to
set the RX to receive from the RX2 antenna port, not the TX/RX port:



> PLease point out where is the mistake in my code.
> Thanks
> Pratik Hetamsaria
> _________________________________________________________________
> class my_graph(gr.flow_graph):
> def __init__(self):
> gr.flow_graph.__init_ _(self)
> parser = OptionParser(option_class=eng_option)
> parser.add_option("-R", "--rx-subdev-spec", type="subdev",
> default=None)
> parser.add_option("-d", "--decim", type="int", default=256)
> parser.add_option("-f", "--freq", type="eng_float", default=910e6)
> parser.add_option("-g", "--gain", type="eng_float", default=45)
> parser.add_option("-T", "--tx-subdev-spec", type="subdev",
> default=None)
> parser.add_option("-a", "--tx-amplitude", type="eng_float",
> default=32000)
> parser.add_option("-q", "--tx-freq", type="eng_float", default=950e6)
> parser.add_option("-i", "--interp", type="intx", default=512)
> (options, args) = parser.parse_args()
> rx_src = usrp.source_c (0, options.decim)
> rx_subdev_spec = (0,0)
> rx_src.set_mux(usrp.determine_rx_mux_value(rx_src, rx_subdev_spec))
> subdev = usrp.selected_subdev(rx_src, rx_subdev_spec)
> r = rx_src.tune(0, subdev, options.freq)
> self._tx_amplitude = options.tx_amplitude
> self.amp = gr.multiply_const_cc(0)
> dst = usrp.sink_c(0, options.interp)
> if options.tx_subdev_spec is None:
> tx_subdev_spec = usrp.pick_tx_subdevice(dst)
> dst.set_mux(usrp.determine_tx_mux_value (dst, tx_subdev_spec))
> subdev = usrp.selected_subdev(dst, tx_subdev_spec)
> r = dst.tune(subdev._which, subdev, options.tx_freq )
> filename = "/home/polytech/Desktop/usrp_data_receive.dat"
> destination = gr.file_sink(gr.sizeof_gr_complex, filename)
> self.connect(rx_src, destination)
> self.connect(rx_src, self.amp, dst)
> if __name__ == '__main__':
> try:
> my_graph().run()
> except KeyboardInterrupt:
> pass

5, 50, 500, 5000. Store N number of mails in your inbox. Click here.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]