GNU Radio Companion (Old)

Note These instructions are for GRC 0.70 and below. If you are using the GRC bundled with your gnuradio installation, please use this guide instead.

The GNU Radio Companion is a preliminary graphical user interface which allows GNU Radio components to be put together graphically. It is currently under development by Josh Blum. GNU Radio Companion encompasses over 200 blocks from the GNU Radio Project.

How it Works

Blocks are manually integrated into GRC via descriptive python definitions. The definitions are very flexible, and allow multiple GNU Radio blocks to be grouped into a single "super-block". A graphical interface allows the user to configure and connect these blocks into a flow graph. The flow graph is saved in an xml format. Another program reads this xml file and reconstructs the flow graph with native GNU Radio blocks.


Flow Graph:
A flow graph is an interconnection of signal processing blocks. GRC provides a scrollable window to place and connect various signal blocks.

Signal Blocks:
Signal blocks perform all of the processing in a flow graph. For example: A signal block can be a filter, an adder, a source, or a sink. GRC represents signal blocks as colored, rectangular blocks. Each block has a label indicating the name of the block and a list of parameters.

Parameters influence the functioning of a signal block. For example: A parameter can be a sampling rate, a gain, or a flag. Most parameters for a signal block are displayed below the block's label.

Sockets are the inputs and outputs of a signal block. Each signal block has certain sockets associated with it. For example: An adder has several input sockets and one output socket. GRC represents a socket as a small rectangle attached to the graphical signal block. The socket has a label indicating its function. Labels are usually named "in" or "out". Some labels are named "vin" or "vout" to indicate a vector type. Sockets are also are colored to indicate their data type. Blue->complex. Red->float. Green->int. Yellow->short. Purple->byte.

A connection joins an input and an output socket. GRC represents connections by drawing a line between the two sockets. Connections must be between matching data types (even vectored and non-vectored data types).

A variable holds a number/string that is available to all elements in the flow graph. Variables serve two purposes: One, parameters can share a value by using a common variable. Two, a variable with a range can dynamically change the value of a parameter while the flow graph is running.



An archive of all releases can be found here: Release Archive


See the current GRC guide.


GRC dependencies: Any version of GNU Radio should work (however, I recommend the trunk for best support). If a block does not exist in a particular version, GRC will ignore the missing block. Installing GNU Radio will take care of most of GRC's dependencies. GRC needs wx support to run flow graphs, and gtk2 for its main GUI. The python XML module is essential, as all flow graphs and user preferences are saved to and loaded from xml. The package names for pyxml vary among software distributions. If GRC crashes with an XML related error, follow the cygwin + pyxml notes below.
  • wx-python
  • numpy
  • gnuradio with gr-wxgui
  • python-gtk2(>=2.6)
  • python-xml and/or pyxml

Notes for Ubuntu Hardy Heron users: Ubuntu removed the xml.dom.ext package from their repositories. GRC 0.70 and below require this package. Solution: download the pyxml source. Unpack the source, and run "sudo python install" from the source directory. This issue has been fixed in the trunk and in future releases.

Notes for Cygwin users: Install pygtk with the Cygwin setup. For python-xml, download the pyxml source.
Unpack the source, and run "sudo python install" from the source directory. If that fails, just copy the xml directory into the python site-packages directory (with GNU Radio). Make sure that you install the X11 server with cygwin, and start the X11 server before running GRC.

Notes for MacOSX users: Follow the Mac Install Instructions. Use mac ports (or whatever program you picked) to install the dependencies for GRC. Also, make sure to install wx-python 2.6.3 or 2.8.6, since 2.8.4 causes problems.

Operating System Compatibility
  • Ubuntu
  • openSuse
  • Fedora Core
  • NetBSD
  • MacOSX + mac ports
  • Windows XP + MinGW
  • Windows XP + Cygwin
  • Gentoo on ppc
  • Others: Unknown


Executing the Program

In the src folder, execute with the python interpreter. Saved flow graphs can be passed as the first argument to

