How UHD, GNURadio and USRP are bound together

Hi,

I read some documentation about USRP, UHD and GNURadio, but something
is
missing, an explanation of how they are bound together. Maybe the
biggest
problem is that I want to use it on Windows, maybe on Linux it would be
much
easyer. For not heaving to give me somelong answers (only yes or no,a
link or
maybe a few words if it’s possible)I will ask few questions to see if I
understood how does it work. I want to tell all af you that I don’t need
anybody
to make my project (a research project) I only need a little help to
start it,
how to use these tools. Maybe these questions will bring some new
informations
to newbies like me. AsI saw everything is made (firmwares - FPGA, FX2,
GNURadio, now UHD - many peoples hard work), the only thing is needed is
a good
overall documentation on how to use these together.

  1. I have to install UHD, GNURadio and UHD WinUSB driver. It says that I
    have to
    compile them, but I received from mr. Josh B. these files
    Josh Knows | Error! Page probably not found(compiled UHD,
    GNURadio-Core,
    gnuradio-uhd, gnuradio-qtgui, and dependencies like Boost, cppunit,
    libfftw),
    very helpfull, thank you very much. What other dependencies do I have to
    install. I didn’t found anywhere a list, what is needed and why.

  2. I will have to give the PATHs, (which ones?. The first time I
    installed
    GNURadio I had many problems with those PATHs and this is why I couldn’t
    use my
    USRP1, couldn’t try examples.

  3. If I will use the UHD it means that I will have to program the FPGA
    firmware
    with the help of the UHD functions? It is correct?Igot the rbf files for
    the
    USRP1 and firmware for FX2 USB tranceiver. I found them here
    https://github.com/EttusResearch/UHD-Mirror/archives/master. Where
    should I copy
    them, where will the UHD look for it or I will have to give the path to
    the rbf
    files. The same question for the FX2 firmware, it’s possible to change
    the
    program from the 8051 microcontroller in te same manner, with some
    functions fro
    UHD?

  4. With the help of the UHD is made the data transfer, readsamples from
    FPGA
    and set parameters (frequency and others). If I’m using MSVC I will be
    able to
    connect through the UHD to the USRP and read samples. If I have those
    samples, I
    have to do something to get out data from them so I will have to use
    some
    functions from gnuradio-core.dll (I checked functions exported fom this
    dll, and
    there are many interesting things - fir filers, fft filters).Is
    itcorrect?

  5. So if I will make an interface in MSVC and I’ll connect through the
    UHD to
    USRP, I could start to receive samples after I would set the required
    parameters
    for the FPGA (which type of board - WBX, frequency, decimation and so
    on). I
    will use this USRP1 only to transfer real time data at a very low data
    rate, I
    would be happy to transfer a package of data containing 3 bytes.

As I mentioned before I don’t need anybody to make my project (to answer
my
questions all day long), I know how to make it butthe problem is to get
basic
data how to use these software and hardware tool together, to see the
right
direction, how to use this tool (meaning what to install, where and
why).

Thank you very much.

Best regards,
Florian E…

On 02/19/2011 03:17 AM, Florian E. wrote:

to newbies like me. As I saw everything is made (firmwares - FPGA, FX2,
GNURadio, now UHD - many peoples hard work), the only thing is needed is a good
overall documentation on how to use these together.

USRP is hardware
UHD is hardware driver
GNURADIO is a signal processing library and more

  1. I have to install UHD, GNURadio and UHD WinUSB driver. It says that I have to
    compile them, but I received from mr. Josh B. these files
    Josh Knows | Error! Page probably not found (compiled UHD, GNURadio-Core,
    gnuradio-uhd, gnuradio-qtgui, and dependencies like Boost, cppunit, libfftw),
    very helpfull, thank you very much. What other dependencies do I have to
    install. I didn’t found anywhere a list, what is needed and why.

I am working on the documentation and collecting install files for other
dependencies. It was a rush because you asked. I would like to update
the files, but it seems my server is unreachable ATM…

  1. I will have to give the PATHs, (which ones?. The first time I installed
    GNURadio I had many problems with those PATHs and this is why I couldn’t use my
    USRP1, couldn’t try examples.

The %PATH% variable needs to contain paths to installed DLL files. The
installer does not do this automatically. So c:/program files/uhd/lib
c:/program files/gnuradio/lib etc

  1. If I will use the UHD it means that I will have to program the FPGA firmware
    with the help of the UHD functions? It is correct? I got the rbf files for the
    USRP1 and firmware for FX2 USB tranceiver. I found them here
    https://github.com/EttusResearch/UHD-Mirror/archives/master. Where should I copy
    them, where will the UHD look for it or I will have to give the path to the rbf
    files. The same question for the FX2 firmware, it’s possible to change the
    program from the 8051 microcontroller in te same manner, with some functions fro
    UHD?

UHD knows how to load images into the USRP1, so you just need to install
the images package and uhd takes care of the rest.

Images can be downloaded here http://www.ettus.com/downloads/uhd_images/

And some documentation:
http://www.ettus.com/uhd_docs/manual/html/images.html

  1. With the help of the UHD is made the data transfer, read samples from FPGA
    and set parameters (frequency and others). If I’m using MSVC I will be able to
    connect through the UHD to the USRP and read samples. If I have those samples, I
    have to do something to get out data from them so I will have to use some
    functions from gnuradio-core.dll (I checked functions exported fom this dll, and
    there are many interesting things - fir filers, fft filters). Is it correct?

Yes, I think it will be simpler to get started by learning about how to
make flow graphs in gnuradio with python.

You may also try python.exe c:/program
files/gnuradio/bin/gnuradio-companion

http://i.imgur.com/dU99P.png

  1. So if I will make an interface in MSVC and I’ll connect through the UHD to
    USRP, I could start to receive samples after I would set the required parameters
    for the FPGA (which type of board - WBX, frequency, decimation and so on). I
    will use this USRP1 only to transfer real time data at a very low data rate, I
    would be happy to transfer a package of data containing 3 bytes.

Unless you are building a C++ app, you dont need MSVC, you can make
great gnuradio apps in python.

-josh

Hi mr. Josh,

USRP is hardware
UHD is hardware driver
GNURADIO a signal processing library and more

Yes, I know that USRP is hardware, UHD is hardware driver and that
GNURADIO is a signal processing library.

I am working on the documentation and collecting install files for other
dependencies. It was a rush because you asked. I would like to update
the files, but it seems my server is unreachable ATM…

Thank you very much.

The %PATH% variable needs to contain paths to installed DLL files. The
installer does not do this automatically. So c:/program files/uhd/lib
c:/program files/gnuradio/lib etc

I installed everything provided by you here
http://www.ettus.com/downloads/gnuradio/.

Regarding the %PATH%, I have provided the:
e:\CodeCenter\Environment\gnuradio\lib
e:\CodeCenter\Environment\UHD\lib
e:\CodeCenter\Environment\gnuradio_deps\lib
I installed Python 2.7 and all other packages provided by you like
numpy
and others here e:\CodeCenter\Environment\Python27\Lib\site-packages.

After providing the PATHs I connected the USRP1 and I thought that it
might work, and I tried the
e:\CodeCenter\Environment\UHD\bin\uhd_find_devices.exe, but nothing.
Theoretically it should work, NO? Or maybe I don’t have all the
information I
should know to make it start. I installed Qt as well, and it’s looking
quite
nice.

UHD knows how to load images into the USRP1, so you just need to install
the images package and uhd takes care of the rest.

Image folder path has to be specified in the %PATH% to be found by UHD.
In
the documentation it says that “Search compiled-in paths and environment
variable pathsfor a specific image file with the provided file name.”

Images can be downloaded here http://www.ettus.com/downloads/uhd_images/

Thank you very much I already got the image (I downloaded the
UHD-images-002.20110120060622.7d918c5-Linux.zip and got the
usrp1_fpga.rbf file
and I placed it into e:\CodeCenter\Environment\image\ folder that I
specified in
the %PATH%).

And some documentation:
http://www.ettus.com/uhd_docs/manual/html/images.html

Thank you very much, I already read it.

Yes, I think it will be simpler to get started by learning about how to
make flow graphs in gnuradio with python.

You may also try python.exe c:/program
files/gnuradio/bin/gnuradio-companion

http://i.imgur.com/dU99P.png

If I will succeed with starting this system I will strat with that. To
tell
you the truth I have never had so many problems with configuring
something to
make it work. Anyway that’s true that if I were trying it under Linux it
would
have been much more easier. I hope that finally I will start it. Anyway
as I
mentioned before I will make a real world application (a PC + USRP
talking to a
few modules using different modulations and working on different
frequencies).
But before all these, I would like to be able to try a simple test
program and
see some waveforms, that’s all, ater that I will play with it and find
right
solutions.

Unless you are building a C++ app, you dont need MSVC, you can make
great gnuradio apps in python.

I planned to use Delphi XE to control UHD (get samples, configure USRP1
device)and use GNURadio functions toprocessdata, use some database like
Firebird tosave datainto and others, but ifit will be required than I
will be
able to use Delphi Prism for .NET environment or Visual Studio (VC or
C#),
there’s no problem. Yes I know that I could make great apps in python
but as I
mentioned before this will be a real world application and I don’t think
that
python would be a good choice. Anyway for my application’s customization
I will
use a scripting language to pass parametersto USRP.

Thanks mr. Josh for your answers. I wish you a nice day.

Best reards,
Florian E…

I am following the instructions at (Step 9) available at
http://gnuradio.org/redmine/wiki/gnuradio/WxPythonCygwin

In the previous step, I am able to generate the test window so I assume
everything is working to that point. After running the following command
python setup.py build_ext --inplace WXPORT=msw COMPILER=cygwin
BUILD_GLCANVAS=0 BUILD_GIZMOS=0 UNICODE=0
I get an error. I have tried various things such as use different
versions of gcc without much success. I also changed the ownership of
directories as was noted in the tips section for installing on windows.
The error that I get is attached at the end and seems to be related to
gcc.
What could be going wrong here?
Best regards,-Vijay

Error as follows -

Vijay@DG70JBG1 /usr/src/wxPython-src-2.8.11.0/wxPython
$ python setup.py build_ext --inplace WXPORT=msw COMPILER=cygwin
BUILD_GLCANVAS
=0 BUILD_GIZMOS=0 UNICODE=0
WARNING: WXWIN not set in environment. Assuming ‘…’
Found wx-config: /usr/local/bin/wx-config
Using flags: --toolkit=msw --unicode=no --version=2.8
Preparing CORE…
Preparing STC…
running build_ext
building ‘core’ extension
gcc -mcygwin -mdll -O -Wall -DSWIG_TYPE_TABLE=wxPython_table
-DSWIG_PYTHON_OUTP
UT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64
-D_LARGE_FILES -DWXU
SINGDLL -D__WXMSW
_ -Iinclude -Isrc
-I/usr/local/lib/wx/include/msw-ansi-release
-2.8 -I/usr/local/include/wx-2.8 -I/usr/include/python2.6 -c
src/helpers.cpp -o
build/temp.cygwin-1.7.8-i686-2.6/src/helpers.o -O3
gcc: error trying to exec ‘cc1plus’: execvp: No such file or directory
error: command ‘gcc’ failed with exit status 1

Hi Don,

Thank you for your suggestion. I set the version for libgcc1, gcc4-core,
gcc4-g++ to the same (4.3.4-3) and then it seemed to work (not exactly
sure why this should make it work, but I read a thread online that said
all the different gcc variants should have the same version)

Best regards,
-Vijay

— On Mon, 3/7/11, Don W. [email protected] wrote:

From: Don W. [email protected]
Subject: Re: [Discuss-gnuradio] Error while building wxPython
To: [email protected]
Date: Monday, March 7, 2011, 9:15 AM

Vijay P. wrote:

I am following the instructions at (Step 9) available at
http://gnuradio.org/redmine/wiki/gnuradio/WxPythonCygwin

In the previous step, I am able to generate the test window so I assume
everything is working to that point. After running the following command
python setup.py build_ext --inplace WXPORT=msw COMPILER=cygwin BUILD_GLCANVAS=0
BUILD_GIZMOS=0 UNICODE=0
I get an error. I have tried various things such as use different versions of
gcc without much success.

I highly recommend picking one version of gcc and using that version
only.
If you switch versions, you should probably start over, recompiling
everything.

=0 BUILD_GIZMOS=0 UNICODE=0
-2.8 -I/usr/local/include/wx-2.8 -I/usr/include/python2.6 -c src/helpers.cpp -o
build/temp.cygwin-1.7.8-i686-2.6/src/helpers.o -O3
gcc: error trying to exec ‘cc1plus’: execvp: No such file or directory
error: command ‘gcc’ failed with exit status 1

This seems to say that part of your gcc installation is missing. Use the
command “cygcheck -c” to see what gcc is installed and to verify that
the files required are present. Remove and reinstall any damaged
packages.
Remove any gcc/g++ versions other than the one you choose to use (only
3.4.4-999 is currently known to work with GNU Radio). Be prepared to
rebuild any dependencies that you might have built with another
compiler.

– Don W.

On 07.03.2011 15:15, Don W. wrote:

Remove any gcc/g++ versions other than the one you choose to use (only
3.4.4-999 is currently known to work with GNU Radio). Be prepared to
rebuild any dependencies that you might have built with another compiler.

The GCC 4.3.4 (GCC4 cygwin packages) also works for me, at least with
the current git/main branch of Gnuradio.
GCC 3 is installed in parallel, but I don’t use it any more.
They don’t conflict, because the gcc, g++ etc. aliases all point to
GCC4.
GCC can handle multiple installations with its separated library
directories.

Vijay P. wrote:

I am following the instructions at (Step 9) available at
http://gnuradio.org/redmine/wiki/gnuradio/WxPythonCygwin

In the previous step, I am able to generate the test window so I assume
everything is working to that point. After running the following command
python setup.py build_ext --inplace WXPORT=msw COMPILER=cygwin
BUILD_GLCANVAS=0 BUILD_GIZMOS=0 UNICODE=0
I get an error. I have tried various things such as use different versions
of
gcc without much success.

I highly recommend picking one version of gcc and using that version
only.
If you switch versions, you should probably start over, recompiling
everything.

$ python setup.py build_ext --inplace WXPORT=msw COMPILER=cygwin
UT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-DWXU
SINGDLL -D__WXMSW__ -Iinclude -Isrc -I/usr/local/lib/wx/include/msw-ansi-release
-2.8 -I/usr/local/include/wx-2.8 -I/usr/include/python2.6 -c
src/helpers.cpp -o
build/temp.cygwin-1.7.8-i686-2.6/src/helpers.o -O3
gcc: error trying to exec ‘cc1plus’: execvp: No such file or directory
error: command ‘gcc’ failed with exit status 1

This seems to say that part of your gcc installation is missing. Use
the
command “cygcheck -c” to see what gcc is installed and to verify that
the files required are present. Remove and reinstall any damaged
packages.
Remove any gcc/g++ versions other than the one you choose to use (only
3.4.4-999 is currently known to work with GNU Radio). Be prepared to
rebuild any dependencies that you might have built with another
compiler.

– Don W.

    After providing the PATHs I connected the USRP1 and I thought that it

might work, and I tried the
e:\CodeCenter\Environment\UHD\bin\uhd_find_devices.exe, but nothing.

You also need some inf/drivers for the usrp1:
http://code.ettus.com/redmine/ettus/projects/uhd/wiki#Windows-USB-drivers-inf-file-and-usb-libraries-only

http://www.ettus.com/uhd_docs/manual/html/usrp1.html

Thank you very much I already got the image (I downloaded the

UHD-images-002.20110120060622.7d918c5-Linux.zip and got the usrp1_fpga.rbf file
and I placed it into e:\CodeCenter\Environment\image\ folder that I specified in
the %PATH%).

Use %UHD_IMAGE_PATH% for a non-standard path

-Josh

Hi, mr. Josh,

I have installed that USB driver before. When I connect USRP1 to the PC
and
power it up I get in Device Manager a device called “libusb (WinUSB)
devices” in
location: “Location 0 (USB Device)”, so driver is installed and it says
“This
device is working properly.”.

OK, I start a command prompt, go to the folder
(e:\CodeCenter\Environment\UHD\bin)that contains the uhd_usrp_probe.exe
and
uhd_find_devices.exe.

I write uhd_find_devices no result, then I write uhd_find_devices
–args=“type=usrp1”, no result, I don’t get any error, I don’t get
anything,
like when trying t without connecting the USRP1 to PC, no error,
nothing.

So, I don’t know where could be the problem, and I start to have less
hope
that I will ever start to develop any application using USRP1 on
Windows.

Use %UHD_IMAGE_PATH% for a non-standard path

thank you very much, I’m really blind, it was there and I didn’t saw
it.

Anyway I think that there would be necessary a step by step guide (put
certain files in a folder, give paths, test it with …, if it’s not
working try
this or that)for those type of people like me if there’s any. Maybe I’m
the
most stupid here because not beeing able to start my USRP1.
Thanks mr. Josh for your answers. I wish you a nice day. Best reards,
Florian E…


From: Josh B. [email protected]
To: Florian E. [email protected]
Cc: [email protected]
Sent: Thu, March 10, 2011 6:54:03 AM
Subject: Re: [Discuss-gnuradio] How UHD, GNURadio and USRP are bound
together.

After providing the PATHs I connected the USRP1 and I thought that it
might work, and I tried the
e:\CodeCenter\Environment\UHD\bin\uhd_find_devices.exe, but nothing.

You also need some inf/drivers for the usrp1:
http://code.ettus.com/redmine/ettus/projects/uhd/wiki#Windows-USB-drivers-inf-file-and-usb-libraries-only

http://www.ettus.com/uhd_docs/manual/html/usrp1.html

Thank you very much I already got the image (I downloaded the
UHD-images-002.20110120060622.7d918c5-Linux.zip and got the usrp1_fpga.rbf file

and I placed it into e:\CodeCenter\Environment\image\ folder that I specified
in

the %PATH%).

Use %UHD_IMAGE_PATH% for a non-standard path

-Josh

What is the subdevice spec (Mb0: subdevice_spec) for a USRP:UHD source?

I tried A:1 (to select RX2 on slot A, as provided at
http://www.ettus.com/uhd_docs/manual/html/usrp1.html) but it does not
work and gave an error.

Best regards,
-Vijay

On 03/11/2011 04:54 PM, Vijay P. wrote:

What is the subdevice spec (Mb0: subdevice_spec) for a USRP:UHD source?

I tried A:1 (to select RX2 on slot A, as provided at
http://www.ettus.com/uhd_docs/manual/html/usrp1.html) but it does not work and
gave an error.

http://www.ettus.com/uhd_docs/manual/html/usrp1.html#specifying-the-subdevice-to-use

This depends on the daugterboard, if you are not using a basic board,
use “A:” to automatically select the first (and only) subdevice on
daughterboard slot A.

-Josh

Hi Josh,

If I am using a WBX board, what would be the setting for selection RX2
on slot A?

And what would be the setting for RX/TX on slot A?

Best regards,
-Vijay

— On Fri, 3/11/11, Josh B. [email protected] wrote:

From: Josh B. [email protected]
Subject: Re: [Discuss-gnuradio] Subdevice Spec for UHD:USRP source
To: [email protected]
Date: Friday, March 11, 2011, 8:05 PM

On 03/11/2011 04:54 PM, Vijay P. wrote:

What is the subdevice spec (Mb0: subdevice_spec) for a USRP:UHD source?

I tried A:1 (to select RX2 on slot A, as provided at
http://www.ettus.com/uhd_docs/manual/html/usrp1.html) but it does not work and
gave an error.

http://www.ettus.com/uhd_docs/manual/html/usrp1.html#specifying-the-subdevice-to-use

This depends on the daugterboard, if you are not using a basic board,
use “A:” to automatically select the first (and only) subdevice on
daughterboard slot A.

-Josh

hI Marcus,

Thank you.

Is there any particular advantage in using the UHD: USRP source and sink
vs. the non UHD version?

Best regards,
-Vijay

— On Fri, 3/11/11, Marcus D. Leech [email protected] wrote:

From: Marcus D. Leech [email protected]
Subject: Re: [Discuss-gnuradio] Subdevice Spec for UHD:USRP source
To: [email protected]
Date: Friday, March 11, 2011, 8:28 PM

On 03/11/2011 08:20 PM, Vijay P. wrote:

        Hi Josh,



          If I am using a WBX board, what would be the setting for
          selection RX2 on slot A?



          And what would be the setting for RX/TX on slot A?



          Best regards,

          -Vijay



          -




If you're using GRC, there's a space for specifying the antenna --
the antenna port is unrelated to the subdevice

 specification.



--

Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

-----Inline Attachment Follows-----

On 03/11/2011 08:40 PM, Vijay P. wrote:

hI Marcus,

Thank you.

Is there any particular advantage in using the UHD: USRP source and
sink vs. the non UHD version?

Best regards,
-Vijay

UHD is the way of all things Ettus going forward. If you don’t have
anything you need to be backwards compatible with,
you should use UHD. Plus UHD on the USRP1 has emulation modes for
some USRP2 hardware features, plus it’s just a
better API.

I would like to know if there is a way to generate multiple windows
using GRC. Eg each window could contain an fft plot.

Combining more than 1 fft/scope plot on a single window does not quite
work out (the second window gets clipped with both manual and automated
settings for grid positions).

Thank you and best regards,
-Vijay

On 03/11/2011 06:05 PM, Vijay P. wrote:

I would like to know if there is a way to generate multiple windows using GRC.
Eg each window could contain an fft plot.

No, but there is a tab widget called notebook (for wx gui).

FYI, If you use the qtgui sink, then the sink is automatically a widget
with a tab for scope, dft, waterfall, constellation.

-josh

On 03/11/2011 08:20 PM, Vijay P. wrote:

If you’re using GRC, there’s a space for specifying the antenna – the
antenna port is unrelated to the subdevice
specification.

I write uhd_find_devices no result, then I write uhd_find_devices
–args=“type=usrp1”, no result, I don’t get any error, I don’t get anything,
like when trying t without connecting the USRP1 to PC, no error, nothing.

So, I don’t know where could be the problem, and I start to have less hope
that I will ever start to develop any application using USRP1 on Windows.

Its entirely possible that I built the library without USB support. I
suggest you manually build uhd in the meantime. Soon (as gnuradio + uhd
approach stabilized master branches) I will be building new installers
for uhd and gnuradio. This time with audio support, qt widgets, and
tested + working gr-uhd.

-Josh