GNU Radio Patches

From SpenchWiki
Jump to: navigation, search

Overview

This page details modifications I have made to GNU Radio, and the patches you can use to modify your own code.

IMPORTANT: Be careful when applying patches! I have grouped my patches by the version of GNU Radio that I modified. Most of them should work on newer versions of the source tree, but make sure you backup anything important before applying them. YMMV!

Seamless BorIP Source

If you wish to have seamless integration of BorIP with GNU Radio (i.e. still use all flowgraphs that would make use of a locally-connected USRP 1), do the following:

  1. Download gr-baz
  2. Apply one of the patches (depending on your version of GNU Radio) below to enable BorIP support in gr_udp_source
  3. Compile and install gr-baz
  4. Add the following to gr-usrp/src/__init__.py:
import sys
if not sys.modules.has_key('baz.borip'):
    from baz import borip

This tells Python to import borip whenever the Python-bindings for the USRP are requested. BorIP automatically patches into usrp_source_c and will attempt to connect to a BorIP server if no local device is present. The default server address is specified in ~/.gnuradio/config.conf:

[borip]
server=<server address>

NOTE: This modification is already included in the 3.4.1-13-gcb23b7a2 patches, so it is only necessary if you do not apply them (or at the very least want to know what's going on).

3.3git-740-ge2222445

Combined patch bundle: gnuradio-3.3git-740-ge2222445.diff

NOTE: The bundle above does NOT include the following individual patches:

  • baz_grc_any_blocks (GRC 'any' blocks):
    • This is because you may have already applied the patch from gr-baz. If not, apply either this one, or the individual ones from gr-baz.
  • blks_dxpsk_demod-corrected:
    • The errors in this file in this version of GNU Radio were corrected in later versions. Only apply this patch if your file is in error (check the patch to see what is wrong with the old file).
  • gr_udp_source-borip
    • This version of the patch completely overhauls the OLD version of gr_udp_source to the version in the newer GNU Radio. Apply this manually if you still have the old version. Otherwise use the patch for the newer version below.

baz_grc_any_blocks

Not in bundle.

Enables support for 'any' blocks in GRC.

blks2_dxpsk_demod-corrected

Not in bundle.

Fixes incorrect arguments supplied in GRC XML block definition. This has been fixed in later versions of GNU Radio, so check if you still need to apply this patch.

constsink-variable_symbol_rate

Allows for changing of the symbol rate at runtime (i.e. no longer fixed from design time).

cpm-Numeric

Minor change to cpm modulator to use Numeric instead of Numpy (so it actually runs).

gr_clock_recovery_mm_xx-error_out

Adds second optional output to Clock Recovery GRC block so that the error value is also output by the block.

NOTE: This is only supported by the Complex (_cc) version, and not the Float (_ff) version. (Sorry, I didn't get around to fixing the _ff one.)

gr_decode_ccsds_27_fb-viterbi

Changes the decoder to track the branch metric value, and output it as a measure of BER from the GRC block. This is good for determining whether the correct deFEC parameters have been chosen with the appropriate gr-baz blocks.

gr_mpsk_receiver_cc-debug

Output all the internal states of the receiver through new block outputs (also shown in GRC 'Debug' block). This is useful to send the states to different files, which can then be graphed in GNU Plot to determine how well the receiver is locking on to the input PSK signal.

gr_udp_source-borip

Not in bundle.

Added BorIP support to the UDP Source block and exposes various settings in GRC.

NOTE: This patch completely overhauls the OLD version of gr_udp_source to the new version. If you already have a more recent version of GNU Radio, please consider using the appropriate newer patch below.

gr_vector_source_X-set

Change the reference vector at runtime (i.e. no longer fixed from design time).

gr_wavfile-auxi

Enable the reader to handle WAV files with the 'auxi' RIFF chunk (e.g. recordings from HDSDR) instead of raising an exception.

rational_resampler-variable

Updates the rational resampler to allow for runtime changes in the interpolation and decimation factors (i.e. no longer fixed from design time). This is helpful for experimenting with different resampling rates without having to restart the flowgraph.

Xpsk-differential_encoding

Changes the PSK modulators to allow for optional differential encoding (i.e. no longer permanently enabled). Helpful if differential encoding is not desired, or done beforehand.

3.4.1-13-gcb23b7a2

NOTE: If you are applying the following after applying the previous one, some of the patching will fail as your code should already have been updated (so it's not an error, it should just say that it appears to have already been patched). For example, you may have already applied the rational_resampler-variable update above, but the code is the same so it should just skip it (hopefully!).

Combined patch bundle: gnuradio-3.4.1-13-gcb23b7a2.diff

am_demod-gain

Allows for changing audio passband and stopband, and gain, at runtime (i.e. no longer fixed from design time).

gr_agc_cc-nan

Experimental fixes for handling hugely varying incoming signal values that cause the AGC to fall into a degenerate state (i.e. outputting NaNs).

gr_udp_source-borip

Adds BorIP support the gr_udp_source and GRC block.

NOTE: This patch updates the new version of gr_udp_source (so this patch is considerably smaller than the previous one above that upgrades the old un-patched version of gr_udp_source to the new version with BorIP support).

rational_resampler-variable

As above.

Updates the rational resampler to allow for runtime changes in the interpolation and decimation factors (i.e. no longer fixed from design time). This is helpful for experimenting with different resampling rates without having to restart the flowgraph.

usrp-init

Adds seamless support for BorIP (via usrp.source_c) to GNU Radio, so all flowgraphs will still work with a remote USRP accessible via BorIP server. Remember to set the default server address (see BorIP note at top)!