Thanks for the reply Eric, here is what I have now:

#!/usr/bin/env python

from gnuradio import gr, gru, window

from gnuradio import usrp

from gnuradio.wxgui import stdgui, fftsink, scopesink

import wx

class topBlock(gr.top_block):

Â Â Â def **init**(self):

Â Â Â Â Â Â gr.top_block.**init**(self)

Â Â Â Â Â Â fftsize = 256

Â Â Â Â Â Â udecim = 256

Â Â Â Â Â Â mywin = window.blackmanharris(fftsize)

Â Â Â Â Â Â fft = gr.fft_vcc(fftsize, True, mywin)

Â Â Â Â Â Â signal = usrp.source_c(0,udecim)Â Â Â # signal from Basic RX,

decimation=256

Â Â Â Â Â Â ss2v = gr.stream_to_vector(gr.sizeof_gr_complex, fftsize)

Â Â Â Â Â Â v2ss = gr.vector_to_stream(gr.sizeof_gr_complex, fftsize)

Â Â Â Â Â Â f_sink = gr.file_sink(gr.sizeof_gr_complex,“output.dat”)

Â Â Â Â Â Â self.connect(signal, ss2v, fft, v2ss, f_sink)

Â Â Â Â Â Â # Do stuff with fsink.data()

Â Â Â Â Â Â

def main():

Â Â Â print “Initilizing…”

Â Â Â tb = topBlock()

Â Â Â print “Flowgraph start…”

Â Â Â tb.start()

Â Â Â print “Exiting…”

if **name** == “**main**”:

Â Â Â main()

But the output.dat file is empty. What I want to do here is to calculate

the fft of a bunch of samples and from there to extract the bin with the

maximum value in order to be able later to “follow” that signal in a

aprox 200 Hz bandwidth

Adrian

You need to insert a gr.stream_to_vector block between the usrp and

the fft.Â Also, using vector_sink_c is not recommended for anything

but QA code that runs with a small number of samples.Â If used like

you are trying to use it, it will consume all of the memory on your

system.Â Use a gr.file_sink instead.

Eric