USRP network based spectrum analyzer

I have a usrp and computer in a remote location without much network
bandwidth available to the system and I’m using it as a spectrum
analyzer.
I’d like to run the fft on the remote system and then send the results
to a
connected client for display. This would allow me to get greater
fidelity
than xwindows forwarding or the ascii dft example while also using less
bandwidth. I would imagine the client side would potentially reuse some
of
the existing wx or qt interfaces for display and control.

This seems like a pretty useful / simple use of this hardware. Does
anybody
know of any implementations floating around that does this? I’d prefer
not
to reinvent the wheel.

-Phelps

On 28/09/2011 4:50 PM, Phelps W. wrote:

anybody know of any implementations floating around that does this?
I’d prefer not to reinvent the wheel.

-Phelps

You could use a GRC-based flow-graph that computes the FFT, and outputs
the results to a FIFO, and have a small C program that simply puts
“snapshots” in an appropriate place. Once it’s in an “appropriate
place” (and perhaps in a form that you like), you could use a web server
to observe the results. Roughly 1e6 ways of skinning this particular
cat.

On 28/09/2011 4:50 PM, Phelps W. wrote:

anybody know of any implementations floating around that does this?
I’d prefer not to reinvent the wheel.

-Phelps

Because I’m such an insanely nice guy, I quickly implemented something
like what you’d need. Attached.

It uses a UHD source, computes a (default 2048-point) 10*log10-scaled
FFT, then outputs the resulting float-vector to a file-sink at a 5Hz
rate.

Everything is pretty-much parameterized on the command line, including:

  frequency         (100M)
  gain                   (20)
  srate                 (1.0e6)
  fifoname          ("fft_output_fifo")
  devicecfg         ("addr=192.168.10.2")
  xmlport            (6060)

I’ve included the ability to change parameters on-the-fly using the
XMLRPC server, which would allow you to, for example, change
run-time parameters from some external interface, such as a WEB gui
or similar.

If this were my problem, I’d start this thing in a script which creates
the fifo file, starts some program that reads the FIFO (left as an
exercise for the proverbial reader) in the background, then calls the
Gnu Radio program.

On 9/28/11 4:54 PM, Marcus D. Leech wrote:

This seems like a pretty useful / simple use of this hardware. Does
cat.
Why not just use VNC? Its generally much lower bandwidth than X
forwarding.

@(^.^)@ Ed

On 29/09/2011 11:02 AM, Ed Criscuolo wrote:

Why not just use VNC? It’s generally much lower bandwidth than X
forwarding.

That hasn’t been my experience at all.

And it’s reasonable to want a “remote sniffer” type of situation that
you could reasonably access via the web or similar.

Thanks Marcus!

I took your idea and ran with it but encountered a funny issue. I’m
slightly confused about the output of the logpwrfft (which is giving
me the output of gr_fft_vcc). I’ve been assuming that logpwrfft
returns a vector of amplitudes in dB for each fft bin. Lets say my
fft size is 1024, I’m assuming vector index 0 is the lowest frequency
and vector index 1023 is the maximum frequency. In plotting these
values it appears to be something different.
It goes from DC-bandwidth/2, then -bandwidth/2 to DC–standard form of
the underlying FFTW library.

hi!
i was wondering if i could use an usrp n210 as a spectrum analyzer? I
need it to show a distinct rise in power levels when mobile phones
receive or transmit in its vicinity.
Thank You
Ranita.b

Thanks Marcus!

I took your idea and ran with it but encountered a funny issue. I’m
slightly confused about the output of the logpwrfft (which is giving me
the
output of gr_fft_vcc). I’ve been assuming that logpwrfft returns a
vector
of amplitudes in dB for each fft bin. Lets say my fft size is 1024, I’m
assuming vector index 0 is the lowest frequency and vector index 1023 is
the
maximum frequency. In plotting these values it appears to be something
different.

I can only guess vector index 0 is the center frequency, index 511 is
the
max frequency and index 512 is the min frequency. Digging around
gr_fft_vcc
and I didn’t see an obvious answer. Any insight into what the fft is
doing
here? Thanks!

-Phelps