Modifying Blocks

Adding a block:
Select a block from the signal block tree menu. Double click the block or click the add button. A new signal block will be placed on the screen.

Moving a block:
Left click a block and drag it around the flow graph. If you drag a block near a border that can be scrolled, wiggle the block to advance the scroll bar.

Rotating a block:
With a block selected, select rotate right or left from the tool bar. Short-cut keys: right or left.

Deleting a block:
With a block selected, select delete from the tool bar. Short-cut keys: delete.

Connecting blocks:
Left click on one socket and then left click on another socket. A connection will only be created between input and output sockets. An input socket may have no existing connections. An output socket may have unlimited connections. Red lines surrounding the connection indicates that the data types of the sockets do not match.

Modifying Parameters

Double click on a block or select it and choose properties from the edit menu. A dialog containing all the parameters for the signal block will appear. Some parameters are set via a drop down menu, most must be typed in as characters. These parameters are usually numeric, representing sampling rates, gains, and amplitudes. Numeric parameters may contain mathematical expressions with variables.

Math Expressions

A math expression may contain any number of variables, numbers, and operators. There must be an operator between every number/variable. Possible operators are +, -, *, /, ^. Numbers can be integers, decimals, floating-point, and complex. Python's built in floating point and imaginary formats are used. Floating point numbers end in an "e" followed by a signed integer. Imaginary numbers end in a "j". Matching bracket pairs are allowed: (), [], {}. Variables are denoted by a leading '$' character.

See Help->Math Expressions in the Editor.

Using Variables

The variable window has 5 columns: variable name, default value, minimum value, maximum value, step size. Choose add to create a new variable entry. Choose remove to delete a selected variable entry. Any value in an entry can be edited by clicking on the input field in the selected row. Invalid changes to a cell are ignored. Variable names are case-sensitive and alpha-numeric, and they may contain hyphens. The first character must be a letter. The default value for the variable may be any string.

Using Variables with Ranges

A variable with a range may be dynamically changed while the flow graph is executing. However, only signal block parameters, underlined in the signal block's properties window, can actually be altered while the flow graph is executing.

For a ranged variable, the default, minimum, maximum, and step size values must be of type float or int. To make a variable with a range, simply type a number into the min or the max input field and the other fields will be filled in. The min must be less than or equal to the default, and the max must be greater than or equal to the default. To remove the range from a variable, just clear one of the input cells for min, max, or step and all cells will be cleared.

Flow Graph Validation

  • Connections are between input and output sockets of the same data type. Different data types have different colors. Therefore, input and output colors must match. Invalid connections are highlighted red.
  • All sockets must be connected (except for optional ones noted in the docs). Disconnected sockets cause their signal block to have a red label.
  • All signal block parameters must be valid. Ex: Numerical expressions can be parsed. Invalid parameters have red labels and cause their signal block to have a red label.

Running a Flow Graph

If a flow graph is valid, all parameters are valid and all sockets are connected. Choose run from the tool bar or press F5. A wx window will appear with any sliders or graphs that were added. To stop the flow graph, close the wx window, press stop in the tool bar, or press F7. Flow graphs can be run without the interface by invoking the python interpreter on, and passing the saved flow graph as the first argument to


The options menu allows the user to adjust the window size, set user preferences, and view USRP information.
  • The window size dialog allows the user to set the size of the flow graph in pixels.
  • The user preferences dialog stores per-user preferences. These preferences can alter the flow graph validation, or set a default flow graph when the program starts.
  • The USRP diagnostics dialog queries the USRP and selected daughterboard for information.


Feel free to add requests for new features and behaviors.

  • GRC Utils, modeling gnuradio utils
  • GRC Examples, modeling gnuradio examples
  • Hierarchical Flow Graphs
  • OFDM

Screen Shots

Screen Shots

Feel free to submit your own screen shots or flow graphs.

注:GNU Radio Companion (Old)(原文出处,翻译整理仅供参考!)