GNU Radio flow graph for Spectrum sensing

Hi guys,

I’m trying to configure a spectrum analyzer with GNU Radio and I had a
problems. I tried a lot of ways to do it but all of them failed.

More specifically, I need to get information about the FFT and store it.

I tried the following:

  • I get data from the block RTL2832 and store it: this is generates a
    big file data end a can’t open. In a file of a few seconds of storage
    (50Mb) I can’t recognize the power values.

  • I try to store and after open it on a editor, but not work.

I think that there is any problem in the format of the data stored. Can
help? Anyone already can do it?

How are you generating those files?

Hi Martin,

I am generating by the following flowgraph:

RTL2832 source → FFT → File Sink

I tried too:

RTL2832 → File Sink

Is it right?

2014-08-13 9:00 GMT-03:00 Martin B. [email protected]:

Hi Rodrigo,
both is right, due to Parseval’s Theorem stating that energy of a
signal in time and frequency domain is equivalent.

Regarding “File is large”: of course it is; I don’t know what sampling
rate you’re using, but assume you have 1MS/s of complex float, that will
232bit10^6/s = 8MB/s of data.

Regarding “it cannot be opened”: Opened by what? Maybe you’re not aware


Hi Rodrigo (once again),

one of the wise elders reminded me that in the FFT, power is but
proportional to the input power in time domain, due to a factor of
fft_length occuring when forward-backward transforming.


Hi Marcus,

Thanks for your reply. Now I understand the size of the file :D.
I really used 1MS/s for sample rate.

Folowing what you said, I take directly form the source. I tried as you
see in the attachment (before I will save the values in the file).

With the filter FIR and looking for FFT, the values of the power seen

Is there other implementation to get the value of the power?

2014-08-14 9:56 GMT-03:00 Marcus Müller [email protected]: