discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Is there a gnuradio module that uses a file as a


From: Jonathan Coveney
Subject: Re: [Discuss-gnuradio] Is there a gnuradio module that uses a file as a source?
Date: Fri, 7 Aug 2009 18:12:54 -0400

Oops, it's attached now

2009/8/7 Jonathan Coveney <address@hidden>
So, the program will run, but instead of hearing anything, I just get oX over and over again.
http://gnuradio.org/trac/wiki/UsrpFAQ/Gen#OUuainoutput
It doesn't look like a normal error, and doing a search, I haven't seen it before.

./filesource_fmmod.py
>>> gr_fir_ccf: using SSE
>>> gr_fir_fff: using SSE
oXoXoXoXoXoXoXoXoXoXoXoXoXoX ad infinitum

Anyone know what's up? I'll keep taking a look (and try adding a throttle, for example). One possibility is that I had to manually set adc_rate, so I set it to 64000000 (since it should grab a value of 64MS/s from the usrp, at least according to the comment..and smaller values don't seem to work, so I don't know)

I've attached the changes I made... to make it easy to traverse, I simply commented out existing code with a ##

The code is usrp_wfm_rcv_nogui.py, modified to try and get a file source. If you have any idea what that error means, or maybe where the code goes wrong, your input would be appreciated (incidentally, what does the third value in gr.file_source modify? the boolean)

And a final question, when reading from a source obviously you don't have to tune...but your samples were made over a given bandwidth, no? In my case, I'm using the TVRX, so about 6MHz. if I want to do FM demodulation, do I have to do it over the baseband? Or can I still "tune"? Is it just a matter of shifting the baseband mathematically/

Thanks

PS if I can get this all working easily, would it be instructive to include a basic nogui example that runs based on a file? It seems decidedly nontrivial.


2009/8/7 Johnathan Corgan <address@hidden>

On Fri, Aug 7, 2009 at 12:49, Jonathan Coveney<address@hidden> wrote:

> I can't find one. The _cfile.py files will save samples to a file of my
> specification, but I am trying to test using said samples, and not
> succeeding. If it does not exist, I tried this:
>
>         #self.u = usrp.source_c()                    # usrp is data source
>         self.u = gr.file_source(gr.sizeof_gr_complex, "data.dat", False)
>
> but there are a lot of things that I'm not sure how to manipulate, such as
> the various rates that are usually drawn off the USRP, but in this case
> don't necessarily apply because the samples are coming from a file? Maybe
> they should just be set artificially to sort of trick the computer into
> thinking that the samples ARe coming from a USRP?

You're on the right track--continue to use gr.file_source.  You'll
need to comment out all the lines that try to set frequency, gain,
etc.  You can put them in a Python 'if' block and either run all the
commands for the USRP, or just create the file source.

The data is pulled from the file as fast as the computer can read the
disk.  If you want to play it back at a certain rate in wall clock
time, you can insert a gr.throttle(itemsize, sample_rate) block in the
pipeline.

Johnathan


Attachment: filesource_fmmod.py
Description: Binary data


reply via email to

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