-
Notifications
You must be signed in to change notification settings - Fork 48
GNURadio
GNU Radio and GrOsmoSDR are bundled with the PothosSDR Windows installer. This allows the GNU Radio blocks to be used within the Pothos framework API and GUI. However, with some additional python dependencies, users can use stock GNU Radio with the GNU Radio companion on a Windows OS.
Table of contents
- The installer is built for 64-bit Windows (amd64).
- The build configuration is RelWithDebInfo (compatible with Release mode builds).
- We provide installers for development with MSVC 2012, 2013, and 2015
- Boost runtime DLLs are included with the installer. Users developing C++ GR blocks will need boost development files.
- GnuRadio is build against Python2.7. We will probably switch to Python3 when its officially supported.
- GrQtGUI is not included in the installer. Pothos GUI and plotters are based around Qt5, and the PothosSDR installer includes Qt5 runtime. We will be able to build GrQtGUI when GNU Radio switches to Qt5.
1) Install PothosSDR environment
Follow the download and install instructions from the PothosSDR tutorial. We highly recommend following the "recognizing your device" instructions as well. The Pothos GUI instructions are optional, but they might be worth trying out.
2) Install Python2.7 for amd64
Several environment variables must be set in order to use GNURadio runtime, companion, and python modules:
- The installer should automatically set the GRC_BLOCKS_PATH.
- Follow the notes about setting the PATH from the tutorial.
- Set the PYTHONPATH to include the GNURadio modules, typically this is "C:/Program Files/PothosSDR/lib/site-packages".
Make sure that the new python path shows up in the following list:
C:\Python27\python.exe -c "import sys; print('\n'.join(sys.path))"
Make sure the following commands work before continuing:
gnuradio-config-info.exe C:\Python27\python.exe -c "from gnuradio import gr"
We provide a Python script called GNURadioHelper.py that checks the version of python, looks for various runtime libraries, and test imports various python modules. When a dependency is missing, the script automatically downloads and installs the missing dependency, or prints out a helpful message to guide the user.
Download and run the GNURadioHelper script. Some dependencies make modifications to the system PATH, and require that you close the terminal and re-run the script:
C:\Python27\python.exe GNURadioHelper.py
As an alternative to the automatic instructions, we also provide manual instructions below.
1) Install Cheetah templates:
C:\Python27\Scripts\pip.exe install cheetah
2) Download OpenGL, PyGTK, WxPython, LXML, and Numpy wheel files for amd64
- http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl
- http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygtk
- http://www.lfd.uci.edu/~gohlke/pythonlibs/#wxpython
- http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
- http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
And install all wheel files with Pip:
C:\Python27\Scripts\pip.exe install <path to each whl file>
3) Install GTK+ Runtime for 64-bit
Download and install the 64-bit GTK+ runtime, make sure it matches the PyGTK version number: http://lvserver.ugent.be/gtk-win64/gtk2-runtime/
4) A quick import test
Make sure the following import tests work before continuing:
C:\Python27\python.exe -c "import Cheetah" C:\Python27\python.exe -c "import OpenGL" C:\Python27\python.exe -c "import gtk" C:\Python27\python.exe -c "import wx" C:\Python27\python.exe -c "import lxml" C:\Python27\python.exe -c "import numpy"
To use portaudio you first need to edit config in %appdata%.gnuradioconfig.conf (if the folder doesn't exist then create it) so it will look like this:
[audio] audio_module = portaudio
no lets check and see if the config was loaded
First check if PothosSDR Prefix exist:
gnuradio-config-info --prefix
you should get something like this:
C:\Program Files\PothosSDR
now check if config got loaded
python -c "from gnuradio import gr; print gr.prefs().to_string()"
and you should see something like this:
[audio] audio_module = portaudio [audio_portaudio] verbose = false [controlport] edges_list = False on = False [default] max_messages = 8192 verbose = False [grc] canvas_default_size = 1280,1024 canvas_font_size = 8 global_blocks_path = C:\PothosSDR\share\gnuradio\grc\blocks local_blocks_path = xterm_executable = xterm [log] debug_file = stderr debug_level = emerg log_file = stdout log_level = debug [modtool] newmod_path = C:\PothosSDR\share\gnuradio\modtool\gr-newmod [perfcounters] clock = thread export = False on = False [wxgui] fft_rate = 15 frame_decim = 1 style = auto
Invoke the GNURadio Companion:
gnuradio-companion
Ignore the following warnings:
- GtkWarning: Could not find the icon 'gnuradio-grc'. The 'hicolor' theme was not found either, perhaps you need to install it.
- UserWarning: You don't have the C version of NameMapper installed! I'm disabling Cheetah's useStackFrames option as it is painfully slow with the Python version of NameMapper. You should get a copy of Cheetah with the compiled C version of NameMapper.
Other known issues:
- Blocks cannot be dragged and dropped from the block tree to the graph editor. The reason is unknown, but it appears to be an issue with GTK+ and not an issue with GRC itself. The work-around is to double click on a block in the tree to add it to the editor.
Most folks will use the GrOsmoSDR source and sink blocks to interface with their SDR device. Because the GrOsmoSDR blocks are compiled with support for as many devices as possible, its best practice to specify specifically which device driver to invoke. For example, to use the first HackRF attached to your system, set the device arguments parameter to "hackrf=0".
The PothosSDR installer does not provide a complete development environment. You will also need the following to develop GNU Radio blocks:
- CMake: https://cmake.org/download/
- Swigwin: http://www.swig.org/download.html
- MSVC (match the installer's version)
- Boost development files: http://sourceforge.net/projects/boost/files/boost-binaries/
- Also match the installer's copy of boost runtime in bin/boost*.dll
- Read more: https://github.com/pothosware/PothosSDR/wiki/Development
Supporting this project relies on community help to test the installer and to report bugs.
Found a bug? having a problem? Let us know: https://github.com/pothosware/pothos/wiki/Support
If you think the bug is narrowed down to a specific software package, post an issue to the PothosSDR issue tracker and to the relevant package's issue tracker as well. This helps us to coordinate to fix issues. We don't want to lose track of an issues or problems that may have been resolved.
We tend to collect a lot of patches the PothosSDR this installer, you can find them here: https://github.com/pothosware/PothosSDR/tree/master/patches Typically we add conditional ifdef and build checks to account for the MSVC compiler differences. Therefore, most of the patches are very small and non-breaking for the standard GCC compiler usage.
Ideally, the patches/ directory should be empty. We are looking for volunteers; anyone who can apply a patch, test the patch on a standard Linux/GCC box, and get the patch upstreamed to its respective project. This can helps others who build with the MSVC compiler from duplicating the same fixes, and makes building future PothosSDR installers more manageable.