discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] What is the simplest way to get data to/from the


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] What is the simplest way to get data to/from the USRP
Date: Wed, 20 Sep 2006 22:15:32 -0700
User-agent: Mutt/1.5.9i

On Wed, Sep 20, 2006 at 06:31:54PM -0600, Bahn William L Civ USAFA/DFCS wrote:
> Assuming that I am ever able to actually establish communications with
> the USRP, what is the simplest way to get raw data to/from the USRP?
> 
> I have been told by several people (none of whom, as far as I know, have
> actually played with SDR) that the basic idea behind SDR is that the
> software receiver receives a time-domain stream of waveform data from
> the hardware receiver, does whatever it wants with it, and then the
> software transmitter generates a time-domain stream of waveform data
> that it send to the hardware transmitter.
> 
> 
> Assuming that this is the case, then what I would like to do sounds
> perfectly suited to that process. I would like to capture a stream of
> values that represent the successive samples from the receiver's A2D,
> process them in a C program, and send out a stream of values that
> represent the success samples that I want the transmitter's DAC to
> generate. No bells or whistles. I am completely unconcerned about data
> rate at this point - if it's 1 Hz I will be happy (for now). 

If you haven't already, I suggest starting with "Exploring GNU Radio"
http://www.gnu.org/software/gnuradio/doc/exploring-gnuradio.html


> I am envisioning something really, really simple. Initially it can even
> be a brute force polled system that operates along the lines of the
> following:

If you want to capture data from the front end and put it into a file,
the easiest way is to use gnuradio-examples/python/usrp/usrp_rx_cfile.py


> I have two memory buffers, one for input from the receiver and one for
> output to the transmitter.

You're trying to operate at a _much_ lower level of abstraction than
we usually work...

If want to work at that low level, you could consider using
the C++ interface to the USRP (same one that GNU Radio uses internally).

See usrp/host/lib/usrp_standard.h and usrp_basic.h for the interface.
Note however, that if you work at this level, you lose the advantage of
all of the (python) code that knows how to talk transparently to the
11 kinds of RF daughterboards that are supported.  I wouldn't
recommend this path.  I'm including it for completeness.  The basic
i/o methods are called read and write.

> I would like/hope/pray that there is some kind of construct that allows
> me to see if the USRP receiver has data for me and also whether the USRP
> transmitter can accept data from me. 

It just streams data to and from you. Fundamentally GNU Radio is a
data flow architecture.  

For something somewhat similar to what you're trying to do, take a
look at gnuradio-examples/python/audio/spectrum_inversion.py 
It uses an audio card for i/o, but the same idea applies to the USRP.

Spend some time with "Exploring GNU Radio" and take a look at
gnuradio-examples/python/usrp/usrp_wfm_rcv_nogui.py for one of the
simplest programs that actually does something interesting.  It's a
wideband FM receiver.


If you're looking for something that moves packets of data across the
air, take a look at gnuradio-examples/python/gmsk2/tunnel.py.  Among
other tricks, it can send IP packets between machines using the USRP.


> For what I am eventually planning to do, this is the equivalent of
> Hello World.

If you tell us what you're really trying to do, someone may be
able to suggest a suitable approach.

> Thanks,
>
> Bill

Eric




reply via email to

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