Discussion:
[Discuss-gnuradio] Gnuradio and Uhd on windows,
Mark Colin
2011-04-10 18:48:28 UTC
Permalink
Hi Marcus,

     yes you are right, anyway it was my first post :). So regarding the USRP1
and UHD. As I wrote before I installed everything I found on
http://www.ettus.com/downloads/gnuradio/. When I run from command line the
uhd_find_devices.exe nothing happend, no error, nothing. If it would receive
some error messages maybe I could solve it, but nothing, the situation is the
same for the uhd_usrp_probe.exe.

   I don't know what could be wrong with it, anyway I will write down in a few
points what I have done:
1. Install gnuradio_deps-b1_44_r0-win32.exe
2. Install gnuradio-v3.3.1git-993-g082e85a-win32.exe
3. Install UHD-003.000.001-win32.exe
4. Unrar libusb_2010.10.06.7z
5. Unrar swigwin-2.0.1.zip
6. Unrar fftw-3.2.2.pl1-dll32.zip
7. Unrar cppunit-1.12.1.tar.gz
8. Install gsl-1.8.exe
9. Unrar and install erllc_uhd_winusb_driver.zip
10. Install python-2.7.1.msi
11. Install pygtk-all-in-one-2.22.6.win32-py2.7.msi
12. Install numpy-1.5.1-win32-superpack-python2.7.exe
13. Install PyQt4.Qwt5-5.2.1.win32-py27.exe
14. Install PyQt-Py2.7-x86-gpl-4.8.2-1.exe
15. Install setuptools-0.6c11.win32-py2.7.exe
16. I got the usrp1_fpga.rbf and usrp1_fw.ihx, both are placed into a folder.

Each of these are installed or unrared into a folder named USRP1Env, in separate
subfolders.

I set in User Variables the following values.
In PATH variable I set:
1. ...\USRP1Env\fftw-3.2.2.pl1-dll32\

2. ...\USRP1Env\gnuradiodeps\lib\     -    it containes cppunit_dll, qwt5, boost
libraries, libfftw3l-3, libgsl, libusb-1.0

3. ...\USRP1Env\libusb\MS32\dll\

4. ...\USRP1Env\gnuradio33\lib\

5. ...\USRP1Env\gsl18\bin\

6. ...\USRP1Env\Python27\Lib

7. ...\USRP1Env\UHD\lib

in the PYONPATH variable I set:

1. ...\USRP1Env\Python27\Lib\site-packages.

When I connect my USRP1 to PC I can see it in Device Manager as "Ettus Research
LLC USRP1", but when trying the uhd_find_devices.exe and uhd_usrp_probe.exe
nothing happend.


Could you tell me please if there is anything missing or not set as needed, or
maybe I didn't understood perfectly how this whole UHD, GNURADIO, USRP thing is
working. Anyway there is any good tutorial or something similar for this, where
is presented step by step the whole installation process and the first
configuration of an example. Maybe for people like you there's no problem to
install all these development tools and to make interesting projects but for me
and others who are starting to use UHD, GNURADIO it's quite difficult. If there
were such kind of tutorial this whole forum wouldn't be full of questions from
begginers related to different installation issues.

Thank you very very much for your answer.

Mark.
Josh Blum
2011-04-10 20:11:18 UTC
Permalink
So two problems:

-----------------------------------------------------------------------
1) It looks like you are not finding devices. The only thing you need to
deal with is uhd. Even libusb is statically linked into uhd, so you dont
even need to install that. Gnuradio and its dependencies are irrelevant
to this.

This installer has been confirmed working on windows 7 machines:
http://www.ettus.com/downloads/uhd_releases/003_000_001/UHD-003.000.001-win32-with-LIBUSB_CALL-fix.exe

ALso, you will also need to install the usb driver:
http://code.ettus.com/redmine/ettus/projects/uhd/wiki#Windows-USB-driver
Josh Blum
2011-04-13 20:19:47 UTC
Permalink
FYI, I uploaded a new gnuradio installer for windows, and added
instructions which can be found here:
http://www.joshknows.com/gnuradio_port#windows_binary_install

