discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Sending pre-saved OFDM file to USRP


From: Hoo-chang Shin
Subject: Re: [Discuss-gnuradio] Sending pre-saved OFDM file to USRP
Date: Thu, 17 Apr 2008 08:36:30 -0700 (PDT)

Thank you for your reply, Tom.

With the 'benchmark_ofdm_tx.py' and 'benchmark_ofdm_rx.py', I receive the right 
packets using the command:

$ ./benchmark_ofdm_tx.py -T A -f 2.45G -i 512
$ ./benchmark_ofdm_rx.py -R A -f 2.45G -d 256

But when I send the pre-saved file (which is saved from the 
'benchmark_ofdm_tx.py'), the  'benchmark_ofdm_rx.py' does not detect any packet 
at the receiver side.

Viewing the received signal with usrp_fft.py, I see the same spectrum, as from 
the 'benchmark_ofdm_tx.py' sent spectrum, though.

I send it with the same frequency, with the same interpolation rate, and with 
the same gain value...


----- Original Message ----
From: Tom Rondeau <address@hidden>
To: Hoo-chang Shin <address@hidden>
Cc: address@hidden
Sent: Thursday, April 17, 2008 5:03:14 PM
Subject: Re: [Discuss-gnuradio] Sending pre-saved OFDM file to USRP

Hoo-chang Shin wrote:
> Well, I did it like that, it did not work with connecting the file_source 
> direct to USRP.
> I thought then it might work when I do the 'vector thing' in the middle.
> In either case, the receiver USRP does not detect anything.
>   

Have you tried to run usrp_fft.py at the receiver to make sure you see 
some energy?

Also, have you just tried using benchmark_ofdm_tx.py on one side and 
benchmark_ofdm_rx.py on another?

There are a lot of parameters to tweak. The amplitude is one important 
one (high enough to be seen at the receiver, low enough to avoid 
clipping), and the decim/interp values depend on the speed of your 
processor.

FWIW, just saying the receiver isn't getting anything isn't too useful 
when asking for help with all of the possible issues.

Tom



> ----- Original Message ----
> From: Tom Rondeau <address@hidden>
> To: Hoo-chang Shin <address@hidden>
> Cc: address@hidden
> Sent: Thursday, April 17, 2008 1:48:27 PM
> Subject: Re: [Discuss-gnuradio] Sending pre-saved OFDM file to USRP
>
> Hoo-chang Shin wrote:
>   
>> Hi,
>>
>> I'm trying to send a pre-saved OFDM file to a transmitter USRP, and to 
>> receive the signal from a receiver USRP.
>> >From the 'benchmark_ofdm_tx.py' I've saved the OFDM signal to a file using 
>> >'gr.file_sink', instead of sending it to 'usrp.sink_c'.
>> And then I want to read the data from the saved file and send it though the 
>> transmitter USRP, and receive it from the other USRP, but does not work.
>>
>> Could anyone give tip, why it does not work? Or give help how to make it 
>> work?
>>
>>
>> This is my code:
>>
>> #!/usr/bin/env python
>>
>> from gnuradio import gr
>> from gnuradio import usrp
>>
>> from numpy import *
>>
>> class send_from_file_graph (gr.flow_graph):
>>
>>     def __init__(self):
>>     gr.flow_graph.__init__(self)
>>     
>>     filename = 'tx_usrp_data.dat'
>>     # which I had saved from 'benchmark_ofdm_tx.py' using 
>> 'gr.file_sink(gr.sizeof_gr_complex, filename)'
>>     src = gr.file_source ( gr.sizeof_gr_complex, filename, False)
>>     
>>     self.v_snk = gr.vector_sink_c()
>>     
>>     # setup usrp
>>     self.u = usrp.sink_c(fusb_block_size=0, fusb_nblocks=0)
>>     self.u.set_interp_rate(512)
>>     self._tx_subdev_spec = usrp.pick_tx_subdevice(self.u)
>>     self.subdev = usrp.selected_subdev(self.u, self._tx_subdev_spec)
>>     
>>     self.u.tune(self.subdev._which, self.subdev, 2.45e9)
>>     self.subdev.set_gain(200)
>>     self.subdev.set_auto_tr(True)
>>     # ##
>>     
>>     self.connect(src, self.v_snk)
>>     self.run()
>>     v_src = gr.vector_source_c(self.v_snk.data())
>>     self.connect(v_src, self.u)
>>     self.run()
>>     
>
> Why don't you just do:
>
> self.connect(src, self.u)
>
> Instead of all the vector stuff in the middle?
>
> Tom
>
>   






      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ





reply via email to

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