[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: Wed, 1 Aug 2007 21:15:32 +0100 (BST)


Thanks very much for your info. i finally got the relay working.. :) ...the basic problem was probably in the selection of the antenna.

But, other things have cropped up. I am transmitting a sine wave from one of the usrp and after the relay ,when i receive it on another 3rd machine at say, 950MHz, thne there is a lot of amplitude variation and i am not able to see a clear sine wave.Moreover, changing the tx_amplitude introduces a lot of variation in the signal. The best sine wave is viewed when i keep its value 1.Increasing its value introduces more signal distortion in the signal. Please tell me what are the values which should be kept for tx_amplitude.

Moreover, I have to work with tx_voice.py and rx_voice.py for transmission and reception of audio files. After relaying, when i try to receive, after a reception of few packets, i get the following 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)

Going through pkt.py and packet_utils.py , and printing out the message length , i have figured out that the above error doent appear whenevr, the msg length has some difference of 33.For eg. it runs perfectly fine if the msg length is 1687 or 1720 (difference of 33). But at the relay node , it arbitrarily goes to some different msg length(different values seen in my case is 1542,1592 etc).There is no problem in reception of signal in the relay because i can see that the packets are demodulated properly by passing the file usrp_data_receive.dat to the demodulator. I do not know how to control this change in the message length in the relay code. So, could you please tell me how to resolve this issue.

Pratik Hetamsaria

Eric Blossom <address@hidden> wrote:
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

Get the freedom to save as many mails as you wish. Click here to know how.
reply via email to

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