[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: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Tx/Rx using one USRP board |
Date: |
Tue, 31 Jul 2007 22:26:01 -0700 |
User-agent: |
Mutt/1.5.9i |
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
dst.set_enable(True)
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:
rx_src.select_rx_antenna('RX2')
Eric
> 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)
self.amp.set_k(self._tx_amplitude)
>
> 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