Gnuradio Installation Notes: Version Modified/Creation Date Description
Gnuradio Installation Notes: Version Modified/Creation Date Description
Document History:
The list of available packages are: (New packages keep getting added to the repository)
• [gnuradio-core] The main library. Contains the underlying runtime system and
most of the hardware independent signal processing blocks.
• [gr-audio-oss] Support for sound cards using the Open Sound System.
• [gr-audio-portaudio] Preliminary support for sound cards using the portaudio V19
library (work-in-progress).
• [usrp] The non-GNU Radio specific part of the Universal Software Radio
Peripheral code base. This contains the host libs, firmware and fpga code.
• [gr-usrp] The glue that ties the usrp library into GNU Radio.
With the exception of SDCC, the following GNU/Linux distributions are known to
come with all required dependencies pre-packaged: Ubuntu 6.06, SuSE 10.0 (the pay
version, not the free download), Fedora Core 2,3,4,5. Other distributions may work
too. The required packages may be contained on your installation CD/DVD, or may be
loaded over the net. The specifics vary depending on your GNU/Linux distribution.
Brief instructions for installing the tarball packages: (I work on Fedora Core, So I have
listed only packages I needed to install, to get GNURadio up and running)
1. [gnuradio-core]:
Prerequisites:
(1) The "autotools"
autoconf 2.57 or later
automake 1.7.4 or later
libtool 1.5 or later
If your system has automake-1.4, there's a good chance it also has automake-1.7 or later.
Check your install disk and/or (on GNU/Linux) try:
$ man update-alternatives
for info on how some distributions support multiple versions.
Also, as noted on the website, GNU Radio exercises bugs in certain versions of g++
3.3.x on the x86 platform. If you are using g++ 3.3 and make check fails, please either
upgrade to 3.4 or downgrade to 3.2. Both are known to work.
2. [gnuradio-examples]
Set your PYTHONPATH environment variable so that the GNU Radio toolkit and
optional packages can be found by python.
PYTHONPATH should include the path of the local site-packages directory.
If the above packages were installed using the default prefix (/usr/local) and you're
using python 2.3, this should work:
$ export PYTHONPATH=/usr/local/lib/python2.4/site-packages
If you've got doxygen installed and provide the --enable-doxygen configure option, the
build process creates documentation for the class hierarchy etc. Point your browser at
gnuradio-core/doc/html/index.html
The online version can be found at :
http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html
5. The online documentation for GNU Radio with descriptions of all the modules, class
import wx
app = wx.PySimpleApp()
frame = wx.Frame(None, -1, "Hello World")
frame.Show(1)
app.MainLoop()
After importing wxPython GUI, we instantiate a new wxPySimpleApp and a new wxFrame. A
frame in wxPython is a window with its titlebar, reduction and close buttons, etc... We make this
Frame appear by "showing" it. Eventually, we start the application's MainLoop whose role is to
handle the events.
d. Install Numerical Python: Numerical Python adds a fast array facility to the
Python language (http://numeric.scipy.org/).
7. [usrp] : The non-GNU Radio specific part of the Universal Software Radio Peripheral
code base. This contains the host libs, firmware and fpga code.
8. [gr-usrp] : The glue that ties the usrp library into GNU Radio.
The USRP hardware needs to setup and checked for correct operation.
The argument is the station's center frequency, in megahertz. A window will pop up
which will show the signal at various stages of processing; and the radio station
should be audible on your computer's speakers.
GNURadio uses the universal TUN/TAP drivers to tunnel the packets from the USRP via
USB to the kernel.
1. Description
TUN/TAP provides packet reception and transmission for user space programs.
It can be seen as a simple Point-to-Point or Ethernet device, which,
instead of receiving packets from physical media, receives them from
user space program and instead of sending packets via physical media
writes them to the user space program.
In order to use the driver a program has to open /dev/net/tun and issue a
corresponding ioctl() to register a network device with the kernel. A network
device will appear as tunXX or tapXX, depending on the options chosen. When
the program closes the file descriptor, the network device and all
corresponding routes will disappear.
Depending on the type of device chosen the userspace program has to read/write
IP packets (with tun) or ethernet frames (with tap). Which one is being used
depends on the flags given with the ioctl().
2. Configuration
Set permissions:
e.g. chmod 0700 /dev/net/tun
if you want the device only accessible by root. Giving regular users the
right to assign network devices is NOT a good idea. Users could assign
bogus network interfaces to trick firewalls or administrators.
Manual loading
insert the module by hand:
modprobe tun
If you do it the latter way, you have to load the module every time you
need it, if you do it the other way it will be automatically loaded when
/dev/net/tun is being opened.
3. Program interface
char *dev should be the name of the device with a format string (e.g.
"tun%d"), but (as far as I can see) this can be any valid network device name.
Note that the character pointer becomes overwritten with the real device name
(e.g. "tun0")
#include <linux/if.h>
#include <linux/if_tun.h>
memset(&ifr, 0, sizeof(ifr));
}
strcpy(dev, ifr.ifr_name);
return fd;
}
o Frame format:
Let's say that you configured IPX on the tap0, then whenever
the kernel sends an IPX packet to tap0, it is passed to the application
(VTun for example). The application encrypts, compresses and sends it to
the other side over TCP or UDP. The application on the other side decompresses
and decrypts the data received and writes the packet to the TAP device,
the kernel handles the packet like it came from real physical device.
This means that you have to read/write IP packets when you are using tun and
ethernet frames when using tap.
This program provides a framework for building your own MACs. It creates a "TAP"
interface in the kernel, typically gr0, and sends and receives ethernet frames through it.
See /usr/src/linux/Documentation/networking/tuntap.txt and/or Google for "universal tun
tap". The Linux 2.6 kernel includes the tun module, you don't have to build it. You may
have to "modprobe tun" if it's not loaded by default. If /dev/net/tun doesn't exist, try
"modprobe tun".
To run this program you'll need to be root or running with the appropriate capability to
open the tun interface. You'll need to fire up two copies on different machines. Once
each is running you'll need to ifconfig the gr0 interface to set the IP address.
This will allow two machines to talk, but anything beyond the two machines depends on
your networking setup. Left as an exercise...
On machine A:
$ su
# ./tunnel.py --freq 423.0M --bitrate 500k
# # in another window on A, also as root...
# ifconfig gr0 192.168.200.1
On machine B:
$ su
# ./tunnel.py --freq 423.0M --bitrate 500k
# # in another window on B, also as root...
# ifconfig gr0 192.168.200.2
$ ping 192.168.200.2
and you should see some output for each packet in the tunnel.py window if you used the -
v option.
Likewise, on machine B:
$ ping 192.168.200.1
This now uses a carrier sense MAC, so you should be able to ssh between the machines,
web browse, etc.
• Troubleshooting:
$ cd gnuradio-core/src/lib/swig
$ make clean
$ make install
o Another handy trick if for example your fftw includes and libs are
installed in, say ~/local/include and ~/local/lib, instead of
/usr/local is this:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/local/lib
$ make CPPFLAGS="-I$HOME/local/include"
SVN Install:
The new repository organization simplifies a lot of the build system. You no longer need
to go into the individual directories and compile separately.
To checkout the latest code from the development trunk, enter this on the command line:
$ svn co http://gnuradio.org/svn/gnuradio/trunk gnuradio
To instead checkout the latest stable release code, enter this on the command line:
$ svn co http://gnuradio.org/svn/gnuradio/branches/releases/3.0 gnuradio
First, ensure that you've fulfilled the dependencies specified in the top-level README.
Most GNU/Linux systems come with our dependencies already packaged. You may need
to install them off of your install CD/DVD or over the net. See below for Operating
System specific notes.
To compile, there are 5 steps. Start by cd'ing to the gnuradio directory, then complete the
following commands:
$ ./bootstrap # Do NOT perform this step if you are building from a tarball.
$ ./configure
$ make
$ make check
$ sudo make install
This will perform all configuration checks and select for build, test, and installation all
components that pass.
For finer control, read the instructions at BuildConfiguration.
The package was installed and tested on Linux Fedora Core 2 (kernel version 2.6.10-
1.771_FC2), Fedora Core 3 (kernel version 2.6.9-1.667) AND Fedora Core 4 (kernel
version 2.6.16-1.2111_FC4). Fedora Core 2, 3 & 4 recognized most of my system
hardware and also my wireless PCI card.
The Dell Laptop’s may have a problem with the Dell TrueMobile wireless PCMCIA
cards, since there is no linux driver for those cards.
The way to activate these cards is by using the NDISWRAPPER
(http://ndiswrapper.sourceforge.net/). The ndiswrapper package can be downloaded from
http://sourceforge.net/projects/ndiswrapper/ and the installation instructions can be found
at http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation.
Follow all the steps as is, expect the “step 4: Configure interface”, the easier way to do it
is first identify the interface id by running “iwconfig”. Suppose it is ”wlan0”,
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Wireless
ESSID=linksys
KEY=5136AS7F81
CHANNEL=1
GATEWAY=192.168.2.1
(Choose the appropriate ESSID, KEY and GATEWAY)
Then automate the ndiswrapper module to load on boot, “ndiswrapper –m” as listed
in Step 5.
Any version of Linux can be used, there is no recommended version of Linux. Newer
versions have most of the packages needed preinstalled, whereas the older ones may
require a manual install of the packages.
Current Defects:
#29 templates are not expanded automatically in gr-trellis/src/lib
#31 plot.py _ticks routine picks bad strategy for producing tick mark labels
#44 portaudio build/link problems on Windows/Cygwin
#48 abort when no device specified on portaudio source or sink; Cygwin std::string problem
#50 make -j2 on Cygwin fails when make -j1 completes (gnuradio-core)
#56 make check in gnuradio-core fails
#71 audio.py doesn't look for audio_windows
#78 USRP compile using SDCC 2.6 fails on Intel-Mac
#85 Memory tests fail on NetBSD
#99 Errors building gnuradio-3.0.2 using MinGW/MSYS
#100 u_long and u_char not defined in MinGW, used in gr-error-correcting-codes
#101 sys/mman.h not defined on MinGW, used in gr-radar
#103 gr_throttle does nothing on MinGW; patch attached
#104 gr_oscope_guts.cc outputs initial garbage; patch attached
Current Enhancements:
#4 make doc should traverse whole tree
#5 Generate python-centric docs from Doxygen xml output
#9 Speed up compilation of gnuradio_swig_python.cc
#49 Add --with-prereqs or similar to configure
#57 on OSX, make ("ar") breaks when path name contains whitespace characters
#58 gr-radar doesn't perform any qa tests
#66 hw/sw closed loop AGC
#67 Standardized digital transmit levels for USRP
#69 Split up gnuradio.i / gnuradio_swig_python.cc to shorten incremental compilations
#72 Try shortening preamble from 32-bits to 8 or 16.
#73 Consider supporting flowgraphs with cycles
#74 Consider NOT requiring Python
#75 rewrite hierarchical blocks so that they are first class objects
#86 Get jcooley's OpenGL waterfall display working again
#89 Integrate gr-rds component into SVN trunk
#90 Better error message on USB version mis-matching
#91 Write plotting widget in C++ to improve performance
#102 examples that import powermate fail on MinGW
#105 Allow either NumPy or Numeric to be used
Current Tasks:
#62 copy www.gnu.org web site to gnuradio.org
Suggested Projects: