Hi,
I am trying to write my own application in C language that will
communicate
with the USRP device. I am able to communicate with the USB port but I
don’t
know what sequence of commands the USRP device will understand to work.
Does
any one have any documentation on how to make it work? And is there any
way
that I can use gnuradio’s usb code in my application?
Regards
Adnan
Hi,
I am trying to write my own application in C language that will
communicate with the USRP device. I am able to communicate with the
USB port but I don’t know what sequence of commands the USRP device
will understand to work. Does any one have any documentation on how to
make it work? And is there any way that I can use gnuradio’s usb code
in my application?
Hi Adnan,
There is documentation about how to use a USRP- object in the doxygen-
generated api- pages at
http://gnuradio.org/doc/doxygen/index.html
I haven’t found that much code that is c+± specific in the usrp-
objects, although I saw a note some time ago
about the possibility to template the usrp2- data handler.
In any case you should look into the usrp_{source | sink}_x classes.
There is a lack of c/c++ examples in the gnuradio source- tree, but the
swig- mapping of functions from c++ to python is straight forward. You
should be able to look at how USRPs are set up in Python and do almost
the same thing in c/c++.
BR
Mattias K.
On Sun, May 16, 2010 at 01:06:23AM +0500, Adnan Yaqoob wrote:
Hi,
I am trying to write my own application in C language that will communicate
with the USRP device. I am able to communicate with the USB port but I don’t
know what sequence of commands the USRP device will understand to work. Does
any one have any documentation on how to make it work? And is there any way
that I can use gnuradio’s usb code in my application?
Regards
Adnan
If you search the archives from the last year, you’ll find a
discussion involving a similar effort, along with suggestions from me
and others.
Summary: Instead of trying to rewrite from scratch, consider building a
thin wrapper on top of the existing USRP interface that is callable
from C. This wrapper could be coded in C++, but with a C callable
interface.
Eric