GNU Radio/Cygwin Installation
Contents
Installing GNU Radio with Cygwin
The easiest way to install GNU Radio on Windows is to use the Cygwin (http://www.cygwin.com, http://www.cygwin.com) environment. Once Cygwin and the required utilities and third-party libraries are installed, installation of GNU Radio is as easy on Windows as it is on Linux.
To install GNU Radio with Cygwin you need to:
- Install the Cygwin environment
- Install the required utilities and third-party libraries
- Build and install GNU Radio
- Install the driver for the USRP (if you have a USRP)
One way to accomplish each of these steps is described below.
Installing Cygwin
Installing Cygwin is easy, but there are a few details to worry about; see getting started with Cygwin.
Installing Utilities and Third-Party Libraries
Utilities and third-party libraries are of two types: those that are available as Cygwin packages and those that must be downloaded and/or built separately.
Installing Cygwin packages
You will need the following Cygwin packages to build GNU Radio. For instructions on installing Cygwin packages see getting started with Cygwin:
- autoconf
- automake1.10 (or automake1.9)
- binutils
- boost-devel
- gcc-core (version 3.4.4-2 or later preferred)
- gcc-g++ (version 3.4.4-2 or later preferred)
- libtool1.5
- make
- Numeric
- patch
- pkg-config
- python (get version 2.4.3-1; version 2.5 doesn't work with GNU Radio yet)
- swig (Note: Building from the SVN trunk requires version 1.3.31 or higher of swig; until this version is available as a package, you will need to build your own from source; see hints, tips, known problems, and solutions for Windows.)
If you have a USRP you will also need:
- libusb-win32 (get version 0.1.10.1-3; version 0.1.12.0-1 doesn't work with GNU Radio yet)
If you want to install from SVN you will need:
- subversion
Other libraries and utilities
Some of the libraries and utilities required by GNU Radio are not available as Cygwin packages. These packages must be installed manually:
- FFTW: the Cygwin package does not include single precision; see installing FFTW
- CppUnit: the Cygwin package version 1.9.14-1 does not work with GNU Radio; see installing CppUnit on Cygwin
- wxPython: not required for all applications, but extremely useful; see installing wxPython
If you need simultaneous capture and play of audio from your sound card or have difficulties with the basic audio support, you may want:
- PortAudio: see installing PortAudio
If you have a USRP you will also need:
- SDCC (Small Device C Compiler); see installing SDCC on Windows
Building and Installing GNU Radio
GNU Radio is a large system with many options. The simplest build procedure configures and builds all the modules that it can, but you can customize your installation (and maybe save some time) by specifying appropriate options. The sections below show how to download the GNU Radio source code, build a minimal GNU Radio system (recommended for the first test), and then how to build and install everything.
Downloading the GNU Radio Source Code
The simplest way to get the GNU Radio source code is to download the tarball from <a class="ext-link" href="ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.0.3.tar.gz">ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.0.3.tar.gz</a> to a convenient working directory and unpack it with
$ tar zxf gnuradio-3.0.3.tar.gz
to produce the directory gnuradio-3.0.3. The tarball includes stable versions of the components needed by most users. If you prefer to get the latest versions of everything, you can check out the code from the Subversion (SVN) repository with:
$ svn co http://gnuradio.org/svn/gnuradio/trunk gnuradio $ cd gnuradio $ ./bootstrap
This checks out the current version to a tree headed by a directory named gnuradio and prepares for configuration. The following instructions assume the code is in gnuradio-3.0.3.
If your g++ is older than version 3.4.4-2: The C++ libraries supplied with Cygwin g++ prior to version 3.4.4-2 have problems with strings that are passed between DLLs. To work around this problem you need to download the patch file at <a class="attachment" title="Attachment *48: dll_string.patch" href="/trac/attachment/ticket/48/dll_string.patch">ticket:48:dll_string.patch</a> (use the "Original Format" link at the bottom of the page) to your gnuradio-3.0.3 directory and execute the commands:
$ cd gnuradio-3.0.3 $ patch -p0 -i dll_string.patch $ ./bootstrap
You can ignore the warning about "underquoted definition" in cppunit.m4.
Building a Minimal GNU Radio System
For a first test, it is helpful to build a minimal GNU Radio. This is done with the commands:
$ cd gnuradio-3.0.3 $ ./configure --with-boost-include-dir=/usr/include/boost-1_33_1 --disable-all-components --enable-gnuradio-core --enable-gr-audio-oss
This disables all components except those explicity enabled, namely gnuradio-core and gr-audio-oss. To build and install these components use the commands:
$ cd gnuradio-3.0.3 $ make $ make check $ make install
You may get warning messages, but unless one of these commands stops with an error message you should have a working installation of GNU Radio. If you do get errors be sure to check hints, tips, known problems, and solutions for Windows.
To use GNU Radio you need to tell Python where to find it:
$ export PYTHONPATH=/usr/local/lib/python2.4/site-packages
You can save yourself some trouble by adding this line to your ~/.bash_profile file.
To actually make GNU Radio do something, try:
$ cd gnuradio-3.0.3/gnuradio-examples/python/audio $ python dial_tone.py
This should produce a dialtone through your speakers. If Python gives you an error message, there is a problem with your installation of GNU Radio. If you get no error messages but no sound, check to see that your speakers are turned on, your volume is turned up, and that the "Wave" source is enabled in your audio control panel. Use Ctrl-C to stop the dialtone. If dial_tone.py stops by itself without producing sound or gives a Windows error pop-up, your version of Cygwin may be out of date (see hints, tips, known problems, and solutions for Windows).
With this minimal GNU Radio system you can capture signals from your sound card, read signals from a file, or generate signals; process signals; and play signals on your sound card or save them to a file.
Note that you cannot simultaneously capture and play signals using the same sound card with gr-audio-oss.
Building a Full GNU Radio System
Building a full GNU Radio system is simpler but takes longer:
$ cd gnuradio-3.0.3 $ ./configure --with-boost-include-dir=/usr/include/boost-1_33_1
This enables all components for which the required libraries and utilities are available. To build and install these components use the commands:
$ cd gnuradio-3.0.3 $ make $ make check $ make install
Unless one of these steps fails due to an error, you should have a working GNU Radio installation. If one of the steps fails, you may be able to disable the component that failed. Use ./configure --help to see how the components are named. Look for the "--enable-..." options and add the corresponding "--disable-..." option to your ./configure command and repeat the above steps.
Installing the Driver for the USRP
If you have a USRP you will need to install the driver for it; see installing the USRP driver for Windows.
Where to Go From Here
Now that your GNU Radio system is installed, it is time to start exploring. The best way to learn about GNU Radio is to study and modify the examples in the various subdirectories of gnuradio-3.0.3/gnuradio-examples/python. Be sure PYTHONPATH is set as described above.
</div> <script type="text/javascript"> addHeadingLinks(document.getElementById("searchable")); </script>
</div>
<script type="text/javascript">searchHighlight()</script>
Download in other formats:
- <a href="/trac/wiki/CygwinInstallMain?format=txt Plain Text</a>
</div>