-Josh
Post by Josh Blum
-----------------------------------------------------------------------
1) It looks like you are not finding devices. The only thing you need to
deal with is uhd. Even libusb is statically linked into uhd, so you dont
even need to install that. Gnuradio and its dependencies are irrelevant
to this.
http://www.ettus.com/downloads/uhd_releases/003_000_001/UHD-003.000.001-win32-with-LIBUSB_CALL-fix.exe
http://code.ettus.com/redmine/ettus/projects/uhd/wiki#Windows-USB-driver
Mark Colin
2011-04-14 10:15:19 UTC
Permalink
Don Ward
2011-04-14 12:56:45 UTC
Permalink
When I power up the USRP1 it shows in the DeviceManager the LibUSB-Win32
Devices -> USRP filter (VID=FFFE; PID=0004

Isn't LibUSB-Win32 the old libusb 0.1 driver? What happens if you uninstall
the driver in the device manager and reinstall with the libusb 1.0 driver?

-- Don W.
Josh Blum
2011-04-14 15:36:02 UTC
Permalink
Post by Don Ward
When I power up the USRP1 it shows in the DeviceManager the LibUSB-Win32
Devices -> USRP filter (VID=FFFE; PID=0004
Isn't LibUSB-Win32 the old libusb 0.1 driver? What happens if you
uninstall the driver in the device manager and reinstall with the libusb
1.0 driver?
Good call, from my recollection, it should say WinUSB something

http://code.ettus.com/redmine/ettus/projects/uhd/wiki#Windows-USB-driver

__ OR __

There is zadig.exe:
http://www.libusb.org/wiki/windows_backend#DriverInstallation

-Josh
Post by Don Ward
-- Don W.
_______________________________________________
Discuss-gnuradio mailing list
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Mark Colin
2011-04-14 22:08:49 UTC
Permalink
Hi Don W,

  thank you very much, I uninstalled the old one and installed the new one
version 1.0, but unfortunatelly it doesn't change anything. I can see in
DeviceManager the libusb (WinUSB) devices -> Ettus Research LLC USRP1 (VID=FFFE;
PID=0002; REV=0004). If I run uhd_find_devices.exe the result is the same as
before, no error, from ...\UHD\bin>uhd_find_devices.exe comes back to
...\UHD\bin>, so it's a situation of everything is installed but nothing works.
Anyway thank you very much for the information.

Have a nice day.

Best regards,
Mark.



________________________________
From: Don Ward <***@sprynet.com>
To: Mark Colin <***@yahoo.com>
Cc: discuss-***@gnu.org
Sent: Thu, April 14, 2011 3:56:45 PM
Subject: Re: [Discuss-gnuradio] Gnuradio and Uhd on windows,
  When I power up the USRP1 it shows in the DeviceManager the LibUSB-Win32
Devices -> USRP filter (VID=FFFE; PID=0004

Isn't LibUSB-Win32 the old libusb 0.1 driver?  What happens if you uninstall the
driver in the device manager and reinstall with the libusb 1.0 driver?

-- Don W.
Josh Blum
2011-04-15 00:12:26 UTC
Permalink
Post by Mark Colin
Hi Don W,
thank you very much, I uninstalled the old one and installed the new one
version 1.0, but unfortunatelly it doesn't change anything. I can see in
DeviceManager the libusb (WinUSB) devices -> Ettus Research LLC USRP1 (VID=FFFE;
PID=0002; REV=0004). If I run uhd_find_devices.exe the result is the same as
before, no error, from ...\UHD\bin>uhd_find_devices.exe comes back to
...\UHD\bin>, so it's a situation of everything is installed but nothing works.
Anyway thank you very much for the information.
Just to verify things, I decided to try this out on an old XP laptop. I
installed uhd and set my UHD_IMAGE_PATH, updated the driver to the
WinUSB. The probe and find devices worked just fine.

I recommend you try a different computer, a different usb cable, or a
different os. Just to eliminate the variables. You only need to install
uhd to test this.

On the gnuradio front. I updated my instructions a bit. I found that the
qt dlls also needed to be in the path. I will try to include these in
the gnuradio installer next time around. Also, I had to install to
program files (x86) because thats how all the paths got hardcoded. I'm
not sure how to transplant a gnuradio install that was built for a
different prefix. We should probably make this simpler.

-Josh
Josh Blum
2011-04-14 16:13:59 UTC
Permalink
I downloaded and installed it as you described it, when trying to run that
gnuradio\bin\gnuradio-companion.py I received an error message "Cannot import
gnuradio.
Make sure you have the most recent installer (i posted yesterday)
http://www.ettus.com/downloads/gnuradio/gnuradio-built-2011-04-13/

I accidentally the python when I built the previous installer (due to an
issue with a relative path). So the site-packages were completely missing.

You can also test this quickly w/

python.exe -c "from gnuradio import gr"
python.exe -c "from gnuradio import uhd"

Does it show errors?
Are your PYTHONPATH and LD_LIBRARY_PATH set correctly?" even if I set PYTHONPATH
and PATH correctly, I checked and double-checked it (I'm using the
Rapid Environment Editor).
I know, nice isnt it?

-Josh
Mark Colin
2011-04-15 23:04:18 UTC
Permalink
Hi Josh,
    Just to verify things, I decided to try this out on an old XP laptop. I
installed uhd and set my UHD_IMAGE_PATH, updated the driver to the
WinUSB. The probe and find devices worked just fine.
I recommend you try a different computer, a different usb cable, or a
different os. Just to eliminate the variables. You only need to install
uhd to test this.
  I tried it on a different PC I installed UHD, when I wanted to try the
uhd_find_devices.exe (previously I set the UHD_IMAGE_PATH in the SYSTEM
VARIABLES not USER VARIABLES as Markus mentioned in one of his posts) it told me
that can't find MSVCP100.dll, after I downloaded the MSVCP100.dll it asked for
MSVCR100.dll, after that it started with some error saying that it wasn't able
to locate an entry point into MSVCR100.dll. So, unfortunatelly it's not working.

  I tried to check if gnuradio is OK, yes I have the most recent installer. I
have tested python.exe -c "from gnuradio import gr" and python.exe -c "from
gnuradio import uhd". It can't find the path to the DLL file (like the problem
of Ryan van den Bergh in one of these posts) even if I changed theyr path from
User Variables Path to System Variables Path.


d:\Docs\Code\Python27>python.exe -c "from gnurad
io import gr"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "d:\Docs\Code\gnuradio\lib\site-packages\
gnuradio\gr\__init__.py", line 43, in <module>
    from gnuradio_core import *
  File "d:\Docs\Code\gnuradio\lib\site-packages\
gnuradio\gr\gnuradio_core.py", line 23, in <module>
    from gnuradio_core_runtime import *
  File "d:\Docs\Code\gnuradio\lib\site-packages\
gnuradio\gr\gnuradio_core_runtime.py", line 25, in <module>
    _gnuradio_core_runtime = swig_import_helper()
  File "d:\Docs\Code\gnuradio\lib\site-packages\
gnuradio\gr\gnuradio_core_runtime.py", line 21, in swig_import_helper
    _mod = imp.load_module('_gnuradio_core_runtime', fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found.

d:\Docs\Code\Python27>python.exe -c "from gnurad
io import uhd"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "d:\Docs\Code\gnuradio\lib\site-packages\
gnuradio\uhd\__init__.py", line 87, in <module>
    _prepare_uhd_swig()
  File "d:\Docs\Code\gnuradio\lib\site-packages\
gnuradio\uhd\__init__.py", line 26, in _prepare_uhd_swig
    import uhd_swig
  File "d:\Docs\Code\gnuradio\lib\site-packages\
gnuradio\uhd\uhd_swig.py", line 24, in <module>
    _uhd_swig = swig_import_helper()
  File "d:\Docs\Code\gnuradio\lib\site-packages\
gnuradio\uhd\uhd_swig.py", line 20, in swig_import_helper
    _mod = imp.load_module('_uhd_swig', fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found.

I checked files with Dependency walker and it reports that can't find file. To
tell you the truth I don't know why it can't find DLL files, I'm making
softwares for more than 5 years but only once or twice happend to have some
problems with paths, anyway that's not a good practice to use hardcoded things
into the application, maybe this is why it can't find the DLL files.

Thanks you very much Josh.

Best regards,
Mark.
Josh Blum
2011-04-15 23:06:14 UTC
Permalink
Post by Mark Colin
that can't find MSVCP100.dll, after I downloaded the MSVCP100.dll it asked for
MSVCR100.dll, after that it started with some error saying that it wasn't able
to locate an entry point into MSVCR100.dll. So, unfortunatelly it's not working.
Install msvc redistributable package.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84

-Josh
Marcus D. Leech
2011-04-15 23:15:47 UTC
Permalink
Post by Josh Blum
Post by Mark Colin
that can't find MSVCP100.dll, after I downloaded the MSVCP100.dll it asked for
MSVCR100.dll, after that it started with some error saying that it wasn't able
to locate an entry point into MSVCR100.dll. So, unfortunatelly it's not working.
Install msvc redistributable package.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
-Josh
So, maybe we've reached the point on the Windows binary stuff where a
"mega installer" is called for, kind of like
build-gnuradio, but for the Winderz binary install? Install the
dependencies, UHD, Gnu Radio, and maybe edits your
PATHs appropriately? I dunno if that's even possible on Windows, and
I don't even know how to do it, and I'm not
volunteering. And I know the Josh object(s) has just *sooooo* much
free time :-)
--
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org
Josh Blum
2011-04-15 23:40:18 UTC
Permalink
Post by Marcus D. Leech
Post by Josh Blum
Post by Mark Colin
that can't find MSVCP100.dll, after I downloaded the MSVCP100.dll it asked for
MSVCR100.dll, after that it started with some error saying that it wasn't able
to locate an entry point into MSVCR100.dll. So, unfortunatelly it's not working.
Install msvc redistributable package.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
-Josh
So, maybe we've reached the point on the Windows binary stuff where a
"mega installer" is called for, kind of like
Its funny, the installer is almost like that. Everything thats not
python is actually in there. (aside from msvc redistributable package)
15 of the 20 mb are dlls from the dependencies.
Post by Marcus D. Leech
build-gnuradio, but for the Winderz binary install? Install the
dependencies, UHD, Gnu Radio, and maybe edits your
PATHs appropriately? I dunno if that's even possible on Windows, and
I don't even know how to do it, and I'm not
Honestly, I'm new to this windows installer thing. I have no idea what
the correct answer is. I come from a linux background thinking that
setting the PATH is the greatest thing ever.

Do i install everything in system32 and not even set the paths? Should
there be a batch script installed to the start menu that sets the path
and then executes grc? Some burdens are easier for me to pass unto the
user...
Post by Marcus D. Leech
volunteering. And I know the Josh object(s) has just *sooooo* much
free time :-)
There is always more time if you know where to look. Like sleep, is it
necessary? Some experts say otherwise.

-Josh
Tom Rondeau
2011-04-16 15:03:42 UTC
Permalink
Post by Josh Blum
Post by Marcus D. Leech
Post by Josh Blum
Post by Mark Colin
that can't find MSVCP100.dll, after I downloaded the MSVCP100.dll it asked for
MSVCR100.dll, after that it started with some error saying that it wasn't able
to locate an entry point into MSVCR100.dll. So, unfortunatelly it's not working.
Install msvc redistributable package.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
Post by Marcus D. Leech
Post by Josh Blum
-Josh
So, maybe we've reached the point on the Windows binary stuff where a
"mega installer" is called for, kind of like
Its funny, the installer is almost like that. Everything thats not
python is actually in there. (aside from msvc redistributable package)
15 of the 20 mb are dlls from the dependencies.
Post by Marcus D. Leech
build-gnuradio, but for the Winderz binary install? Install the
dependencies, UHD, Gnu Radio, and maybe edits your
PATHs appropriately? I dunno if that's even possible on Windows, and
I don't even know how to do it, and I'm not
Honestly, I'm new to this windows installer thing. I have no idea what
the correct answer is. I come from a linux background thinking that
setting the PATH is the greatest thing ever.
Do i install everything in system32 and not even set the paths? Should
there be a batch script installed to the start menu that sets the path
and then executes grc? Some burdens are easier for me to pass unto the
user...
Post by Marcus D. Leech
volunteering. And I know the Josh object(s) has just *sooooo* much
free time :-)
There is always more time if you know where to look. Like sleep, is it
necessary? Some experts say otherwise.
-Josh
So I've largely just been glancing over this email thread, so I might not
have all the facts. But this email between Marcus and Josh has caught my
attention.

Josh, is the Windows build that's being discussed here based on your cmake
branch? I'm wondering how easily you've found it to keep it up to date with
the rest of the changes in GNU Radio master? I imagine it's not terribly
difficult for most things, but possibly that my latest changes to gr-qtgui
might have been a bit more challenging since the directory structure was
changed.

It also seems like you're working out the last bugs in the installation
process, now, too, and have been making gains with your installer (going
towards the mega-installer). I'm just throwing this out there to see what
people think, but I'm thinking we should host this on the main GNU Radio
website, too. Also, we can probably clean up the Windows build section of
the Wiki based on your work.

Thanks!
Tom
Josh Blum
2011-04-16 18:07:54 UTC
Permalink
Post by Tom Rondeau
Josh, is the Windows build that's being discussed here based on your cmake
yes indeed
Post by Tom Rondeau
branch? I'm wondering how easily you've found it to keep it up to date with
the rest of the changes in GNU Radio master? I imagine it's not terribly
difficult for most things, but possibly that my latest changes to gr-qtgui
might have been a bit more challenging since the directory structure was
changed.
it was ok, I had to move the cmake files after the merge, add entries
for the new files and the api export macro for the new classes in utils.
Post by Tom Rondeau
It also seems like you're working out the last bugs in the installation
process, now, too, and have been making gains with your installer (going
I did figure out how to get a nice configuration page in the installer
that asks you if it should set the PATH just by adding the line
SET(CPACK_NSIS_MODIFY_PATH ON)

It looks like I will have to figure out a little more NSIS magic to set
the PYTHONPATH
Post by Tom Rondeau
towards the mega-installer). I'm just throwing this out there to see what
people think, but I'm thinking we should host this on the main GNU Radio
website, too. Also, we can probably clean up the Windows build section of
the Wiki based on your work.
I would rather put my notes on the redmine wiki, but I don't want to be
presumptuous.

-Josh
Josh Blum
2011-04-15 23:50:22 UTC
Permalink
Post by Mark Colin
Hi Josh,
...YUPEEEEEEEEE finally it's working :), it recognized my USRP1. The
Gnuradio Companion is working, too. Thanks Josh for your support, finally I will
be able to start real code development. Anyway as a first step should be
resolved the problem related to hardcoded paths, maybe I will solve that after I
will check source code.
When you transplant a gnuradio install, the hardcoded path problem
effects where gnuradio looks for conf files and where grc looks for xml
block files and documentation.

You can set some environment variables to fix the GRC issues, and I
think the gnuradio conf stuff will be ok since it will just use the
defaults.

GRC_BLOCKS_PATH may need to be set, I think thats all you might need.

-Josh
Josh Blum
2011-05-19 02:26:57 UTC
Permalink
Post by Josh Blum
When you transplant a gnuradio install, the hardcoded path problem
effects where gnuradio looks for conf files and where grc looks for xml
block files and documentation.
You can set some environment variables to fix the GRC issues, and I
think the gnuradio conf stuff will be ok since it will just use the
defaults.
GRC_BLOCKS_PATH may need to be set, I think thats all you might need.
Just to give an update on this. The current installer now adds itself to
the path and automatically sets the necessary environment variables for
"transplanted installs". This way, grc can find the blocks and doxygen
files.

So you can install uhd and gnuradio + all of its dependencies entirely
from exe installers, and the only thing you need to do post install is
set the PYTHONPATH. Basically environment variables are easy to set but
harder to append to from NSIS. I would like to solve that too...

Basically, the CMake NSIS template already has code for appending to the
PATH, so it may just be an issue of making a custom NSIS template and
duplicating the addtopath function to also handle PYTHONPATH.

I updated the instructions and installers here:
http://www.joshknows.com/gnuradio_port#binary_packages

Also, the PyQWT installer I found has busted slider support. If anybody
can find or make a windows installer for PyQWT + python2.7 that isnt
busted, that would be great!
http://www.ettus.com/downloads/gnuradio/other_deps_with_installers/PyQt4.Qwt5-5.2.1.win32-py27.exe

Thanks,
-Josh

Mark Colin
2011-04-15 23:13:55 UTC
Permalink
Hi Josh,

 excuse me, right now I checked your website and read about MSVC redistributable
package from microsoft and the recomandation to install it to c:\program files
(x86). I will check if it's working with these changes.


Thanks,

Best regards,
Mark.
Loading...