diff --git a/.clang-format b/.clang-format
index b023ad2..3e4ddd4 100644
--- a/.clang-format
+++ b/.clang-format
@@ -6,7 +6,7 @@ AlignAfterOpenBracket: Align
 AlignConsecutiveAssignments: false
 AlignConsecutiveDeclarations: false
 AlignEscapedNewlinesLeft: true
-AlignOperands: true
+AlignOperands:   true
 AlignTrailingComments: true
 AllowAllParametersOfDeclarationOnNextLine: true
 AllowShortBlocksOnASingleLine: false
@@ -22,58 +22,58 @@ BinPackArguments: false
 BinPackParameters: false
 BreakBeforeBraces: Custom
 BraceWrapping:
-  AfterClass: true
+  AfterClass:      true
   AfterControlStatement: false
-  AfterEnum: false
-  AfterFunction: true
-  AfterNamespace: false
+  AfterEnum:       false
+  AfterFunction:   true
+  AfterNamespace:  false
   AfterObjCDeclaration: false
-  AfterStruct: false
-  AfterUnion: false
-  BeforeCatch: false
-  BeforeElse: false
-  IndentBraces: false
+  AfterStruct:     false
+  AfterUnion:      false
+  BeforeCatch:     false
+  BeforeElse:      false
+  IndentBraces:    false
 BreakBeforeBinaryOperators: None
 BreakBeforeTernaryOperators: true
 BreakConstructorInitializersBeforeComma: false
 BreakAfterJavaFieldAnnotations: false
 BreakStringLiterals: true
-ColumnLimit: 90
-CommentPragmas: "^ IWYU pragma:"
+ColumnLimit:     90
+CommentPragmas:  '^ IWYU pragma:'
 ConstructorInitializerAllOnOneLineOrOnePerLine: true
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: false
 DerivePointerAlignment: false
-DisableFormat: false
+DisableFormat:   false
 ExperimentalAutoDetectBinPacking: false
 ForEachMacros:
   - foreach
   - Q_FOREACH
   - BOOST_FOREACH
 IncludeCategories:
-  - Regex: '^"(gnuradio)/'
-    Priority: 1
-  - Regex: "^<(gnuradio)/"
-    Priority: 2
-  - Regex: "^<(boost)/"
-    Priority: 98
-  - Regex: "^<[a-z]*>$"
-    Priority: 99
-  - Regex: '^".*"$'
-    Priority: 0
-  - Regex: ".*"
-    Priority: 10
+  - Regex:           '^"(gnuradio)/'
+    Priority:        1
+  - Regex:           '^<(gnuradio)/'
+    Priority:        2
+  - Regex:           '^<(boost)/'
+    Priority:        98
+  - Regex:           '^<[a-z]*>$'
+    Priority:        99
+  - Regex:           '^".*"$'
+    Priority:        0
+  - Regex:           '.*'
+    Priority:        10
 
-IncludeIsMainRegex: "(Test)?$"
+IncludeIsMainRegex: '(Test)?$'
 IndentCaseLabels: false
 IndentWidth: 4
 IndentWrappedFunctionNames: false
 JavaScriptQuotes: Leave
 JavaScriptWrapImports: true
 KeepEmptyLinesAtTheStartOfBlocks: true
-MacroBlockBegin: ""
-MacroBlockEnd: ""
+MacroBlockBegin: ''
+MacroBlockEnd:   ''
 MaxEmptyLinesToKeep: 2
 NamespaceIndentation: None
 ObjCBlockIndentWidth: 2
@@ -86,19 +86,19 @@ PenaltyBreakString: 1000
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
 PointerAlignment: Left
-ReflowComments: true
-SortIncludes: true
+ReflowComments:  true
+SortIncludes:    true
 SpaceAfterCStyleCast: false
 SpaceAfterTemplateKeyword: true
 SpaceBeforeAssignmentOperators: true
 SpaceBeforeParens: ControlStatements
 SpaceInEmptyParentheses: false
 SpacesBeforeTrailingComments: 1
-SpacesInAngles: false
+SpacesInAngles:  false
 SpacesInContainerLiterals: true
 SpacesInCStyleCastParentheses: false
 SpacesInParentheses: false
 SpacesInSquareBrackets: false
-Standard: Cpp11
-TabWidth: 8
-UseTab: Never
+Standard:        Cpp11
+TabWidth:        8
+UseTab:          Never
diff --git a/.gitignore b/.gitignore
index 065e739..85c92e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
-build/**
-.vscode/**
+*~
+*.pyc
+*.pyo
+build*/
+examples/grc/*.py
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 78290cc..1572d1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,22 +1,10 @@
-# Copyright 2011,2012,2014,2016,2018 Free Software Foundation, Inc.
+# Copyright 2011-2020 Free Software Foundation, Inc.
 #
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 
 ########################################################################
 # Project setup
@@ -42,10 +30,10 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
 list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
 
 # Set the version information here
-set(VERSION_MAJOR 3)
-set(VERSION_API    0)
-set(VERSION_ABI 1)
-set(VERSION_PATCH 0)
+set(VERSION_MAJOR 1)
+set(VERSION_API   0)
+set(VERSION_ABI   0)
+set(VERSION_PATCH git)
 
 cmake_policy(SET CMP0011 NEW)
 
@@ -63,11 +51,11 @@ if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
 endif()
 
 IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-    SET(CMAKE_CXX_STANDARD 11)
+    SET(CMAKE_CXX_STANDARD 14)
 ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    SET(CMAKE_CXX_STANDARD 11)
+    SET(CMAKE_CXX_STANDARD 14)
 ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
-    SET(CMAKE_CXX_STANDARD 11)
+    SET(CMAKE_CXX_STANDARD 14)
 ELSE()
     message(WARNING "C++ standard could not be set because compiler is not GNU, Clang or MSVC.")
 ENDIF()
@@ -82,19 +70,12 @@ ELSE()
     message(WARNING "C standard could not be set because compiler is not GNU, Clang or MSVC.")
 ENDIF()
 
-
 ########################################################################
 # Install directories
 ########################################################################
-set(MIN_GR_VERSION "3.8.0")
-set(MAX_GR_VERSION "3.9.0")
-find_package(Gnuradio REQUIRED)
+include(FindPkgConfig)
+find_package(Gnuradio "3.9" REQUIRED)
 include(GrVersion)
-if("${Gnuradio_VERSION}" VERSION_LESS MIN_GR_VERSION OR "${Gnuradio_VERSION}" 
-        VERSION_GREATER_EQUAL MAX_GR_VERSION)
-    MESSAGE(FATAL_ERROR "GnuRadio version required: >=\"" ${MIN_GR_VERSION} "\" \
-        < \"${MAX_GR_VERSION}\"  found: \"" ${Gnuradio_VERSION} "\"")
-endif()
 
 include(GrPlatform) #define LIB_SUFFIX
 
@@ -109,14 +90,6 @@ set(GR_PKG_DOC_DIR      ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME})
 set(GR_PKG_CONF_DIR     ${GR_CONF_DIR}/${CMAKE_PROJECT_NAME}/conf.d)
 set(GR_PKG_LIBEXEC_DIR  ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME})
 
-########################################################################
-# LimeSuite
-########################################################################
-
-find_package(LimeSuite REQUIRED)
-message(STATUS "LimeSuite version ${LimeSuite_VERSION} found.")
-include_directories("${LIMESUITE_INCLUDE_DIR}/lime")
-
 ########################################################################
 # On Apple only, set install name and use rpath correctly, if not already set
 ########################################################################
@@ -142,6 +115,53 @@ endif(APPLE)
 ########################################################################
 find_package(Doxygen)
 
+########################################################################
+# PyBind11 Related
+########################################################################
+
+find_package(pybind11 REQUIRED)
+execute_process(
+    COMMAND "${PYTHON_EXECUTABLE}" -c
+    "try:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n  print(inc_path, end='')\nexcept:\n pass"
+    OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR)
+# format path in CMake-style for consistency with other path variables
+# (a consistent style helps conda builds by using the same path separators)
+file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" PYTHON_NUMPY_INCLUDE_DIR)
+
+########################################################################
+# Find LimeSuite
+########################################################################
+MESSAGE(STATUS "Configuring LimeSuite C++ Libraries...")
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(PC_LIMESUITE LimeSuite)
+find_path(LIMESUITE_INCLUDE_DIRS
+ NAMES LimeSuite.h
+ HINTS ${PC_LIMESUITE_INCLUDEDIR}/lime
+ PATHS ${LIMESUITE_PKG_INCLUDE_DIRS}
+       /usr/include/lime
+       /usr/local/include/lime
+)
+find_library(LIMESUITE_LIB
+ NAMES LimeSuite limesuite
+ HINTS ${PC_LIMESUITE_LIBDIR}
+ PATHS ${LIMESDR_PKG_LIBRARY_DIRS}
+       /usr/lib
+       /usr/local/lib
+)
+
+message(STATUS "Found LimeSuite: ${LIMESUITE_INCLUDE_DIRS}, ${LIMESUITE_LIB}")
+
+########################################################################
+# LimeRFE
+########################################################################
+include(FeatureSummary)
+include(CMakeDependentOption)
+option(ENABLE_RFE "Enable LimeRFE support" OFF)
+add_feature_info(LimeRFE ENABLE_LIBRARY "LimeRFE support")
+if(ENABLE_RFE)
+    message(STATUS "Enabling LimeRFE support")
+endif()
+
 ########################################################################
 # Setup doxygen option
 ########################################################################
@@ -163,7 +183,6 @@ add_custom_target(uninstall
     ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
     )
 
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -171,9 +190,14 @@ add_subdirectory(include/limesdr)
 add_subdirectory(lib)
 add_subdirectory(apps)
 add_subdirectory(docs)
-add_subdirectory(swig)
-add_subdirectory(python)
-add_subdirectory(grc)
+# NOTE: manually update below to use GRC to generate C++ flowgraphs w/o python
+if(ENABLE_PYTHON)
+  message(STATUS "PYTHON and GRC components are enabled")
+  add_subdirectory(python)
+  add_subdirectory(grc)
+else(ENABLE_PYTHON)
+  message(STATUS "PYTHON and GRC components are disabled")
+endif(ENABLE_PYTHON)
 
 ########################################################################
 # Install cmake search helper for this library
diff --git a/LICENSE b/LICENSE
index 6ea713f..42ac245 100755
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright 2019 Lime Microsystems info@limemicro.com
+Copyright 2018 Lime Microsystems info@limemicro.com
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -11,4 +11,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program.  If not, see <https://www.gnu.org/licenses/>.
+along with this program.  If not, see <https://www.gnu.org/licenses/>.
\ No newline at end of file
diff --git a/MANIFEST.md b/MANIFEST.md
old mode 100755
new mode 100644
index d189447..303d9c5
--- a/MANIFEST.md
+++ b/MANIFEST.md
@@ -1,13 +1,17 @@
 title: The LIMESDR OOT Module
-brief: gr-limesdr blocks are used to control LimeSDR family devices
-tags: #sink, #source, #settings
+brief: Short description of gr-limesdr
+tags: # Tags are arbitrary, but look at CGRAN what other authors are using
   - sdr
 author:
-  - Lime Microsystems <info@limemicro.com>
+  - Author Name <authors@email.address>
 copyright_owner:
-  - Lime Microsystems
+  - Copyright Owner 1
 license:
-#repo: 
-#website: 
-#icon: 
+gr_supported_version: # Put a comma separated list of supported GR versions here
+#repo: # Put the URL of the repository here, or leave blank for default
+#website: <module_website> # If you have a separate project website, put it here
+#icon: <icon_url> # Put a URL to a square image here that will be used as an icon on CGRAN
 ---
+A longer, multi-line description of gr-limesdr.
+You may use some *basic* Markdown here.
+If left empty, it will try to find a README file instead.
diff --git a/README.md b/README.md
index 075af86..0e7142b 100755
--- a/README.md
+++ b/README.md
@@ -8,21 +8,19 @@ Package includes GNU Radio blocks for various LimeSDR boards.
 
 ## Dependencies
  
-* GNU Radio (>=3.8)
+* GNU Radio(3.9)
 * BOOST
-* SWIG
+* pybind11
 * LimeSuite
 
 ## Installation process
 
-* Installing GNURadio
-To install GNURadio3.8 please follow this guide [Installing GNURadio](https://wiki.gnuradio.org/index.php/InstallingGR)
+#### Linux
 
 * Building from source
 <pre>
-git clone https://github.com/myriadrf/gr-limesdr.git
+git clone https://github.com/chrisjohgorman/gr-limesdr.git
 cd gr-limesdr
-git checkout gr-3.8
 mkdir build
 cd build
 cmake ..
@@ -31,6 +29,11 @@ sudo make install
 sudo ldconfig
 </pre>
 
+## Known issues
+
+Known issues are located in:
+gr-limesdr/docs/known_issues.txt
+
 ## GNU Radio-Companion examples
 
 GNU Radio-Companion examples are located in:
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
index 6005bc1..7dbba51 100644
--- a/apps/CMakeLists.txt
+++ b/apps/CMakeLists.txt
@@ -3,20 +3,8 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 
 include(GrPython)
 
diff --git a/cmake/Modules/FindCppUnit.cmake b/cmake/Modules/FindCppUnit.cmake
new file mode 100755
index 0000000..f93ade3
--- /dev/null
+++ b/cmake/Modules/FindCppUnit.cmake
@@ -0,0 +1,39 @@
+# http://www.cmake.org/pipermail/cmake/2006-October/011446.html
+# Modified to use pkg config and use standard var names
+
+#
+# Find the CppUnit includes and library
+#
+# This module defines
+# CPPUNIT_INCLUDE_DIR, where to find tiff.h, etc.
+# CPPUNIT_LIBRARIES, the libraries to link against to use CppUnit.
+# CPPUNIT_FOUND, If false, do not try to use CppUnit.
+
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(PC_CPPUNIT "cppunit")
+
+FIND_PATH(CPPUNIT_INCLUDE_DIRS
+    NAMES cppunit/TestCase.h
+    HINTS ${PC_CPPUNIT_INCLUDE_DIR}
+    ${CMAKE_INSTALL_PREFIX}/include
+    PATHS
+    /usr/local/include
+    /usr/include
+)
+
+FIND_LIBRARY(CPPUNIT_LIBRARIES
+    NAMES cppunit
+    HINTS ${PC_CPPUNIT_LIBDIR}
+    ${CMAKE_INSTALL_PREFIX}/lib
+    ${CMAKE_INSTALL_PREFIX}/lib64
+    PATHS
+    ${CPPUNIT_INCLUDE_DIRS}/../lib
+    /usr/local/lib
+    /usr/lib
+)
+
+LIST(APPEND CPPUNIT_LIBRARIES ${CMAKE_DL_LIBS})
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS)
+MARK_AS_ADVANCED(CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS)
diff --git a/cmake/Modules/FindGnuradioRuntime.cmake b/cmake/Modules/FindGnuradioRuntime.cmake
new file mode 100755
index 0000000..afed684
--- /dev/null
+++ b/cmake/Modules/FindGnuradioRuntime.cmake
@@ -0,0 +1,36 @@
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(PC_GNURADIO_RUNTIME gnuradio-runtime)
+
+if(PC_GNURADIO_RUNTIME_FOUND)
+  # look for include files
+  FIND_PATH(
+    GNURADIO_RUNTIME_INCLUDE_DIRS
+    NAMES gnuradio/top_block.h
+    HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
+          ${PC_GNURADIO_RUNTIME_INCLUDE_DIRS}
+          ${CMAKE_INSTALL_PREFIX}/include
+    PATHS /usr/local/include
+          /usr/include
+    )
+
+  # look for libs
+  FIND_LIBRARY(
+    GNURADIO_RUNTIME_LIBRARIES
+    NAMES gnuradio-runtime
+    HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib
+          ${PC_GNURADIO_RUNTIME_LIBDIR}
+          ${CMAKE_INSTALL_PREFIX}/lib/
+          ${CMAKE_INSTALL_PREFIX}/lib64/
+    PATHS /usr/local/lib
+          /usr/local/lib64
+          /usr/lib
+          /usr/lib64
+    )
+
+  set(GNURADIO_RUNTIME_FOUND ${PC_GNURADIO_RUNTIME_FOUND})
+endif(PC_GNURADIO_RUNTIME_FOUND)
+
+INCLUDE(FindPackageHandleStandardArgs)
+# do not check GNURADIO_RUNTIME_INCLUDE_DIRS, is not set when default include path us used.
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_RUNTIME DEFAULT_MSG GNURADIO_RUNTIME_LIBRARIES)
+MARK_AS_ADVANCED(GNURADIO_RUNTIME_LIBRARIES GNURADIO_RUNTIME_INCLUDE_DIRS)
diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake
new file mode 100755
index 0000000..188c404
--- /dev/null
+++ b/cmake/Modules/GrMiscUtils.cmake
@@ -0,0 +1,525 @@
+# Copyright 2010-2011,2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+if(DEFINED __INCLUDED_GR_MISC_UTILS_CMAKE)
+    return()
+endif()
+set(__INCLUDED_GR_MISC_UTILS_CMAKE TRUE)
+
+########################################################################
+# Set global variable macro.
+# Used for subdirectories to export settings.
+# Example: include and library paths.
+########################################################################
+function(GR_SET_GLOBAL var)
+    set(${var} ${ARGN} CACHE INTERNAL "" FORCE)
+endfunction(GR_SET_GLOBAL)
+
+########################################################################
+# Set the pre-processor definition if the condition is true.
+#  - def the pre-processor definition to set and condition name
+########################################################################
+function(GR_ADD_COND_DEF def)
+    if(${def})
+        add_definitions(-D${def})
+    endif(${def})
+endfunction(GR_ADD_COND_DEF)
+
+########################################################################
+# Check for a header and conditionally set a compile define.
+#  - hdr the relative path to the header file
+#  - def the pre-processor definition to set
+########################################################################
+function(GR_CHECK_HDR_N_DEF hdr def)
+    include(CheckIncludeFileCXX)
+    CHECK_INCLUDE_FILE_CXX(${hdr} ${def})
+    GR_ADD_COND_DEF(${def})
+endfunction(GR_CHECK_HDR_N_DEF)
+
+########################################################################
+# Include subdirectory macro.
+# Sets the CMake directory variables,
+# includes the subdirectory CMakeLists.txt,
+# resets the CMake directory variables.
+#
+# This macro includes subdirectories rather than adding them
+# so that the subdirectory can affect variables in the level above.
+# This provides a work-around for the lack of convenience libraries.
+# This way a subdirectory can append to the list of library sources.
+########################################################################
+macro(GR_INCLUDE_SUBDIRECTORY subdir)
+    #insert the current directories on the front of the list
+    list(INSERT _cmake_source_dirs 0 ${CMAKE_CURRENT_SOURCE_DIR})
+    list(INSERT _cmake_binary_dirs 0 ${CMAKE_CURRENT_BINARY_DIR})
+
+    #set the current directories to the names of the subdirs
+    set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir})
+    set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${subdir})
+
+    #include the subdirectory CMakeLists to run it
+    file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+    include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
+
+    #reset the value of the current directories
+    list(GET _cmake_source_dirs 0 CMAKE_CURRENT_SOURCE_DIR)
+    list(GET _cmake_binary_dirs 0 CMAKE_CURRENT_BINARY_DIR)
+
+    #pop the subdir names of the front of the list
+    list(REMOVE_AT _cmake_source_dirs 0)
+    list(REMOVE_AT _cmake_binary_dirs 0)
+endmacro(GR_INCLUDE_SUBDIRECTORY)
+
+########################################################################
+# Check if a compiler flag works and conditionally set a compile define.
+#  - flag the compiler flag to check for
+#  - have the variable to set with result
+########################################################################
+macro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have)
+    include(CheckCXXCompilerFlag)
+    CHECK_CXX_COMPILER_FLAG(${flag} ${have})
+    if(${have})
+      if(${CMAKE_VERSION} VERSION_GREATER "2.8.4")
+        STRING(FIND "${CMAKE_CXX_FLAGS}" "${flag}" flag_dup)
+        if(${flag_dup} EQUAL -1)
+          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+          set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
+        endif(${flag_dup} EQUAL -1)
+      endif(${CMAKE_VERSION} VERSION_GREATER "2.8.4")
+    endif(${have})
+endmacro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE)
+
+########################################################################
+# Generates the .la libtool file
+# This appears to generate libtool files that cannot be used by auto*.
+# Usage GR_LIBTOOL(TARGET [target] DESTINATION [dest])
+# Notice: there is not COMPONENT option, these will not get distributed.
+########################################################################
+function(GR_LIBTOOL)
+    if(NOT DEFINED GENERATE_LIBTOOL)
+        set(GENERATE_LIBTOOL OFF) #disabled by default
+    endif()
+
+    if(GENERATE_LIBTOOL)
+        include(CMakeParseArgumentsCopy)
+        CMAKE_PARSE_ARGUMENTS(GR_LIBTOOL "" "TARGET;DESTINATION" "" ${ARGN})
+
+        find_program(LIBTOOL libtool)
+        if(LIBTOOL)
+            include(CMakeMacroLibtoolFile)
+            CREATE_LIBTOOL_FILE(${GR_LIBTOOL_TARGET} /${GR_LIBTOOL_DESTINATION})
+        endif(LIBTOOL)
+    endif(GENERATE_LIBTOOL)
+
+endfunction(GR_LIBTOOL)
+
+########################################################################
+# Do standard things to the library target
+# - set target properties
+# - make install rules
+# Also handle gnuradio custom naming conventions w/ extras mode.
+########################################################################
+function(GR_LIBRARY_FOO target)
+    #parse the arguments for component names
+    include(CMakeParseArgumentsCopy)
+    CMAKE_PARSE_ARGUMENTS(GR_LIBRARY "" "RUNTIME_COMPONENT;DEVEL_COMPONENT" "" ${ARGN})
+
+    #set additional target properties
+    set_target_properties(${target} PROPERTIES SOVERSION ${LIBVER})
+
+    #install the generated files like so...
+    install(TARGETS ${target}
+        LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .so/.dylib file
+        ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_DEVEL_COMPONENT}   # .lib file
+        RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .dll file
+    )
+
+    #extras mode enabled automatically on linux
+    if(NOT DEFINED LIBRARY_EXTRAS)
+        set(LIBRARY_EXTRAS ${LINUX})
+    endif()
+
+    #special extras mode to enable alternative naming conventions
+    if(LIBRARY_EXTRAS)
+
+        #create .la file before changing props
+        GR_LIBTOOL(TARGET ${target} DESTINATION ${GR_LIBRARY_DIR})
+
+        #give the library a special name with ultra-zero soversion
+        set_target_properties(${target} PROPERTIES OUTPUT_NAME ${target}-${LIBVER} SOVERSION "0.0.0")
+        set(target_name lib${target}-${LIBVER}.so.0.0.0)
+
+        #custom command to generate symlinks
+        add_custom_command(
+            TARGET ${target}
+            POST_BUILD
+            COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so
+            COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0
+            COMMAND ${CMAKE_COMMAND} -E touch ${target_name} #so the symlinks point to something valid so cmake 2.6 will install
+        )
+
+        #and install the extra symlinks
+        install(
+            FILES
+            ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so
+            ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0
+            DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT}
+        )
+
+    endif(LIBRARY_EXTRAS)
+endfunction(GR_LIBRARY_FOO)
+
+########################################################################
+# Create a dummy custom command that depends on other targets.
+# Usage:
+#   GR_GEN_TARGET_DEPS(unique_name target_deps <target1> <target2> ...)
+#   ADD_CUSTOM_COMMAND(<the usual args> ${target_deps})
+#
+# Custom command cant depend on targets, but can depend on executables,
+# and executables can depend on targets. So this is the process:
+########################################################################
+function(GR_GEN_TARGET_DEPS name var)
+    file(
+        WRITE ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp.in
+        "int main(void){return 0;}\n"
+    )
+    execute_process(
+        COMMAND ${CMAKE_COMMAND} -E copy_if_different
+        ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp.in
+        ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp
+    )
+    add_executable(${name} ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp)
+    if(ARGN)
+        add_dependencies(${name} ${ARGN})
+    endif(ARGN)
+
+    if(CMAKE_CROSSCOMPILING)
+        set(${var} "DEPENDS;${name}" PARENT_SCOPE) #cant call command when cross
+    else()
+        set(${var} "DEPENDS;${name};COMMAND;${name}" PARENT_SCOPE)
+    endif()
+endfunction(GR_GEN_TARGET_DEPS)
+
+########################################################################
+# Control use of gr_logger
+# Usage:
+#   GR_LOGGING()
+#
+# Will set ENABLE_GR_LOG to 1 by default.
+# Can manually set with -DENABLE_GR_LOG=0|1
+########################################################################
+function(GR_LOGGING)
+  find_package(Log4cpp)
+
+  OPTION(ENABLE_GR_LOG "Use gr_logger" ON)
+  if(ENABLE_GR_LOG)
+    # If gr_logger is enabled, make it usable
+    add_definitions( -DENABLE_GR_LOG )
+
+    # also test LOG4CPP; if we have it, use this version of the logger
+    # otherwise, default to the stdout/stderr model.
+    if(LOG4CPP_FOUND)
+      SET(HAVE_LOG4CPP True CACHE INTERNAL "" FORCE)
+      add_definitions( -DHAVE_LOG4CPP )
+    else(not LOG4CPP_FOUND)
+      SET(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE)
+      SET(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
+      SET(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE)
+      SET(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
+    endif(LOG4CPP_FOUND)
+
+    SET(ENABLE_GR_LOG ${ENABLE_GR_LOG} CACHE INTERNAL "" FORCE)
+
+  else(ENABLE_GR_LOG)
+    SET(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE)
+    SET(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
+    SET(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE)
+    SET(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
+  endif(ENABLE_GR_LOG)
+
+  message(STATUS "ENABLE_GR_LOG set to ${ENABLE_GR_LOG}.")
+  message(STATUS "HAVE_LOG4CPP set to ${HAVE_LOG4CPP}.")
+  message(STATUS "LOG4CPP_LIBRARIES set to ${LOG4CPP_LIBRARIES}.")
+
+endfunction(GR_LOGGING)
+
+########################################################################
+# Run GRCC to compile .grc files into .py files.
+#
+# Usage: GRCC(filename, directory)
+#    - filenames: List of file name of .grc file
+#    - directory: directory of built .py file - usually in
+#                 ${CMAKE_CURRENT_BINARY_DIR}
+#    - Sets PYFILES: output converted GRC file names to Python files.
+########################################################################
+function(GRCC)
+  # Extract directory from list of args, remove it for the list of filenames.
+  list(GET ARGV -1 directory)
+  list(REMOVE_AT ARGV -1)
+  set(filenames ${ARGV})
+  file(MAKE_DIRECTORY ${directory})
+
+  SET(GRCC_COMMAND ${CMAKE_SOURCE_DIR}/gr-utils/python/grcc)
+
+  # GRCC uses some stuff in grc and gnuradio-runtime, so we force
+  # the known paths here
+  list(APPEND PYTHONPATHS
+    ${CMAKE_SOURCE_DIR}
+    ${CMAKE_SOURCE_DIR}/gnuradio-runtime/python
+    ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/swig
+    ${CMAKE_BINARY_DIR}/gnuradio-runtime/lib/swig
+    )
+
+  if(WIN32)
+    #SWIG generates the python library files into a subdirectory.
+    #Therefore, we must append this subdirectory into PYTHONPATH.
+    #Only do this for the python directories matching the following:
+    foreach(pydir ${PYTHONPATHS})
+      get_filename_component(name ${pydir} NAME)
+      if(name MATCHES "^(swig|lib|src)$")
+        list(APPEND PYTHONPATHS ${pydir}/${CMAKE_BUILD_TYPE})
+      endif()
+    endforeach(pydir)
+  endif(WIN32)
+
+  file(TO_NATIVE_PATH "${PYTHONPATHS}" pypath)
+
+  if(UNIX)
+    list(APPEND pypath "$PYTHONPATH")
+    string(REPLACE ";" ":" pypath "${pypath}")
+    set(ENV{PYTHONPATH} ${pypath})
+  endif(UNIX)
+
+  if(WIN32)
+    list(APPEND pypath "%PYTHONPATH%")
+    string(REPLACE ";" "\\;" pypath "${pypath}")
+    #list(APPEND environs "PYTHONPATH=${pypath}")
+    set(ENV{PYTHONPATH} ${pypath})
+  endif(WIN32)
+
+  foreach(f ${filenames})
+    execute_process(
+      COMMAND ${GRCC_COMMAND} -d ${directory} ${f}
+      )
+    string(REPLACE ".grc" ".py" pyfile "${f}")
+    string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" pyfile "${pyfile}")
+    list(APPEND pyfiles ${pyfile})
+  endforeach(f)
+
+  set(PYFILES ${pyfiles} PARENT_SCOPE)
+endfunction(GRCC)
+
+########################################################################
+# Check if HAVE_PTHREAD_SETSCHEDPARAM and HAVE_SCHED_SETSCHEDULER
+#  should be defined
+########################################################################
+macro(GR_CHECK_LINUX_SCHED_AVAIL)
+set(CMAKE_REQUIRED_LIBRARIES -lpthread)
+    CHECK_CXX_SOURCE_COMPILES("
+        #include <pthread.h>
+        int main(){
+            pthread_t pthread;
+            pthread_setschedparam(pthread,  0, 0);
+            return 0;
+        } " HAVE_PTHREAD_SETSCHEDPARAM
+    )
+    GR_ADD_COND_DEF(HAVE_PTHREAD_SETSCHEDPARAM)
+
+    CHECK_CXX_SOURCE_COMPILES("
+        #include <sched.h>
+        int main(){
+            pid_t pid;
+            sched_setscheduler(pid, 0, 0);
+            return 0;
+        } " HAVE_SCHED_SETSCHEDULER
+    )
+    GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER)
+endmacro(GR_CHECK_LINUX_SCHED_AVAIL)
+
+########################################################################
+# Macros to generate source and header files from template
+########################################################################
+macro(GR_EXPAND_X_H component root)
+
+  include(GrPython)
+
+  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+"#!${PYTHON_EXECUTABLE}
+
+import sys, os, re
+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+
+if __name__ == '__main__':
+    import build_utils
+    root, inp = sys.argv[1:3]
+    for sig in sys.argv[3:]:
+        name = re.sub ('X+', sig, root)
+        d = build_utils.standard_dict2(name, sig, '${component}')
+        build_utils.expand_template(d, inp)
+")
+
+  #make a list of all the generated headers
+  unset(expanded_files_h)
+  foreach(sig ${ARGN})
+    string(REGEX REPLACE "X+" ${sig} name ${root})
+    list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+  endforeach(sig)
+  unset(name)
+
+  #create a command to generate the headers
+  add_custom_command(
+    OUTPUT ${expanded_files_h}
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+    ${root} ${root}.h.t ${ARGN}
+  )
+
+  #install rules for the generated headers
+  list(APPEND generated_includes ${expanded_files_h})
+
+endmacro(GR_EXPAND_X_H)
+
+macro(GR_EXPAND_X_CC_H component root)
+
+  include(GrPython)
+
+  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+"#!${PYTHON_EXECUTABLE}
+
+import sys, os, re
+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+
+if __name__ == '__main__':
+    import build_utils
+    root, inp = sys.argv[1:3]
+    for sig in sys.argv[3:]:
+        name = re.sub ('X+', sig, root)
+        d = build_utils.standard_impl_dict2(name, sig, '${component}')
+        build_utils.expand_template(d, inp)
+")
+
+  #make a list of all the generated files
+  unset(expanded_files_cc)
+  unset(expanded_files_h)
+  foreach(sig ${ARGN})
+    string(REGEX REPLACE "X+" ${sig} name ${root})
+    list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
+    list(APPEND expanded_files_h  ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+  endforeach(sig)
+  unset(name)
+
+  #create a command to generate the source files
+  add_custom_command(
+    OUTPUT ${expanded_files_cc}
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
+    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+    ${root} ${root}.cc.t ${ARGN}
+  )
+
+  #create a command to generate the header files
+  add_custom_command(
+    OUTPUT ${expanded_files_h}
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+    ${root} ${root}.h.t ${ARGN}
+  )
+
+  #make source files depends on headers to force generation
+  set_source_files_properties(${expanded_files_cc}
+    PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+  )
+
+  #install rules for the generated files
+  list(APPEND generated_sources ${expanded_files_cc})
+  list(APPEND generated_headers ${expanded_files_h})
+
+endmacro(GR_EXPAND_X_CC_H)
+
+macro(GR_EXPAND_X_CC_H_IMPL component root)
+
+  include(GrPython)
+
+  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+"#!${PYTHON_EXECUTABLE}
+
+import sys, os, re
+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+
+if __name__ == '__main__':
+    import build_utils
+    root, inp = sys.argv[1:3]
+    for sig in sys.argv[3:]:
+        name = re.sub ('X+', sig, root)
+        d = build_utils.standard_dict(name, sig, '${component}')
+        build_utils.expand_template(d, inp, '_impl')
+")
+
+  #make a list of all the generated files
+  unset(expanded_files_cc_impl)
+  unset(expanded_files_h_impl)
+  unset(expanded_files_h)
+  foreach(sig ${ARGN})
+    string(REGEX REPLACE "X+" ${sig} name ${root})
+    list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc)
+    list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h)
+    list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/${component}/${name}.h)
+  endforeach(sig)
+  unset(name)
+
+  #create a command to generate the _impl.cc files
+  add_custom_command(
+    OUTPUT ${expanded_files_cc_impl}
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
+    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+    ${root} ${root}_impl.cc.t ${ARGN}
+  )
+
+  #create a command to generate the _impl.h files
+  add_custom_command(
+    OUTPUT ${expanded_files_h_impl}
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
+    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+    ${root} ${root}_impl.h.t ${ARGN}
+  )
+
+  #make _impl.cc source files depend on _impl.h to force generation
+  set_source_files_properties(${expanded_files_cc_impl}
+    PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}"
+  )
+
+  #make _impl.h source files depend on headers to force generation
+  set_source_files_properties(${expanded_files_h_impl}
+    PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
+  )
+
+  #install rules for the generated files
+  list(APPEND generated_sources ${expanded_files_cc_impl})
+  list(APPEND generated_headers ${expanded_files_h_impl})
+
+endmacro(GR_EXPAND_X_CC_H_IMPL)
diff --git a/cmake/Modules/GrPlatform.cmake b/cmake/Modules/GrPlatform.cmake
new file mode 100755
index 0000000..fbbea5f
--- /dev/null
+++ b/cmake/Modules/GrPlatform.cmake
@@ -0,0 +1,54 @@
+# Copyright 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+if(DEFINED __INCLUDED_GR_PLATFORM_CMAKE)
+    return()
+endif()
+set(__INCLUDED_GR_PLATFORM_CMAKE TRUE)
+
+########################################################################
+# Setup additional defines for OS types
+########################################################################
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    set(LINUX TRUE)
+endif()
+
+if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/debian_version")
+    set(DEBIAN TRUE)
+endif()
+
+if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/redhat-release")
+    set(REDHAT TRUE)
+endif()
+
+if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/slackware-version")
+    set(SLACKWARE TRUE)
+endif()
+
+########################################################################
+# when the library suffix should be 64 (applies to redhat linux family)
+########################################################################
+if (REDHAT OR SLACKWARE)
+    set(LIB64_CONVENTION TRUE)
+endif()
+
+if(NOT DEFINED LIB_SUFFIX AND LIB64_CONVENTION AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
+    set(LIB_SUFFIX 64)
+endif()
+set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")
diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake
new file mode 100755
index 0000000..06e061e
--- /dev/null
+++ b/cmake/Modules/GrPython.cmake
@@ -0,0 +1,241 @@
+# Copyright 2010-2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+if(DEFINED __INCLUDED_GR_PYTHON_CMAKE)
+    return()
+endif()
+set(__INCLUDED_GR_PYTHON_CMAKE TRUE)
+
+########################################################################
+# Setup the python interpreter:
+# This allows the user to specify a specific interpreter,
+# or finds the interpreter via the built-in cmake module.
+########################################################################
+#this allows the user to override PYTHON_EXECUTABLE
+if(PYTHON_EXECUTABLE)
+
+    set(PYTHONINTERP_FOUND TRUE)
+
+#otherwise if not set, try to automatically find it
+else(PYTHON_EXECUTABLE)
+
+    #use the built-in find script
+    find_package(PythonInterp 2)
+
+    #and if that fails use the find program routine
+    if(NOT PYTHONINTERP_FOUND)
+        find_program(PYTHON_EXECUTABLE NAMES python python2 python2.7 python2.6 python2.5)
+        if(PYTHON_EXECUTABLE)
+            set(PYTHONINTERP_FOUND TRUE)
+        endif(PYTHON_EXECUTABLE)
+    endif(NOT PYTHONINTERP_FOUND)
+
+endif(PYTHON_EXECUTABLE)
+
+if (CMAKE_CROSSCOMPILING)
+    set(QA_PYTHON_EXECUTABLE "/usr/bin/python")
+else (CMAKE_CROSSCOMPILING)
+    set(QA_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
+endif(CMAKE_CROSSCOMPILING)
+
+#make the path to the executable appear in the cmake gui
+set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
+set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests")
+
+#make sure we can use -B with python (introduced in 2.6)
+if(PYTHON_EXECUTABLE)
+    execute_process(
+        COMMAND ${PYTHON_EXECUTABLE} -B -c ""
+        OUTPUT_QUIET ERROR_QUIET
+        RESULT_VARIABLE PYTHON_HAS_DASH_B_RESULT
+    )
+    if(PYTHON_HAS_DASH_B_RESULT EQUAL 0)
+        set(PYTHON_DASH_B "-B")
+    endif()
+endif(PYTHON_EXECUTABLE)
+
+########################################################################
+# Check for the existence of a python module:
+# - desc a string description of the check
+# - mod the name of the module to import
+# - cmd an additional command to run
+# - have the result variable to set
+########################################################################
+macro(GR_PYTHON_CHECK_MODULE desc mod cmd have)
+    message(STATUS "")
+    message(STATUS "Python checking for ${desc}")
+    execute_process(
+        COMMAND ${PYTHON_EXECUTABLE} -c "
+#########################################
+try:
+    import ${mod}
+    assert ${cmd}
+except ImportError, AssertionError: exit(-1)
+except: pass
+#########################################"
+        RESULT_VARIABLE ${have}
+    )
+    if(${have} EQUAL 0)
+        message(STATUS "Python checking for ${desc} - found")
+        set(${have} TRUE)
+    else(${have} EQUAL 0)
+        message(STATUS "Python checking for ${desc} - not found")
+        set(${have} FALSE)
+    endif(${have} EQUAL 0)
+endmacro(GR_PYTHON_CHECK_MODULE)
+
+########################################################################
+# Sets the python installation directory GR_PYTHON_DIR
+########################################################################
+if(NOT DEFINED GR_PYTHON_DIR)
+execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
+from distutils import sysconfig
+print sysconfig.get_python_lib(plat_specific=True, prefix='')
+" OUTPUT_VARIABLE GR_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+endif()
+file(TO_CMAKE_PATH ${GR_PYTHON_DIR} GR_PYTHON_DIR)
+
+########################################################################
+# Create an always-built target with a unique name
+# Usage: GR_UNIQUE_TARGET(<description> <dependencies list>)
+########################################################################
+function(GR_UNIQUE_TARGET desc)
+    file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+    execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
+unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5]
+print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
+    OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE)
+    add_custom_target(${_target} ALL DEPENDS ${ARGN})
+endfunction(GR_UNIQUE_TARGET)
+
+########################################################################
+# Install python sources (also builds and installs byte-compiled python)
+########################################################################
+function(GR_PYTHON_INSTALL)
+    include(CMakeParseArgumentsCopy)
+    CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
+
+    ####################################################################
+    if(GR_PYTHON_INSTALL_FILES)
+    ####################################################################
+        install(${ARGN}) #installs regular python files
+
+        #create a list of all generated files
+        unset(pysrcfiles)
+        unset(pycfiles)
+        unset(pyofiles)
+        foreach(pyfile ${GR_PYTHON_INSTALL_FILES})
+            get_filename_component(pyfile ${pyfile} ABSOLUTE)
+            list(APPEND pysrcfiles ${pyfile})
+
+            #determine if this file is in the source or binary directory
+            file(RELATIVE_PATH source_rel_path ${CMAKE_CURRENT_SOURCE_DIR} ${pyfile})
+            string(LENGTH "${source_rel_path}" source_rel_path_len)
+            file(RELATIVE_PATH binary_rel_path ${CMAKE_CURRENT_BINARY_DIR} ${pyfile})
+            string(LENGTH "${binary_rel_path}" binary_rel_path_len)
+
+            #and set the generated path appropriately
+            if(${source_rel_path_len} GREATER ${binary_rel_path_len})
+                set(pygenfile ${CMAKE_CURRENT_BINARY_DIR}/${binary_rel_path})
+            else()
+                set(pygenfile ${CMAKE_CURRENT_BINARY_DIR}/${source_rel_path})
+            endif()
+            list(APPEND pycfiles ${pygenfile}c)
+            list(APPEND pyofiles ${pygenfile}o)
+
+            #ensure generation path exists
+            get_filename_component(pygen_path ${pygenfile} PATH)
+            file(MAKE_DIRECTORY ${pygen_path})
+
+        endforeach(pyfile)
+
+        #the command to generate the pyc files
+        add_custom_command(
+            DEPENDS ${pysrcfiles} OUTPUT ${pycfiles}
+            COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/python_compile_helper.py ${pysrcfiles} ${pycfiles}
+        )
+
+        #the command to generate the pyo files
+        add_custom_command(
+            DEPENDS ${pysrcfiles} OUTPUT ${pyofiles}
+            COMMAND ${PYTHON_EXECUTABLE} -O ${CMAKE_BINARY_DIR}/python_compile_helper.py ${pysrcfiles} ${pyofiles}
+        )
+
+        #create install rule and add generated files to target list
+        set(python_install_gen_targets ${pycfiles} ${pyofiles})
+        install(FILES ${python_install_gen_targets}
+            DESTINATION ${GR_PYTHON_INSTALL_DESTINATION}
+            COMPONENT ${GR_PYTHON_INSTALL_COMPONENT}
+        )
+
+    ####################################################################
+    elseif(GR_PYTHON_INSTALL_PROGRAMS)
+    ####################################################################
+        file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} pyexe_native)
+
+        if (CMAKE_CROSSCOMPILING)
+           set(pyexe_native "/usr/bin/env python")
+        endif()
+
+        foreach(pyfile ${GR_PYTHON_INSTALL_PROGRAMS})
+            get_filename_component(pyfile_name ${pyfile} NAME)
+            get_filename_component(pyfile ${pyfile} ABSOLUTE)
+            string(REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" pyexefile "${pyfile}.exe")
+            list(APPEND python_install_gen_targets ${pyexefile})
+
+            get_filename_component(pyexefile_path ${pyexefile} PATH)
+            file(MAKE_DIRECTORY ${pyexefile_path})
+
+            add_custom_command(
+                OUTPUT ${pyexefile} DEPENDS ${pyfile}
+                COMMAND ${PYTHON_EXECUTABLE} -c
+                "import re; R=re.compile('^\#!.*$\\n',flags=re.MULTILINE); open('${pyexefile}','w').write('\#!${pyexe_native}\\n'+R.sub('',open('${pyfile}','r').read()))"
+                COMMENT "Shebangin ${pyfile_name}"
+                VERBATIM
+            )
+
+            #on windows, python files need an extension to execute
+            get_filename_component(pyfile_ext ${pyfile} EXT)
+            if(WIN32 AND NOT pyfile_ext)
+                set(pyfile_name "${pyfile_name}.py")
+            endif()
+
+            install(PROGRAMS ${pyexefile} RENAME ${pyfile_name}
+                DESTINATION ${GR_PYTHON_INSTALL_DESTINATION}
+                COMPONENT ${GR_PYTHON_INSTALL_COMPONENT}
+            )
+        endforeach(pyfile)
+
+    endif()
+
+    GR_UNIQUE_TARGET("pygen" ${python_install_gen_targets})
+
+endfunction(GR_PYTHON_INSTALL)
+
+########################################################################
+# Write the python helper script that generates byte code files
+########################################################################
+file(WRITE ${CMAKE_BINARY_DIR}/python_compile_helper.py "
+import sys, py_compile
+files = sys.argv[1:]
+srcs, gens = files[:len(files)/2], files[len(files)/2:]
+for src, gen in zip(srcs, gens):
+    py_compile.compile(file=src, cfile=gen, doraise=True)
+")
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake
new file mode 100755
index 0000000..abf4dc4
--- /dev/null
+++ b/cmake/Modules/GrSwig.cmake
@@ -0,0 +1,251 @@
+# Copyright 2010-2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+if(DEFINED __INCLUDED_GR_SWIG_CMAKE)
+    return()
+endif()
+set(__INCLUDED_GR_SWIG_CMAKE TRUE)
+
+include(GrPython)
+
+########################################################################
+# Builds a swig documentation file to be generated into python docstrings
+# Usage: GR_SWIG_MAKE_DOCS(output_file input_path input_path....)
+#
+# Set the following variable to specify extra dependent targets:
+#   - GR_SWIG_DOCS_SOURCE_DEPS
+#   - GR_SWIG_DOCS_TARGET_DEPS
+########################################################################
+function(GR_SWIG_MAKE_DOCS output_file)
+    if(ENABLE_DOXYGEN)
+
+        #setup the input files variable list, quote formated
+        set(input_files)
+        unset(INPUT_PATHS)
+        foreach(input_path ${ARGN})
+            if(IS_DIRECTORY ${input_path}) #when input path is a directory
+                file(GLOB input_path_h_files ${input_path}/*.h)
+            else() #otherwise its just a file, no glob
+                set(input_path_h_files ${input_path})
+            endif()
+            list(APPEND input_files ${input_path_h_files})
+            set(INPUT_PATHS "${INPUT_PATHS} \"${input_path}\"")
+        endforeach(input_path)
+
+        #determine the output directory
+        get_filename_component(name ${output_file} NAME_WE)
+        get_filename_component(OUTPUT_DIRECTORY ${output_file} PATH)
+        set(OUTPUT_DIRECTORY ${OUTPUT_DIRECTORY}/${name}_swig_docs)
+        make_directory(${OUTPUT_DIRECTORY})
+
+        #generate the Doxyfile used by doxygen
+        configure_file(
+            ${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile.swig_doc.in
+            ${OUTPUT_DIRECTORY}/Doxyfile
+        @ONLY)
+
+        #Create a dummy custom command that depends on other targets
+        include(GrMiscUtils)
+        GR_GEN_TARGET_DEPS(_${name}_tag tag_deps ${GR_SWIG_DOCS_TARGET_DEPS})
+
+        #call doxygen on the Doxyfile + input headers
+        add_custom_command(
+            OUTPUT ${OUTPUT_DIRECTORY}/xml/index.xml
+            DEPENDS ${input_files} ${GR_SWIG_DOCS_SOURCE_DEPS} ${tag_deps}
+            COMMAND ${DOXYGEN_EXECUTABLE} ${OUTPUT_DIRECTORY}/Doxyfile
+            COMMENT "Generating doxygen xml for ${name} docs"
+        )
+
+        #call the swig_doc script on the xml files
+        add_custom_command(
+            OUTPUT ${output_file}
+            DEPENDS ${input_files} ${stamp-file} ${OUTPUT_DIRECTORY}/xml/index.xml
+            COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+                ${CMAKE_SOURCE_DIR}/docs/doxygen/swig_doc.py
+                ${OUTPUT_DIRECTORY}/xml
+                ${output_file}
+            COMMENT "Generating python docstrings for ${name}"
+            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/docs/doxygen
+        )
+
+    else(ENABLE_DOXYGEN)
+        file(WRITE ${output_file} "\n") #no doxygen -> empty file
+    endif(ENABLE_DOXYGEN)
+endfunction(GR_SWIG_MAKE_DOCS)
+
+########################################################################
+# Build a swig target for the common gnuradio use case. Usage:
+# GR_SWIG_MAKE(target ifile ifile ifile...)
+#
+# Set the following variables before calling:
+#   - GR_SWIG_FLAGS
+#   - GR_SWIG_INCLUDE_DIRS
+#   - GR_SWIG_LIBRARIES
+#   - GR_SWIG_SOURCE_DEPS
+#   - GR_SWIG_TARGET_DEPS
+#   - GR_SWIG_DOC_FILE
+#   - GR_SWIG_DOC_DIRS
+########################################################################
+macro(GR_SWIG_MAKE name)
+    set(ifiles ${ARGN})
+
+    # Shimming this in here to take care of a SWIG bug with handling
+    # vector<size_t> and vector<unsigned int> (on 32-bit machines) and
+    # vector<long unsigned int> (on 64-bit machines). Use this to test
+    # the size of size_t, then set SIZE_T_32 if it's a 32-bit machine
+    # or not if it's 64-bit. The logic in gr_type.i handles the rest.
+    INCLUDE(CheckTypeSize)
+    CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T)
+    CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT)
+    if(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT})
+      list(APPEND GR_SWIG_FLAGS -DSIZE_T_32)
+    endif(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT})
+
+    #do swig doc generation if specified
+    if(GR_SWIG_DOC_FILE)
+        set(GR_SWIG_DOCS_SOURCE_DEPS ${GR_SWIG_SOURCE_DEPS})
+        list(APPEND GR_SWIG_DOCS_TARGET_DEPS ${GR_SWIG_TARGET_DEPS})
+        GR_SWIG_MAKE_DOCS(${GR_SWIG_DOC_FILE} ${GR_SWIG_DOC_DIRS})
+        add_custom_target(${name}_swig_doc DEPENDS ${GR_SWIG_DOC_FILE})
+        list(APPEND GR_SWIG_TARGET_DEPS ${name}_swig_doc ${GR_RUNTIME_SWIG_DOC_FILE})
+    endif()
+
+    #append additional include directories
+    find_package(PythonLibs 2)
+    list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH}) #deprecated name (now dirs)
+    list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
+
+    #prepend local swig directories
+    list(INSERT GR_SWIG_INCLUDE_DIRS 0 ${CMAKE_CURRENT_SOURCE_DIR})
+    list(INSERT GR_SWIG_INCLUDE_DIRS 0 ${CMAKE_CURRENT_BINARY_DIR})
+
+    #determine include dependencies for swig file
+    execute_process(
+        COMMAND ${PYTHON_EXECUTABLE}
+            ${CMAKE_BINARY_DIR}/get_swig_deps.py
+            "${ifiles}" "${GR_SWIG_INCLUDE_DIRS}"
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+        OUTPUT_VARIABLE SWIG_MODULE_${name}_EXTRA_DEPS
+        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    )
+
+    #Create a dummy custom command that depends on other targets
+    include(GrMiscUtils)
+    GR_GEN_TARGET_DEPS(_${name}_swig_tag tag_deps ${GR_SWIG_TARGET_DEPS})
+    set(tag_file ${CMAKE_CURRENT_BINARY_DIR}/${name}.tag)
+    add_custom_command(
+        OUTPUT ${tag_file}
+        DEPENDS ${GR_SWIG_SOURCE_DEPS} ${tag_deps}
+        COMMAND ${CMAKE_COMMAND} -E touch ${tag_file}
+    )
+
+    #append the specified include directories
+    include_directories(${GR_SWIG_INCLUDE_DIRS})
+    list(APPEND SWIG_MODULE_${name}_EXTRA_DEPS ${tag_file})
+
+    #setup the swig flags with flags and include directories
+    set(CMAKE_SWIG_FLAGS -fvirtual -modern -keyword -w511 -module ${name} ${GR_SWIG_FLAGS})
+    foreach(dir ${GR_SWIG_INCLUDE_DIRS})
+        list(APPEND CMAKE_SWIG_FLAGS "-I${dir}")
+    endforeach(dir)
+
+    #set the C++ property on the swig .i file so it builds
+    set_source_files_properties(${ifiles} PROPERTIES CPLUSPLUS ON)
+
+    #setup the actual swig library target to be built
+    include(UseSWIG)
+    SWIG_ADD_MODULE(${name} python ${ifiles})
+    SWIG_LINK_LIBRARIES(${name} ${PYTHON_LIBRARIES} ${GR_SWIG_LIBRARIES})
+    if(${name} STREQUAL "runtime_swig")
+        SET_TARGET_PROPERTIES(${SWIG_MODULE_runtime_swig_REAL_NAME} PROPERTIES DEFINE_SYMBOL "gnuradio_runtime_EXPORTS")
+    endif(${name} STREQUAL "runtime_swig")
+
+endmacro(GR_SWIG_MAKE)
+
+########################################################################
+# Install swig targets generated by GR_SWIG_MAKE. Usage:
+# GR_SWIG_INSTALL(
+#   TARGETS target target target...
+#   [DESTINATION destination]
+#   [COMPONENT component]
+# )
+########################################################################
+macro(GR_SWIG_INSTALL)
+
+    include(CMakeParseArgumentsCopy)
+    CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN})
+
+    foreach(name ${GR_SWIG_INSTALL_TARGETS})
+        install(TARGETS ${SWIG_MODULE_${name}_REAL_NAME}
+            DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
+            COMPONENT ${GR_SWIG_INSTALL_COMPONENT}
+        )
+
+        include(GrPython)
+        GR_PYTHON_INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.py
+            DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
+            COMPONENT ${GR_SWIG_INSTALL_COMPONENT}
+        )
+
+        GR_LIBTOOL(
+            TARGET ${SWIG_MODULE_${name}_REAL_NAME}
+            DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
+        )
+
+    endforeach(name)
+
+endmacro(GR_SWIG_INSTALL)
+
+########################################################################
+# Generate a python file that can determine swig dependencies.
+# Used by the make macro above to determine extra dependencies.
+# When you build C++, CMake figures out the header dependencies.
+# This code essentially performs that logic for swig includes.
+########################################################################
+file(WRITE ${CMAKE_BINARY_DIR}/get_swig_deps.py "
+
+import os, sys, re
+
+i_include_matcher = re.compile('%(include|import)\\s*[<|\"](.*)[>|\"]')
+h_include_matcher = re.compile('#(include)\\s*[<|\"](.*)[>|\"]')
+include_dirs = sys.argv[2].split(';')
+
+def get_swig_incs(file_path):
+    if file_path.endswith('.i'): matcher = i_include_matcher
+    else: matcher = h_include_matcher
+    file_contents = open(file_path, 'r').read()
+    return matcher.findall(file_contents, re.MULTILINE)
+
+def get_swig_deps(file_path, level):
+    deps = [file_path]
+    if level == 0: return deps
+    for keyword, inc_file in get_swig_incs(file_path):
+        for inc_dir in include_dirs:
+            inc_path = os.path.join(inc_dir, inc_file)
+            if not os.path.exists(inc_path): continue
+            deps.extend(get_swig_deps(inc_path, level-1))
+            break #found, we dont search in lower prio inc dirs
+    return deps
+
+if __name__ == '__main__':
+    ifiles = sys.argv[1].split(';')
+    deps = sum([get_swig_deps(ifile, 3) for ifile in ifiles], [])
+    #sys.stderr.write(';'.join(set(deps)) + '\\n\\n')
+    print(';'.join(set(deps)))
+")
diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake
new file mode 100755
index 0000000..62caab4
--- /dev/null
+++ b/cmake/Modules/GrTest.cmake
@@ -0,0 +1,143 @@
+# Copyright 2010-2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+if(DEFINED __INCLUDED_GR_TEST_CMAKE)
+    return()
+endif()
+set(__INCLUDED_GR_TEST_CMAKE TRUE)
+
+########################################################################
+# Add a unit test and setup the environment for a unit test.
+# Takes the same arguments as the ADD_TEST function.
+#
+# Before calling set the following variables:
+# GR_TEST_TARGET_DEPS  - built targets for the library path
+# GR_TEST_LIBRARY_DIRS - directories for the library path
+# GR_TEST_PYTHON_DIRS  - directories for the python path
+# GR_TEST_ENVIRONS  - other environment key/value pairs
+########################################################################
+function(GR_ADD_TEST test_name)
+
+        #Ensure that the build exe also appears in the PATH.
+        list(APPEND GR_TEST_TARGET_DEPS ${ARGN})
+
+        #In the land of windows, all libraries must be in the PATH.
+        #Since the dependent libraries are not yet installed,
+        #we must manually set them in the PATH to run tests.
+        #The following appends the path of a target dependency.
+        foreach(target ${GR_TEST_TARGET_DEPS})
+            get_target_property(location ${target} LOCATION)
+            if(location)
+                get_filename_component(path ${location} PATH)
+                string(REGEX REPLACE "\\$\\(.*\\)" ${CMAKE_BUILD_TYPE} path ${path})
+                list(APPEND GR_TEST_LIBRARY_DIRS ${path})
+            endif(location)
+        endforeach(target)
+
+    if(WIN32)
+        #SWIG generates the python library files into a subdirectory.
+        #Therefore, we must append this subdirectory into PYTHONPATH.
+        #Only do this for the python directories matching the following:
+        foreach(pydir ${GR_TEST_PYTHON_DIRS})
+            get_filename_component(name ${pydir} NAME)
+            if(name MATCHES "^(swig|lib|src)$")
+                list(APPEND GR_TEST_PYTHON_DIRS ${pydir}/${CMAKE_BUILD_TYPE})
+            endif()
+        endforeach(pydir)
+    endif(WIN32)
+
+    file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} srcdir)
+    file(TO_NATIVE_PATH "${GR_TEST_LIBRARY_DIRS}" libpath) #ok to use on dir list?
+    file(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir list?
+
+    set(environs "VOLK_GENERIC=1" "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}")
+    list(APPEND environs ${GR_TEST_ENVIRONS})
+
+    #http://www.cmake.org/pipermail/cmake/2009-May/029464.html
+    #Replaced this add test + set environs code with the shell script generation.
+    #Its nicer to be able to manually run the shell script to diagnose problems.
+    #ADD_TEST(${ARGV})
+    #SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}")
+
+    if(UNIX)
+        set(LD_PATH_VAR "LD_LIBRARY_PATH")
+        if(APPLE)
+            set(LD_PATH_VAR "DYLD_LIBRARY_PATH")
+        endif()
+
+        set(binpath "${CMAKE_CURRENT_BINARY_DIR}:$PATH")
+        list(APPEND libpath "$${LD_PATH_VAR}")
+        list(APPEND pypath "$PYTHONPATH")
+
+        #replace list separator with the path separator
+        string(REPLACE ";" ":" libpath "${libpath}")
+        string(REPLACE ";" ":" pypath "${pypath}")
+        list(APPEND environs "PATH=${binpath}" "${LD_PATH_VAR}=${libpath}" "PYTHONPATH=${pypath}")
+
+        #generate a bat file that sets the environment and runs the test
+	if (CMAKE_CROSSCOMPILING)
+                set(SHELL "/bin/sh")
+        else(CMAKE_CROSSCOMPILING)
+                find_program(SHELL sh)
+        endif(CMAKE_CROSSCOMPILING)
+        set(sh_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.sh)
+        file(WRITE ${sh_file} "#!${SHELL}\n")
+        #each line sets an environment variable
+        foreach(environ ${environs})
+            file(APPEND ${sh_file} "export ${environ}\n")
+        endforeach(environ)
+        #load the command to run with its arguments
+        foreach(arg ${ARGN})
+            file(APPEND ${sh_file} "${arg} ")
+        endforeach(arg)
+        file(APPEND ${sh_file} "\n")
+
+        #make the shell file executable
+        execute_process(COMMAND chmod +x ${sh_file})
+
+        add_test(${test_name} ${SHELL} ${sh_file})
+
+    endif(UNIX)
+
+    if(WIN32)
+        list(APPEND libpath ${DLL_PATHS} "%PATH%")
+        list(APPEND pypath "%PYTHONPATH%")
+
+        #replace list separator with the path separator (escaped)
+        string(REPLACE ";" "\\;" libpath "${libpath}")
+        string(REPLACE ";" "\\;" pypath "${pypath}")
+        list(APPEND environs "PATH=${libpath}" "PYTHONPATH=${pypath}")
+
+        #generate a bat file that sets the environment and runs the test
+        set(bat_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.bat)
+        file(WRITE ${bat_file} "@echo off\n")
+        #each line sets an environment variable
+        foreach(environ ${environs})
+            file(APPEND ${bat_file} "SET ${environ}\n")
+        endforeach(environ)
+        #load the command to run with its arguments
+        foreach(arg ${ARGN})
+            file(APPEND ${bat_file} "${arg} ")
+        endforeach(arg)
+        file(APPEND ${bat_file} "\n")
+
+        add_test(${test_name} ${bat_file})
+    endif(WIN32)
+
+endfunction(GR_ADD_TEST)
diff --git a/cmake/Modules/UseSWIG.cmake b/cmake/Modules/UseSWIG.cmake
new file mode 100755
index 0000000..c0f1728
--- /dev/null
+++ b/cmake/Modules/UseSWIG.cmake
@@ -0,0 +1,304 @@
+# - SWIG module for CMake
+# Defines the following macros:
+#   SWIG_ADD_MODULE(name language [ files ])
+#     - Define swig module with given name and specified language
+#   SWIG_LINK_LIBRARIES(name [ libraries ])
+#     - Link libraries to swig module
+# All other macros are for internal use only.
+# To get the actual name of the swig module,
+# use: ${SWIG_MODULE_${name}_REAL_NAME}.
+# Set Source files properties such as CPLUSPLUS and SWIG_FLAGS to specify
+# special behavior of SWIG. Also global CMAKE_SWIG_FLAGS can be used to add
+# special flags to all swig calls.
+# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify
+# where to write all the swig generated module (swig -outdir option)
+# The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS may be used
+# to specify extra dependencies for the generated modules.
+# If the source file generated by swig need some special flag you can use
+# set_source_files_properties( ${swig_generated_file_fullname}
+#        PROPERTIES COMPILE_FLAGS "-bla")
+
+
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2009 Mathieu Malaterre <mathieu.malaterre@gmail.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+set(SWIG_CXX_EXTENSION "cxx")
+set(SWIG_EXTRA_LIBRARIES "")
+
+set(SWIG_PYTHON_EXTRA_FILE_EXTENSION "py")
+
+#
+# For given swig module initialize variables associated with it
+#
+macro(SWIG_MODULE_INITIALIZE name language)
+  string(TOUPPER "${language}" swig_uppercase_language)
+  string(TOLOWER "${language}" swig_lowercase_language)
+  set(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}")
+  set(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}")
+
+  set(SWIG_MODULE_${name}_REAL_NAME "${name}")
+  if("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "UNKNOWN")
+    message(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
+  elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PYTHON")
+    # when swig is used without the -interface it will produce in the module.py
+    # a 'import _modulename' statement, which implies having a corresponding
+    # _modulename.so (*NIX), _modulename.pyd (Win32).
+    set(SWIG_MODULE_${name}_REAL_NAME "_${name}")
+  elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL")
+    set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
+  endif()
+endmacro()
+
+#
+# For a given language, input file, and output file, determine extra files that
+# will be generated. This is internal swig macro.
+#
+
+macro(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
+  set(${outfiles} "")
+  get_source_file_property(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename
+    ${infile} SWIG_MODULE_NAME)
+  if(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND")
+    get_filename_component(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE)
+  endif()
+  foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSION})
+    set(${outfiles} ${${outfiles}}
+      "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}")
+  endforeach()
+endmacro()
+
+#
+# Take swig (*.i) file and add proper custom commands for it
+#
+macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
+  set(swig_full_infile ${infile})
+  get_filename_component(swig_source_file_path "${infile}" PATH)
+  get_filename_component(swig_source_file_name_we "${infile}" NAME_WE)
+  get_source_file_property(swig_source_file_generated ${infile} GENERATED)
+  get_source_file_property(swig_source_file_cplusplus ${infile} CPLUSPLUS)
+  get_source_file_property(swig_source_file_flags ${infile} SWIG_FLAGS)
+  if("${swig_source_file_flags}" STREQUAL "NOTFOUND")
+    set(swig_source_file_flags "")
+  endif()
+  set(swig_source_file_fullname "${infile}")
+  if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
+    string(REGEX REPLACE
+      "^${CMAKE_CURRENT_SOURCE_DIR}" ""
+      swig_source_file_relative_path
+      "${swig_source_file_path}")
+  else()
+    if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
+      string(REGEX REPLACE
+        "^${CMAKE_CURRENT_BINARY_DIR}" ""
+        swig_source_file_relative_path
+        "${swig_source_file_path}")
+      set(swig_source_file_generated 1)
+    else()
+      set(swig_source_file_relative_path "${swig_source_file_path}")
+      if(swig_source_file_generated)
+        set(swig_source_file_fullname "${CMAKE_CURRENT_BINARY_DIR}/${infile}")
+      else()
+        set(swig_source_file_fullname "${CMAKE_CURRENT_SOURCE_DIR}/${infile}")
+      endif()
+    endif()
+  endif()
+
+  set(swig_generated_file_fullname
+    "${CMAKE_CURRENT_BINARY_DIR}")
+  if(swig_source_file_relative_path)
+    set(swig_generated_file_fullname
+      "${swig_generated_file_fullname}/${swig_source_file_relative_path}")
+  endif()
+  # If CMAKE_SWIG_OUTDIR was specified then pass it to -outdir
+  if(CMAKE_SWIG_OUTDIR)
+    set(swig_outdir ${CMAKE_SWIG_OUTDIR})
+  else()
+    set(swig_outdir ${CMAKE_CURRENT_BINARY_DIR})
+  endif()
+  SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE}
+    swig_extra_generated_files
+    "${swig_outdir}"
+    "${infile}")
+  set(swig_generated_file_fullname
+    "${swig_generated_file_fullname}/${swig_source_file_name_we}")
+  # add the language into the name of the file (i.e. TCL_wrap)
+  # this allows for the same .i file to be wrapped into different languages
+  set(swig_generated_file_fullname
+    "${swig_generated_file_fullname}${SWIG_MODULE_${name}_LANGUAGE}_wrap")
+
+  if(swig_source_file_cplusplus)
+    set(swig_generated_file_fullname
+      "${swig_generated_file_fullname}.${SWIG_CXX_EXTENSION}")
+  else()
+    set(swig_generated_file_fullname
+      "${swig_generated_file_fullname}.c")
+  endif()
+
+  # Shut up some warnings from poor SWIG code generation that we
+  # can do nothing about, when this flag is available
+  include(CheckCXXCompilerFlag)
+  check_cxx_compiler_flag("-Wno-unused-but-set-variable" HAVE_WNO_UNUSED_BUT_SET_VARIABLE)
+  if(HAVE_WNO_UNUSED_BUT_SET_VARIABLE)
+    set_source_files_properties(${swig_generated_file_fullname}
+      PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
+  endif(HAVE_WNO_UNUSED_BUT_SET_VARIABLE)
+
+  get_directory_property(cmake_include_directories INCLUDE_DIRECTORIES)
+  set(swig_include_dirs)
+  foreach(it ${cmake_include_directories})
+    set(swig_include_dirs ${swig_include_dirs} "-I${it}")
+  endforeach()
+
+  set(swig_special_flags)
+  # default is c, so add c++ flag if it is c++
+  if(swig_source_file_cplusplus)
+    set(swig_special_flags ${swig_special_flags} "-c++")
+  endif()
+  set(swig_extra_flags)
+  if(SWIG_MODULE_${name}_EXTRA_FLAGS)
+    set(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS})
+  endif()
+
+  # hack to work around CMake bug in add_custom_command with multiple OUTPUT files
+
+  file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+  execute_process(
+    COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
+unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5]
+print(re.sub('\\W', '_', '${name} ${reldir} ' + unique))"
+    OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+  file(
+    WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp.in
+   "int main(void){return 0;}\n"
+  )
+
+  # create dummy dependencies
+  add_custom_command(
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp
+    COMMAND ${CMAKE_COMMAND} -E copy
+        ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp.in
+        ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp
+    DEPENDS "${swig_source_file_fullname}" ${SWIG_MODULE_${name}_EXTRA_DEPS}
+    COMMENT ""
+  )
+
+  # create the dummy target
+  add_executable(${_target} ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp)
+
+  # add a custom command to the dummy target
+  add_custom_command(
+    TARGET ${_target}
+    # Let's create the ${swig_outdir} at execution time, in case dir contains $(OutDir)
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${swig_outdir}
+    COMMAND "${SWIG_EXECUTABLE}"
+    ARGS "-${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}"
+    ${swig_source_file_flags}
+    ${CMAKE_SWIG_FLAGS}
+    -outdir ${swig_outdir}
+    ${swig_special_flags}
+    ${swig_extra_flags}
+    ${swig_include_dirs}
+    -o "${swig_generated_file_fullname}"
+    "${swig_source_file_fullname}"
+    COMMENT "Swig source"
+  )
+
+  #add dummy independent dependencies from the _target to each file
+  #that will be generated by the SWIG command above
+
+  set(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files})
+
+  foreach(swig_gen_file ${${outfiles}})
+    add_custom_command(
+      OUTPUT ${swig_gen_file}
+      COMMAND ""
+      DEPENDS ${_target}
+      COMMENT ""
+    )
+  endforeach()
+
+  set_source_files_properties(
+    ${outfiles} PROPERTIES GENERATED 1
+  )
+
+endmacro()
+
+#
+# Create Swig module
+#
+macro(SWIG_ADD_MODULE name language)
+  SWIG_MODULE_INITIALIZE(${name} ${language})
+  set(swig_dot_i_sources)
+  set(swig_other_sources)
+  foreach(it ${ARGN})
+    if(${it} MATCHES ".*\\.i$")
+      set(swig_dot_i_sources ${swig_dot_i_sources} "${it}")
+    else()
+      set(swig_other_sources ${swig_other_sources} "${it}")
+    endif()
+  endforeach()
+
+  set(swig_generated_sources)
+  foreach(it ${swig_dot_i_sources})
+    SWIG_ADD_SOURCE_TO_MODULE(${name} swig_generated_source ${it})
+    set(swig_generated_sources ${swig_generated_sources} "${swig_generated_source}")
+  endforeach()
+  get_directory_property(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
+  set_directory_properties(PROPERTIES
+    ADDITIONAL_MAKE_CLEAN_FILES "${swig_extra_clean_files};${swig_generated_sources}")
+  add_library(${SWIG_MODULE_${name}_REAL_NAME}
+    MODULE
+    ${swig_generated_sources}
+    ${swig_other_sources})
+  string(TOLOWER "${language}" swig_lowercase_language)
+  if ("${swig_lowercase_language}" STREQUAL "java")
+    if (APPLE)
+        # In java you want:
+        #      System.loadLibrary("LIBRARY");
+        # then JNI will look for a library whose name is platform dependent, namely
+        #   MacOS  : libLIBRARY.jnilib
+        #   Windows: LIBRARY.dll
+        #   Linux  : libLIBRARY.so
+        set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".jnilib")
+      endif ()
+  endif ()
+  if ("${swig_lowercase_language}" STREQUAL "python")
+    # this is only needed for the python case where a _modulename.so is generated
+    set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
+    # Python extension modules on Windows must have the extension ".pyd"
+    # instead of ".dll" as of Python 2.5.  Older python versions do support
+    # this suffix.
+    # http://docs.python.org/whatsnew/ports.html#SECTION0001510000000000000000
+    # <quote>
+    # Windows: .dll is no longer supported as a filename extension for extension modules.
+    # .pyd is now the only filename extension that will be searched for.
+    # </quote>
+    if(WIN32 AND NOT CYGWIN)
+      set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd")
+    endif()
+  endif ()
+endmacro()
+
+#
+# Like TARGET_LINK_LIBRARIES but for swig modules
+#
+macro(SWIG_LINK_LIBRARIES name)
+  if(SWIG_MODULE_${name}_REAL_NAME)
+    target_link_libraries(${SWIG_MODULE_${name}_REAL_NAME} ${ARGN})
+  else()
+    message(SEND_ERROR "Cannot find Swig library \"${name}\".")
+  endif()
+endmacro()
diff --git a/cmake/Modules/limesdrConfig.cmake b/cmake/Modules/limesdrConfig.cmake
index 610f9a2..4564656 100644
--- a/cmake/Modules/limesdrConfig.cmake
+++ b/cmake/Modules/limesdrConfig.cmake
@@ -1,4 +1,6 @@
-INCLUDE(FindPkgConfig)
+if(NOT PKG_CONFIG_FOUND)
+    INCLUDE(FindPkgConfig)
+endif()
 PKG_CHECK_MODULES(PC_LIMESDR limesdr)
 
 FIND_PATH(
diff --git a/cmake/Modules/targetConfig.cmake.in b/cmake/Modules/targetConfig.cmake.in
index 79e4a28..4a1fb31 100644
--- a/cmake/Modules/targetConfig.cmake.in
+++ b/cmake/Modules/targetConfig.cmake.in
@@ -2,20 +2,8 @@
 #
 # This file is part of GNU Radio
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 
 include(CMakeFindDependencyMacro)
 
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 350ab24..3dfec04 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -3,20 +3,8 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 
 ########################################################################
 # Setup dependencies
diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt
index 7d280d4..bee1232 100644
--- a/docs/doxygen/CMakeLists.txt
+++ b/docs/doxygen/CMakeLists.txt
@@ -3,20 +3,8 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 
 ########################################################################
 # Create the doxygen configuration file
@@ -29,6 +17,7 @@ file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} abs_top_builddir)
 set(HAVE_DOT ${DOXYGEN_DOT_FOUND})
 set(enable_html_docs YES)
 set(enable_latex_docs NO)
+set(enable_mathjax NO)
 set(enable_xml_docs YES)
 
 configure_file(
diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in
index f6df40e..91a2019 100644
--- a/docs/doxygen/Doxyfile.in
+++ b/docs/doxygen/Doxyfile.in
@@ -199,13 +199,6 @@ TAB_SIZE               = 8
 
 ALIASES                =
 
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding
-# "class=itcl::class" will allow you to use the command class in the
-# itcl::class meaning.
-
-TCL_SUBST              =
-
 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
 # sources only. Doxygen will then generate output that is more tailored for C.
 # For instance, some of the names that are used will be different. The list
@@ -723,8 +716,6 @@ EXCLUDE_PATTERNS       = */.deps/* \
 
 EXCLUDE_SYMBOLS        = ad9862 \
                          numpy \
-                         *swig* \
-                         *Swig* \
                          *my_top_block* \
                          *my_graph* \
                          *app_top_block* \
@@ -1220,14 +1211,14 @@ FORMULA_TRANSPARENT    = YES
 # output. When enabled you may also need to install MathJax separately and
 # configure the path to it using the MATHJAX_RELPATH option.
 
-USE_MATHJAX            = NO
+USE_MATHJAX            = @enable_mathjax@
 
 # When MathJax is enabled you can set the default output format to be used for
 # the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
 # SVG. The default value is HTML-CSS, which is slower, but has the best
 # compatibility.
 
-MATHJAX_FORMAT         = HTML-CSS
+MATHJAX_FORMAT         = SVG
 
 # When MathJax is enabled you need to specify the location relative to the
 # HTML output directory using the MATHJAX_RELPATH option. The destination
@@ -1239,12 +1230,12 @@ MATHJAX_FORMAT         = HTML-CSS
 # However, it is strongly recommended to install a local
 # copy of MathJax from http://www.mathjax.org before deployment.
 
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_RELPATH        = @MATHJAX2_PATH@
 
 # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
 # names that should be enabled during MathJax rendering.
 
-MATHJAX_EXTENSIONS     =
+MATHJAX_EXTENSIONS     = TeX/AMSmath TeX/AMSsymbols
 
 # The MATHJAX_CODEFILE tag can be used to specify a file with javascript
 # pieces of code that will be used on startup of the MathJax code.
@@ -1680,11 +1671,6 @@ EXTERNAL_GROUPS        = YES
 
 EXTERNAL_PAGES         = YES
 
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
 #---------------------------------------------------------------------------
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
@@ -1697,15 +1683,6 @@ PERL_PATH              = /usr/bin/perl
 
 CLASS_DIAGRAMS         = YES
 
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
 # If set to YES, the inheritance and collaboration graphs will hide
 # inheritance and usage relations if the target is undocumented
 # or is not a class.
@@ -1834,7 +1811,7 @@ DIRECTORY_GRAPH        = YES
 # HTML_FILE_EXTENSION to xhtml in order to make the SVG files
 # visible in IE 9+ (other browsers do not have this requirement).
 
-DOT_IMAGE_FORMAT       = png
+DOT_IMAGE_FORMAT       = svg
 
 # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
 # enable generation of interactive SVG images that allow zooming and panning.
diff --git a/docs/doxygen/Doxyfile.swig_doc.in b/docs/doxygen/Doxyfile.swig_doc.in
old mode 100644
new mode 100755
index cbe06d6..19e17dc
--- a/docs/doxygen/Doxyfile.swig_doc.in
+++ b/docs/doxygen/Doxyfile.swig_doc.in
@@ -54,7 +54,7 @@ PROJECT_LOGO           =
 # If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = "@OUTPUT_DIRECTORY@"
+OUTPUT_DIRECTORY       = @OUTPUT_DIRECTORY@
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
 # 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -121,7 +121,7 @@ INLINE_INHERITED_MEMB  = NO
 # path before files name in the file list and in the header files. If set
 # to NO the shortest path that makes the file name unique will be used.
 
-FULL_PATH_NAMES        = NO
+FULL_PATH_NAMES        = YES
 
 # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
 # can be used to strip a user-defined part of the path. Stripping is
@@ -913,7 +913,7 @@ HTML_STYLESHEET        =
 # user-defined cascading style sheet that is included after the standard
 # style sheets created by doxygen. Using this option one can overrule
 # certain style aspects. This is preferred over using HTML_STYLESHEET
-# since it does not replace the standard style sheet and is therefore more
+# since it does not replace the standard style sheet and is therefor more
 # robust against future updates. Doxygen will copy the style sheet file to
 # the output directory.
 
@@ -957,7 +957,7 @@ HTML_COLORSTYLE_GAMMA  = 80
 # page will contain the date and time when the page was generated. Setting
 # this to NO can help when comparing the output of multiple runs.
 
-HTML_TIMESTAMP         = NO
+HTML_TIMESTAMP         = YES
 
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
 # documentation will contain sections that can be hidden and shown after the
diff --git a/docs/doxygen/doxyxml/__init__.py b/docs/doxygen/doxyxml/__init__.py
index 58f6c35..be2978b 100644
--- a/docs/doxygen/doxyxml/__init__.py
+++ b/docs/doxygen/doxyxml/__init__.py
@@ -4,20 +4,8 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 #
 """
 Python interface to contents of doxygen xml documentation.
@@ -64,7 +52,6 @@ This line is uninformative and is only to test line breaks in the comments.
 u'Outputs the vital aadvark statistics.'
 
 """
-from __future__ import unicode_literals
 
 from .doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther
 
diff --git a/docs/doxygen/doxyxml/__init__.pyc b/docs/doxygen/doxyxml/__init__.pyc
new file mode 100755
index 0000000..586ac48
Binary files /dev/null and b/docs/doxygen/doxyxml/__init__.pyc differ
diff --git a/docs/doxygen/doxyxml/base.py b/docs/doxygen/doxyxml/base.py
index 9d218a3..9807e1e 100644
--- a/docs/doxygen/doxyxml/base.py
+++ b/docs/doxygen/doxyxml/base.py
@@ -4,20 +4,8 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 #
 """
 A base class is created.
@@ -25,8 +13,6 @@ A base class is created.
 Classes based upon this are used to make more user-friendly interfaces
 to the doxygen xml docs than the generated classes provide.
 """
-from __future__ import print_function
-from __future__ import unicode_literals
 
 import os
 import pdb
diff --git a/docs/doxygen/doxyxml/base.pyc b/docs/doxygen/doxyxml/base.pyc
new file mode 100755
index 0000000..ebd0ce1
Binary files /dev/null and b/docs/doxygen/doxyxml/base.pyc differ
diff --git a/docs/doxygen/doxyxml/doxyindex.py b/docs/doxygen/doxyxml/doxyindex.py
index 6a65b97..c59050e 100644
--- a/docs/doxygen/doxyxml/doxyindex.py
+++ b/docs/doxygen/doxyxml/doxyindex.py
@@ -4,27 +4,13 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 #
 """
 Classes providing more user-friendly interfaces to the doxygen xml
 docs than the generated classes provide.
 """
-from __future__ import absolute_import
-from __future__ import unicode_literals
 
 import os
 
@@ -60,14 +46,6 @@ class DoxyIndex(Base):
                 self._members.append(converted)
 
 
-def generate_swig_doc_i(self):
-    """
-    %feature("docstring") gr_make_align_on_samplenumbers_ss::align_state "
-    Wraps the C++: gr_align_on_samplenumbers_ss::align_state";
-    """
-    pass
-
-
 class DoxyCompMem(Base):
 
 
diff --git a/docs/doxygen/doxyxml/doxyindex.pyc b/docs/doxygen/doxyxml/doxyindex.pyc
new file mode 100755
index 0000000..0f56da2
Binary files /dev/null and b/docs/doxygen/doxyxml/doxyindex.pyc differ
diff --git a/docs/doxygen/doxyxml/generated/__init__.py b/docs/doxygen/doxyxml/generated/__init__.py
index 23095c1..3982397 100644
--- a/docs/doxygen/doxyxml/generated/__init__.py
+++ b/docs/doxygen/doxyxml/generated/__init__.py
@@ -5,4 +5,3 @@ These do the real work of parsing the doxygen xml files but the
 resultant classes are not very friendly to navigate so the rest of the
 doxyxml module processes them further.
 """
-from __future__ import unicode_literals
diff --git a/docs/doxygen/doxyxml/generated/__init__.pyc b/docs/doxygen/doxyxml/generated/__init__.pyc
new file mode 100755
index 0000000..aedc669
Binary files /dev/null and b/docs/doxygen/doxyxml/generated/__init__.pyc differ
diff --git a/docs/doxygen/doxyxml/generated/compound.py b/docs/doxygen/doxyxml/generated/compound.py
index acfa0dd..d0b164e 100644
--- a/docs/doxygen/doxyxml/generated/compound.py
+++ b/docs/doxygen/doxyxml/generated/compound.py
@@ -3,8 +3,6 @@
 """
 Generated Mon Feb  9 19:08:05 2009 by generateDS.py.
 """
-from __future__ import absolute_import
-from __future__ import unicode_literals
 
 
 from xml.dom import minidom
diff --git a/docs/doxygen/doxyxml/generated/compound.pyc b/docs/doxygen/doxyxml/generated/compound.pyc
new file mode 100755
index 0000000..80a8648
Binary files /dev/null and b/docs/doxygen/doxyxml/generated/compound.pyc differ
diff --git a/docs/doxygen/doxyxml/generated/compoundsuper.py b/docs/doxygen/doxyxml/generated/compoundsuper.py
index 6e984e1..05c4928 100644
--- a/docs/doxygen/doxyxml/generated/compoundsuper.py
+++ b/docs/doxygen/doxyxml/generated/compoundsuper.py
@@ -4,17 +4,12 @@
 # Generated Thu Jun 11 18:44:25 2009 by generateDS.py.
 #
 
-from __future__ import print_function
-from __future__ import unicode_literals
 
 import sys
 
 from xml.dom import minidom
 from xml.dom import Node
 
-import six
-
-
 #
 # User methods
 #
@@ -69,7 +64,7 @@ def showIndent(outfile, level):
         outfile.write('    ')
 
 def quote_xml(inStr):
-    s1 = (isinstance(inStr, six.string_types) and inStr or
+    s1 = (isinstance(inStr, str) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -77,7 +72,7 @@ def quote_xml(inStr):
     return s1
 
 def quote_attrib(inStr):
-    s1 = (isinstance(inStr, six.string_types) and inStr or
+    s1 = (isinstance(inStr, str) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
diff --git a/docs/doxygen/doxyxml/generated/compoundsuper.pyc b/docs/doxygen/doxyxml/generated/compoundsuper.pyc
new file mode 100755
index 0000000..9cd5855
Binary files /dev/null and b/docs/doxygen/doxyxml/generated/compoundsuper.pyc differ
diff --git a/docs/doxygen/doxyxml/generated/index.py b/docs/doxygen/doxyxml/generated/index.py
index 0c63512..c58407d 100644
--- a/docs/doxygen/doxyxml/generated/index.py
+++ b/docs/doxygen/doxyxml/generated/index.py
@@ -3,8 +3,6 @@
 """
 Generated Mon Feb  9 19:08:05 2009 by generateDS.py.
 """
-from __future__ import absolute_import
-from __future__ import unicode_literals
 
 from xml.dom import minidom
 
diff --git a/docs/doxygen/doxyxml/generated/index.pyc b/docs/doxygen/doxyxml/generated/index.pyc
new file mode 100755
index 0000000..80fbc78
Binary files /dev/null and b/docs/doxygen/doxyxml/generated/index.pyc differ
diff --git a/docs/doxygen/doxyxml/generated/indexsuper.py b/docs/doxygen/doxyxml/generated/indexsuper.py
index 11312db..cc2c112 100644
--- a/docs/doxygen/doxyxml/generated/indexsuper.py
+++ b/docs/doxygen/doxyxml/generated/indexsuper.py
@@ -4,16 +4,12 @@
 # Generated Thu Jun 11 18:43:54 2009 by generateDS.py.
 #
 
-from __future__ import print_function
-from __future__ import unicode_literals
 
 import sys
 
 from xml.dom import minidom
 from xml.dom import Node
 
-import six
-
 #
 # User methods
 #
@@ -68,7 +64,7 @@ def showIndent(outfile, level):
         outfile.write('    ')
 
 def quote_xml(inStr):
-    s1 = (isinstance(inStr, six.string_types) and inStr or
+    s1 = (isinstance(inStr, str) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -76,7 +72,7 @@ def quote_xml(inStr):
     return s1
 
 def quote_attrib(inStr):
-    s1 = (isinstance(inStr, six.string_types) and inStr or
+    s1 = (isinstance(inStr, str) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
diff --git a/docs/doxygen/doxyxml/generated/indexsuper.pyc b/docs/doxygen/doxyxml/generated/indexsuper.pyc
new file mode 100755
index 0000000..8eddaf0
Binary files /dev/null and b/docs/doxygen/doxyxml/generated/indexsuper.pyc differ
diff --git a/docs/doxygen/doxyxml/text.py b/docs/doxygen/doxyxml/text.py
index 02513b2..45de7a8 100644
--- a/docs/doxygen/doxyxml/text.py
+++ b/docs/doxygen/doxyxml/text.py
@@ -4,25 +4,12 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 #
 """
 Utilities for extracting text from generated classes.
 """
-from __future__ import unicode_literals
 
 def is_string(txt):
     if isinstance(txt, str):
diff --git a/docs/doxygen/doxyxml/text.pyc b/docs/doxygen/doxyxml/text.pyc
new file mode 100755
index 0000000..dcc507b
Binary files /dev/null and b/docs/doxygen/doxyxml/text.pyc differ
diff --git a/docs/doxygen/pydoc_macros.h b/docs/doxygen/pydoc_macros.h
new file mode 100644
index 0000000..98bf7cd
--- /dev/null
+++ b/docs/doxygen/pydoc_macros.h
@@ -0,0 +1,19 @@
+#ifndef PYDOC_MACROS_H
+#define PYDOC_MACROS_H
+
+#define __EXPAND(x) x
+#define __COUNT(_1, _2, _3, _4, _5, _6, _7, COUNT, ...) COUNT
+#define __VA_SIZE(...) __EXPAND(__COUNT(__VA_ARGS__, 7, 6, 5, 4, 3, 2, 1))
+#define __CAT1(a, b) a##b
+#define __CAT2(a, b) __CAT1(a, b)
+#define __DOC1(n1) __doc_##n1
+#define __DOC2(n1, n2) __doc_##n1##_##n2
+#define __DOC3(n1, n2, n3) __doc_##n1##_##n2##_##n3
+#define __DOC4(n1, n2, n3, n4) __doc_##n1##_##n2##_##n3##_##n4
+#define __DOC5(n1, n2, n3, n4, n5) __doc_##n1##_##n2##_##n3##_##n4##_##n5
+#define __DOC6(n1, n2, n3, n4, n5, n6) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6
+#define __DOC7(n1, n2, n3, n4, n5, n6, n7) \
+    __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7
+#define DOC(...) __EXPAND(__EXPAND(__CAT2(__DOC, __VA_SIZE(__VA_ARGS__)))(__VA_ARGS__))
+
+#endif // PYDOC_MACROS_H
\ No newline at end of file
diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py
old mode 100644
new mode 100755
index 26f9fbd..4e1ce2e
--- a/docs/doxygen/swig_doc.py
+++ b/docs/doxygen/swig_doc.py
@@ -1,8 +1,7 @@
 #
-# Copyright 2010-2012 Free Software Foundation, Inc.
+# Copyright 2010,2011 Free Software Foundation, Inc.
 #
-# This file was generated by gr_modtool, a tool from the GNU Radio framework
-# This file is a part of gr-limesdr
+# This file is part of GNU Radio
 #
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,12 +26,14 @@ The file instructs SWIG to transfer the doxygen comments into the
 python docstrings.
 
 """
-from __future__ import unicode_literals
 
-import sys, time
+import sys
+
+try:
+    from doxyxml import DoxyIndex, DoxyClass, DoxyFriend, DoxyFunction, DoxyFile, base
+except ImportError:
+    from gnuradio.doxyxml import DoxyIndex, DoxyClass, DoxyFriend, DoxyFunction, DoxyFile, base
 
-from doxyxml import DoxyIndex, DoxyClass, DoxyFriend, DoxyFunction, DoxyFile
-from doxyxml import DoxyOther, base
 
 def py_name(name):
     bits = name.split('_')
@@ -55,41 +56,18 @@ class Block(object):
         # Check for a parsing error.
         if item.error():
             return False
-        friendname = make_name(item.name())
-        is_a_block = item.has_member(friendname, DoxyFriend)
-        # But now sometimes the make function isn't a friend so check again.
-        if not is_a_block:
-            is_a_block = di.has_member(friendname, DoxyFunction)
-        return is_a_block
-
-class Block2(object):
-    """
-    Checks if doxyxml produced objects correspond to a new style
-    gnuradio block.
-    """
-
-    @classmethod
-    def includes(cls, item):
-        if not isinstance(item, DoxyClass):
-            return False
-        # Check for a parsing error.
-        if item.error():
-            return False
-        is_a_block2 = item.has_member('make', DoxyFunction) and item.has_member('sptr', DoxyOther)
-        return is_a_block2
+        return item.has_member(make_name(item.name()), DoxyFriend)
 
 
 def utoascii(text):
     """
-    Convert unicode text into ascii and escape quotes and backslashes.
+    Convert unicode text into ascii and escape quotes.
     """
     if text is None:
         return ''
     out = text.encode('ascii', 'replace')
-    # swig will require us to replace blackslash with 4 backslashes
-    out = out.replace(b'\\', b'\\\\\\\\')
-    out = out.replace(b'"', b'\\"').decode('ascii')
-    return str(out)
+    out = out.replace('"', '\\"')
+    return out
 
 
 def combine_descriptions(obj):
@@ -105,15 +83,9 @@ def combine_descriptions(obj):
         description.append(dd)
     return utoascii('\n\n'.join(description)).strip()
 
-def format_params(parameteritems):
-    output = ['Args:']
-    template = '    {0} : {1}'
-    for pi in parameteritems:
-        output.append(template.format(pi.name, pi.description))
-    return '\n'.join(output)
 
 entry_templ = '%feature("docstring") {name} "{docstring}"'
-def make_entry(obj, name=None, templ="{description}", description=None, params=[]):
+def make_entry(obj, name=None, templ="{description}", description=None):
     """
     Create a docstring entry for a swig interface file.
 
@@ -130,9 +102,6 @@ def make_entry(obj, name=None, templ="{description}", description=None, params=[
         return ''
     if description is None:
         description = combine_descriptions(obj)
-    if params:
-        description += '\n\n'
-        description += utoascii(format_params(params))
     docstring = templ.format(description=description)
     if not docstring:
         return ''
@@ -152,31 +121,27 @@ def make_func_entry(func, name=None, description=None, params=None):
             used as the description instead of extracting it from func.
     params - a parameter list that overrides using func.params.
     """
-    #if params is None:
-    #    params = func.params
-    #params = [prm.declname for prm in params]
-    #if params:
-    #    sig = "Params: (%s)" % ", ".join(params)
-    #else:
-    #    sig = "Params: (NONE)"
-    #templ = "{description}\n\n" + sig
-    #return make_entry(func, name=name, templ=utoascii(templ),
-    #                  description=description)
-    return make_entry(func, name=name, description=description, params=params)
-
-
-def make_class_entry(klass, description=None, ignored_methods=[], params=None):
+    if params is None:
+        params = func.params
+    params = [prm.declname for prm in params]
+    if params:
+        sig = "Params: (%s)" % ", ".join(params)
+    else:
+        sig = "Params: (NONE)"
+    templ = "{description}\n\n" + sig
+    return make_entry(func, name=name, templ=utoascii(templ),
+                      description=description)
+
+
+def make_class_entry(klass, description=None):
     """
     Create a class docstring for a swig interface file.
     """
-    if params is None:
-        params = klass.params
     output = []
-    output.append(make_entry(klass, description=description, params=params))
+    output.append(make_entry(klass, description=description))
     for func in klass.in_category(DoxyFunction):
-        if func.name() not in ignored_methods:
-            name = klass.name() + '::' + func.name()
-            output.append(make_func_entry(func, name=name))
+        name = klass.name() + '::' + func.name()
+        output.append(make_func_entry(func, name=name))
     return "\n\n".join(output)
 
 
@@ -210,33 +175,11 @@ def make_block_entry(di, block):
     # the make function.
     output = []
     output.append(make_class_entry(block, description=super_description))
+    creator = block.get_member(block.name(), DoxyFunction)
     output.append(make_func_entry(make_func, description=super_description,
-                                  params=block.params))
+                                  params=creator.params))
     return "\n\n".join(output)
 
-def make_block2_entry(di, block):
-    """
-    Create class and function docstrings of a new style gnuradio block for a
-    swig interface file.
-    """
-    descriptions = []
-    # For new style blocks all the relevant documentation should be
-    # associated with the 'make' method.
-    class_description = combine_descriptions(block)
-    make_func = block.get_member('make', DoxyFunction)
-    make_description = combine_descriptions(make_func)
-    description = class_description + "\n\nConstructor Specific Documentation:\n\n" + make_description
-    # Associate the combined description with the class and
-    # the make function.
-    output = []
-    output.append(make_class_entry(
-            block, description=description,
-            ignored_methods=['make'], params=make_func.params))
-    makename = block.name() + '::make'
-    output.append(make_func_entry(
-            make_func, name=makename, description=description,
-            params=make_func.params))
-    return "\n\n".join(output)
 
 def make_swig_interface_file(di, swigdocfilename, custom_output=None):
 
@@ -253,59 +196,39 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None):
 
     # Create docstrings for the blocks.
     blocks = di.in_category(Block)
-    blocks2 = di.in_category(Block2)
-
     make_funcs = set([])
     for block in blocks:
         try:
             make_func = di.get_member(make_name(block.name()), DoxyFunction)
-            # Don't want to risk writing to output twice.
-            if make_func.name() not in make_funcs:
-                make_funcs.add(make_func.name())
-                output.append(make_block_entry(di, block))
-        except block.ParsingError:
-            sys.stderr.write('Parsing error for block {0}\n'.format(block.name()))
-            raise
-
-    for block in blocks2:
-        try:
-            make_func = block.get_member('make', DoxyFunction)
-            make_func_name = block.name() +'::make'
-            # Don't want to risk writing to output twice.
-            if make_func_name not in make_funcs:
-                make_funcs.add(make_func_name)
-                output.append(make_block2_entry(di, block))
+            make_funcs.add(make_func.name())
+            output.append(make_block_entry(di, block))
         except block.ParsingError:
-            sys.stderr.write('Parsing error for block {0}\n'.format(block.name()))
-            raise
+            print('Parsing error for block %s' % block.name())
 
     # Create docstrings for functions
     # Don't include the make functions since they have already been dealt with.
-    funcs = [f for f in di.in_category(DoxyFunction)
-             if f.name() not in make_funcs and not f.name().startswith('std::')]
+    funcs = [f for f in di.in_category(DoxyFunction) if f.name() not in make_funcs]
     for f in funcs:
         try:
             output.append(make_func_entry(f))
         except f.ParsingError:
-            sys.stderr.write('Parsing error for function {0}\n'.format(f.name()))
+            print('Parsing error for function %s' % f.name())
 
     # Create docstrings for classes
     block_names = [block.name() for block in blocks]
-    block_names += [block.name() for block in blocks2]
-    klasses = [k for k in di.in_category(DoxyClass)
-               if k.name() not in block_names and not k.name().startswith('std::')]
+    klasses = [k for k in di.in_category(DoxyClass) if k.name() not in block_names]
     for k in klasses:
         try:
             output.append(make_class_entry(k))
         except k.ParsingError:
-            sys.stderr.write('Parsing error for class {0}\n'.format(k.name()))
+            print('Parsing error for class %s' % k.name())
 
     # Docstrings are not created for anything that is not a function or a class.
     # If this excludes anything important please add it here.
 
     output = "\n\n".join(output)
 
-    swig_doc = open(swigdocfilename, 'w')
+    swig_doc = file(swigdocfilename, 'w')
     swig_doc.write(output)
     swig_doc.close()
 
@@ -313,7 +236,7 @@ if __name__ == "__main__":
     # Parse command line options and set up doxyxml.
     err_msg = "Execute using: python swig_doc.py xml_path outputfilename"
     if len(sys.argv) != 3:
-        raise Exception(err_msg)
+        raise StandardError(err_msg)
     xml_path = sys.argv[1]
     swigdocfilename = sys.argv[2]
     di = DoxyIndex(xml_path)
diff --git a/docs/doxygen/swig_doc.pyc b/docs/doxygen/swig_doc.pyc
new file mode 100755
index 0000000..df927c8
Binary files /dev/null and b/docs/doxygen/swig_doc.pyc differ
diff --git a/docs/doxygen/update_pydoc.py b/docs/doxygen/update_pydoc.py
new file mode 100644
index 0000000..e6b4544
--- /dev/null
+++ b/docs/doxygen/update_pydoc.py
@@ -0,0 +1,346 @@
+#
+# Copyright 2010-2012 Free Software Foundation, Inc.
+#
+# This file was generated by gr_modtool, a tool from the GNU Radio framework
+# This file is a part of gnuradio
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+#
+"""
+Updates the *pydoc_h files for a module
+Execute using: python update_pydoc.py xml_path outputfilename
+
+The file instructs Pybind11 to transfer the doxygen comments into the
+python docstrings.
+
+"""
+
+import os, sys, time, glob, re, json
+from argparse import ArgumentParser
+
+from doxyxml import DoxyIndex, DoxyClass, DoxyFriend, DoxyFunction, DoxyFile
+from doxyxml import DoxyOther, base
+
+def py_name(name):
+    bits = name.split('_')
+    return '_'.join(bits[1:])
+
+def make_name(name):
+    bits = name.split('_')
+    return bits[0] + '_make_' + '_'.join(bits[1:])
+
+
+class Block(object):
+    """
+    Checks if doxyxml produced objects correspond to a gnuradio block.
+    """
+
+    @classmethod
+    def includes(cls, item):
+        if not isinstance(item, DoxyClass):
+            return False
+        # Check for a parsing error.
+        if item.error():
+            return False
+        friendname = make_name(item.name())
+        is_a_block = item.has_member(friendname, DoxyFriend)
+        # But now sometimes the make function isn't a friend so check again.
+        if not is_a_block:
+            is_a_block = di.has_member(friendname, DoxyFunction)
+        return is_a_block
+
+class Block2(object):
+    """
+    Checks if doxyxml produced objects correspond to a new style
+    gnuradio block.
+    """
+
+    @classmethod
+    def includes(cls, item):
+        if not isinstance(item, DoxyClass):
+            return False
+        # Check for a parsing error.
+        if item.error():
+            return False
+        is_a_block2 = item.has_member('make', DoxyFunction) and item.has_member('sptr', DoxyOther)
+        return is_a_block2
+
+
+def utoascii(text):
+    """
+    Convert unicode text into ascii and escape quotes and backslashes.
+    """
+    if text is None:
+        return ''
+    out = text.encode('ascii', 'replace')
+    # swig will require us to replace blackslash with 4 backslashes
+    # TODO: evaluate what this should be for pybind11
+    out = out.replace(b'\\', b'\\\\\\\\')
+    out = out.replace(b'"', b'\\"').decode('ascii')
+    return str(out)
+
+
+def combine_descriptions(obj):
+    """
+    Combines the brief and detailed descriptions of an object together.
+    """
+    description = []
+    bd = obj.brief_description.strip()
+    dd = obj.detailed_description.strip()
+    if bd:
+        description.append(bd)
+    if dd:
+        description.append(dd)
+    return utoascii('\n\n'.join(description)).strip()
+
+def format_params(parameteritems):
+    output = ['Args:']
+    template = '    {0} : {1}'
+    for pi in parameteritems:
+        output.append(template.format(pi.name, pi.description))
+    return '\n'.join(output)
+
+entry_templ = '%feature("docstring") {name} "{docstring}"'
+def make_entry(obj, name=None, templ="{description}", description=None, params=[]):
+    """
+    Create a docstring key/value pair, where the key is the object name.
+
+    obj - a doxyxml object from which documentation will be extracted.
+    name - the name of the C object (defaults to obj.name())
+    templ - an optional template for the docstring containing only one
+            variable named 'description'.
+    description - if this optional variable is set then it's value is
+            used as the description instead of extracting it from obj.
+    """
+    if name is None:
+        name=obj.name()
+        if hasattr(obj,'_parse_data') and hasattr(obj._parse_data,'definition'):
+            name=obj._parse_data.definition.split(' ')[-1]
+    if "operator " in name:
+        return ''
+    if description is None:
+        description = combine_descriptions(obj)
+    if params:
+        description += '\n\n'
+        description += utoascii(format_params(params))
+    docstring = templ.format(description=description)
+
+    return {name: docstring}
+
+
+def make_class_entry(klass, description=None, ignored_methods=[], params=None):
+    """
+    Create a class docstring key/value pair.
+    """
+    if params is None:
+        params = klass.params
+    output = {}
+    output.update(make_entry(klass, description=description, params=params))
+    for func in klass.in_category(DoxyFunction):
+        if func.name() not in ignored_methods:
+            name = klass.name() + '::' + func.name()
+            output.update(make_entry(func, name=name))
+    return output
+
+
+def make_block_entry(di, block):
+    """
+    Create class and function docstrings of a gnuradio block
+    """
+    descriptions = []
+    # Get the documentation associated with the class.
+    class_desc = combine_descriptions(block)
+    if class_desc:
+        descriptions.append(class_desc)
+    # Get the documentation associated with the make function
+    make_func = di.get_member(make_name(block.name()), DoxyFunction)
+    make_func_desc = combine_descriptions(make_func)
+    if make_func_desc:
+        descriptions.append(make_func_desc)
+    # Get the documentation associated with the file
+    try:
+        block_file = di.get_member(block.name() + ".h", DoxyFile)
+        file_desc = combine_descriptions(block_file)
+        if file_desc:
+            descriptions.append(file_desc)
+    except base.Base.NoSuchMember:
+        # Don't worry if we can't find a matching file.
+        pass
+    # And join them all together to make a super duper description.
+    super_description = "\n\n".join(descriptions)
+    # Associate the combined description with the class and
+    # the make function.
+    output = {}
+    output.update(make_class_entry(block, description=super_description))
+    output.update(make_entry(make_func, description=super_description,
+                                  params=block.params))
+    return output
+
+def make_block2_entry(di, block):
+    """
+    Create class and function docstrings of a new style gnuradio block
+    """
+    # For new style blocks all the relevant documentation should be
+    # associated with the 'make' method.
+    class_description = combine_descriptions(block)
+    make_func = block.get_member('make', DoxyFunction)
+    make_description = combine_descriptions(make_func)
+    description = class_description + "\n\nConstructor Specific Documentation:\n\n" + make_description
+    # Associate the combined description with the class and
+    # the make function.
+    output = {}
+    output.update(make_class_entry(
+            block, description=description,
+            ignored_methods=['make'], params=make_func.params))
+    makename = block.name() + '::make'
+    output.update(make_entry(
+            make_func, name=makename, description=description,
+            params=make_func.params))
+    return output
+
+def get_docstrings_dict(di, custom_output=None):
+
+    output = {}
+    if custom_output:
+        output.update(custom_output)
+
+    # Create docstrings for the blocks.
+    blocks = di.in_category(Block)
+    blocks2 = di.in_category(Block2)
+
+    make_funcs = set([])
+    for block in blocks:
+        try:
+            make_func = di.get_member(make_name(block.name()), DoxyFunction)
+            # Don't want to risk writing to output twice.
+            if make_func.name() not in make_funcs:
+                make_funcs.add(make_func.name())
+                output.update(make_block_entry(di, block))
+        except block.ParsingError:
+            sys.stderr.write('Parsing error for block {0}\n'.format(block.name()))
+            raise
+
+    for block in blocks2:
+        try:
+            make_func = block.get_member('make', DoxyFunction)
+            make_func_name = block.name() +'::make'
+            # Don't want to risk writing to output twice.
+            if make_func_name not in make_funcs:
+                make_funcs.add(make_func_name)
+                output.update(make_block2_entry(di, block))
+        except block.ParsingError:
+            sys.stderr.write('Parsing error for block {0}\n'.format(block.name()))
+            raise
+
+    # Create docstrings for functions
+    # Don't include the make functions since they have already been dealt with.
+    funcs = [f for f in di.in_category(DoxyFunction)
+             if f.name() not in make_funcs and not f.name().startswith('std::')]
+    for f in funcs:
+        try:
+            output.update(make_entry(f))
+        except f.ParsingError:
+            sys.stderr.write('Parsing error for function {0}\n'.format(f.name()))
+
+    # Create docstrings for classes
+    block_names = [block.name() for block in blocks]
+    block_names += [block.name() for block in blocks2]
+    klasses = [k for k in di.in_category(DoxyClass)
+               if k.name() not in block_names and not k.name().startswith('std::')]
+    for k in klasses:
+        try:
+            output.update(make_class_entry(k))
+        except k.ParsingError:
+            sys.stderr.write('Parsing error for class {0}\n'.format(k.name()))
+
+    # Docstrings are not created for anything that is not a function or a class.
+    # If this excludes anything important please add it here.
+
+    return output
+
+def sub_docstring_in_pydoc_h(pydoc_files, docstrings_dict, output_dir, filter_str=None):
+    if filter_str:
+        docstrings_dict = {k: v for k, v in docstrings_dict.items() if k.startswith(filter_str)}
+
+    with open(os.path.join(output_dir,'docstring_status'),'w') as status_file:
+    
+        for pydoc_file in pydoc_files:
+            if filter_str:
+                filter_str2 = "::".join((filter_str,os.path.split(pydoc_file)[-1].split('_pydoc_template.h')[0]))
+                docstrings_dict2 = {k: v for k, v in docstrings_dict.items() if k.startswith(filter_str2)}
+            else:
+                docstrings_dict2 = docstrings_dict
+
+
+
+            file_in = open(pydoc_file,'r').read()
+            for key, value in docstrings_dict2.items(): 
+                file_in_tmp = file_in 
+                try:
+                    doc_key = key.split("::")
+                    # if 'gr' in doc_key:
+                    #     doc_key.remove('gr') 
+                    doc_key = '_'.join(doc_key)
+                    regexp = r'(__doc_{} =\sR\"doc\()[^)]*(\)doc\")'.format(doc_key)
+                    regexp = re.compile(regexp, re.MULTILINE)
+                
+                    (file_in, nsubs) = regexp.subn(r'\1'+value+r'\2', file_in, count=1)
+                    if nsubs == 1:
+                        status_file.write("PASS: " + pydoc_file + "\n")
+                except KeyboardInterrupt:
+                    raise KeyboardInterrupt
+                except: # be permissive, TODO log, but just leave the docstring blank
+                    status_file.write("FAIL: " + pydoc_file + "\n")
+                    file_in = file_in_tmp
+
+            output_pathname = os.path.join(output_dir, os.path.basename(pydoc_file).replace('_template.h','.h'))
+            # FIXME: Remove this debug print
+            print('output docstrings to {}'.format(output_pathname))
+            with open(output_pathname,'w') as file_out:
+                file_out.write(file_in)
+
+def copy_docstring_templates(pydoc_files, output_dir):
+    with open(os.path.join(output_dir,'docstring_status'),'w') as status_file:
+        for pydoc_file in pydoc_files:
+            file_in = open(pydoc_file,'r').read()
+            output_pathname = os.path.join(output_dir, os.path.basename(pydoc_file).replace('_template.h','.h'))
+            # FIXME: Remove this debug print
+            print('copy docstrings to {}'.format(output_pathname))
+            with open(output_pathname,'w') as file_out:
+                file_out.write(file_in)
+        status_file.write("DONE")
+
+def argParse():
+    """Parses commandline args."""
+    desc='Scrape the doxygen generated xml for docstrings to insert into python bindings'
+    parser = ArgumentParser(description=desc)
+    
+    parser.add_argument("function", help="Operation to perform on docstrings", choices=["scrape","sub","copy"])
+
+    parser.add_argument("--xml_path")
+    parser.add_argument("--bindings_dir")
+    parser.add_argument("--output_dir")
+    parser.add_argument("--json_path")
+    parser.add_argument("--filter", default=None)
+
+    return parser.parse_args()
+
+if __name__ == "__main__":
+    # Parse command line options and set up doxyxml.
+    args = argParse()
+    if args.function.lower() == 'scrape':
+        di = DoxyIndex(args.xml_path)
+        docstrings_dict = get_docstrings_dict(di)
+        with open(args.json_path, 'w') as fp:
+            json.dump(docstrings_dict, fp)
+    elif args.function.lower() == 'sub':
+        with open(args.json_path, 'r') as fp:
+            docstrings_dict = json.load(fp)
+        pydoc_files = glob.glob(os.path.join(args.bindings_dir,'*_pydoc_template.h'))
+        sub_docstring_in_pydoc_h(pydoc_files, docstrings_dict, args.output_dir, args.filter)
+    elif args.function.lower() == 'copy':
+        pydoc_files = glob.glob(os.path.join(args.bindings_dir,'*_pydoc_template.h'))
+        copy_docstring_templates(pydoc_files, args.output_dir)
+
+            
diff --git a/docs/known_issues.txt b/docs/known_issues.txt
new file mode 100755
index 0000000..085b78a
--- /dev/null
+++ b/docs/known_issues.txt
@@ -0,0 +1,13 @@
+﻿1. Python Path is not /usr/lib/python2.7/site-package/:/usr/local/lib/python2.7/site-package/
+export PYTHONPATH="/usr/lib/python2.7/site-packages/:/usr/local/lib/python2.7/site-packages" 
+
+this line is need to be added in the end of .bashrc file.
+
+2. Blocks work with LimeSuite version 17.10.0 and above.
+
+3. While running GNU Radio flowgraph “aUaU” message is thrown. This means audio underrun (not enough
+samples ready to send to sound sink.
+
+4. Doesn't compile with GNU Radio 3.8.
+
+5. CW is being transmitted when flowgraph is killed.
diff --git a/examples/DVB_T_2k_64QAM_TX.grc b/examples/DVB_T_2k_64QAM_TX.grc
new file mode 100644
index 0000000..05850e7
--- /dev/null
+++ b/examples/DVB_T_2k_64QAM_TX.grc
@@ -0,0 +1,1415 @@
+<?xml version='1.0' encoding='utf-8'?>
+<?grc format='1' created='3.7.13'?>
+<flow_graph>
+  <timestamp>Thu Jan 16 23:00:58 2014</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>author</key>
+      <value></value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 12)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>qt_gui</value>
+    </param>
+    <param>
+      <key>hier_block_src_path</key>
+      <value>.:</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>LimeSDR_USB_DVB_T_Demo_2k</value>
+    </param>
+    <param>
+      <key>max_nouts</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>qt_qss_theme</key>
+      <value></value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>run_command</key>
+      <value>{python} -u {filename}</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sizing_mode</key>
+      <value>fixed</value>
+    </param>
+    <param>
+      <key>thread_safe_setters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>title</key>
+      <value></value>
+    </param>
+    <param>
+      <key>placement</key>
+      <value>(0,0)</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(216, 12)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>center_freq</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>700e6</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(320, 12)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>(8000000.0 * 8) / 7</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_file_source</key>
+    <param>
+      <key>begin_tag</key>
+      <value>pmt.PMT_NIL</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>file</key>
+      <value>adv8dvbt23qam64.ts</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(16, 84)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_file_source_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_multiply_const_xx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>0.0022097087</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(688, 404)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_multiply_const_xx_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_vector_to_stream</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(160, 332)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_vector_to_stream_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>num_items</key>
+      <value>2048</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>digital_ofdm_cyclic_prefixer</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>cp_len</key>
+      <value>64</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>input_size</key>
+      <value>2048</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(432, 400)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>digital_ofdm_cyclic_prefixer_0</value>
+    </param>
+    <param>
+      <key>tagname</key>
+      <value></value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rolloff</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>dtv_dvbt_bit_inner_interleaver</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>constellation</key>
+      <value>64qam</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1064, 204)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>hierarchy</key>
+      <value>nh</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>dtv_dvbt_bit_inner_interleaver_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>transmission_mode</key>
+      <value>T2k</value>
+    </param>
+  </block>
+  <block>
+    <key>dtv_dvbt_convolutional_interleaver</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>blocks</key>
+      <value>136</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>M</key>
+      <value>17</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(784, 84)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>dtv_dvbt_convolutional_interleaver_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>I</key>
+      <value>12</value>
+    </param>
+  </block>
+  <block>
+    <key>dtv_dvbt_energy_dispersal</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>nsize</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(280, 104)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>dtv_dvbt_energy_dispersal_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>dtv_dvbt_inner_coder</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>code_rate</key>
+      <value>C2_3</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>constellation</key>
+      <value>64qam</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1040, 80)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>hierarchy</key>
+      <value>nh</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>dtv_dvbt_inner_coder_0</value>
+    </param>
+    <param>
+      <key>ninput</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>noutput</key>
+      <value>1512</value>
+    </param>
+  </block>
+  <block>
+    <key>dtv_dvbt_map</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>constellation</key>
+      <value>64qam</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(464, 192)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>hierarchy</key>
+      <value>nh</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>dtv_dvbt_map_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>transmission_mode</key>
+      <value>T2k</value>
+    </param>
+  </block>
+  <block>
+    <key>dtv_dvbt_reed_solomon_enc</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>blocks</key>
+      <value>8</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>gfpoly</key>
+      <value>0x11d</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(496, 56)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>dtv_dvbt_reed_solomon_enc_0</value>
+    </param>
+    <param>
+      <key>k</key>
+      <value>239</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>n</key>
+      <value>255</value>
+    </param>
+    <param>
+      <key>s</key>
+      <value>51</value>
+    </param>
+    <param>
+      <key>m</key>
+      <value>8</value>
+    </param>
+    <param>
+      <key>p</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>t</key>
+      <value>8</value>
+    </param>
+  </block>
+  <block>
+    <key>dtv_dvbt_reference_signals</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>cell_id</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>code_rate_hp</key>
+      <value>C2_3</value>
+    </param>
+    <param>
+      <key>code_rate_lp</key>
+      <value>C2_3</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>constellation</key>
+      <value>64qam</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(184, 156)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>guard_interval</key>
+      <value>GI_1_32</value>
+    </param>
+    <param>
+      <key>hierarchy</key>
+      <value>nh</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>dtv_dvbt_reference_signals_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>include_cell_id</key>
+      <value>call_id_yes</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>transmission_mode</key>
+      <value>T2k</value>
+    </param>
+  </block>
+  <block>
+    <key>dtv_dvbt_symbol_inner_interleaver</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>direction</key>
+      <value>Interleave</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(792, 204)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>dtv_dvbt_symbol_inner_interleaver_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>transmission_mode</key>
+      <value>T2k</value>
+    </param>
+  </block>
+  <block>
+    <key>fft_vxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>2048</value>
+    </param>
+    <param>
+      <key>forward</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(104, 392)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>fft_vxx_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>nthreads</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>shift</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>window</key>
+      <value>window.rectangular(2048)</value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_sink</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>analog_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_dB_ch0</key>
+      <value>60</value>
+    </param>
+    <param>
+      <key>nco_freq_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>pa_path_ch0</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_dB_ch1</key>
+      <value>60</value>
+    </param>
+    <param>
+      <key>nco_freq_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>pa_path_ch1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>channel_mode</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(920, 300)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_sink_0</value>
+    </param>
+    <param>
+      <key>length_tag_name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>oversample</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rf_freq</key>
+      <value>center_freq</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+  </block>
+  <block>
+    <key>qtgui_const_sink_x</key>
+    <param>
+      <key>autoscale</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>axislabels</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(376, 324)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>qtgui_const_sink_x_0</value>
+    </param>
+    <param>
+      <key>legend</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>alpha1</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color1</key>
+      <value>"blue"</value>
+    </param>
+    <param>
+      <key>label1</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha10</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color10</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label10</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker10</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style10</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width10</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha2</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color2</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label2</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker2</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style2</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width2</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha3</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color3</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label3</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker3</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style3</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width3</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha4</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color4</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label4</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker4</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style4</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width4</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha5</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color5</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label5</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker5</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style5</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width5</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha6</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color6</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label6</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker6</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style6</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width6</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha7</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color7</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label7</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker7</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style7</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width7</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha8</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color8</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label8</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker8</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style8</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width8</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha9</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color9</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label9</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker9</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>style9</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>width9</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>name</key>
+      <value>""</value>
+    </param>
+    <param>
+      <key>nconnections</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>tr_chan</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>tr_level</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>tr_mode</key>
+      <value>qtgui.TRIG_MODE_FREE</value>
+    </param>
+    <param>
+      <key>tr_slope</key>
+      <value>qtgui.TRIG_SLOPE_POS</value>
+    </param>
+    <param>
+      <key>tr_tag</key>
+      <value>""</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>update_time</key>
+      <value>0.10</value>
+    </param>
+    <param>
+      <key>xmax</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>xmin</key>
+      <value>-2</value>
+    </param>
+    <param>
+      <key>ymax</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>ymin</key>
+      <value>-2</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>blocks_file_source_0</source_block_id>
+    <sink_block_id>dtv_dvbt_energy_dispersal_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_multiply_const_xx_0</source_block_id>
+    <sink_block_id>limesdr_sink_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_vector_to_stream_0</source_block_id>
+    <sink_block_id>qtgui_const_sink_x_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>digital_ofdm_cyclic_prefixer_0</source_block_id>
+    <sink_block_id>blocks_multiply_const_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>dtv_dvbt_bit_inner_interleaver_0</source_block_id>
+    <sink_block_id>dtv_dvbt_symbol_inner_interleaver_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>dtv_dvbt_convolutional_interleaver_0</source_block_id>
+    <sink_block_id>dtv_dvbt_inner_coder_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>dtv_dvbt_energy_dispersal_0</source_block_id>
+    <sink_block_id>dtv_dvbt_reed_solomon_enc_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>dtv_dvbt_inner_coder_0</source_block_id>
+    <sink_block_id>dtv_dvbt_bit_inner_interleaver_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>dtv_dvbt_map_0</source_block_id>
+    <sink_block_id>dtv_dvbt_reference_signals_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>dtv_dvbt_reed_solomon_enc_0</source_block_id>
+    <sink_block_id>dtv_dvbt_convolutional_interleaver_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>dtv_dvbt_reference_signals_0</source_block_id>
+    <sink_block_id>blocks_vector_to_stream_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>dtv_dvbt_reference_signals_0</source_block_id>
+    <sink_block_id>fft_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>dtv_dvbt_symbol_inner_interleaver_0</source_block_id>
+    <sink_block_id>dtv_dvbt_map_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fft_vxx_0</source_block_id>
+    <sink_block_id>digital_ofdm_cyclic_prefixer_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/examples/FM_RDS.grc b/examples/FM_RDS.grc
new file mode 100644
index 0000000..04b9288
--- /dev/null
+++ b/examples/FM_RDS.grc
@@ -0,0 +1,3510 @@
+<?xml version='1.0' encoding='utf-8'?>
+<?grc format='1' created='3.7.13'?>
+<flow_graph>
+  <timestamp>Thu Aug 28 08:24:49 2014</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>author</key>
+      <value>Lime Microsystems</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>4096,4096</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(14, 9)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>hier_block_src_path</key>
+      <value>.:</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>rds_rx</value>
+    </param>
+    <param>
+      <key>max_nouts</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>qt_qss_theme</key>
+      <value></value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>run_command</key>
+      <value>{python} -u {filename}</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sizing_mode</key>
+      <value>fixed</value>
+    </param>
+    <param>
+      <key>thread_safe_setters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FM RDS receiver</value>
+    </param>
+    <param>
+      <key>placement</key>
+      <value>(0,0)</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(560, 4)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>audio_decim</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>5</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(368, 1380)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>audio_decim_rate</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>baseband_rate/audio_decim</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(272, 1380)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>48000</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(448, 4)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>baseband_rate</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>samp_rate/bb_decim</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(664, 4)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>bb_decim</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>4</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>100.1e6</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1360, 16)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>(1,0,1,2)</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Frequency</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>108e6</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>88e6</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>int_converter</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>40</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1216, 16)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>(0,0,1,1)</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>gain</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RF Gain</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>70</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>70</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(344, 4)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1000000</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1504, 16)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>(0,1,1,1)</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>volume</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Volume</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>51</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(280, 308)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>xlate_bandwidth</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>100000</value>
+    </param>
+  </block>
+  <block>
+    <key>analog_fm_deemph</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(632, 1308)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_fm_deemph_0_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_decim_rate</value>
+    </param>
+    <param>
+      <key>tau</key>
+      <value>75e-6</value>
+    </param>
+  </block>
+  <block>
+    <key>analog_fm_deemph</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(640, 1460)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_fm_deemph_0_0_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_decim_rate</value>
+    </param>
+    <param>
+      <key>tau</key>
+      <value>75e-6</value>
+    </param>
+  </block>
+  <block>
+    <key>analog_pll_refout_cc</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(864, 532)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_pll_refout_cc_0</value>
+    </param>
+    <param>
+      <key>w</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>max_freq</key>
+      <value>2 * math.pi * (19000+200) / baseband_rate</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>min_freq</key>
+      <value>2 * math.pi * (19000-200) / baseband_rate</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>analog_wfm_rcv</key>
+    <param>
+      <key>audio_decimation</key>
+      <value>bb_decim</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(536, 380)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_wfm_rcv_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>quad_rate</key>
+      <value>samp_rate</value>
+    </param>
+  </block>
+  <block>
+    <key>audio_sink</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>device_name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(48, 1352)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>audio_sink_0</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>ok_to_block</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_add_xx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(824, 1456)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_add_xx_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_complex_to_imag</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(872, 680)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_complex_to_imag_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_complex_to_real</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(272, 1056)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_complex_to_real_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_keep_one_in_n</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(232, 1100)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_keep_one_in_n_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>n</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_multiply_const_vxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>volume</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(472, 1468)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_multiply_const_vxx_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_multiply_const_vxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>volume</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(472, 1316)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_multiply_const_vxx_0_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_multiply_xx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1264, 736)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>270</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_multiply_xx_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_multiply_xx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(928, 608)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_multiply_xx_1</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_sub_xx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(808, 1304)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_sub_xx_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>digital_binary_slicer_fb</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(80, 1104)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>digital_binary_slicer_fb_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>digital_diff_decoder_bb</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(368, 1100)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>digital_diff_decoder_bb_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>modulus</key>
+      <value>2</value>
+    </param>
+  </block>
+  <block>
+    <key>digital_mpsk_receiver_cc</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(48, 884)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_mu</key>
+      <value>0.05</value>
+    </param>
+    <param>
+      <key>gain_omega</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>digital_mpsk_receiver_cc_0</value>
+    </param>
+    <param>
+      <key>w</key>
+      <value>1*cmath.pi/100.0</value>
+    </param>
+    <param>
+      <key>M</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>fmax</key>
+      <value>0.06</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>fmin</key>
+      <value>-0.06</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>mu</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>omega_relative_limit</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>omega</key>
+      <value>samp_rate/bb_decim/audio_decim/ 2375.0</value>
+    </param>
+    <param>
+      <key>theta</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>fir_filter_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>audio_decim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(668, 696)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>270</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>fir_filter_xxx_1</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_delay</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>firdes.low_pass(1.0,baseband_rate,13e3,3e3,firdes.WIN_HAMMING)</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fff</value>
+    </param>
+  </block>
+  <block>
+    <key>fir_filter_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(864, 412)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>fir_filter_xxx_2</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_delay</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>firdes.complex_band_pass(1.0,baseband_rate,19e3-500,19e3+500,1e3,firdes.WIN_HAMMING)</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fcc</value>
+    </param>
+  </block>
+  <block>
+    <key>fir_filter_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1272, 380)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>fir_filter_xxx_3</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_delay</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>firdes.band_pass(1.0,baseband_rate,38e3-13e3,38e3+13e3,3e3,firdes.WIN_HAMMING)</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fff</value>
+    </param>
+  </block>
+  <block>
+    <key>fir_filter_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>audio_decim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1268, 1144)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>270</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>fir_filter_xxx_5</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_delay</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>firdes.low_pass(1.0,baseband_rate,20e3,40e3,firdes.WIN_HAMMING)</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fff</value>
+    </param>
+  </block>
+  <block>
+    <key>freq_xlating_fir_filter_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>center_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(240, 368)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>freq_xlating_fir_filter_xxx_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>firdes.low_pass(1, samp_rate, xlate_bandwidth, 100000)</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ccc</value>
+    </param>
+  </block>
+  <block>
+    <key>freq_xlating_fir_filter_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>center_freq</key>
+      <value>57e3</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>audio_decim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(48, 648)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>freq_xlating_fir_filter_xxx_1</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>baseband_rate</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>firdes.low_pass(2500.0,baseband_rate,2.4e3,2e3,firdes.WIN_HAMMING)</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fcc</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_rds_decoder</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>debug</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(408, 1156)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>gr_rds_decoder_0</value>
+    </param>
+    <param>
+      <key>log</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_rds_panel</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(40, 1168)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>gr_rds_panel_0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+  </block>
+  <block>
+    <key>gr_rds_parser</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>debug</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(224, 1148)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>gr_rds_parser_0</value>
+    </param>
+    <param>
+      <key>log</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>pty_locale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>reset</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>import</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(888, 484)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>import_0</value>
+    </param>
+    <param>
+      <key>import</key>
+      <value>import math</value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_source</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>analog_bandw_ch0</key>
+      <value>1.5e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch0</key>
+      <value>2.5e6</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch0</key>
+      <value>100e3</value>
+    </param>
+    <param>
+      <key>gain_dB_ch0</key>
+      <value>gain</value>
+    </param>
+    <param>
+      <key>lna_path_ch0</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>nco_freq_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch1</key>
+      <value>1.5e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch1</key>
+      <value>2.5e6</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch1</key>
+      <value>100e3</value>
+    </param>
+    <param>
+      <key>gain_dB_ch1</key>
+      <value>gain</value>
+    </param>
+    <param>
+      <key>lna_path_ch1</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>nco_freq_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>channel_mode</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 260)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_source_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>oversample</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rf_freq</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+  </block>
+  <block>
+    <key>notebook</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(184, 6)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>(2,0,1,2)</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>nb</value>
+    </param>
+    <param>
+      <key>labels</key>
+      <value>['BB', 'Demod', 'L+R', 'L-R', 'Pilot', 'DSBSC', 'RDS', 'RDS constellation','Waterfall']</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.NB_TOP</value>
+    </param>
+  </block>
+  <block>
+    <key>note</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value>L+R for
+stereo
+receivers</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(776, 900)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>note_0</value>
+    </param>
+    <param>
+      <key>note</key>
+      <value>L+R</value>
+    </param>
+  </block>
+  <block>
+    <key>note</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value>In FM stereo broadcasting, 
+a pilot tone of 19 kHz indicates 
+that there is stereophonic 
+information at 38 kHz 
+(19×2, the second harmonic of the pilot). 
+The receiver doubles the frequency 
+of the pilot tone and uses it as a 
+frequency and phase reference to 
+demodulate the stereo information.</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1048, 460)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>note_0_0</value>
+    </param>
+    <param>
+      <key>note</key>
+      <value>Pilot</value>
+    </param>
+  </block>
+  <block>
+    <key>note</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value>DSBSC modulation
+of 38 kHz sinewave
+for mono</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1272, 276)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>note_0_0_0</value>
+    </param>
+    <param>
+      <key>note</key>
+      <value>DSBSC</value>
+    </param>
+  </block>
+  <block>
+    <key>note</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value>L-R for
+mono
+receivers</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1136, 900)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>note_0_1</value>
+    </param>
+    <param>
+      <key>note</key>
+      <value>L-R</value>
+    </param>
+  </block>
+  <block>
+    <key>note</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value>Digital signal which 
+includes information such 
+as the name of the station, 
+or free text such as the title 
+of the program or the music.</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(264, 548)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>note_0_2</value>
+    </param>
+    <param>
+      <key>note</key>
+      <value>RDS</value>
+    </param>
+  </block>
+  <block>
+    <key>note</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value>We use lowest possible
+analog filter bandwidth
+and 
+100 kHz digital filter bandwidth</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 140)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>note_10</value>
+    </param>
+    <param>
+      <key>note</key>
+      <value>LimeSDR</value>
+    </param>
+  </block>
+  <block>
+    <key>rational_resampler_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>audio_decim_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fbw</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(280, 1448)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>rational_resampler_xxx_0</value>
+    </param>
+    <param>
+      <key>interp</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>[]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fff</value>
+    </param>
+  </block>
+  <block>
+    <key>rational_resampler_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>audio_decim_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fbw</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(280, 1296)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>rational_resampler_xxx_0_0</value>
+    </param>
+    <param>
+      <key>interp</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>[]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fff</value>
+    </param>
+  </block>
+  <block>
+    <key>root_raised_cosine_filter</key>
+    <param>
+      <key>alpha</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fir_filter_ccf</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(48, 760)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>root_raised_cosine_filter_0</value>
+    </param>
+    <param>
+      <key>interp</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ntaps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate/bb_decim/audio_decim</value>
+    </param>
+    <param>
+      <key>sym_rate</key>
+      <value>2375</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.8</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>freqvar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(544, 120)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>nb, 0</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>-30</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Baseband</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.8</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>freqvar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(904, 120)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0_0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>nb, 1</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>baseband_rate</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FM Demod</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>freqvar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(736, 1012)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0_0_0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>nb, 2</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_decim_rate</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>L+R</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>freqvar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1504, 316)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0_0_0_1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>nb, 5</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>baseband_rate</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>DSBSC Sub-carrier</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>freqvar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1096, 1012)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0_0_0_1_0_0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>nb, 3</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>-50</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>baseband_rate</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>L-R</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>freqvar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(312, 684)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0_0_0_1_0_1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>nb,6</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>RDS</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(864, 728)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>nb, 4</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>baseband_rate</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Pilot</value>
+    </param>
+    <param>
+      <key>trig_mode</key>
+      <value>wxgui.TRIG_MODE_AUTO</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>v_offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>y_axis_label</key>
+      <value>Counts</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(320, 904)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>nb,7</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>2375</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Scope Plot</value>
+    </param>
+    <param>
+      <key>trig_mode</key>
+      <value>wxgui.TRIG_MODE_AUTO</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>v_offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0.4</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>y_axis_label</key>
+      <value>Counts</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_waterfallsink2</key>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>dynamic_range</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>512</value>
+    </param>
+    <param>
+      <key>freqvar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(736, 124)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_waterfallsink2_0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>nb,8</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>baseband_rate</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Waterfall Plot</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>analog_fm_deemph_0_0</source_block_id>
+    <sink_block_id>blocks_multiply_const_vxx_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_fm_deemph_0_0_0</source_block_id>
+    <sink_block_id>blocks_multiply_const_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_pll_refout_cc_0</source_block_id>
+    <sink_block_id>blocks_multiply_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_pll_refout_cc_0</source_block_id>
+    <sink_block_id>blocks_multiply_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_wfm_rcv_0</source_block_id>
+    <sink_block_id>fir_filter_xxx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_wfm_rcv_0</source_block_id>
+    <sink_block_id>fir_filter_xxx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_wfm_rcv_0</source_block_id>
+    <sink_block_id>fir_filter_xxx_3</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_wfm_rcv_0</source_block_id>
+    <sink_block_id>freq_xlating_fir_filter_xxx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_wfm_rcv_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_wfm_rcv_0</source_block_id>
+    <sink_block_id>wxgui_waterfallsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_add_xx_0</source_block_id>
+    <sink_block_id>analog_fm_deemph_0_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_complex_to_imag_0</source_block_id>
+    <sink_block_id>blocks_multiply_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_complex_to_imag_0</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_complex_to_real_0</source_block_id>
+    <sink_block_id>digital_binary_slicer_fb_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_keep_one_in_n_0</source_block_id>
+    <sink_block_id>digital_diff_decoder_bb_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
+    <sink_block_id>rational_resampler_xxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_multiply_const_vxx_0_0</source_block_id>
+    <sink_block_id>rational_resampler_xxx_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_multiply_xx_0</source_block_id>
+    <sink_block_id>fir_filter_xxx_5</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_multiply_xx_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0_0_0_1_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_multiply_xx_1</source_block_id>
+    <sink_block_id>blocks_complex_to_imag_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_sub_xx_0</source_block_id>
+    <sink_block_id>analog_fm_deemph_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>digital_binary_slicer_fb_0</source_block_id>
+    <sink_block_id>blocks_keep_one_in_n_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>digital_diff_decoder_bb_0</source_block_id>
+    <sink_block_id>gr_rds_decoder_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>digital_mpsk_receiver_cc_0</source_block_id>
+    <sink_block_id>blocks_complex_to_real_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>digital_mpsk_receiver_cc_0</source_block_id>
+    <sink_block_id>wxgui_scopesink2_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fir_filter_xxx_1</source_block_id>
+    <sink_block_id>blocks_add_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fir_filter_xxx_1</source_block_id>
+    <sink_block_id>blocks_sub_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fir_filter_xxx_1</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fir_filter_xxx_2</source_block_id>
+    <sink_block_id>analog_pll_refout_cc_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fir_filter_xxx_3</source_block_id>
+    <sink_block_id>blocks_multiply_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fir_filter_xxx_3</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0_0_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fir_filter_xxx_5</source_block_id>
+    <sink_block_id>blocks_add_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fir_filter_xxx_5</source_block_id>
+    <sink_block_id>blocks_sub_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>freq_xlating_fir_filter_xxx_0</source_block_id>
+    <sink_block_id>analog_wfm_rcv_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>freq_xlating_fir_filter_xxx_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>freq_xlating_fir_filter_xxx_1</source_block_id>
+    <sink_block_id>root_raised_cosine_filter_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>freq_xlating_fir_filter_xxx_1</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0_0_0_1_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_rds_decoder_0</source_block_id>
+    <sink_block_id>gr_rds_parser_0</sink_block_id>
+    <source_key>out</source_key>
+    <sink_key>in</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_rds_parser_0</source_block_id>
+    <sink_block_id>gr_rds_panel_0</sink_block_id>
+    <source_key>out</source_key>
+    <sink_key>in</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>limesdr_source_0</source_block_id>
+    <sink_block_id>freq_xlating_fir_filter_xxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>rational_resampler_xxx_0</source_block_id>
+    <sink_block_id>audio_sink_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>rational_resampler_xxx_0_0</source_block_id>
+    <sink_block_id>audio_sink_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>root_raised_cosine_filter_0</source_block_id>
+    <sink_block_id>digital_mpsk_receiver_cc_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/examples/FM_receiver.grc b/examples/FM_receiver.grc
index a47f6f2..17c8b42 100644
--- a/examples/FM_receiver.grc
+++ b/examples/FM_receiver.grc
@@ -1,396 +1,798 @@
-options:
-  parameters:
-    author: Lime Microsystems
-    category: '[GRC Hier Blocks]'
-    cmake_opt: ''
-    comment: ''
-    copyright: ''
-    description: ''
-    gen_cmake: 'On'
-    gen_linking: dynamic
-    generate_options: qt_gui
-    hier_block_src_path: '.:'
-    id: top_block
-    max_nouts: '0'
-    output_language: python
-    placement: (0,0)
-    qt_qss_theme: ''
-    realtime_scheduling: ''
-    run: 'True'
-    run_command: '{python} -u {filename}'
-    run_options: prompt
-    sizing_mode: fixed
-    thread_safe_setters: ''
-    title: FM Receiver
-    window_size: ''
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [8, 8]
-    rotation: 0
-    state: enabled
-
-blocks:
-- name: baseband
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 0,0,1,1
-    label: RX Baseband [MHz]
-    type: real
-    value: '100'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [165, 293]
-    rotation: 0
-    state: true
-- name: cut_freq
-  id: variable_qtgui_range
-  parameters:
-    comment: ''
-    gui_hint: 2,0,1,1
-    label: Cutoff frequency
-    min_len: '200'
-    orient: Qt.Horizontal
-    rangeType: float
-    start: 1e3
-    step: 1e3
-    stop: samp_rate/2
-    value: 500e3
-    widget: counter_slider
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [460, 323]
-    rotation: 0
-    state: true
-- name: gain
-  id: variable_qtgui_range
-  parameters:
-    comment: ''
-    gui_hint: 1,0,1,1
-    label: Gain [dB]
-    min_len: '70'
-    orient: Qt.Horizontal
-    rangeType: int
-    start: '0'
-    step: '1'
-    stop: '70'
-    value: '30'
-    widget: counter_slider
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [193, 80]
-    rotation: 0
-    state: true
-- name: lna_path
-  id: variable_qtgui_chooser
-  parameters:
-    comment: ''
-    gui_hint: 0,1,1,1
-    label: LNA Path
-    label0: Auto
-    label1: H
-    label2: L
-    label3: W
-    label4: ''
-    labels: '[]'
-    num_opts: '4'
-    option1: '1'
-    option2: '2'
-    option3: '3'
-    option4: '4'
-    options: '[0, 1, 2]'
-    orient: Qt.QVBoxLayout
-    type: int
-    value: '255'
-    widget: combo_box
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [10, 167]
-    rotation: 0
-    state: true
-- name: samp_rate
-  id: variable
-  parameters:
-    comment: ''
-    value: 2e6
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [9, 104]
-    rotation: 0
-    state: enabled
-- name: trans_width
-  id: variable_qtgui_range
-  parameters:
-    comment: ''
-    gui_hint: 2,1,1,1
-    label: Transition width
-    min_len: '200'
-    orient: Qt.Horizontal
-    rangeType: float
-    start: 10e3
-    step: '500'
-    stop: 500e3
-    value: 100e3
-    widget: counter_slider
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [328, 323]
-    rotation: 0
-    state: true
-- name: volume
-  id: variable_qtgui_range
-  parameters:
-    comment: ''
-    gui_hint: 1,1,1,1
-    label: Volume
-    min_len: '200'
-    orient: Qt.Horizontal
-    rangeType: float
-    start: '0'
-    step: '0.1'
-    stop: '10'
-    value: '5'
-    widget: counter_slider
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [1010, 102]
-    rotation: 0
-    state: true
-- name: analog_wfm_rcv_0
-  id: analog_wfm_rcv
-  parameters:
-    affinity: ''
-    alias: ''
-    audio_decimation: '10'
-    comment: ''
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    quad_rate: 480e3
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [807, 218]
-    rotation: 0
-    state: true
-- name: audio_sink_0
-  id: audio_sink
-  parameters:
-    affinity: ''
-    alias: ''
-    comment: ''
-    device_name: ''
-    num_inputs: '1'
-    ok_to_block: 'True'
-    samp_rate: '48000'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [1174, 226]
-    rotation: 0
-    state: true
-- name: blocks_multiply_const_vxx_0
-  id: blocks_multiply_const_vxx
-  parameters:
-    affinity: ''
-    alias: ''
-    comment: ''
-    const: volume
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    type: float
-    vlen: '1'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [1010, 226]
-    rotation: 0
-    state: enabled
-- name: limesdr_source_0
-  id: limesdr_source
-  parameters:
-    affinity: ''
-    alias: ''
-    allow_tcxo_dac: '0'
-    analog_bandw_ch0: 2e6
-    analog_bandw_ch1: 1.5e6
-    calibr_bandw_ch0: 2.5e6
-    calibr_bandw_ch1: 2.5e6
-    channel_mode: '0'
-    comment: ''
-    dacVal: '180'
-    digital_bandw_ch0: 1.8e6
-    digital_bandw_ch1: samp_rate
-    filename: ''
-    gain_dB_ch0: gain
-    gain_dB_ch1: '1'
-    lna_path_ch0: '255'
-    lna_path_ch1: '2'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    nco_freq_ch0: '0'
-    nco_freq_ch1: '0'
-    oversample: '0'
-    rf_freq: baseband*1e6
-    samp_rate: samp_rate
-    serial: ''
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [165, 210]
-    rotation: 0
-    state: true
-- name: low_pass_filter_0
-  id: low_pass_filter
-  parameters:
-    affinity: ''
-    alias: ''
-    beta: '6.76'
-    comment: ''
-    cutoff_freq: cut_freq
-    decim: '1'
-    gain: '1'
-    interp: '1'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    samp_rate: samp_rate
-    type: fir_filter_ccf
-    width: trans_width
-    win: firdes.WIN_HAMMING
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [391, 178]
-    rotation: 0
-    state: true
-- name: qtgui_freq_sink_x_0
-  id: qtgui_freq_sink_x
-  parameters:
-    affinity: ''
-    alias: ''
-    alpha1: '1.0'
-    alpha10: '1.0'
-    alpha2: '1.0'
-    alpha3: '1.0'
-    alpha4: '1.0'
-    alpha5: '1.0'
-    alpha6: '1.0'
-    alpha7: '1.0'
-    alpha8: '1.0'
-    alpha9: '1.0'
-    autoscale: 'False'
-    average: '1.0'
-    axislabels: 'True'
-    bw: samp_rate
-    color1: '"blue"'
-    color10: '"dark blue"'
-    color2: '"red"'
-    color3: '"green"'
-    color4: '"black"'
-    color5: '"cyan"'
-    color6: '"magenta"'
-    color7: '"yellow"'
-    color8: '"dark red"'
-    color9: '"dark green"'
-    comment: ''
-    ctrlpanel: 'False'
-    fc: baseband*1e6
-    fftsize: '1024'
-    freqhalf: 'True'
-    grid: 'False'
-    gui_hint: 3,0,15,2
-    label: Relative Gain
-    label1: ''
-    label10: ''''''
-    label2: ''''''
-    label3: ''''''
-    label4: ''''''
-    label5: ''''''
-    label6: ''''''
-    label7: ''''''
-    label8: ''''''
-    label9: ''''''
-    legend: 'True'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    name: '"Low Pass filtered"'
-    nconnections: '1'
-    showports: 'False'
-    tr_chan: '0'
-    tr_level: '0.0'
-    tr_mode: qtgui.TRIG_MODE_FREE
-    tr_tag: '""'
-    type: complex
-    units: dB
-    update_time: '0.10'
-    width1: '1'
-    width10: '1'
-    width2: '1'
-    width3: '1'
-    width4: '1'
-    width5: '1'
-    width6: '1'
-    width7: '1'
-    width8: '1'
-    width9: '1'
-    wintype: firdes.WIN_BLACKMAN_hARRIS
-    ymax: '10'
-    ymin: '-140'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [606, 75]
-    rotation: 0
-    state: enabled
-- name: rational_resampler_xxx_0
-  id: rational_resampler_xxx
-  parameters:
-    affinity: ''
-    alias: ''
-    comment: ''
-    decim: '200'
-    fbw: '0'
-    interp: '48'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    taps: ''
-    type: ccc
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [606, 202]
-    rotation: 0
-    state: true
-
-connections:
-- [analog_wfm_rcv_0, '0', blocks_multiply_const_vxx_0, '0']
-- [blocks_multiply_const_vxx_0, '0', audio_sink_0, '0']
-- [limesdr_source_0, '0', low_pass_filter_0, '0']
-- [low_pass_filter_0, '0', qtgui_freq_sink_x_0, '0']
-- [low_pass_filter_0, '0', rational_resampler_xxx_0, '0']
-- [rational_resampler_xxx_0, '0', analog_wfm_rcv_0, '0']
-
-metadata:
-  file_format: 1
+<?xml version='1.0' encoding='utf-8'?>
+<?grc format='1' created='3.7.13'?>
+<flow_graph>
+  <timestamp>Tue Feb 20 16:15:20 2018</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>author</key>
+      <value>Lime Microsystems</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>(1200,500)</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 8)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>hier_block_src_path</key>
+      <value>.:</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>top_block</value>
+    </param>
+    <param>
+      <key>max_nouts</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>qt_qss_theme</key>
+      <value></value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>run_command</key>
+      <value>{python} -u {filename}</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sizing_mode</key>
+      <value>fixed</value>
+    </param>
+    <param>
+      <key>thread_safe_setters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FM receiver</value>
+    </param>
+    <param>
+      <key>placement</key>
+      <value>(0,0)</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>500e3</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(248, 368)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>cut_freq</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Cutoff frequency</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>1e6</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>1e3</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>100e3</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(392, 368)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>trans_width</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Transition width</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>500e3</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>10e3</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>5</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(896, 152)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>volume</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Volume</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+  </block>
+  <block>
+    <key>analog_wfm_rcv</key>
+    <param>
+      <key>audio_decimation</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(704, 260)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_wfm_rcv_0_1</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>quad_rate</key>
+      <value>480e3</value>
+    </param>
+  </block>
+  <block>
+    <key>audio_sink</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>device_name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1056, 268)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>audio_sink_0_0</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>ok_to_block</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>48000</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_multiply_const_vxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>volume</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(896, 268)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_multiply_const_vxx_0_1</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_source</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>analog_bandw_ch0</key>
+      <value>1.5e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch0</key>
+      <value>100e3</value>
+    </param>
+    <param>
+      <key>gain_dB_ch0</key>
+      <value>60</value>
+    </param>
+    <param>
+      <key>lna_path_ch0</key>
+      <value>255</value>
+    </param>
+    <param>
+      <key>nco_freq_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch1</key>
+      <value>1.5e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch1</key>
+      <value>100e3</value>
+    </param>
+    <param>
+      <key>gain_dB_ch1</key>
+      <value>60</value>
+    </param>
+    <param>
+      <key>lna_path_ch1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>nco_freq_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>channel_mode</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 148)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_source_0_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>oversample</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rf_freq</key>
+      <value>100.1e6</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>2e6</value>
+    </param>
+  </block>
+  <block>
+    <key>low_pass_filter</key>
+    <param>
+      <key>beta</key>
+      <value>6.76</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>cutoff_freq</key>
+      <value>cut_freq</value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fir_filter_ccf</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(288, 224)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>low_pass_filter_0_1</value>
+    </param>
+    <param>
+      <key>interp</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>2e6</value>
+    </param>
+    <param>
+      <key>width</key>
+      <value>trans_width</value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>firdes.WIN_HAMMING</value>
+    </param>
+  </block>
+  <block>
+    <key>rational_resampler_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>fbw</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(520, 248)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>rational_resampler_xxx_1_0_1</value>
+    </param>
+    <param>
+      <key>interp</key>
+      <value>48</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value></value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ccc</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>100.1e6</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>freqvar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(520, 12)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>2e6</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Low Pass Filter</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>analog_wfm_rcv_0_1</source_block_id>
+    <sink_block_id>blocks_multiply_const_vxx_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_multiply_const_vxx_0_1</source_block_id>
+    <sink_block_id>audio_sink_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>limesdr_source_0_0</source_block_id>
+    <sink_block_id>low_pass_filter_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>low_pass_filter_0_1</source_block_id>
+    <sink_block_id>rational_resampler_xxx_1_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>low_pass_filter_0_1</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>rational_resampler_xxx_1_0_1</source_block_id>
+    <sink_block_id>analog_wfm_rcv_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/examples/FM_transmitter.grc b/examples/FM_transmitter.grc
index 2580567..2450776 100644
--- a/examples/FM_transmitter.grc
+++ b/examples/FM_transmitter.grc
@@ -1,292 +1,495 @@
-options:
-  parameters:
-    author: Lime Microsystems
-    category: '[GRC Hier Blocks]'
-    cmake_opt: ''
-    comment: ''
-    copyright: ''
-    description: ''
-    gen_cmake: 'On'
-    gen_linking: dynamic
-    generate_options: qt_gui
-    hier_block_src_path: '.:'
-    id: fm_transmitter
-    max_nouts: '0'
-    output_language: python
-    placement: (0,0)
-    qt_qss_theme: ''
-    realtime_scheduling: ''
-    run: 'True'
-    run_command: '{python} -u {filename}'
-    run_options: prompt
-    sizing_mode: fixed
-    thread_safe_setters: ''
-    title: FM transmitter
-    window_size: ''
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [8, 8]
-    rotation: 0
-    state: enabled
-
-blocks:
-- name: baseband
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 0,0,1,2
-    label: TX Baseband [MHz]
-    type: real
-    value: '446.094'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [180, 8]
-    rotation: 0
-    state: true
-- name: gain
-  id: variable_qtgui_range
-  parameters:
-    comment: ''
-    gui_hint: 1,0,1,1
-    label: Gain [dB]
-    min_len: '70'
-    orient: Qt.Horizontal
-    rangeType: int
-    start: '0'
-    step: '1'
-    stop: '60'
-    value: '40'
-    widget: counter_slider
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [336, 9]
-    rotation: 0
-    state: true
-- name: pa_path
-  id: variable_qtgui_chooser
-  parameters:
-    comment: ''
-    gui_hint: 1,1,1,1
-    label: PA Path
-    label0: Auto
-    label1: Band1
-    label2: Band2
-    label3: W
-    label4: ''
-    labels: '[]'
-    num_opts: '3'
-    option1: '1'
-    option2: '2'
-    option3: '3'
-    option4: '4'
-    options: '[0, 1, 2]'
-    orient: Qt.QVBoxLayout
-    type: int
-    value: '255'
-    widget: combo_box
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [462, 8]
-    rotation: 0
-    state: true
-- name: samp_rate
-  id: variable
-  parameters:
-    comment: ''
-    value: 2e6
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [10, 106]
-    rotation: 0
-    state: enabled
-- name: analog_nbfm_tx_0
-  id: analog_nbfm_tx
-  parameters:
-    affinity: ''
-    alias: ''
-    audio_rate: '48000'
-    comment: ''
-    fh: '-1.0'
-    max_dev: 2e3
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    quad_rate: '480000'
-    tau: 75e-6
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [249, 189]
-    rotation: 0
-    state: true
-- name: blocks_wavfile_source_0
-  id: blocks_wavfile_source
-  parameters:
-    affinity: ''
-    alias: ''
-    comment: ''
-    file: '.../examples/guitar.wav'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    nchan: '1'
-    repeat: 'True'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [16, 213]
-    rotation: 0
-    state: true
-- name: limesdr_sink_0_0
-  id: limesdr_sink
-  parameters:
-    affinity: ''
-    alias: ''
-    allow_tcxo_dac: '0'
-    analog_bandw_ch0: 5e6
-    analog_bandw_ch1: 5e6
-    calibr_bandw_ch0: 2.5e6
-    calibr_bandw_ch1: 2.5e6
-    channel_mode: '0'
-    comment: ''
-    dacVal: '180'
-    digital_bandw_ch0: samp_rate
-    digital_bandw_ch1: samp_rate
-    filename: ''
-    gain_dB_ch0: gain
-    gain_dB_ch1: '1'
-    length_tag_name: ''
-    nco_freq_ch0: '0'
-    nco_freq_ch1: '0'
-    oversample: '0'
-    pa_path_ch0: pa_path
-    pa_path_ch1: '255'
-    rf_freq: baseband*1e6
-    samp_rate: samp_rate
-    serial: ''
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [755, 197]
-    rotation: 0
-    state: enabled
-- name: qtgui_freq_sink_x_0
-  id: qtgui_freq_sink_x
-  parameters:
-    affinity: ''
-    alias: ''
-    alpha1: '1.0'
-    alpha10: '1.0'
-    alpha2: '1.0'
-    alpha3: '1.0'
-    alpha4: '1.0'
-    alpha5: '1.0'
-    alpha6: '1.0'
-    alpha7: '1.0'
-    alpha8: '1.0'
-    alpha9: '1.0'
-    autoscale: 'False'
-    average: '1.0'
-    axislabels: 'True'
-    bw: samp_rate
-    color1: '"blue"'
-    color10: '"dark blue"'
-    color2: '"red"'
-    color3: '"green"'
-    color4: '"black"'
-    color5: '"cyan"'
-    color6: '"magenta"'
-    color7: '"yellow"'
-    color8: '"dark red"'
-    color9: '"dark green"'
-    comment: ''
-    ctrlpanel: 'False'
-    fc: baseband*1e6
-    fftsize: '2048'
-    freqhalf: 'True'
-    grid: 'False'
-    gui_hint: 2,0,1,2
-    label: Relative Gain
-    label1: ''
-    label10: ''''''
-    label2: ''''''
-    label3: ''''''
-    label4: ''''''
-    label5: ''''''
-    label6: ''''''
-    label7: ''''''
-    label8: ''''''
-    label9: ''''''
-    legend: 'True'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    name: '"Transmiting data"'
-    nconnections: '1'
-    showports: 'False'
-    tr_chan: '0'
-    tr_level: '0.0'
-    tr_mode: qtgui.TRIG_MODE_FREE
-    tr_tag: '""'
-    type: complex
-    units: dB
-    update_time: '0.10'
-    width1: '1'
-    width10: '1'
-    width2: '1'
-    width3: '1'
-    width4: '1'
-    width5: '1'
-    width6: '1'
-    width7: '1'
-    width8: '1'
-    width9: '1'
-    wintype: firdes.WIN_BLACKMAN_hARRIS
-    ymax: '10'
-    ymin: '-140'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [755, 302]
-    rotation: 0
-    state: true
-- name: rational_resampler_xxx_0
-  id: rational_resampler_xxx
-  parameters:
-    affinity: ''
-    alias: ''
-    comment: ''
-    decim: '6'
-    fbw: '0'
-    interp: '25'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    taps: ''
-    type: ccc
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [533, 197]
-    rotation: 0
-    state: true
-
-connections:
-- [analog_nbfm_tx_0, '0', rational_resampler_xxx_0, '0']
-- [blocks_wavfile_source_0, '0', analog_nbfm_tx_0, '0']
-- [rational_resampler_xxx_0, '0', limesdr_sink_0_0, '0']
-- [rational_resampler_xxx_0, '0', qtgui_freq_sink_x_0, '0']
-
-metadata:
-  file_format: 1
+<?xml version='1.0' encoding='utf-8'?>
+<?grc format='1' created='3.7.13'?>
+<flow_graph>
+  <timestamp>Tue Feb 20 16:22:48 2018</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>author</key>
+      <value>Lime Microsystems</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>(1000,500)</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 8)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>hier_block_src_path</key>
+      <value>.:</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>top_block</value>
+    </param>
+    <param>
+      <key>max_nouts</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>qt_qss_theme</key>
+      <value></value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>run_command</key>
+      <value>{python} -u {filename}</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>run</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sizing_mode</key>
+      <value>fixed</value>
+    </param>
+    <param>
+      <key>thread_safe_setters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FM transmitter</value>
+    </param>
+    <param>
+      <key>placement</key>
+      <value>(0,0)</value>
+    </param>
+  </block>
+  <block>
+    <key>analog_nbfm_tx</key>
+    <param>
+      <key>audio_rate</key>
+      <value>48000</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(200, 200)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_nbfm_tx_0_0</value>
+    </param>
+    <param>
+      <key>max_dev</key>
+      <value>2e3</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>fh</key>
+      <value>-1.0</value>
+    </param>
+    <param>
+      <key>quad_rate</key>
+      <value>480000</value>
+    </param>
+    <param>
+      <key>tau</key>
+      <value>75e-6</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_wavfile_source</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>file</key>
+      <value>/home/garmus/GITHUB/gr-limesdr/examples/guitar.wav</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(16, 220)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_wavfile_source_0_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>nchan</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_sink</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>analog_bandw_ch0</key>
+      <value>5e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch0</key>
+      <value>100e3</value>
+    </param>
+    <param>
+      <key>gain_dB_ch0</key>
+      <value>60</value>
+    </param>
+    <param>
+      <key>nco_freq_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>pa_path_ch0</key>
+      <value>255</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch1</key>
+      <value>5e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch1</key>
+      <value>100e3</value>
+    </param>
+    <param>
+      <key>gain_dB_ch1</key>
+      <value>60</value>
+    </param>
+    <param>
+      <key>nco_freq_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>pa_path_ch1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>channel_mode</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(696, 20)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_sink_0</value>
+    </param>
+    <param>
+      <key>length_tag_name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>oversample</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rf_freq</key>
+      <value>446.09375e6</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>2e6</value>
+    </param>
+  </block>
+  <block>
+    <key>rational_resampler_xxx</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>6</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>fbw</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(448, 208)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>rational_resampler_xxx_0</value>
+    </param>
+    <param>
+      <key>interp</key>
+      <value>25</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value></value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ccf</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>446.09375e6</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>freqvar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(696, 308)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>2e6</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Transmitting data</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>analog_nbfm_tx_0_0</source_block_id>
+    <sink_block_id>rational_resampler_xxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_wavfile_source_0_0</source_block_id>
+    <sink_block_id>analog_nbfm_tx_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>rational_resampler_xxx_0</source_block_id>
+    <sink_block_id>limesdr_sink_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>rational_resampler_xxx_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/examples/GFSK.grc b/examples/GFSK.grc
new file mode 100644
index 0000000..3802007
--- /dev/null
+++ b/examples/GFSK.grc
@@ -0,0 +1,1548 @@
+<?xml version='1.0' encoding='utf-8'?>
+<?grc format='1' created='3.7.13'?>
+<flow_graph>
+  <timestamp>Thu May 24 14:58:19 2018</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>author</key>
+      <value>Lime Microsystems</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>(1000,500)</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 8)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>qt_gui</value>
+    </param>
+    <param>
+      <key>hier_block_src_path</key>
+      <value>.:</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>top_block</value>
+    </param>
+    <param>
+      <key>max_nouts</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>qt_qss_theme</key>
+      <value></value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>run_command</key>
+      <value>{python} -u {filename}</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sizing_mode</key>
+      <value>fixed</value>
+    </param>
+    <param>
+      <key>thread_safe_setters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>GFSK loopback</value>
+    </param>
+    <param>
+      <key>placement</key>
+      <value>(0,0)</value>
+    </param>
+  </block>
+  <block>
+    <key>analog_quadrature_demod_cf</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(656, 52)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_quadrature_demod_cf_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>analog_quadrature_demod_cf</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(256, 292)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_quadrature_demod_cf_0_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_packet_decoder</key>
+    <param>
+      <key>access_code</key>
+      <value></value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(472, 388)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blks2_packet_decoder_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>threshold</key>
+      <value>-1</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_packet_encoder</key>
+    <param>
+      <key>access_code</key>
+      <value></value>
+    </param>
+    <param>
+      <key>bits_per_symbol</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(240, 96)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blks2_packet_encoder_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>pad_for_usrp</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>payload_length</key>
+      <value>16</value>
+    </param>
+    <param>
+      <key>preamble</key>
+      <value></value>
+    </param>
+    <param>
+      <key>samples_per_symbol</key>
+      <value>4</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_file_sink</key>
+    <param>
+      <key>append</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>file</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(640, 380)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_file_sink_0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>unbuffered</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>blocks_file_source</key>
+    <param>
+      <key>begin_tag</key>
+      <value>pmt.PMT_NIL</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>file</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(72, 116)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>blocks_file_source_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+  </block>
+  <block>
+    <key>digital_gfsk_demod</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>freq_error</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(256, 360)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_mu</key>
+      <value>0.175</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>digital_gfsk_demod_0</value>
+    </param>
+    <param>
+      <key>log</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>mu</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>omega_relative_limit</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>samples_per_symbol</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>sensitivity</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>verbose</key>
+      <value>False</value>
+    </param>
+  </block>
+  <block>
+    <key>digital_gfsk_mod</key>
+    <param>
+      <key>bt</key>
+      <value>0.35</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(448, 112)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>digital_gfsk_mod_0</value>
+    </param>
+    <param>
+      <key>log</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>samples_per_symbol</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>sensitivity</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>verbose</key>
+      <value>True</value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_sink</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>analog_bandw_ch0</key>
+      <value>10e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_dB_ch0</key>
+      <value>40</value>
+    </param>
+    <param>
+      <key>nco_freq_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>pa_path_ch0</key>
+      <value>255</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch1</key>
+      <value>10e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_dB_ch1</key>
+      <value>40</value>
+    </param>
+    <param>
+      <key>nco_freq_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>pa_path_ch1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>channel_mode</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(808, 124)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_sink_0</value>
+    </param>
+    <param>
+      <key>length_tag_name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>oversample</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rf_freq</key>
+      <value>1e9</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>0.5e6</value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_source</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>analog_bandw_ch0</key>
+      <value>10e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_dB_ch0</key>
+      <value>40</value>
+    </param>
+    <param>
+      <key>lna_path_ch0</key>
+      <value>255</value>
+    </param>
+    <param>
+      <key>nco_freq_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch1</key>
+      <value>10e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_dB_ch1</key>
+      <value>40</value>
+    </param>
+    <param>
+      <key>lna_path_ch1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>nco_freq_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>channel_mode</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 240)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_source_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>oversample</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rf_freq</key>
+      <value>1e9</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>0.5e6</value>
+    </param>
+  </block>
+  <block>
+    <key>qtgui_time_sink_x</key>
+    <param>
+      <key>autoscale</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>axislabels</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>ctrlpanel</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>entags</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(832, 32)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>qtgui_time_sink_x_0</value>
+    </param>
+    <param>
+      <key>legend</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>alpha1</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color1</key>
+      <value>"blue"</value>
+    </param>
+    <param>
+      <key>label1</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker1</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha10</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color10</key>
+      <value>"blue"</value>
+    </param>
+    <param>
+      <key>label10</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker10</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style10</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width10</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha2</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color2</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label2</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker2</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style2</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width2</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha3</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color3</key>
+      <value>"green"</value>
+    </param>
+    <param>
+      <key>label3</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker3</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style3</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width3</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha4</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color4</key>
+      <value>"black"</value>
+    </param>
+    <param>
+      <key>label4</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker4</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style4</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width4</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha5</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color5</key>
+      <value>"cyan"</value>
+    </param>
+    <param>
+      <key>label5</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker5</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style5</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width5</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha6</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color6</key>
+      <value>"magenta"</value>
+    </param>
+    <param>
+      <key>label6</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker6</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style6</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width6</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha7</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color7</key>
+      <value>"yellow"</value>
+    </param>
+    <param>
+      <key>label7</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker7</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style7</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width7</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha8</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color8</key>
+      <value>"dark red"</value>
+    </param>
+    <param>
+      <key>label8</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker8</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style8</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width8</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha9</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color9</key>
+      <value>"dark green"</value>
+    </param>
+    <param>
+      <key>label9</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker9</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style9</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width9</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>name</key>
+      <value>Sent Signal</value>
+    </param>
+    <param>
+      <key>nconnections</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>srate</key>
+      <value>2.4e6</value>
+    </param>
+    <param>
+      <key>stemplot</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>tr_chan</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>tr_delay</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>tr_level</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>tr_mode</key>
+      <value>qtgui.TRIG_MODE_FREE</value>
+    </param>
+    <param>
+      <key>tr_slope</key>
+      <value>qtgui.TRIG_SLOPE_POS</value>
+    </param>
+    <param>
+      <key>tr_tag</key>
+      <value>""</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>update_time</key>
+      <value>0.10</value>
+    </param>
+    <param>
+      <key>ylabel</key>
+      <value>Amplitude</value>
+    </param>
+    <param>
+      <key>yunit</key>
+      <value>""</value>
+    </param>
+    <param>
+      <key>ymax</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>ymin</key>
+      <value>-1</value>
+    </param>
+  </block>
+  <block>
+    <key>qtgui_time_sink_x</key>
+    <param>
+      <key>autoscale</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>axislabels</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>ctrlpanel</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>entags</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(440, 272)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>qtgui_time_sink_x_0_0</value>
+    </param>
+    <param>
+      <key>legend</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>alpha1</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color1</key>
+      <value>"blue"</value>
+    </param>
+    <param>
+      <key>label1</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker1</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha10</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color10</key>
+      <value>"blue"</value>
+    </param>
+    <param>
+      <key>label10</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker10</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style10</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width10</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha2</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color2</key>
+      <value>"red"</value>
+    </param>
+    <param>
+      <key>label2</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker2</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style2</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width2</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha3</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color3</key>
+      <value>"green"</value>
+    </param>
+    <param>
+      <key>label3</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker3</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style3</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width3</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha4</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color4</key>
+      <value>"black"</value>
+    </param>
+    <param>
+      <key>label4</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker4</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style4</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width4</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha5</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color5</key>
+      <value>"cyan"</value>
+    </param>
+    <param>
+      <key>label5</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker5</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style5</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width5</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha6</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color6</key>
+      <value>"magenta"</value>
+    </param>
+    <param>
+      <key>label6</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker6</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style6</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width6</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha7</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color7</key>
+      <value>"yellow"</value>
+    </param>
+    <param>
+      <key>label7</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker7</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style7</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width7</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha8</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color8</key>
+      <value>"dark red"</value>
+    </param>
+    <param>
+      <key>label8</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker8</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style8</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width8</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alpha9</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>color9</key>
+      <value>"dark green"</value>
+    </param>
+    <param>
+      <key>label9</key>
+      <value></value>
+    </param>
+    <param>
+      <key>marker9</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>style9</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>width9</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>name</key>
+      <value>Received Signal</value>
+    </param>
+    <param>
+      <key>nconnections</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>srate</key>
+      <value>2.4e6</value>
+    </param>
+    <param>
+      <key>stemplot</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>tr_chan</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>tr_delay</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>tr_level</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>tr_mode</key>
+      <value>qtgui.TRIG_MODE_FREE</value>
+    </param>
+    <param>
+      <key>tr_slope</key>
+      <value>qtgui.TRIG_SLOPE_POS</value>
+    </param>
+    <param>
+      <key>tr_tag</key>
+      <value>""</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>update_time</key>
+      <value>0.10</value>
+    </param>
+    <param>
+      <key>ylabel</key>
+      <value>Amplitude</value>
+    </param>
+    <param>
+      <key>yunit</key>
+      <value>""</value>
+    </param>
+    <param>
+      <key>ymax</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>ymin</key>
+      <value>-1</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>analog_quadrature_demod_cf_0</source_block_id>
+    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_quadrature_demod_cf_0_0</source_block_id>
+    <sink_block_id>qtgui_time_sink_x_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_packet_decoder_0</source_block_id>
+    <sink_block_id>blocks_file_sink_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_packet_encoder_0</source_block_id>
+    <sink_block_id>digital_gfsk_mod_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blocks_file_source_0</source_block_id>
+    <sink_block_id>blks2_packet_encoder_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>digital_gfsk_demod_0</source_block_id>
+    <sink_block_id>blks2_packet_decoder_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>digital_gfsk_mod_0</source_block_id>
+    <sink_block_id>analog_quadrature_demod_cf_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>digital_gfsk_mod_0</source_block_id>
+    <sink_block_id>limesdr_sink_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>limesdr_source_0</source_block_id>
+    <sink_block_id>analog_quadrature_demod_cf_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>limesdr_source_0</source_block_id>
+    <sink_block_id>digital_gfsk_demod_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/examples/README b/examples/README
new file mode 100644
index 0000000..c012bdf
--- /dev/null
+++ b/examples/README
@@ -0,0 +1,4 @@
+It is considered good practice to add examples in here to demonstrate the
+functionality of your OOT module. Python scripts, GRC flow graphs or other
+code can go here.
+
diff --git a/examples/signal_analyzer.grc b/examples/signal_analyzer.grc
index 5389ee6..6d3b641 100644
--- a/examples/signal_analyzer.grc
+++ b/examples/signal_analyzer.grc
@@ -1,226 +1,570 @@
-options:
-  parameters:
-    author: Lime Microsystems
-    category: '[GRC Hier Blocks]'
-    cmake_opt: ''
-    comment: ''
-    copyright: ''
-    description: ''
-    gen_cmake: 'On'
-    gen_linking: dynamic
-    generate_options: qt_gui
-    hier_block_src_path: '.:'
-    id: top_block
-    max_nouts: '0'
-    output_language: python
-    placement: (0,0)
-    qt_qss_theme: ''
-    realtime_scheduling: ''
-    run: 'True'
-    run_command: '{python} -u {filename}'
-    run_options: prompt
-    sizing_mode: fixed
-    thread_safe_setters: ''
-    title: Signal analyzer
-    window_size: (300,300)
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [8, 6]
-    rotation: 0
-    state: enabled
-
-blocks:
-- name: analog_filter
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 1,0,1,1
-    label: Analog filter bandwidth [MHz]
-    type: real
-    value: samp_rate/1e6
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [339, 8]
-    rotation: 0
-    state: true
-- name: baseband
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 0,0,1,1
-    label: RX Baseband [MHz]
-    type: real
-    value: '100'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [178, 8]
-    rotation: 0
-    state: true
-- name: digital_filter
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 1,1,1,1
-    label: Digital filter bandwidth [MHz]
-    type: real
-    value: samp_rate/1e6 - 0.3
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [339, 88]
-    rotation: 0
-    state: true
-- name: gain
-  id: variable_qtgui_range
-  parameters:
-    comment: ''
-    gui_hint: 2,0,1,1
-    label: Gain [dB]
-    min_len: '70'
-    orient: Qt.Horizontal
-    rangeType: int
-    start: '0'
-    step: '1'
-    stop: '70'
-    value: '30'
-    widget: counter_slider
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [510, 8]
-    rotation: 0
-    state: true
-- name: lna_path
-  id: variable_qtgui_chooser
-  parameters:
-    comment: ''
-    gui_hint: 2,1,1,1
-    label: LNA Path
-    label0: Auto
-    label1: H
-    label2: L
-    label3: W
-    label4: ''
-    labels: '[]'
-    num_opts: '4'
-    option1: '1'
-    option2: '2'
-    option3: '3'
-    option4: '4'
-    options: '[0, 1, 2]'
-    orient: Qt.QVBoxLayout
-    type: int
-    value: '255'
-    widget: combo_box
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [10, 171]
-    rotation: 0
-    state: true
-- name: nco
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 0,1,1,1
-    label: NCO [MHz]
-    type: real
-    value: '0'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [178, 87]
-    rotation: 0
-    state: true
-- name: samp_rate
-  id: variable
-  parameters:
-    comment: ''
-    value: 5e6
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [9, 102]
-    rotation: 0
-    state: enabled
-- name: limesdr_source_0
-  id: limesdr_source
-  parameters:
-    affinity: ''
-    alias: ''
-    allow_tcxo_dac: '0'
-    analog_bandw_ch0: analog_filter*1e6
-    analog_bandw_ch1: 1.5e6
-    calibr_bandw_ch0: samp_rate
-    calibr_bandw_ch1: 2.5e6
-    channel_mode: '0'
-    comment: ''
-    dacVal: '180'
-    digital_bandw_ch0: digital_filter*1e6
-    digital_bandw_ch1: samp_rate
-    filename: ''
-    gain_dB_ch0: gain
-    gain_dB_ch1: '1'
-    lna_path_ch0: lna_path
-    lna_path_ch1: '2'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    nco_freq_ch0: nco
-    nco_freq_ch1: '0'
-    oversample: '0'
-    rf_freq: baseband*1e6
-    samp_rate: samp_rate
-    serial: ''
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [177, 233]
-    rotation: 0
-    state: true
-- name: qtgui_sink_x_0
-  id: qtgui_sink_x
-  parameters:
-    affinity: ''
-    alias: ''
-    bw: samp_rate
-    comment: ''
-    fc: baseband*1e6
-    fftsize: '4096'
-    gui_hint: 3,0,2,2
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    name: '""'
-    plotconst: 'True'
-    plotfreq: 'True'
-    plottime: 'True'
-    plotwaterfall: 'True'
-    rate: '10'
-    showports: 'False'
-    showrf: 'True'
-    type: complex
-    wintype: firdes.WIN_BLACKMAN_hARRIS
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [427, 233]
-    rotation: 0
-    state: true
-
-connections:
-- [limesdr_source_0, '0', qtgui_sink_x_0, '0']
-
-metadata:
-  file_format: 1
+<?xml version='1.0' encoding='utf-8'?>
+<?grc format='1' created='3.7.13'?>
+<flow_graph>
+  <timestamp>Mon May 21 21:44:03 2018</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>author</key>
+      <value>Lime Microsystems</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>(1000,500)</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 8)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>qt_gui</value>
+    </param>
+    <param>
+      <key>hier_block_src_path</key>
+      <value>.:</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>top_block</value>
+    </param>
+    <param>
+      <key>max_nouts</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>qt_qss_theme</key>
+      <value></value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>run_command</key>
+      <value>{python} -u {filename}</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sizing_mode</key>
+      <value>fixed</value>
+    </param>
+    <param>
+      <key>thread_safe_setters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Signal analyzer</value>
+    </param>
+    <param>
+      <key>placement</key>
+      <value>(0,0)</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(176, 206)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>2,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_filter_bandwidth_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX analog filter bandwidth [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>600</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(176, 118)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>0,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>baseband_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX baseband [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>sample_rate/2e6</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(368, 206)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>2,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>digital_filter_bandwidth_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX digital filter bandwidth [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_range</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(392, 73)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>1,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>gain_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX gain</value>
+    </param>
+    <param>
+      <key>min_len</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>orient</key>
+      <value>Qt.Horizontal</value>
+    </param>
+    <param>
+      <key>start</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>step</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>stop</key>
+      <value>70</value>
+    </param>
+    <param>
+      <key>rangeType</key>
+      <value>int</value>
+    </param>
+    <param>
+      <key>widget</key>
+      <value>counter_slider</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(16, 206)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>1,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>nco_freq_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX NCO [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_label</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>5e6</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>formatter</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(192, 14)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>0,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Sample rate [S/s]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>raw</value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_source</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>analog_bandw_ch0</key>
+      <value>analog_filter_bandwidth_rx*1e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch0</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch0</key>
+      <value>digital_filter_bandwidth_rx*1e6</value>
+    </param>
+    <param>
+      <key>gain_dB_ch0</key>
+      <value>gain_rx</value>
+    </param>
+    <param>
+      <key>lna_path_ch0</key>
+      <value>255</value>
+    </param>
+    <param>
+      <key>nco_freq_ch0</key>
+      <value>nco_freq_rx*1e6</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_dB_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>lna_path_ch1</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>nco_freq_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>channel_mode</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(552, 120)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_source_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>oversample</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rf_freq</key>
+      <value>baseband_rx*1e6</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+  </block>
+  <block>
+    <key>qtgui_sink_x</key>
+    <param>
+      <key>bw</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>fc</key>
+      <value>baseband_rx*1e6</value>
+    </param>
+    <param>
+      <key>freqchangevar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fftsize</key>
+      <value>4096</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(776, 200)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>3,0,1,2</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>qtgui_sink_x_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>plotconst</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>plotfreq</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>plottime</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>plotwaterfall</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>showports</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>showrf</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>rate</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>wintype</key>
+      <value>firdes.WIN_BLACKMAN_hARRIS</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>limesdr_source_0</source_block_id>
+    <sink_block_id>qtgui_sink_x_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/examples/signal_analyzer_with_rfe.grc b/examples/signal_analyzer_with_rfe.grc
new file mode 100644
index 0000000..485e8c8
--- /dev/null
+++ b/examples/signal_analyzer_with_rfe.grc
@@ -0,0 +1,950 @@
+<?xml version='1.0' encoding='utf-8'?>
+<?grc format='1' created='3.7.14'?>
+<flow_graph>
+  <timestamp>Mon May 21 21:44:03 2018</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>author</key>
+      <value>Lime Microsystems</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>(2000,1000)</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 8)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>qt_gui</value>
+    </param>
+    <param>
+      <key>hier_block_src_path</key>
+      <value>.:</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>top_block</value>
+    </param>
+    <param>
+      <key>max_nouts</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>qt_qss_theme</key>
+      <value></value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>run_command</key>
+      <value>{python} -u {filename}</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sizing_mode</key>
+      <value>fixed</value>
+    </param>
+    <param>
+      <key>thread_safe_setters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Signal analyzer</value>
+    </param>
+    <param>
+      <key>placement</key>
+      <value>(0,0)</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(336, 4)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>2,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_filter_bandwidth_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX analog filter bandwidth [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>600</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(176, 4)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>0,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>baseband_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX baseband [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>sample_rate/2e6</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(336, 84)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>2,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>digital_filter_bandwidth_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX digital filter bandwidth [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_range</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 196)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>1,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>gain_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX gain</value>
+    </param>
+    <param>
+      <key>min_len</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>orient</key>
+      <value>Qt.Horizontal</value>
+    </param>
+    <param>
+      <key>start</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>step</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>stop</key>
+      <value>70</value>
+    </param>
+    <param>
+      <key>rangeType</key>
+      <value>int</value>
+    </param>
+    <param>
+      <key>widget</key>
+      <value>counter_slider</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(176, 84)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>1,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>nco_freq_rx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX NCO [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_chooser</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(648, 4)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>3,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>rfe_attenuation</value>
+    </param>
+    <param>
+      <key>label0</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label1</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label2</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label3</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label4</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RFE Attenuation [dB]</value>
+    </param>
+    <param>
+      <key>labels</key>
+      <value>['0', '2', '4', '6', '8', '10', '12', '14']</value>
+    </param>
+    <param>
+      <key>num_opts</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>option0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>option1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>option2</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>option3</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>option4</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>options</key>
+      <value>[0, 1, 2, 3, 4, 5 ,6 , 7]</value>
+    </param>
+    <param>
+      <key>orient</key>
+      <value>Qt.QVBoxLayout</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>int</value>
+    </param>
+    <param>
+      <key>widget</key>
+      <value>combo_box</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_chooser</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(512, 8)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>3,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>rfe_mode</value>
+    </param>
+    <param>
+      <key>label0</key>
+      <value>RX</value>
+    </param>
+    <param>
+      <key>label1</key>
+      <value>NONE</value>
+    </param>
+    <param>
+      <key>label2</key>
+      <value>TXRX</value>
+    </param>
+    <param>
+      <key>label3</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label4</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>LimeRFE Mode</value>
+    </param>
+    <param>
+      <key>labels</key>
+      <value>[]</value>
+    </param>
+    <param>
+      <key>num_opts</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>option0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>option1</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>option2</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>option3</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>option4</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>options</key>
+      <value>[0, 1, 2]</value>
+    </param>
+    <param>
+      <key>orient</key>
+      <value>Qt.QVBoxLayout</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>int</value>
+    </param>
+    <param>
+      <key>widget</key>
+      <value>combo_box</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_chooser</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(808, 4)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>4,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>rfe_notch</value>
+    </param>
+    <param>
+      <key>label0</key>
+      <value>Enabled</value>
+    </param>
+    <param>
+      <key>label1</key>
+      <value>Disabled</value>
+    </param>
+    <param>
+      <key>label2</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label3</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label4</key>
+      <value></value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>AM/FM Notch Filter</value>
+    </param>
+    <param>
+      <key>labels</key>
+      <value>[]</value>
+    </param>
+    <param>
+      <key>num_opts</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>option0</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>option1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>option2</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>option3</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>option4</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>options</key>
+      <value>[0, 1, 2]</value>
+    </param>
+    <param>
+      <key>orient</key>
+      <value>Qt.QVBoxLayout</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>int</value>
+    </param>
+    <param>
+      <key>widget</key>
+      <value>combo_box</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_label</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>5e6</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>formatter</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(8, 108)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>0,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Sample rate [S/s]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>raw</value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_rfe</key>
+    <param>
+      <key>notch</key>
+      <value>rfe_notch</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comm_type</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>fan</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(184, 388)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_rfe_0</value>
+    </param>
+    <param>
+      <key>mode</key>
+      <value>rfe_mode</value>
+    </param>
+    <param>
+      <key>atten</key>
+      <value>rfe_attenuation</value>
+    </param>
+    <param>
+      <key>rx_channel</key>
+      <value>-2</value>
+    </param>
+    <param>
+      <key>rx_port</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>sdr_serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>tx_channel</key>
+      <value>-2</value>
+    </param>
+    <param>
+      <key>tx_port</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>com_port</key>
+      <value></value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_source</key>
+    <param>
+      <key>allow_tcxo_dac</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch0</key>
+      <value>analog_filter_bandwidth_rx*1e6</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch0</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>channel_mode</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>digital_bandw_ch0</key>
+      <value>digital_filter_bandwidth_rx*1e6</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(184, 184)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_dB_ch0</key>
+      <value>gain_rx</value>
+    </param>
+    <param>
+      <key>gain_dB_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_source_0</value>
+    </param>
+    <param>
+      <key>lna_path_ch0</key>
+      <value>255</value>
+    </param>
+    <param>
+      <key>lna_path_ch1</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>nco_freq_ch0</key>
+      <value>nco_freq_rx*1e6</value>
+    </param>
+    <param>
+      <key>nco_freq_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>oversample</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rf_freq</key>
+      <value>baseband_rx*1e6</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>dacVal</key>
+      <value>125</value>
+    </param>
+  </block>
+  <block>
+    <key>qtgui_sink_x</key>
+    <param>
+      <key>bw</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>fc</key>
+      <value>baseband_rx*1e6</value>
+    </param>
+    <param>
+      <key>freqchangevar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>fftsize</key>
+      <value>4096</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(440, 236)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>5,0,1,2</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>qtgui_sink_x_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>plotconst</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>plotfreq</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>plottime</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>plotwaterfall</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>showports</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>showrf</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>rate</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>wintype</key>
+      <value>firdes.WIN_BLACKMAN_hARRIS</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>limesdr_source_0</source_block_id>
+    <sink_block_id>qtgui_sink_x_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/examples/signal_generator.grc b/examples/signal_generator.grc
index 4e787f4..7b8fbb3 100644
--- a/examples/signal_generator.grc
+++ b/examples/signal_generator.grc
@@ -1,307 +1,761 @@
-options:
-  parameters:
-    author: Lime Microsystems
-    category: '[GRC Hier Blocks]'
-    cmake_opt: ''
-    comment: ''
-    copyright: ''
-    description: ''
-    gen_cmake: 'On'
-    gen_linking: dynamic
-    generate_options: qt_gui
-    hier_block_src_path: '.:'
-    id: signal_generator
-    max_nouts: '0'
-    output_language: python
-    placement: (0,0)
-    qt_qss_theme: ''
-    realtime_scheduling: ''
-    run: 'True'
-    run_command: '{python} -u {filename}'
-    run_options: prompt
-    sizing_mode: fixed
-    thread_safe_setters: ''
-    title: Signal generator
-    window_size: ''
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [8, 8]
-    rotation: 0
-    state: enabled
-
-blocks:
-- name: analog_filter
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 1,0,1,1
-    label: Analog filter bandwidth [MHz]
-    type: real
-    value: samp_rate/1e6
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [339, 8]
-    rotation: 0
-    state: true
-- name: baseband
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 0,0,1,1
-    label: TX Baseband [MHz]
-    type: real
-    value: '100'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [178, 8]
-    rotation: 0
-    state: true
-- name: digital_filter
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 1,1,1,1
-    label: Digital filter bandwidth [MHz]
-    type: real
-    value: samp_rate/1e6 - 0.3
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [339, 88]
-    rotation: 0
-    state: true
-- name: gain
-  id: variable_qtgui_range
-  parameters:
-    comment: ''
-    gui_hint: 5,0,1,2
-    label: Gain [dB]
-    min_len: '70'
-    orient: Qt.Horizontal
-    rangeType: int
-    start: '0'
-    step: '1'
-    stop: '60'
-    value: '40'
-    widget: counter_slider
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [510, 8]
-    rotation: 0
-    state: true
-- name: nco
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 0,1,1,1
-    label: NCO [MHz]
-    type: real
-    value: '0'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [178, 87]
-    rotation: 0
-    state: true
-- name: pa_path
-  id: variable_qtgui_chooser
-  parameters:
-    comment: ''
-    gui_hint: 4,0
-    label: PA Path
-    label0: Auto
-    label1: Band1
-    label2: Band2
-    label3: W
-    label4: ''
-    labels: '[]'
-    num_opts: '3'
-    option1: '1'
-    option2: '2'
-    option3: '3'
-    option4: '4'
-    options: '[0, 1, 2]'
-    orient: Qt.QVBoxLayout
-    type: int
-    value: '255'
-    widget: combo_box
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [8, 170]
-    rotation: 0
-    state: true
-- name: samp_rate
-  id: variable
-  parameters:
-    comment: ''
-    value: 5e6
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [9, 103]
-    rotation: 0
-    state: enabled
-- name: signal_freq
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 2,0,1,1
-    label: Signal frequency [MHz]
-    type: real
-    value: '1'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [633, 6]
-    rotation: 0
-    state: true
-- name: signal_samp_rate
-  id: variable_qtgui_entry
-  parameters:
-    comment: ''
-    gui_hint: 2,1,1,1
-    label: Signal sampling rate [MHz]
-    type: real
-    value: samp_rate/1e6
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [633, 86]
-    rotation: 0
-    state: true
-- name: waveform
-  id: variable_qtgui_chooser
-  parameters:
-    comment: ''
-    gui_hint: 4,1
-    label: Waveform
-    label0: Cosine
-    label1: Square
-    label2: Triangle
-    label3: Saw tooth
-    label4: Saw tooth
-    labels: '["0","1","2","3","4","5"]'
-    num_opts: '4'
-    option1: '103'
-    option2: '104'
-    option3: '105'
-    option4: '105'
-    options: '[100, 101, 102,103,104,105]'
-    orient: Qt.QVBoxLayout
-    type: int
-    value: '102'
-    widget: combo_box
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [815, 5]
-    rotation: 0
-    state: true
-- name: analog_sig_source_x_0
-  id: analog_sig_source_x
-  parameters:
-    affinity: ''
-    alias: ''
-    amp: '1'
-    comment: ''
-    freq: signal_freq*1e6
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    offset: '0'
-    phase: '0'
-    samp_rate: signal_samp_rate*1e6
-    type: complex
-    waveform: waveform
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [193, 219]
-    rotation: 0
-    state: true
-- name: limesdr_sink_0
-  id: limesdr_sink
-  parameters:
-    affinity: ''
-    alias: ''
-    allow_tcxo_dac: '0'
-    analog_bandw_ch0: analog_filter*1e6
-    analog_bandw_ch1: 5e6
-    calibr_bandw_ch0: samp_rate
-    calibr_bandw_ch1: 2.5e6
-    channel_mode: '0'
-    comment: ''
-    dacVal: '180'
-    digital_bandw_ch0: digital_filter*1e6
-    digital_bandw_ch1: samp_rate
-    filename: ''
-    gain_dB_ch0: gain
-    gain_dB_ch1: '1'
-    length_tag_name: ''
-    nco_freq_ch0: nco
-    nco_freq_ch1: '0'
-    oversample: '0'
-    pa_path_ch0: pa_path
-    pa_path_ch1: '255'
-    rf_freq: baseband*1e6
-    samp_rate: samp_rate
-    serial: ''
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [533, 296]
-    rotation: 0
-    state: enabled
-- name: qtgui_sink_x_0
-  id: qtgui_sink_x
-  parameters:
-    affinity: ''
-    alias: ''
-    bw: samp_rate
-    comment: ''
-    fc: baseband*1e6
-    fftsize: '4096'
-    gui_hint: 6,0,5,2
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    name: '""'
-    plotconst: 'True'
-    plotfreq: 'True'
-    plottime: 'True'
-    plotwaterfall: 'True'
-    rate: '10'
-    showports: 'False'
-    showrf: 'True'
-    type: complex
-    wintype: firdes.WIN_BLACKMAN_hARRIS
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [533, 173]
-    rotation: 0
-    state: true
-
-connections:
-- [analog_sig_source_x_0, '0', limesdr_sink_0, '0']
-- [analog_sig_source_x_0, '0', qtgui_sink_x_0, '0']
-
-metadata:
-  file_format: 1
+<?xml version='1.0' encoding='utf-8'?>
+<?grc format='1' created='3.7.13'?>
+<flow_graph>
+  <timestamp>Mon May 21 21:11:53 2018</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>author</key>
+      <value>Lime Microsystems</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value> (1200,400)</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(16, 23)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>qt_gui</value>
+    </param>
+    <param>
+      <key>hier_block_src_path</key>
+      <value>.:</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>top_block</value>
+    </param>
+    <param>
+      <key>max_nouts</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>qt_qss_theme</key>
+      <value></value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>run_command</key>
+      <value>{python} -u {filename}</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sizing_mode</key>
+      <value>fixed</value>
+    </param>
+    <param>
+      <key>thread_safe_setters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Signal generator</value>
+    </param>
+    <param>
+      <key>placement</key>
+      <value>(0,0)</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(776, 166)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>3,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_filter_bandwidth_tx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>TX analog filter bandwidth [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>600</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(784, 86)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>0,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>baseband_tx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>TX:Baseband [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>sample_rate/2e6</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(944, 166)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>3,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>digital_filter_bandwidth_tx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>TX digital filter bandwidth [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_range</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(16, 113)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>1,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>frequency</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Signal source frequency</value>
+    </param>
+    <param>
+      <key>min_len</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>orient</key>
+      <value>Qt.Horizontal</value>
+    </param>
+    <param>
+      <key>start</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>step</key>
+      <value>0.05e6</value>
+    </param>
+    <param>
+      <key>stop</key>
+      <value>20e6</value>
+    </param>
+    <param>
+      <key>rangeType</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>widget</key>
+      <value>counter_slider</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_range</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(976, 41)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>2,1,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>gain_tx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>TX gain</value>
+    </param>
+    <param>
+      <key>min_len</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>orient</key>
+      <value>Qt.Horizontal</value>
+    </param>
+    <param>
+      <key>start</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>step</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>stop</key>
+      <value>60</value>
+    </param>
+    <param>
+      <key>rangeType</key>
+      <value>int</value>
+    </param>
+    <param>
+      <key>widget</key>
+      <value>counter_slider</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_entry</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(616, 166)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>2,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>nco_freq_tx</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>TX NCO value [MHz]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_range</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(16, 233)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>1,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>samp_rate_sig_source</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Signal source sample rate</value>
+    </param>
+    <param>
+      <key>min_len</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>orient</key>
+      <value>Qt.Horizontal</value>
+    </param>
+    <param>
+      <key>start</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>step</key>
+      <value>0.1e6</value>
+    </param>
+    <param>
+      <key>stop</key>
+      <value>20e6</value>
+    </param>
+    <param>
+      <key>rangeType</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>widget</key>
+      <value>counter_slider</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_qtgui_label</key>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>5e6</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>formatter</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(192, 30)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>0,0,1,1</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Sample rate [S/s]</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+  </block>
+  <block>
+    <key>analog_sig_source_x</key>
+    <param>
+      <key>amp</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>frequency</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(216, 216)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>analog_sig_source_x_0_0_0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate_sig_source</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>analog.GR_COS_WAVE</value>
+    </param>
+  </block>
+  <block>
+    <key>limesdr_sink</key>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>analog_bandw_ch0</key>
+      <value>analog_filter_bandwidth_tx*1e6</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch0</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch0</key>
+      <value>digital_filter_bandwidth_tx*1e6</value>
+    </param>
+    <param>
+      <key>gain_dB_ch0</key>
+      <value>gain_tx</value>
+    </param>
+    <param>
+      <key>nco_freq_ch0</key>
+      <value>nco_freq_tx*1e6</value>
+    </param>
+    <param>
+      <key>pa_path_ch0</key>
+      <value>255</value>
+    </param>
+    <param>
+      <key>analog_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>calibr_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>digital_bandw_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>gain_dB_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>nco_freq_ch1</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>pa_path_ch1</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>channel_mode</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>serial</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>filename</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(416, 144)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>limesdr_sink_0</value>
+    </param>
+    <param>
+      <key>length_tag_name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>oversample</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>rf_freq</key>
+      <value>baseband_tx*1e6</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+  </block>
+  <block>
+    <key>qtgui_sink_x</key>
+    <param>
+      <key>bw</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>fc</key>
+      <value>baseband_tx*1e6</value>
+    </param>
+    <param>
+      <key>freqchangevar</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>comment</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>fftsize</key>
+      <value>4096</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(416, 32)</value>
+    </param>
+    <param>
+      <key>gui_hint</key>
+      <value>4,0,1,2</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>id</key>
+      <value>qtgui_sink_x_0_1</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>name</key>
+      <value>"Signal Source"</value>
+    </param>
+    <param>
+      <key>plotconst</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>plotfreq</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>plottime</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>plotwaterfall</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>showports</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>showrf</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>rate</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>wintype</key>
+      <value>firdes.WIN_BLACKMAN_hARRIS</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>analog_sig_source_x_0_0_0</source_block_id>
+    <sink_block_id>limesdr_sink_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>analog_sig_source_x_0_0_0</source_block_id>
+    <sink_block_id>qtgui_sink_x_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index b0aaa71..e0f8082 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -1,7 +1,6 @@
 # Copyright 2011 Free Software Foundation, Inc.
 #
-# This file was generated by gr_modtool, a tool from the GNU Radio framework
-# This file is a part of gr-limesdr
+# This file is part of GNU Radio
 #
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,5 +19,9 @@
 
 install(FILES
     limesdr_source.block.yml
-    limesdr_sink.block.yml DESTINATION share/gnuradio/grc/blocks
+    limesdr_sink.block.yml
+    DESTINATION share/gnuradio/grc/blocks
 )
+if(ENABLE_RFE)
+    install(FILES limesdr_rfe.block.yml DESTINATION share/gnuradio/grc/blocks)
+endif()
\ No newline at end of file
diff --git a/grc/limesdr_rfe.block.yml b/grc/limesdr_rfe.block.yml
new file mode 100644
index 0000000..59c7d13
--- /dev/null
+++ b/grc/limesdr_rfe.block.yml
@@ -0,0 +1,172 @@
+# auto-generated by grc.converter
+
+id: limesdr_rfe
+label: LimeRFE Control
+category: '[LimeSuite]'
+
+parameters:
+-   id: comm_type
+    label: Communication
+    dtype: int
+    default: '0'
+    options: ['0', '1']
+    option_labels: [Direct USB, SDR]
+-   id: com_port
+    label: USB COM Port
+    dtype: string
+    hide: ${ 'part' if comm_type == 0 else 'all' }
+-   id: sdr_serial
+    label: SDR Device Serial
+    dtype: string
+    hide: ${ 'part' if comm_type == 1 else 'all' }
+-   id: filename
+    label: Configuration File
+    category: Advanced
+    dtype: file_open
+    hide: part
+-   id: fan
+    label: Enable Fan
+    dtype: int
+    default: '0'
+    options: ['0', '1']
+    option_labels: ['False', 'True']
+    hide: part
+-   id: mode
+    label: Mode
+    dtype: int
+    default: '0'
+    options: ['0', '1', '3', '2']
+    option_labels: [RX, TX, RX+TX, NONE]
+-   id: rx_channel
+    label: RX Channel
+    dtype: int
+    default: '1'
+    options: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13',
+        '14', '15', '16', '-2']
+    option_labels: [Wideband 1-1000, Wideband 1000-4000, HAM 30, HAM 50-70, HAM 144-146,
+        HAM 220-225, HAM 430-440, HAM 902-928, HAM 1240-1325, HAM 2300-2450, HAM 3300-3500,
+        Cellular Band 1, Cellular Band 2/PCS-1900, Cellular Band 3/PCS-1800, Cellular
+            Band 7, Cellular Band 38, Auto]
+-   id: rx_port
+    label: RX Port
+    dtype: int
+    default: '1'
+    options: ['1', '3']
+    option_labels: [TX/RX(J3), 30 MHz TX/RX(J5)]
+-   id: atten
+    label: RX Attenuation(dB)
+    dtype: int
+    default: '0'
+    options: ['0', '1', '2', '3', '4', '5', '6', '7']
+    option_labels: ['0', '2', '4', '6', '8', '10', '12', '14']
+    hide: part
+-   id: notch
+    label: AM FM Notch Filter
+    dtype: int
+    default: '0'
+    options: ['0', '1']
+    option_labels: [Disabled, Enabled]
+    hide: part
+-   id: tx_channel
+    label: TX Channel
+    dtype: int
+    default: '1'
+    options: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '-2']
+    option_labels: [Wideband 1-1000, Wideband 1000-4000, HAM 30, HAM 50-70, HAM 144-146,
+        HAM 220-225, HAM 430-440, HAM 902-928, HAM 1240-1325, HAM 2300-2450, HAM 3300-3500,
+        Auto]
+    hide: ${ 'all' if rx_channel > 11 else 'none' }
+-   id: tx_port
+    label: TX Port
+    dtype: int
+    default: '1'
+    options: ['1', '2', '3']
+    option_labels: [TX/RX(J3), TX (J4), 30 MHz TX/RX(J5)]
+
+templates:
+    imports: import limesdr
+    make: |-
+        limesdr.rfe(${comm_type},
+        % if comm_type == 0:
+            ${com_port},
+        % else:
+            ${sdr_serial},
+        % endif
+        ${filename}, ${rx_channel}, ${tx_channel}, ${rx_port}, ${tx_port}, ${mode}, ${notch}, ${atten})
+    callbacks:
+    - change_mode(${mode})
+    - set_attenuation(${atten})
+    - set_notch(${notch})
+    - set_fan(${fan})
+
+documentation: |-
+    -------------------------------------------------------------------------------------------------------------------
+    COMMUNICATION
+
+    Type of communication used to configure LimeRFE board.
+    Direct USB: LimeRFE is configured directly through USB COM port
+    SDR: LimeRFE is configured through LimeSDR device GPIO ports
+
+    -------------------------------------------------------------------------------------------------------------------
+    USB COM PORT
+
+    Specified USB COM Port device is connected to e.g. /dev/ttyUSB0 on linux or COM0 on windows
+    -------------------------------------------------------------------------------------------------------------------
+    SDR DEVICE SERIAL
+
+    SDR Device serial number obtained by running
+
+    LimeUtil --find
+
+    If left blank, the first device in the list will be used to configure LimeRFE board
+    -------------------------------------------------------------------------------------------------------------------
+    ENABLE FAN
+
+    Enable or disable fan connected to LimeRFE device
+    -------------------------------------------------------------------------------------------------------------------
+    MODE
+
+    Select LimeRFE mode to be used, valid values are: RX(0), TX(1), RX+TX(2), NONE(3)
+
+    -------------------------------------------------------------------------------------------------------------------
+    RX CHANNEL
+
+    Select RX channel to be configured, if Cellular Bands are selected, the same channel is set for TX
+
+    -------------------------------------------------------------------------------------------------------------------
+    RX PORT
+
+    Select hardware port to be used for receive
+
+    -------------------------------------------------------------------------------------------------------------------
+    RX ATTENUATION
+
+    Specifies the attenuation in the RX path. Attenuation [dB] = 2 * attenuation.
+    Valid value range is [0,7]
+
+    -------------------------------------------------------------------------------------------------------------------
+    AM FM NOTCH FILTER
+
+    Enables or disables AM FM notch filter
+
+    Note: Only works for specific channels(see block diagram of LimeRFE)
+
+    -------------------------------------------------------------------------------------------------------------------
+    TX CHANNEL
+
+    Select TX channel to be configured
+
+    -------------------------------------------------------------------------------------------------------------------
+    TX PORT
+
+    Select hardware port to be used for transmit
+    -------------------------------------------------------------------------------------------------------------------
+    CONFIGURATION FILE
+
+    This setting is available in "Advanced" tab of grc block.
+    If set LimeRFE device will be configured using already generated .ini file
+
+    Note: .ini file must be generated using LimeSuite->Modules->LimeRFE->save, general LimeSuite .ini file will not work
+    -------------------------------------------------------------------------------------------------------------------
+
+file_format: 1
diff --git a/grc/limesdr_rfe.xml b/grc/limesdr_rfe.xml
new file mode 100644
index 0000000..2ae2f3a
--- /dev/null
+++ b/grc/limesdr_rfe.xml
@@ -0,0 +1,410 @@
+<?xml version="1.0"?>
+<block>
+    <name>LimeRFE Control</name>
+    <key>limesdr_rfe</key>
+    <category>[LimeSuite]</category>
+    <import>import limesdr</import>
+    <make>limesdr.rfe($comm_type,
+    #if $comm_type() == 0
+        $com_port,
+    #else
+        $sdr_serial,
+    #end if
+    $filename,
+    $rx_channel,
+    $tx_channel,
+     $rx_port, $tx_port, $mode, $notch, $atten)
+    </make>
+
+    <callback>change_mode($mode)</callback>
+    <callback>set_attenuation($atten)</callback>
+    <callback>set_notch($notch)</callback>
+    <callback>set_fan($fan)</callback>
+
+    <param>
+        <name>Communication</name>
+        <key>comm_type</key>
+        <value>0</value>
+        <type>int</type>
+        <option>
+            <name>Direct USB</name>
+            <key>0</key>
+        </option>
+        <option>
+            <name>SDR</name>
+            <key>1</key>
+        </option>
+    </param>
+
+    <param>
+        <name>USB COM Port</name>
+        <key>com_port</key>
+        <value></value>
+        <type>string</type>
+        <hide>        
+        #if $comm_type() == 0
+          part
+        #else
+          all
+        #end if
+        </hide>
+    </param>
+
+    <param>
+        <name>SDR Device Serial</name>
+        <key>sdr_serial</key>
+        <value></value>
+        <type>string</type>
+        <hide>        
+        #if $comm_type() == 1
+          part
+        #else
+          all
+        #end if
+        </hide>
+    </param>
+
+    <param>
+        <name>Configuration File</name>
+        <key>filename</key>
+        <value></value>
+        <type>file_open</type>
+        <hide>part</hide>
+        <tab>Advanced</tab>
+    </param>
+
+    <param>
+        <name>Enable Fan</name>
+        <key>fan</key>
+        <value>0</value>
+        <type>int</type>
+        <hide>part</hide>
+        <option>
+            <name>False</name>
+            <key>0</key>
+        </option>
+        <option>
+            <name>True</name>
+            <key>1</key>
+        </option>
+    </param>
+
+    <param>
+        <name>Mode</name>
+        <key>mode</key>
+        <value>0</value>
+        <type>int</type>
+        <option>
+            <name>RX</name>
+            <key>0</key>
+        </option>
+        <option>
+            <name>TX</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>RX+TX</name>
+            <key>3</key>
+        </option>
+        <option>
+            <name>NONE</name>
+            <key>2</key>
+        </option>
+    </param>
+
+    <param>
+        <name>RX Channel</name>
+        <key>rx_channel</key>
+        <value>1</value>
+        <type>int</type>
+        <option>
+            <name>Wideband 1-1000</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>Wideband 1000-4000</name>
+            <key>2</key>
+        </option>
+        <option>
+            <name>HAM 30</name>
+            <key>3</key>
+        </option>
+        <option>
+            <name>HAM 50-70</name>
+            <key>4</key>
+        </option>
+        <option>
+            <name>HAM 144-146</name>
+            <key>5</key>
+        </option>
+        <option>
+            <name>HAM 220-225</name>
+            <key>6</key>
+        </option>
+        <option>
+            <name>HAM 430-440</name>
+            <key>7</key>
+        </option>
+        <option>
+            <name>HAM 902-928</name>
+            <key>8</key>
+        </option>
+        <option>
+            <name>HAM 1240-1325</name>
+            <key>9</key>
+        </option>
+        <option>
+            <name>HAM 2300-2450</name>
+            <key>10</key>
+        </option>
+        <option>
+            <name>HAM 3300-3500</name>
+            <key>11</key>
+        </option>
+        <option>
+            <name>Cellular Band 1</name>
+            <key>12</key>
+        </option>
+        <option>
+            <name>Cellular Band 2/PCS-1900</name>
+            <key>13</key>
+        </option>
+        <option>
+            <name>Cellular Band 3/PCS-1800</name>
+            <key>14</key>
+        </option>
+        <option>
+            <name>Cellular Band 7</name>
+            <key>15</key>
+        </option>
+        <option>
+            <name>Cellular Band 38</name>
+            <key>16</key>
+        </option>
+        <option>
+            <name>Auto</name>
+            <key>-2</key>
+        </option>
+    </param>
+
+    <param>
+        <name>RX Port</name>
+        <key>rx_port</key>
+        <value>1</value>
+        <type>int</type>
+        <option>
+            <name>TX/RX(J3)</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>30 MHz TX/RX(J5)</name>
+            <key>3</key>
+        </option>
+    </param>
+
+    <param>
+        <name>RX Attenuation(dB)</name>
+        <key>atten</key>
+        <value>0</value>
+        <type>int</type>
+        <hide>part</hide>
+        <option>
+            <name>0</name>
+            <key>0</key>
+        </option>
+        <option>
+            <name>2</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>4</name>
+            <key>2</key>
+        </option>
+        <option>
+            <name>6</name>
+            <key>3</key>
+        </option>
+        <option>
+            <name>8</name>
+            <key>4</key>
+        </option>
+        <option>
+            <name>10</name>
+            <key>5</key>
+        </option><option>
+            <name>12</name>
+            <key>6</key>
+        </option>
+        <option>
+            <name>14</name>
+            <key>7</key>
+        </option>
+    </param>
+
+    <param>
+        <name>AM FM Notch Filter</name>
+        <key>notch</key>
+        <value>0</value>
+        <type>int</type>
+        <hide>part</hide>
+        <option>
+            <name>Disabled</name>
+            <key>0</key>
+        </option>
+        <option>
+            <name>Enabled</name>
+            <key>1</key>
+        </option>  
+    </param>
+
+    <param>
+        <name>TX Channel</name>
+        <key>tx_channel</key>
+        <value>1</value>
+        <type>int</type>
+        <hide>        
+        #if $rx_channel() > 11
+          all
+        #else
+          none
+        #end if
+        </hide>
+        <option>
+            <name>Wideband 1-1000</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>Wideband 1000-4000</name>
+            <key>2</key>
+        </option>
+        <option>
+            <name>HAM 30</name>
+            <key>3</key>
+        </option>
+        <option>
+            <name>HAM 50-70</name>
+            <key>4</key>
+        </option>
+        <option>
+            <name>HAM 144-146</name>
+            <key>5</key>
+        </option>
+        <option>
+            <name>HAM 220-225</name>
+            <key>6</key>
+        </option>
+        <option>
+            <name>HAM 430-440</name>
+            <key>7</key>
+        </option>
+        <option>
+            <name>HAM 902-928</name>
+            <key>8</key>
+        </option>
+        <option>
+            <name>HAM 1240-1325</name>
+            <key>9</key>
+        </option>
+        <option>
+            <name>HAM 2300-2450</name>
+            <key>10</key>
+        </option>
+        <option>
+            <name>HAM 3300-3500</name>
+            <key>11</key>
+        </option>
+        <option>
+            <name>Auto</name>
+            <key>-2</key>
+        </option>
+    </param>
+
+    <param>
+        <name>TX Port</name>
+        <key>tx_port</key>
+        <value>1</value>
+        <type>int</type>
+        <option>
+            <name>TX/RX(J3)</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>TX (J4)</name>
+            <key>2</key>
+        </option>
+        <option>
+            <name>30 MHz TX/RX(J5)</name>
+            <key>3</key>
+        </option>
+    </param>
+<doc>
+-------------------------------------------------------------------------------------------------------------------
+COMMUNICATION
+
+Type of communication used to configure LimeRFE board.
+Direct USB: LimeRFE is configured directly through USB COM port
+SDR: LimeRFE is configured through LimeSDR device GPIO ports
+
+-------------------------------------------------------------------------------------------------------------------
+USB COM PORT
+
+Specified USB COM Port device is connected to e.g. /dev/ttyUSB0 on linux or COM0 on windows
+-------------------------------------------------------------------------------------------------------------------
+SDR DEVICE SERIAL
+
+SDR Device serial number obtained by running
+
+LimeUtil --find
+
+If left blank, the first device in the list will be used to configure LimeRFE board
+-------------------------------------------------------------------------------------------------------------------
+ENABLE FAN
+
+Enable or disable fan connected to LimeRFE device
+-------------------------------------------------------------------------------------------------------------------
+MODE
+
+Select LimeRFE mode to be used, valid values are: RX(0), TX(1), RX+TX(2), NONE(3)
+
+-------------------------------------------------------------------------------------------------------------------
+RX CHANNEL
+
+Select RX channel to be configured, if Cellular Bands are selected, the same channel is set for TX
+
+-------------------------------------------------------------------------------------------------------------------
+RX PORT
+
+Select hardware port to be used for receive
+
+-------------------------------------------------------------------------------------------------------------------
+RX ATTENUATION
+
+Specifies the attenuation in the RX path. Attenuation [dB] = 2 * attenuation.
+Valid value range is [0,7]
+
+-------------------------------------------------------------------------------------------------------------------
+AM FM NOTCH FILTER
+
+Enables or disables AM FM notch filter
+
+Note: Only works for specific channels(see block diagram of LimeRFE)
+
+-------------------------------------------------------------------------------------------------------------------
+TX CHANNEL
+
+Select TX channel to be configured
+
+-------------------------------------------------------------------------------------------------------------------
+TX PORT
+
+Select hardware port to be used for transmit
+-------------------------------------------------------------------------------------------------------------------
+CONFIGURATION FILE
+
+This setting is available in "Advanced" tab of grc block.
+If set LimeRFE device will be configured using already generated .ini file
+
+Note: .ini file must be generated using LimeSuite->Modules->LimeRFE->save, general LimeSuite .ini file will not work
+-------------------------------------------------------------------------------------------------------------------
+</doc>
+</block>
diff --git a/grc/limesdr_sink.block.yml b/grc/limesdr_sink.block.yml
index e8e6052..56f61f4 100644
--- a/grc/limesdr_sink.block.yml
+++ b/grc/limesdr_sink.block.yml
@@ -1,379 +1,323 @@
+# auto-generated by grc.converter
+
 id: limesdr_sink
-label: LimeSDR Sink (TX)
-category: '[LimeSDR]'
-flags: throttle
+label: LimeSuite Sink (TX)
+category: '[LimeSuite]'
+flags:
+- throttle
 
 parameters:
-- id: serial
-  label: Device serial
-  dtype: string
-  hide: part
-  category: General
-
-- id: filename
-  label: File
-  dtype: file_open
-  hide: part
-  category: General
-
-- id: channel_mode
-  label: Channel
-  dtype: enum
-  options:       ['0', '1', '2']
-  option_labels: ['A', 'B', 'A+B']
-  default: 0
-  hide: part
-  category: General
-
-- id: rf_freq
-  label: RF frequency
-  dtype: float
-  default: 100e6
-  category: General
-
-- id: samp_rate
-  label: Sample rate
-  dtype: float
-  default: samp_rate
-  category: General
-
-- id: oversample
-  label: Oversample
-  dtype: enum
-  options:       ['0', '1', '2', '4', '8', '16', '32']
-  option_labels: ['Default', '1', '2', '4', '8', '16', '32']
-  default: 0
-  category: General
-
-- id: length_tag_name
-  label: Length tag name
-  dtype: string
-  hide: part
-  category: General
-
-- id: samp_rate
-  label: Sample rate
-  dtype: float
-  default: samp_rate
-  category: General
-
-- id: nco_freq_ch0
-  label: NCO frequency
-  dtype: float
-  default: 0
-  hide: part
-  category: Channel A
-
-- id: calibr_bandw_ch0
-  label: Calibration bandwidth
-  dtype: float
-  default: 2.5e6
-  hide: part
-  category: Channel A
-
-- id: pa_path_ch0
-  label: PA path
-  dtype: int
-  options:       ['1', '2', '255']
-  option_labels: ['Band1', 'Band2', 'Auto']
-  default: '255'
-  hide: part
-  category: Channel A
-
-- id: analog_bandw_ch0
-  label: Analog filter bandwidth
-  dtype: float
-  default: 5e6
-  hide: part
-  category: Channel A
-
-- id: digital_bandw_ch0
-  label: Digital filter bandwidth
-  dtype: float
-  default: samp_rate
-  hide: part
-  category: Channel A
-
-- id: gain_dB_ch0
-  label: Gain (dB)
-  dtype: int
-  default: 1
-  hide: part
-  category: Channel A
-
-- id: nco_freq_ch1
-  label: NCO frequency
-  dtype: float
-  default: 0
-  hide: part
-  category: Channel B
-
-- id: calibr_bandw_ch1
-  label: Calibration bandwidth
-  dtype: float
-  default: 2.5e6
-  hide: part
-  category: Channel B
-
-- id: pa_path_ch1
-  label: PA path
-  dtype: int
-  options:       ['1', '2', '255']
-  option_labels: ['Band1', 'Band2', 'Auto']
-  default: '255'
-  hide: part
-  category: Channel B
-
-- id: analog_bandw_ch1
-  label: Analog filter bandwidth
-  dtype: float
-  default: 5e6
-  hide: part
-  category: Channel B
-
-- id: digital_bandw_ch1
-  label: Digital filter bandwidth
-  dtype: float
-  default: samp_rate
-  hide: part
-  category: Channel B
-
-- id: gain_dB_ch1
-  label: Gain (dB)
-  dtype: int
-  default: 1
-  hide: part
-  category: Channel B
-
-- id: allow_tcxo_dac
-  label: Allow TCXO DAC control
-  dtype: enum
-  options:       ['0', '1']
-  option_labels: ['No', 'Yes']
-  default: 0
-  hide: part
-  category: Advanced
-
-- id: dacVal
-  label: TCX0:DAC val
-  dtype: int
-  default: 180
-  hide: part
-  category: Advanced
-
-templates:
-  imports: import limesdr
-  make: |-
-    limesdr.sink(${serial}, ${channel_mode}, ${filename}, ${length_tag_name})
-
-    % if filename() == "":
-
-    self.${id}.set_sample_rate(${samp_rate})
- 
-    % if int(oversample()) > 0:
-    self.${id}.set_oversampling(${oversample})
-    % endif
-
-    self.${id}.set_center_freq(${rf_freq}, 0)
-
-    % if analog_bandw_ch0() > 0 and (int(channel_mode()) == 0 or int(channel_mode()) == 2):
-    self.${id}.set_bandwidth(${analog_bandw_ch0}, 0)
-    % endif
-
-    % if analog_bandw_ch1() > 0 and int(channel_mode()) > 0:
-    self.${id}.set_bandwidth(${analog_bandw_ch1}, 1)
-    % endif
-
-    % if digital_bandw_ch0() > 0 and (int(channel_mode()) == 0 or int(channel_mode()) == 2):
-    self.${id}.set_digital_filter(${digital_bandw_ch0}, 0)
-    % endif
-
-    % if digital_bandw_ch1() > 0 and int(channel_mode()) > 0:
-    self.${id}.set_digital_filter(${digital_bandw_ch1}, 1)
-    % endif
-
-    % if int(channel_mode()) == 0 or int(channel_mode()) == 2:
-    self.${id}.set_gain(${gain_dB_ch0}, 0)
-    % endif
-
-    % if int(channel_mode()) > 0:
-    self.${id}.set_gain(${gain_dB_ch1}, 1)
-    % endif
-
-    % if int(channel_mode()) == 0 or int(channel_mode()) == 2:
-    self.${id}.set_antenna(${pa_path_ch0}, 0)
-    % endif
-
-    % if int(channel_mode()) > 0:
-    self.${id}.set_antenna(${pa_path_ch1}, 1)
-    % endif
-
-    % if calibr_bandw_ch0() > 0 and (int(channel_mode()) == 0 or int(channel_mode()) == 2):
-    self.${id}.calibrate(${calibr_bandw_ch0}, 0)
-    % endif
-
-    % if calibr_bandw_ch1() > 0 and int(channel_mode()) > 0:
-    self.${id}.calibrate(${calibr_bandw_ch1}, 1)
-    % endif
-
-    % if nco_freq_ch0() != 0 and (int(channel_mode()) == 0 or int(channel_mode()) == 2):
-    self.${id}.set_nco(${nco_freq_ch0},0)
-    % endif
-
-    % if nco_freq_ch1() != 0 and int(channel_mode()) > 0:
-    self.${id}.set_nco(${nco_freq_ch1}, 1)
-    % endif
-
-    % endif # if filename() == ""
-   
-    % if int(allow_tcxo_dac) == 1:
-    self.${id}.set_tcxo_dac(${dacVal})
-    % endif
-
-  callbacks:
-  - set_center_freq(${rf_freq}, 0)
-  - set_antenna(${pa_path_ch0}, 0)
-  - set_antenna(${pa_path_ch1}, 1)
-  - set_nco(${nco_freq_ch0}, 0)
-  - set_nco(${nco_freq_ch1}, 1)
-  - set_bandwidth(${analog_bandw_ch0}, 0)
-  - set_bandwidth(${analog_bandw_ch1}, 1)
-  - set_digital_filter(${digital_bandw_ch0}, 0)
-  - set_digital_filter(${digital_bandw_ch1}, 1)
-  - set_gain(${gain_dB_ch0}, 0)
-  - set_gain(${gain_dB_ch1}, 1)
-  - set_tcxo_dac(${dacVal})
+-   id: serial
+    label: Device Serial
+    dtype: string
+    hide: none
+-   id: filename
+    label: File
+    category: Advanced
+    dtype: file_open
+-   id: channel_mode
+    label: Channel
+    dtype: int
+    default: '0'
+    options: ['0', '1', '2']
+    option_labels: [A, B, A+B (MIMO)]
+    hide: part
+-   id: rf_freq
+    label: RF Frequency
+    dtype: float
+    default: 100e6
+-   id: samp_rate
+    label: Sample Rate
+    dtype: float
+    default: samp_rate
+    hide: ${ 'all' if filename != "" else 'none' }
+-   id: oversample
+    label: Oversample
+    dtype: int
+    default: '0'
+    options: ['0', '1', '2', '4', '8', '16', '32']
+    option_labels: [Default, '1', '2', '4', '8', '16', '32']
+    hide: ${ 'all' if filename != "" else 'none' }
+-   id: dacVal
+    label: DAC Value (TCXO)
+    dtype: int
+    default: '125'
+    hide: ${ 'all' if allow_tcxo_dac == 0 else 'none' }
+-   id: length_tag_name
+    label: Length Tag Name
+    dtype: string
+    hide: none
+-   id: nco_freq_ch0
+    label: NCO Frequency
+    category: Channel A
+    dtype: float
+    default: '0'
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: calibr_bandw_ch0
+    label: Calibration BW
+    category: Channel A
+    dtype: float
+    default: 5e6
+    hide: ${ 'all' if channel_mode == 1 or filename != "" else 'none' }
+-   id: pa_path_ch0
+    label: PA Path
+    category: Channel A
+    dtype: int
+    default: '255'
+    options: ['255', '1', '2']
+    option_labels: [Auto (Default), Band 1, Band 2]
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: analog_bandw_ch0
+    label: Analog Filter BW
+    category: Channel A
+    dtype: float
+    default: 5e6
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: digital_bandw_ch0
+    label: Digital Filter BW
+    category: Channel A
+    dtype: float
+    default: '0'
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: gain_dB_ch0
+    label: Gain (dB)
+    category: Channel A
+    dtype: int
+    default: '30'
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: nco_freq_ch1
+    label: NCO Frequency
+    category: Channel B
+    dtype: float
+    default: '0'
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+-   id: calibr_bandw_ch1
+    label: Calibration BW
+    category: Channel B
+    dtype: float
+    default: 5e6
+    hide: ${ 'all' if channel_mode == 0 or filename != "" else 'none' }
+-   id: pa_path_ch1
+    label: PA Path
+    category: Channel B
+    dtype: int
+    default: '1'
+    options: ['1', '2']
+    option_labels: [Band 1, Band 2]
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+-   id: analog_bandw_ch1
+    label: Analog Filter BW
+    category: Channel B
+    dtype: float
+    default: 5e6
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+
+-   id: digital_bandw_ch1
+    label: Digital Filter BW
+    category: Channel B
+    dtype: float
+    default: '0'
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+-   id: gain_dB_ch1
+    label: Gain (dB)
+    category: Channel B
+    dtype: int
+    default: '30'
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+-   id: allow_tcxo_dac
+    label: Allow TCXO DAC Control
+    category: Advanced
+    dtype: int
+    default: '0'
+    options: ['1', '0']
+    option_labels: ['Yes', 'No']
+    hide: part
 
+inputs:
+-   domain: stream
+    dtype: complex
+    multiplicity: ${ channel_mode }
 asserts:
-- ${ int(channel_mode) >= 0 }
-- ${ 2 >= int(channel_mode) }
-
+- ${ channel_mode >= 0 }
+- ${ 2 >= channel_mode }
 - ${ rf_freq > 0 }
-
 - ${ calibr_bandw_ch0 >= 2.5e6 or calibr_bandw_ch0 == 0 }
 - ${ 120e6 >= calibr_bandw_ch0 }
-
 - ${ calibr_bandw_ch1 >= 2.5e6 or calibr_bandw_ch1 == 0 }
 - ${ 120e6 >= calibr_bandw_ch1 }
-
 - ${ analog_bandw_ch0 >= 5e6 or analog_bandw_ch0 == 0 }
 - ${ 130e6 >= analog_bandw_ch0 }
-
 - ${ analog_bandw_ch1 >= 5e6 or analog_bandw_ch1 == 0 }
 - ${ 130e6 >= analog_bandw_ch1 }
-
 - ${ digital_bandw_ch0 >= 0 }
 - ${ samp_rate >= digital_bandw_ch0 or digital_bandw_ch0 == 0 }
-
 - ${ digital_bandw_ch1 >= 0 }
-- ${ samp_rate >= digital_bandw_ch1 or digital_bandw_ch0 == 0 }
-
+- ${ samp_rate >= digital_bandw_ch1 or digital_bandw_ch1 == 0 }
 - ${ gain_dB_ch0 >= 0 }
-- ${ 60 >= gain_dB_ch0 }
-
+- ${ 73 >= gain_dB_ch0 }
 - ${ gain_dB_ch1 >= 0 }
-- ${ 60 >= gain_dB_ch1 }
-
+- ${ 73 >= gain_dB_ch1 }
 - ${ samp_rate > 0 }
 - ${ 61.44e6 >= samp_rate }
 
-inputs:
-- label: in
-  domain: stream
-  dtype: complex
-  multiplicity: ${ (2 if int(channel_mode) == 2 else 1) }
-
-file_format: 1
+templates:
+    imports: import limesdr
+    make: |-
+        limesdr.sink(${serial}, ${channel_mode}, ${filename}, ${length_tag_name})
+        % if context.get('filename')() == "":
+        self.${id}.set_sample_rate(${samp_rate})
+        % if context.get('oversample')() > 0:
+        self.${id}.set_oversampling(${oversample})
+        % endif
+        self.${id}.set_center_freq(${rf_freq}, 0)
+        % if context.get('analog_bandw_ch0')() > 0 and (context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2):
+        self.${id}.set_bandwidth(${analog_bandw_ch0},0)
+        % endif
+        % if context.get('analog_bandw_ch1')() > 0 and context.get('channel_mode')() > 0:
+        self.${id}.set_bandwidth(${analog_bandw_ch1},1)
+        % endif
+        % if context.get('digital_bandw_ch0')() > 0 and (context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2):
+        self.${id}.set_digital_filter(${digital_bandw_ch0},0)
+        % endif
+        % if context.get('digital_bandw_ch1')() > 0 and context.get('channel_mode')() > 0:
+        self.${id}.set_digital_filter(${digital_bandw_ch1},1)
+        % endif
+        % if context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2:
+        self.${id}.set_gain(${gain_dB_ch0},0)
+        % endif
+        % if context.get('channel_mode')() > 0:
+        self.${id}.set_gain(${gain_dB_ch1},1)
+        % endif
+        % if context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2:
+        self.${id}.set_antenna(${pa_path_ch0},0)
+        % endif
+        % if context.get('channel_mode')() > 0:
+        self.${id}.set_antenna(${pa_path_ch1},1)
+        % endif
+        % if context.get('calibr_bandw_ch0')() > 0 and (context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2):
+        self.${id}.calibrate(${calibr_bandw_ch0}, 0)
+        % endif
+        % if context.get('calibr_bandw_ch1')() > 0 and context.get('channel_mode')() > 0:
+        self.${id}.calibrate(${calibr_bandw_ch1}, 1)
+        % endif
+        % if context.get('nco_freq_ch0')() != 0 and (context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2):
+        self.${id}.set_nco(${nco_freq_ch0},0)
+        % endif
+        % if context.get('nco_freq_ch1')() != 0 and context.get('channel_mode')() > 0:
+        self.${id}.set_nco(${nco_freq_ch1},1)
+        % endif
+        % endif
+        % if context.get('allow_tcxo_dac')() == 1:
+        self.${id}.set_tcxo_dac(${dacVal})
+        % endif
+    callbacks:
+    - set_center_freq(${rf_freq}, 0)
+    - set_antenna(${pa_path_ch0},0)
+    - set_antenna(${pa_path_ch1},1)
+    - set_nco(${nco_freq_ch0},0)
+    - set_nco(${nco_freq_ch1},1)
+    - set_bandwidth(${analog_bandw_ch0},0)
+    - set_bandwidth(${analog_bandw_ch1},1)
+    - set_digital_filter(${digital_bandw_ch0},0)
+    - set_digital_filter(${digital_bandw_ch1},1)
+    - set_gain(${gain_dB_ch0},0)
+    - set_gain(${gain_dB_ch1},1)
+    - set_tcxo_dac(${dacVal})
 
 documentation: |-
-  -------------------------------------------------------------------------------------------------------------------
-  DEVICE SERIAL
+    -------------------------------------------------------------------------------------------------------------------
+    DEVICE SERIAL
+
+    Device serial number obtained by running
 
-  Device serial number obtained by running
+    	LimeUtil --find
 
-    LimeUtil --find
+    If left blank, the first device in the list is used.
+    -------------------------------------------------------------------------------------------------------------------
+    CHANNEL
 
-  If left blank, the first device in the list is used.
-  -------------------------------------------------------------------------------------------------------------------
-  CHANNEL
+    Use this setting to choose between SISO channels or MIMO mode.
 
-  Use this setting to choose between SISO channels or MIMO mode.
+    Note: not all devices support MIMO mode and have more than one channel.
+    -------------------------------------------------------------------------------------------------------------------
+    RF FREQUENCY
 
-  Note: not all devices support MIMO mode and have more than one channel.
-  -------------------------------------------------------------------------------------------------------------------
-  FILE
+    Set RF center frequency for TX (both channels).
+    LimeSDR-USB supports	  [100e3,3800e6] Hz.
+    LimeSDR-PCIe supports	  [100e3,3800e6] Hz.
+    LimeSDR-Mini supports	  [10e6,3500e6] Hz.
+    LimeNET-Micro supports  [10e6,3500e6] Hz.
+    -------------------------------------------------------------------------------------------------------------------
+    SAMPLE RATE
 
-  Generate .ini file with LimeSuite and select path.
+    Here you can enter sample rate for TX.
 
-  Note: setting must match in LimeSuite Source and Sink for the same device.
-  -------------------------------------------------------------------------------------------------------------------
-  RF FREQUENCY
+    LimeSDR-USB sample rate must be no more than 61.44e6 S/s.
+    LimeSDR-PCIe sample rate must be no more than 61.44e6 S/s.
+    LimeSDR-Mini sample rate must be no more than 30.72e6 S/s.
+    LimeNET-Micro sample rate must be no more than 10e6 S/s.
 
-  Set RF center frequency for TX (both channels).
-  LimeSDR-USB supports	  [100e3,3800e6] Hz.
-  LimeSDR-PCIe supports	  [100e3,3800e6] Hz.
-  LimeSDR-Mini supports	  [10e6,3500e6] Hz.
-  LimeNET-Micro supports  [10e6,3500e6] Hz.
-  -------------------------------------------------------------------------------------------------------------------
-  SAMPLE RATE
+    Note: LimeSDR-Mini and LimeNET-Micro supports only the same sample rate for TX and RX.
+    -------------------------------------------------------------------------------------------------------------------
+    OVERSAMPLE
 
-  Here you can enter sample rate for TX.
+    Here you can select oversampling value for TX. Default value uses highest possible oversampling value.
 
-  LimeSDR-USB sample rate must be no more than 61.44e6 S/s.
-  LimeSDR-PCIe sample rate must be no more than 61.44e6 S/s.
-  LimeSDR-Mini sample rate must be no more than 30.72e6 S/s.
-  LimeNET-Micro sample rate must be no more than 10e6 S/s.
+    Note: LimeSDR-Mini and LimeNET-Micro supports only the same oversampling value for TX and RX.
+    -------------------------------------------------------------------------------------------------------------------
+    Length tag name
 
-  Note: LimeSDR-Mini and LimeNET-Micro supports only the same sample rate for TX and RX.
-  -------------------------------------------------------------------------------------------------------------------
-  OVERSAMPLE
+    Set name of stream tag with which number of samples sent is set.
+    -------------------------------------------------------------------------------------------------------------------
+    NCO FREQUENCY
 
-  Here you can select oversampling value for TX. Default value uses highest possible oversampling value.
+    Adjust numerically controlled oscillator for each channel. 0 means that NCO is OFF.
+    -------------------------------------------------------------------------------------------------------------------
+    CALIBRATION BANDW.
 
-  Note: LimeSDR-Mini and LimeNET-Micro supports only the same oversampling value for TX and RX.
-  -------------------------------------------------------------------------------------------------------------------
-  Length tag name
+    This setting is used to set bandwidth for calibration for each channel. This value should be equal to your signal bandwidth.
+    Calibration is off when bandwidth is set to 0.
 
-  Set name of stream tag with which number of samples sent is set.
-  -------------------------------------------------------------------------------------------------------------------
-  NCO FREQUENCY
+    Calibration bandwidth range must be [2.5e6,120e6] Hz.
+    -------------------------------------------------------------------------------------------------------------------
+    PA PATH
 
-  Adjust numerically controlled oscillator for each channel. 0 means that NCO is OFF.
-  -------------------------------------------------------------------------------------------------------------------
-  CALIBRATION BANDW.
+    Select active power amplifier path of each channel.
+    For LimeSDR-Mini and LimeNET-Micro Auto(Default) option sets preferred PA path depending on RF frequency.
+    For LimeSDR-USB and LimeSDR-PCIe Auto(Default) sets PA path to Band1.
+    -------------------------------------------------------------------------------------------------------------------
+    ANALOG FILTER BANDW.
 
-  This setting is used to set bandwidth for calibration for each channel. This value should be equal to your signal bandwidth.
-  Calibration is off when bandwidth is set to 0.
+    Enter analog filter bandwidth for each channel. Analog filter is off if bandwidth is set to 0.
+    Analog filter bandwidth range must be [5e6,130e6] Hz.
+    -------------------------------------------------------------------------------------------------------------------
+    DIGITAL FILTER BANDW.
 
-  Calibration bandwidth range must be [2.5e6,120e6] Hz.
-  -------------------------------------------------------------------------------------------------------------------
-  PA PATH
+    Enter digital filter bandwidth for each channel. Digital filter if off if bandwidth is set to 0.
+    Bandwidth should not be higher than sample rate.
+    -------------------------------------------------------------------------------------------------------------------
+    GAIN
 
-  Select active power amplifier path of each channel. 
-  For LimeSDR-Mini and LimeNET-Micro Auto(Default) option sets preferred PA path depending on RF frequency.
-  For LimeSDR-USB and LimeSDR-PCIe Auto(Default) sets PA path to Band1.
-  -------------------------------------------------------------------------------------------------------------------
-  ANALOG FILTER BANDW.
+    Controls combined TX gain settings. Gain range must be [0,73] dB.
+    -------------------------------------------------------------------------------------------------------------------
+    FILE
 
-  Enter analog filter bandwidth for each channel. Analog filter is off if bandwidth is set to 0.
-  Analog filter bandwidth range must be [5e6,130e6] Hz.
-  -------------------------------------------------------------------------------------------------------------------
-  DIGITAL FILTER BANDW.
+    This setting is available in "Advanced" tab of grc block.
+    Use .ini file generated by LimeSuiteGUI to configure the device.
+    RF frequency, sampling rate, oversampling, filters, gain and antenna settings won't be used from GRC blocks when
+    device is started. Runtime variables(RF frequency, gain...) can still be modified when flowgraph is running.
 
-  Enter digital filter bandwidth for each channel. Digital filter if off if bandwidth is set to 0.
-  Bandwidth should not be higher than sample rate.
-  -------------------------------------------------------------------------------------------------------------------
-  GAIN
+    Note: setting must match in LimeSuite Source and Sink for the same device.
+    -------------------------------------------------------------------------------------------------------------------
+    TCXO DAC
 
-  Controls combined TX gain settings. Gain range must be [0,60] dB.
-  -------------------------------------------------------------------------------------------------------------------
-  TCXO DAC
+    Controls 40 MHz TCXO DAC settings.  To enable this parameter "Allow TCXO DAC control" in the "Advanced" tab must be set to "Yes"
+    Care must be taken as this parameter is returned to default value only after power off.
 
-  Controls 40 MHz TCXO DAC settings.  To enable this parameter "Allow TCXO DAC control" in the "Advanced" tab must be set to "Yes"
-  Care must be taken as this parameter is returned to default value only after power off.
+    LimeSDR-Mini default value is 180 range is [0,255]
+    LimeSDR-USB default value is 125 range is [0,255]
+    LimeSDR-PCIe default value is 134 range is [0,255]
+    LimeNET-Micro default value is 30714 range is [0,65535]
+    -------------------------------------------------------------------------------------------------------------------
 
-  LimeSDR-Mini default value is 180 range is [0,255]
-  LimeSDR-USB default value is 125 range is [0,255]
-  LimeSDR-PCIe default value is 134 range is [0,255]
-  LimeNET-Micro default value is 30714 range is [0,65535]
-  -------------------------------------------------------------------------------------------------------------------
+file_format: 1
diff --git a/grc/limesdr_sink.xml b/grc/limesdr_sink.xml
new file mode 100755
index 0000000..a4474df
--- /dev/null
+++ b/grc/limesdr_sink.xml
@@ -0,0 +1,556 @@
+<?xml version="1.0"?>
+<block>
+    <name>LimeSuite Sink (TX)</name>
+    <key>limesdr_sink</key>
+    <category>[LimeSuite]</category>
+    <flags>throttle</flags>
+    <import>import limesdr</import>
+    <make>limesdr.sink($serial, $channel_mode, $filename, $length_tag_name)
+#if $filename() == ""
+self.$(id).set_sample_rate($samp_rate)
+#if $oversample() > 0
+self.$(id).set_oversampling($oversample)
+#end if
+self.$(id).set_center_freq($rf_freq, 0)
+#if $analog_bandw_ch0() > 0 and ($channel_mode() == 0 or $channel_mode() == 2)
+self.$(id).set_bandwidth($analog_bandw_ch0,0)
+#end if
+#if $analog_bandw_ch1() > 0 and $channel_mode() > 0
+self.$(id).set_bandwidth($analog_bandw_ch1,1)
+#end if
+#if $digital_bandw_ch0() > 0 and ($channel_mode() == 0 or $channel_mode() == 2)
+self.$(id).set_digital_filter($digital_bandw_ch0,0)
+#end if
+#if $digital_bandw_ch1() > 0 and $channel_mode() > 0
+self.$(id).set_digital_filter($digital_bandw_ch1,1)
+#end if
+#if $channel_mode() == 0 or $channel_mode() == 2
+self.$(id).set_gain($gain_dB_ch0,0)
+#end if
+#if $channel_mode() > 0
+self.$(id).set_gain($gain_dB_ch1,1)
+#end if
+#if $channel_mode() == 0 or $channel_mode() == 2
+self.$(id).set_antenna($pa_path_ch0,0)
+#end if
+#if $channel_mode() > 0
+self.$(id).set_antenna($pa_path_ch1,1)
+#end if
+#if $calibr_bandw_ch0() > 0 and ($channel_mode() == 0 or $channel_mode() == 2)
+self.$(id).calibrate($calibr_bandw_ch0, 0)
+#end if
+#if $calibr_bandw_ch1() > 0 and $channel_mode() > 0
+self.$(id).calibrate($calibr_bandw_ch1, 1)
+#end if
+#if $nco_freq_ch0() != 0 and ($channel_mode() == 0 or $channel_mode() == 2)
+self.$(id).set_nco($nco_freq_ch0,0)
+#end if
+#if $nco_freq_ch1() != 0 and $channel_mode() > 0
+self.$(id).set_nco($nco_freq_ch1,1)
+#end if
+#end if
+#if $allow_tcxo_dac() == 1
+self.$(id).set_tcxo_dac($dacVal)
+#end if    
+    </make>
+
+    <callback>set_center_freq($rf_freq, 0)</callback>
+    <callback>set_antenna($pa_path_ch0,0)</callback>
+    <callback>set_antenna($pa_path_ch1,1)</callback>
+    <callback>set_nco($nco_freq_ch0,0)</callback>
+    <callback>set_nco($nco_freq_ch1,1)</callback>
+    <callback>set_bandwidth($analog_bandw_ch0,0)</callback>
+    <callback>set_bandwidth($analog_bandw_ch1,1)</callback>
+    <callback>set_digital_filter($digital_bandw_ch0,0)</callback>
+    <callback>set_digital_filter($digital_bandw_ch1,1)</callback>
+    <callback>set_gain($gain_dB_ch0,0)</callback>
+    <callback>set_gain($gain_dB_ch1,1)</callback>
+    <callback>set_tcxo_dac($dacVal)</callback>
+    
+    <param_tab_order>
+      <tab>General</tab>
+      <tab>Channel A</tab>
+      <tab>Channel B</tab>
+    </param_tab_order>
+
+    <param>
+        <name>Device Serial</name>
+        <key>serial</key>
+        <value></value>
+        <type>string</type>
+        <hide>none</hide>
+    </param>
+
+    <param>
+        <name>File</name>
+        <key>filename</key>
+        <value></value>
+        <type>file_open</type>
+        <tab>Advanced</tab>
+    </param>
+ 
+    <param>
+        <name>Channel</name>
+        <key>channel_mode</key>
+        <value>0</value>
+        <type>int</type>
+        <option>
+            <name>A</name>
+            <key>0</key>
+        </option>
+        <option>
+            <name>B</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>A+B (MIMO)</name>
+            <key>2</key>
+        </option>
+    </param>
+  
+    <param>
+        <name>RF Frequency</name>
+        <key>rf_freq</key>
+        <value>100e6</value>
+        <type>float</type>
+    </param>
+ 
+    <param>
+        <name>Sample Rate</name>
+        <key>samp_rate</key>
+        <value>samp_rate</value>
+        <type>float</type>
+        <hide>
+        #if $filename() != ""
+          all
+        #else
+          none
+        #end if
+        </hide>
+    </param>
+  
+    <param>
+        <name>Oversample</name>
+        <key>oversample</key>
+        <value>0</value>
+        <type>int</type>
+        <hide>
+        #if $filename() != ""
+          all
+        #else
+          none
+        #end if
+       </hide>
+        <option>
+            <name>Default</name>
+            <key>0</key>
+        </option>
+        <option>
+            <name>1</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>2</name>
+            <key>2</key>
+        </option>
+        <option>
+            <name>4</name>
+            <key>4</key>
+        </option>
+        <option>
+            <name>8</name>
+            <key>8</key>
+        </option>
+        <option>
+            <name>16</name>
+            <key>16</key>
+        </option>
+        <option>
+            <name>32</name>
+            <key>32</key>
+        </option>
+    </param>
+    
+	<param>
+		<name>DAC Value (TCXO)</name>
+		<key>dacVal</key>
+		<value>125</value>
+		<type>int</type>
+    <hide>
+	  #if $allow_tcxo_dac() == 0
+	    all
+	  #else
+	    none
+	  #end if
+    </hide>
+	</param>
+	
+    <param>
+        <name>Length Tag Name</name>
+        <key>length_tag_name</key>
+        <value></value>
+        <type>string</type>
+        <hide>none</hide>
+    </param>
+
+    <param>
+        <name>NCO Frequency</name>
+        <key>nco_freq_ch0</key>
+        <value>0</value>
+        <type>float</type>
+        <hide>
+        #if $channel_mode() == 1
+          all
+        #else
+          none
+        #end if
+    </hide>
+    <tab>Channel A</tab>
+    </param>
+    
+    <param>
+      <name>Calibration BW</name>
+      <key>calibr_bandw_ch0</key>
+      <value>5e6</value>
+      <type>float</type>
+      <hide>
+      #if $filename() != ""
+        all
+      #else if $channel_mode() == 1
+        all
+      #else
+        none
+      #end if
+      </hide>
+      <tab>Channel A</tab>
+    </param>
+  
+    <param>
+        <name>PA Path</name>
+        <key>pa_path_ch0</key>
+        <value>255</value>
+        <type>int</type>
+        <hide>
+        #if $channel_mode() == 1
+          all
+        #else
+          none
+        #end if
+        </hide>
+        <option>
+            <name>Auto (Default)</name>
+            <key>255</key>
+        </option>
+        <option>
+            <name>Band 1</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>Band 2</name>
+            <key>2</key>
+        </option>
+	<tab>Channel A</tab>
+    </param>
+  
+    <param>
+        <name>Analog Filter BW</name>
+        <key>analog_bandw_ch0</key>
+        <value>5e6</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 1
+      all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel A</tab>
+    </param>
+  
+ 
+    <param>
+        <name>Digital Filter BW</name>
+        <key>digital_bandw_ch0</key>
+        <value>0</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 1
+      all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel A</tab>
+    </param>
+ 
+    <param>
+        <name>Gain (dB)</name>
+        <key>gain_dB_ch0</key>
+        <value>30</value>
+        <type>int</type>
+        <hide>
+	  #if $channel_mode() == 1
+      all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel A</tab>
+    </param>
+ 
+    <param>
+        <name>NCO Frequency</name>
+        <key>nco_freq_ch1</key>
+        <value>0</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+  
+    <param>
+        <name>Calibration BW</name>
+        <key>calibr_bandw_ch1</key>
+        <value>5e6</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else if $filename() != ""
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+  
+    <param>
+        <name>PA Path</name>
+        <key>pa_path_ch1</key>
+        <value>1</value>
+        <type>int</type>
+        <hide>
+	    #if $channel_mode() == 0
+	      all
+	    #else
+	      none
+	    #end if
+    	</hide>
+        <option>
+            <name>Band 1</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>Band 2</name>
+            <key>2</key>
+        </option>
+	<tab>Channel B</tab>
+    </param>
+  
+    <param>
+        <name>Analog Filter BW</name>
+        <key>analog_bandw_ch1</key>
+        <value>5e6</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+  
+    <param>
+        <name>Digital Filter BW</name>
+        <key>digital_bandw_ch1</key>
+        <value>0</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+  
+    <param>
+        <name>Gain (dB)</name>
+        <key>gain_dB_ch1</key>
+        <value>30</value>
+        <type>int</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+
+    <param>
+        <name>Allow TCXO DAC Control</name>
+        <key>allow_tcxo_dac</key>
+        <value>0</value>
+        <type>int</type>
+        <hide>part</hide>
+        <option>
+            <name>Yes</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>No</name>
+            <key>0</key>
+        </option>
+        <tab>Advanced</tab>
+    </param>
+  
+    <!--<check> $device_type >= $channel_mode-1 </check>-->
+    <check> $channel_mode >= 0 </check>
+    <check> 2 >= $channel_mode </check>
+  
+    <check> $rf_freq > 0  </check>
+
+    <check> $calibr_bandw_ch0 >= 2.5e6 or $calibr_bandw_ch0 == 0</check>
+    <check> 120e6 >= $calibr_bandw_ch0</check>
+  
+    <check> $calibr_bandw_ch1 >= 2.5e6 or $calibr_bandw_ch1 == 0 </check>
+    <check> 120e6 >= $calibr_bandw_ch1</check>
+  
+    <check> $analog_bandw_ch0 >= 5e6 or $analog_bandw_ch0 == 0 </check>
+    <check> 130e6 >= $analog_bandw_ch0</check>
+  
+    <check> $analog_bandw_ch1 >= 5e6 or $analog_bandw_ch1 == 0</check>
+    <check> 130e6 >= $analog_bandw_ch1</check>
+ 
+    <check> $digital_bandw_ch0 >= 0 </check>
+    <check> $samp_rate >= $digital_bandw_ch0 or $digital_bandw_ch0 == 0 </check>
+  
+    <check> $digital_bandw_ch1 >= 0 </check>
+    <check> $samp_rate >= $digital_bandw_ch1 or $digital_bandw_ch1 == 0 </check>
+  
+    <check> $gain_dB_ch0 >= 0 </check>
+    <check> 73 >= $gain_dB_ch0 </check>
+  
+    <check> $gain_dB_ch1 >= 0 </check>
+    <check> 73 >= $gain_dB_ch1 </check>
+  
+    <check> $samp_rate > 0 </check>
+    <check> 61.44e6 >= $samp_rate </check>
+
+    <!--<check> $txco_dac >= 0 </check>
+    <check> 255 > $tcxo_dac </check>-->
+  
+    <sink>
+        <name>in</name>
+        <type>complex</type>
+        <nports>$channel_mode</nports>
+    </sink>
+    
+<doc>
+-------------------------------------------------------------------------------------------------------------------
+DEVICE SERIAL
+
+Device serial number obtained by running
+
+	LimeUtil --find
+
+If left blank, the first device in the list is used.
+-------------------------------------------------------------------------------------------------------------------
+CHANNEL
+
+Use this setting to choose between SISO channels or MIMO mode.
+
+Note: not all devices support MIMO mode and have more than one channel.
+-------------------------------------------------------------------------------------------------------------------
+RF FREQUENCY
+
+Set RF center frequency for TX (both channels).
+LimeSDR-USB supports	  [100e3,3800e6] Hz.
+LimeSDR-PCIe supports	  [100e3,3800e6] Hz.
+LimeSDR-Mini supports	  [10e6,3500e6] Hz.
+LimeNET-Micro supports  [10e6,3500e6] Hz.
+-------------------------------------------------------------------------------------------------------------------
+SAMPLE RATE
+
+Here you can enter sample rate for TX.
+
+LimeSDR-USB sample rate must be no more than 61.44e6 S/s.
+LimeSDR-PCIe sample rate must be no more than 61.44e6 S/s.
+LimeSDR-Mini sample rate must be no more than 30.72e6 S/s.
+LimeNET-Micro sample rate must be no more than 10e6 S/s.
+
+Note: LimeSDR-Mini and LimeNET-Micro supports only the same sample rate for TX and RX.
+-------------------------------------------------------------------------------------------------------------------
+OVERSAMPLE
+
+Here you can select oversampling value for TX. Default value uses highest possible oversampling value.
+
+Note: LimeSDR-Mini and LimeNET-Micro supports only the same oversampling value for TX and RX.
+-------------------------------------------------------------------------------------------------------------------
+Length tag name
+
+Set name of stream tag with which number of samples sent is set.
+-------------------------------------------------------------------------------------------------------------------
+NCO FREQUENCY
+
+Adjust numerically controlled oscillator for each channel. 0 means that NCO is OFF.
+-------------------------------------------------------------------------------------------------------------------
+CALIBRATION BANDW.
+
+This setting is used to set bandwidth for calibration for each channel. This value should be equal to your signal bandwidth.
+Calibration is off when bandwidth is set to 0.
+
+Calibration bandwidth range must be [2.5e6,120e6] Hz.
+-------------------------------------------------------------------------------------------------------------------
+PA PATH
+
+Select active power amplifier path of each channel. 
+For LimeSDR-Mini and LimeNET-Micro Auto(Default) option sets preferred PA path depending on RF frequency.
+For LimeSDR-USB and LimeSDR-PCIe Auto(Default) sets PA path to Band1.
+-------------------------------------------------------------------------------------------------------------------
+ANALOG FILTER BANDW.
+
+Enter analog filter bandwidth for each channel. Analog filter is off if bandwidth is set to 0.
+Analog filter bandwidth range must be [5e6,130e6] Hz.
+-------------------------------------------------------------------------------------------------------------------
+DIGITAL FILTER BANDW.
+
+Enter digital filter bandwidth for each channel. Digital filter if off if bandwidth is set to 0.
+Bandwidth should not be higher than sample rate.
+-------------------------------------------------------------------------------------------------------------------
+GAIN
+
+Controls combined TX gain settings. Gain range must be [0,73] dB.
+-------------------------------------------------------------------------------------------------------------------
+FILE
+
+This setting is available in "Advanced" tab of grc block. 
+Use .ini file generated by LimeSuiteGUI to configure the device.
+RF frequency, sampling rate, oversampling, filters, gain and antenna settings won't be used from GRC blocks when 
+device is started. Runtime variables(RF frequency, gain...) can still be modified when flowgraph is running.
+
+Note: setting must match in LimeSuite Source and Sink for the same device.
+-------------------------------------------------------------------------------------------------------------------
+TCXO DAC
+
+Controls 40 MHz TCXO DAC settings.  To enable this parameter "Allow TCXO DAC control" in the "Advanced" tab must be set to "Yes"
+Care must be taken as this parameter is returned to default value only after power off.
+
+LimeSDR-Mini default value is 180 range is [0,255]
+LimeSDR-USB default value is 125 range is [0,255]
+LimeSDR-PCIe default value is 134 range is [0,255]
+LimeNET-Micro default value is 30714 range is [0,65535]
+-------------------------------------------------------------------------------------------------------------------
+</doc>
+</block>
diff --git a/grc/limesdr_source.block.yml b/grc/limesdr_source.block.yml
index 9280ce4..d98742c 100644
--- a/grc/limesdr_source.block.yml
+++ b/grc/limesdr_source.block.yml
@@ -1,363 +1,314 @@
+# auto-generated by grc.converter
+
 id: limesdr_source
-label: LimeSDR Source (RX)
-category: '[LimeSDR]'
-flags: throttle
+label: LimeSuite Source (RX)
+category: '[LimeSuite]'
+flags:
+- throttle
 
 parameters:
-- id: serial
-  label: Device serial
-  dtype: string
-  hide: part
-  category: General
-
-- id: filename
-  label: File
-  dtype: file_open
-  hide: part
-  category: General
-
-- id: channel_mode
-  label: Channel
-  dtype: enum
-  options:       ['0', '1', '2']
-  option_labels: ['A', 'B', 'A+B']
-  default: 0
-  hide: part
-  category: General
-
-- id: rf_freq
-  label: RF frequency
-  dtype: float
-  default: 100e6
-  category: General
-
-- id: samp_rate
-  label: Sample rate
-  dtype: float
-  default: samp_rate
-  category: General
-
-- id: oversample
-  label: Oversample
-  dtype: enum
-  options:       ['0', '1', '2', '4', '8', '16', '32']
-  option_labels: ['Default', '1', '2', '4', '8', '16', '32']
-  default: 0
-  category: General
-
-- id: nco_freq_ch0
-  label: NCO frequency
-  dtype: float
-  default: 0
-  hide: part
-  category: Channel A
-
-- id: calibr_bandw_ch0
-  label: Calibration bandwidth
-  dtype: float
-  default: 2.5e6
-  hide: part
-  category: Channel A
-
-- id: lna_path_ch0
-  label: LNA path
-  dtype: int
-  options:       ['1', '2', '3', '255']
-  option_labels: ['H', 'L', 'W', 'Auto']
-  default: '255'
-  hide: part
-  category: Channel A
-
-- id: analog_bandw_ch0
-  label: Analog filter bandwidth
-  dtype: float
-  default: 1.5e6
-  hide: part
-  category: Channel A
-
-- id: digital_bandw_ch0
-  label: Digital filter bandwidth
-  dtype: float
-  default: samp_rate
-  hide: part
-  category: Channel A
-
-- id: gain_dB_ch0
-  label: Gain (dB)
-  dtype: int
-  default: 1
-  hide: part
-  category: Channel A
-
-- id: nco_freq_ch1
-  label: NCO frequency
-  dtype: float
-  default: 0
-  hide: part
-  category: Channel B
-
-- id: calibr_bandw_ch1
-  label: Calibration bandwidth
-  dtype: float
-  default: 2.5e6
-  hide: part
-  category: Channel B
-
-- id: lna_path_ch1
-  label: LNA path
-  dtype: int
-  options:       ['1', '2', '3']
-  option_labels: ['H', 'L', 'W']
-  default: 2
-  hide: part
-  category: Channel B
-
-- id: analog_bandw_ch1
-  label: Analog filter bandwidth
-  dtype: float
-  default: 1.5e6
-  hide: part
-  category: Channel B
-
-- id: digital_bandw_ch1
-  label: Digital filter bandwidth
-  dtype: float
-  default: samp_rate
-  hide: part
-  category: Channel B
+-   id: serial
+    label: Device Serial
+    dtype: string
+    hide: none
+-   id: filename
+    label: File
+    category: Advanced
+    dtype: file_open
+-   id: channel_mode
+    label: Channel
+    dtype: int
+    default: '0'
+    options: ['0', '1', '2']
+    option_labels: [A, B, A+B (MIMO)]
+    hide: part
+-   id: rf_freq
+    label: RF Frequency
+    dtype: float
+    default: 100e6
+-   id: samp_rate
+    label: Sample Rate
+    dtype: float
+    default: samp_rate
+    hide: ${ 'all' if filename != "" else 'none' }
+-   id: oversample
+    label: Oversample
+    dtype: int
+    default: '0'
+    options: ['0', '1', '2', '4', '8', '16', '32']
+    option_labels: [Default, '1', '2', '4', '8', '16', '32']
+    hide: ${ 'all' if filename != "" else 'none' }
+-   id: dacVal
+    label: TCXO DAC Value
+    dtype: int
+    default: '125'
+    hide: ${ 'all' if allow_tcxo_dac == 0 else 'none' }
+-   id: nco_freq_ch0
+    label: NCO Frequency
+    category: Channel A
+    dtype: float
+    default: '0'
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: calibr_bandw_ch0
+    label: Calibration BW
+    category: Channel A
+    dtype: float
+    default: 5e6
+    hide: ${ 'all' if filename != "" or channel_mode == 1 else 'none' }
+-   id: lna_path_ch0
+    label: LNA Path
+    category: Channel A
+    dtype: int
+    default: '255'
+    options: ['255', '1', '2', '3']
+    option_labels: [Auto(Default), H, L, W]
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: analog_bandw_ch0
+    label: Analog Filter BW
+    category: Channel A
+    dtype: float
+    default: 5e6
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: digital_bandw_ch0
+    label: Digital Filter BW
+    category: Channel A
+    dtype: float
+    default: '0'
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: gain_dB_ch0
+    label: Gain (dB)
+    category: Channel A
+    dtype: int
+    default: '30'
+    hide: ${ 'all' if channel_mode == 1 else 'none' }
+-   id: nco_freq_ch1
+    label: NCO Frequency
+    category: Channel B
+    dtype: float
+    default: '0'
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+-   id: calibr_bandw_ch1
+    label: Calibration BW
+    category: Channel B
+    dtype: float
+    default: 5e6
+    hide: ${ 'all' if filename != "" or channel_mode == 0 else 'none' }
+-   id: lna_path_ch1
+    label: LNA Path
+    category: Channel B
+    dtype: int
+    default: '2'
+    options: ['1', '2', '3']
+    option_labels: [H, L, W]
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+-   id: analog_bandw_ch1
+    label: Analog Filter BW
+    category: Channel B
+    dtype: float
+    default: 5e6
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+-   id: digital_bandw_ch1
+    label: Digital Filter BW
+    category: Channel B
+    dtype: float
+    default: '0'
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+-   id: gain_dB_ch1
+    label: Gain (dB)
+    category: Channel B
+    dtype: int
+    default: '30'
+    hide: ${ 'all' if channel_mode == 0 else 'none' }
+-   id: allow_tcxo_dac
+    label: Allow TCXO DAC Control
+    category: Advanced
+    dtype: int
+    default: '0'
+    options: ['1', '0']
+    option_labels: ['Yes', 'No']
+    hide: part
 
-- id: gain_dB_ch1
-  label: Gain (dB)
-  dtype: int
-  default: 1
-  hide: part
-  category: Channel B
-
-- id: allow_tcxo_dac
-  label: Allow TCXO DAC control
-  dtype: enum
-  options:       ['0', '1']
-  option_labels: ['No', 'Yes']
-  default: 0
-  hide: part
-  category: Advanced
-
-- id: dacVal
-  label: TCX0:DAC val
-  dtype: int
-  default: 180
-  hide: part
-  category: Advanced
+outputs:
+-   domain: stream
+    dtype: complex
+    multiplicity: ${ channel_mode }
+asserts:
+- ${ channel_mode >= 0 }
+- ${ 2 >= channel_mode }
+- ${ rf_freq > 0 }
+- ${ calibr_bandw_ch0 >= 2.5e6 or calibr_bandw_ch0 == 0 }
+- ${ 120e6 >= calibr_bandw_ch0 }
+- ${ calibr_bandw_ch1 >= 2.5e6 or calibr_bandw_ch1 == 0 }
+- ${ 120e6 >= calibr_bandw_ch1 }
+- ${ analog_bandw_ch0 >= 1.5e6 or analog_bandw_ch0 == 0 }
+- ${ 130e6 >= analog_bandw_ch0 }
+- ${ analog_bandw_ch1 >= 1.5e6 or analog_bandw_ch1 == 0 }
+- ${ 130e6 >= analog_bandw_ch1 }
+- ${ digital_bandw_ch0 >= 0 }
+- ${ samp_rate >= digital_bandw_ch0 or digital_bandw_ch0 == 0 }
+- ${ digital_bandw_ch1 >= 0 }
+- ${ samp_rate >= digital_bandw_ch1 or digital_bandw_ch0 == 0 }
+- ${ gain_dB_ch0 >= 0 }
+- ${ 73 >= gain_dB_ch0 }
+- ${ gain_dB_ch1 >= 0 }
+- ${ 73 >= gain_dB_ch1 }
+- ${ samp_rate > 0 }
+- ${ 61.44e6 >= samp_rate }
 
 templates:
-  imports: import limesdr
-  make: |-
-    limesdr.source(${serial}, ${channel_mode}, ${filename})
+    imports: import limesdr
+    make: |-
+        limesdr.source(${serial}, ${channel_mode}, ${filename})
+        % if context.get('filename')() == "":
+        self.${id}.set_sample_rate(${samp_rate})
+        % if context.get('oversample')() > 0:
+        self.${id}.set_oversampling(${oversample})
+        % endif
+        self.${id}.set_center_freq(${rf_freq}, 0)
+        % if context.get('analog_bandw_ch0')() > 0 and (context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2):
+        self.${id}.set_bandwidth(${analog_bandw_ch0}, 0)
+        % endif
+        % if context.get('analog_bandw_ch1')() > 0 and context.get('channel_mode')() > 0:
+        self.${id}.set_bandwidth(${analog_bandw_ch1}, 1)
+        % endif
+        % if context.get('digital_bandw_ch0')() > 0 and (context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2):
+        self.${id}.set_digital_filter(${digital_bandw_ch0},0)
+        % endif
+        % if context.get('digital_bandw_ch1')() > 0 and context.get('channel_mode')() > 0:
+        self.${id}.set_digital_filter(${digital_bandw_ch1},1)
+        % endif
+        % if context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2:
+        self.${id}.set_gain(${gain_dB_ch0},0)
+        % endif
+        % if context.get('channel_mode')() > 0:
+        self.${id}.set_gain(${gain_dB_ch1},1)
+        % endif
+        % if context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2:
+        self.${id}.set_antenna(${lna_path_ch0},0)
+        % endif
+        % if context.get('channel_mode')() > 0:
+        self.${id}.set_antenna(${lna_path_ch1},1)
+        % endif
+        % if context.get('calibr_bandw_ch0')() > 0 and (context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2):
+        self.${id}.calibrate(${calibr_bandw_ch0}, 0)
+        % endif
+        % if context.get('calibr_bandw_ch1')() > 0 and context.get('channel_mode')() > 0:
+        self.${id}.calibrate(${calibr_bandw_ch1}, 1)
+        % endif
+        % if context.get('nco_freq_ch0')() != 0 and (context.get('channel_mode')() == 0 or context.get('channel_mode')() == 2):
+        self.${id}.set_nco(${nco_freq_ch0},0)
+        % endif
+        % if context.get('nco_freq_ch1')() != 0 and context.get('channel_mode')() > 0:
+        self.${id}.set_nco(${nco_freq_ch1},1)
+        % endif
+        % endif
+        % if context.get('allow_tcxo_dac')() == 1:
+        self.${id}.set_tcxo_dac(${dacVal})
+        % endif
+    callbacks:
+    - set_center_freq(${rf_freq}, 0)
+    - set_antenna(${lna_path_ch0},0)
+    - set_antenna(${lna_path_ch1},1)
+    - set_nco(${nco_freq_ch0},0)
+    - set_nco(${nco_freq_ch1},1)
+    - set_bandwidth(${analog_bandw_ch0},0)
+    - set_bandwidth(${analog_bandw_ch1},1)
+    - set_digital_filter(${digital_bandw_ch0},0)
+    - set_digital_filter(${digital_bandw_ch1},1)
+    - set_gain(${gain_dB_ch0},0)
+    - set_gain(${gain_dB_ch1},1)
+    - set_tcxo_dac(${dacVal})
 
-    % if filename() == "":
+documentation: |-
+    -------------------------------------------------------------------------------------------------------------------
+    DEVICE SERIAL
 
-    self.${id}.set_sample_rate(${samp_rate})
- 
-    % if int(oversample()) > 0:
-    self.${id}.set_oversampling(${oversample})
-    % endif
+    Device serial number obtained by running
 
-    self.${id}.set_center_freq(${rf_freq}, 0)
+    	LimeUtil --find
 
-    % if analog_bandw_ch0() > 0 and (int(channel_mode()) == 0 or int(channel_mode()) == 2):
-    self.${id}.set_bandwidth(${analog_bandw_ch0}, 0)
-    % endif
+    If left blank, the first device in the list is used.
+    -------------------------------------------------------------------------------------------------------------------
+    CHANNEL
 
-    % if analog_bandw_ch1() > 0 and int(channel_mode()) > 0:
-    self.${id}.set_bandwidth(${analog_bandw_ch1}, 1)
-    % endif
+    Use this setting to choose between SISO channels or MIMO mode.
 
-    % if digital_bandw_ch0() > 0 and (int(channel_mode()) == 0 or int(channel_mode()) == 2):
-    self.${id}.set_digital_filter(${digital_bandw_ch0}, 0)
-    % endif
+    Note: not all devices support MIMO mode and have more than one channel.
+    -------------------------------------------------------------------------------------------------------------------
+    RF FREQUENCY
 
-    % if digital_bandw_ch1() > 0 and int(channel_mode()) > 0:
-    self.${id}.set_digital_filter(${digital_bandw_ch1}, 1)
-    % endif
+    Set RF center frequency for RX (both channels).
+    LimeSDR-USB supports 	  [100e3,3800e6] 	Hz.
+    LimeSDR-PCIe supports 	[100e3,3800e6] 	Hz.
+    LimeSDR-Mini supports 	[10e6,3500e6] 	Hz.
+    LimeSDR-Micro supports 	[10e6,3500e6] 	Hz.
+    -------------------------------------------------------------------------------------------------------------------
+    SAMPLE RATE
 
-    % if int(channel_mode()) == 0 or int(channel_mode()) == 2:
-    self.${id}.set_gain(${gain_dB_ch0}, 0)
-    % endif
+    Here you can enter sample rate for RX.
 
-    % if int(channel_mode()) > 0:
-    self.${id}.set_gain(${gain_dB_ch1}, 1)
-    % endif
+    LimeSDR-USB sample rate must be no more than 61.44e6 S/s.
+    LimeSDR-PCIe sample rate must be no more than 61.44e6 S/s.
+    LimeSDR-Mini sample rate must be no more than 30.72e6 S/s.
+    LimeSDR-Micro sample rate must be no more than 10e6 S/s.
 
-    % if int(channel_mode()) == 0 or int(channel_mode()) == 2:
-    self.${id}.set_antenna(${lna_path_ch0}, 0)
-    % endif
+    Note: LimeSDR-Mini and LimeSDR-Micro supports only the same sample rate for TX and RX.
+    -------------------------------------------------------------------------------------------------------------------
+    OVERSAMPLE
 
-    % if int(channel_mode()) > 0:
-    self.${id}.set_antenna(${lna_path_ch1}, 1)
-    % endif
+    Here you can select oversampling value for RX. Default value uses highest possible oversampling value.
 
-    % if calibr_bandw_ch0() > 0 and (int(channel_mode()) == 0 or int(channel_mode()) == 2):
-    self.${id}.calibrate(${calibr_bandw_ch0}, 0)
-    % endif
+    Note: LimeSDR-Mini and LimeSDR-Micro supports only the same oversampling value for TX and RX.
+    -------------------------------------------------------------------------------------------------------------------
+    NCO FREQUENCY
 
-    % if calibr_bandw_ch1() > 0 and int(channel_mode()) > 0:
-    self.${id}.calibrate(${calibr_bandw_ch1}, 1)
-    % endif
+    Adjust numerically controlled oscillator for each channel. 0 means that NCO is OFF.
+    -------------------------------------------------------------------------------------------------------------------
+    CALIBRATION BANDW.
 
-    % if nco_freq_ch0() != 0 and (int(channel_mode()) == 0 or int(channel_mode()) == 2):
-    self.${id}.set_nco(${nco_freq_ch0},0)
-    % endif
+    This setting is used to set bandwidth for calibration for each channel. This value should be equal to your signal bandwidth.
+    Calibration is off when bandwidth is set to 0.
 
-    % if nco_freq_ch1() != 0 and int(channel_mode()) > 0:
-    self.${id}.set_nco(${nco_freq_ch1}, 1)
-    % endif
+    Calibration bandwidth range must be [2.5e6,120e6] Hz.
+    -------------------------------------------------------------------------------------------------------------------
+    LNA PATH
 
-    % endif # if filename() == ""
-   
-    % if int(allow_tcxo_dac) == 1:
-    self.${id}.set_tcxo_dac(${dacVal})
-    % endif
+    Select active low-noise amplifier path of each channel.
+    For LimeSDR-Mini and LimeNET-Micro Auto(Default) option sets preferred LNA path depending on RF frequency.
+    For LimeSDR-USB and LimeSDR-PCIe Auto(Default) sets LNA path to LNAL.
+    -------------------------------------------------------------------------------------------------------------------
+    ANALOG FILTER BANDW.
 
-  callbacks:
-  - set_center_freq(${rf_freq}, 0)
-  - set_antenna(${lna_path_ch0}, 0)
-  - set_antenna(${lna_path_ch1}, 1)
-  - set_nco(${nco_freq_ch0}, 0)
-  - set_nco(${nco_freq_ch1}, 1)
-  - set_bandwidth(${analog_bandw_ch0}, 0)
-  - set_bandwidth(${analog_bandw_ch1}, 1)
-  - set_digital_filter(${digital_bandw_ch0}, 0)
-  - set_digital_filter(${digital_bandw_ch1}, 1)
-  - set_gain(${gain_dB_ch0}, 0)
-  - set_gain(${gain_dB_ch1}, 1)
-  - set_tcxo_dac(${dacVal})
+    Enter analog filter bandwidth for each channel. Analog filter is off if bandwidth is set to 0.
+    Analog filter bandwidth range must be [1.5e6,130e6] Hz.
+    -------------------------------------------------------------------------------------------------------------------
+    DIGITAL FILTER BANDW.
 
-asserts:
-- ${ int(channel_mode) >= 0 }
-- ${ 2 >= int(channel_mode) }
+    Enter digital filter bandwidth for each channel. Digital filter if off if bandwidth is set to 0.
+    Bandwidth should not be higher than sample rate.
+    -------------------------------------------------------------------------------------------------------------------
+    GAIN
 
-- ${ rf_freq > 0 }
+    Controls combined RX gain settings. Gain range must be [0,73] dB.
+    -------------------------------------------------------------------------------------------------------------------
+    FILE
 
-- ${ calibr_bandw_ch0 >= 2.5e6 or calibr_bandw_ch0 == 0 }
-- ${ 120e6 >= calibr_bandw_ch0 }
+    This setting is available in "Advanced" tab of grc block.
+    Use .ini file generated by LimeSuiteGUI to configure the device.
+    RF frequency, sampling rate, oversampling, filters, gain and antenna settings won't be used from GRC blocks when
+    device is started. Runtime variables(RF frequency, gain...) can still be modified when flowgraph is running.
 
-- ${ calibr_bandw_ch1 >= 2.5e6 or calibr_bandw_ch1 == 0 }
-- ${ 120e6 >= calibr_bandw_ch1 }
+    Note: setting must match in LimeSuite Source and Sink for the same device.
+    -------------------------------------------------------------------------------------------------------------------
+    TCXO DAC
 
-- ${ analog_bandw_ch0 >= 1.5e6 or analog_bandw_ch0 == 0 }
-- ${ 130e6 >= analog_bandw_ch0 }
+    Controls 40 MHz TCXO DAC settings.  To enable this parameter "Allow TCXO DAC control" in the "Advanced" tab must be set to "Yes"
+    Care must be taken as this parameter is returned to default value only after power off.
 
-- ${ analog_bandw_ch1 >= 1.5e6 or analog_bandw_ch1 == 0 }
-- ${ 130e6 >= analog_bandw_ch1 }
-
-- ${ digital_bandw_ch0 >= 0 }
-- ${ samp_rate >= digital_bandw_ch0 or digital_bandw_ch0 == 0 }
-
-- ${ digital_bandw_ch1 >= 0 }
-- ${ samp_rate >= digital_bandw_ch1 or digital_bandw_ch0 == 0 }
-
-- ${ gain_dB_ch0 >= 0 }
-- ${ 70 >= gain_dB_ch0 }
-
-- ${ gain_dB_ch1 >= 0 }
-- ${ 70 >= gain_dB_ch1 }
-
-- ${ samp_rate > 0 }
-- ${ 61.44e6 >= samp_rate }
-
-outputs:
-- label: out
-  domain: stream
-  dtype: complex
-  multiplicity: ${ (2 if int(channel_mode) == 2 else 1) }
+    LimeSDR-Mini default value is 180 range is [0,255]
+    LimeSDR-USB default value is 125 range is [0,255]
+    LimeSDR-PCIe default value is 134 range is [0,255]
+    LimeNET-Micro default value is 30714 range is [0,65535]
+    -------------------------------------------------------------------------------------------------------------------
 
 file_format: 1
-
-documentation: |-
-  -------------------------------------------------------------------------------------------------------------------
-  DEVICE SERIAL
-  
-  Device serial number obtained by running
-  
-  	LimeUtil --find
-  
-  If left blank, the first device in the list is used.
-  -------------------------------------------------------------------------------------------------------------------
-  CHANNEL
-  
-  Use this setting to choose between SISO channels or MIMO mode.
-  
-  Note: not all devices support MIMO mode and have more than one channel.
-  -------------------------------------------------------------------------------------------------------------------
-  FILE
-  
-  Generate .ini file with LimeSuite and select path.
-  
-  Note: setting must match in LimeSuite Source and Sink for the same device.
-  -------------------------------------------------------------------------------------------------------------------
-  RF FREQUENCY
-  
-  Set RF center frequency for RX (both channels).
-  LimeSDR-USB supports 	  [100e3,3800e6] 	Hz.
-  LimeSDR-PCIe supports 	[100e3,3800e6] 	Hz.
-  LimeSDR-Mini supports 	[10e6,3500e6] 	Hz.
-  LimeSDR-Micro supports 	[10e6,3500e6] 	Hz.
-  -------------------------------------------------------------------------------------------------------------------
-  SAMPLE RATE
-  
-  Here you can enter sample rate for RX.
-  
-  LimeSDR-USB sample rate must be no more than 61.44e6 S/s.
-  LimeSDR-PCIe sample rate must be no more than 61.44e6 S/s.
-  LimeSDR-Mini sample rate must be no more than 30.72e6 S/s.
-  LimeSDR-Micro sample rate must be no more than 10e6 S/s.
-  
-  Note: LimeSDR-Mini and LimeSDR-Micro supports only the same sample rate for TX and RX.
-  -------------------------------------------------------------------------------------------------------------------
-  OVERSAMPLE
-  
-  Here you can select oversampling value for RX. Default value uses highest possible oversampling value.
-  
-  Note: LimeSDR-Mini and LimeSDR-Micro supports only the same oversampling value for TX and RX.
-  -------------------------------------------------------------------------------------------------------------------
-  NCO FREQUENCY
-  
-  Adjust numerically controlled oscillator for each channel. 0 means that NCO is OFF.
-  -------------------------------------------------------------------------------------------------------------------
-  CALIBRATION BANDW.
-  
-  This setting is used to set bandwidth for calibration for each channel. This value should be equal to your signal bandwidth.
-  Calibration is off when bandwidth is set to 0.
-  
-  Calibration bandwidth range must be [2.5e6,120e6] Hz.
-  -------------------------------------------------------------------------------------------------------------------
-  LNA PATH
-  
-  Select active low-noise amplifier path of each channel.
-  For LimeSDR-Mini and LimeNET-Micro Auto(Default) option sets preferred LNA path depending on RF frequency.
-  For LimeSDR-USB and LimeSDR-PCIe Auto(Default) sets LNA path to LNAL.
-  -------------------------------------------------------------------------------------------------------------------
-  ANALOG FILTER BANDW.
-  
-  Enter analog filter bandwidth for each channel. Analog filter is off if bandwidth is set to 0.
-  Analog filter bandwidth range must be [1.5e6,130e6] Hz.
-  -------------------------------------------------------------------------------------------------------------------
-  DIGITAL FILTER BANDW.
-  
-  Enter digital filter bandwidth for each channel. Digital filter if off if bandwidth is set to 0.
-  Bandwidth should not be higher than sample rate.
-  -------------------------------------------------------------------------------------------------------------------
-  GAIN
-  
-  Controls combined RX gain settings. Gain range must be [0,70] dB.
-  -------------------------------------------------------------------------------------------------------------------
-  TCXO DAC
-  
-  Controls 40 MHz TCXO DAC settings.  To enable this parameter "Allow TCXO DAC control" in the "Advanced" tab must be set to "Yes"
-  Care must be taken as this parameter is returned to default value only after power off.
-  
-  LimeSDR-Mini default value is 180 range is [0,255]
-  LimeSDR-USB default value is 125 range is [0,255]
-  LimeSDR-PCIe default value is 134 range is [0,255]
-  LimeNET-Micro default value is 30714 range is [0,65535]
-  -------------------------------------------------------------------------------------------------------------------
diff --git a/grc/limesdr_source.xml b/grc/limesdr_source.xml
new file mode 100755
index 0000000..ae9b13e
--- /dev/null
+++ b/grc/limesdr_source.xml
@@ -0,0 +1,549 @@
+<?xml version="1.0"?>
+<block>
+    <name>LimeSuite Source (RX)</name>
+    <key>limesdr_source</key>
+    <category>[LimeSuite]</category>
+    <flags>throttle</flags>
+    <import>import limesdr</import>
+    <make>limesdr.source($serial, $channel_mode, $filename)
+#if $filename() == ""
+self.$(id).set_sample_rate($samp_rate)
+#if $oversample() > 0
+self.$(id).set_oversampling($oversample)
+#end if
+self.$(id).set_center_freq($rf_freq, 0)
+#if $analog_bandw_ch0() > 0 and ($channel_mode() == 0 or $channel_mode() == 2)
+self.$(id).set_bandwidth($analog_bandw_ch0,0)
+#end if
+#if $analog_bandw_ch1() > 0 and $channel_mode() > 0
+self.$(id).set_bandwidth($analog_bandw_ch1,1)
+#end if
+#if $digital_bandw_ch0() > 0 and ($channel_mode() == 0 or $channel_mode() == 2)
+self.$(id).set_digital_filter($digital_bandw_ch0,0)
+#end if
+#if $digital_bandw_ch1() > 0 and $channel_mode() > 0
+self.$(id).set_digital_filter($digital_bandw_ch1,1)
+#end if
+#if $channel_mode() == 0 or $channel_mode() == 2
+self.$(id).set_gain($gain_dB_ch0,0)
+#end if
+#if $channel_mode() > 0
+self.$(id).set_gain($gain_dB_ch1,1)
+#end if
+#if $channel_mode() == 0 or $channel_mode() == 2
+self.$(id).set_antenna($lna_path_ch0,0)
+#end if
+#if $channel_mode() > 0
+self.$(id).set_antenna($lna_path_ch1,1)
+#end if
+#if $calibr_bandw_ch0() > 0 and ($channel_mode() == 0 or $channel_mode() == 2)
+self.$(id).calibrate($calibr_bandw_ch0, 0)
+#end if
+#if $calibr_bandw_ch1() > 0 and $channel_mode() > 0
+self.$(id).calibrate($calibr_bandw_ch1, 1)
+#end if
+#if $nco_freq_ch0() != 0 and ($channel_mode() == 0 or $channel_mode() == 2)
+self.$(id).set_nco($nco_freq_ch0,0)
+#end if
+#if $nco_freq_ch1() != 0 and $channel_mode() > 0
+self.$(id).set_nco($nco_freq_ch1,1)
+#end if
+#end if
+#if $allow_tcxo_dac() == 1
+self.$(id).set_tcxo_dac($dacVal)
+#end if
+    </make>
+
+    <callback>set_center_freq($rf_freq, 0)</callback>
+    <callback>set_antenna($lna_path_ch0,0)</callback>
+    <callback>set_antenna($lna_path_ch1,1)</callback>
+    <callback>set_nco($nco_freq_ch0,0)</callback>
+    <callback>set_nco($nco_freq_ch1,1)</callback>
+    <callback>set_bandwidth($analog_bandw_ch0,0)</callback>
+    <callback>set_bandwidth($analog_bandw_ch1,1)</callback>
+    <callback>set_digital_filter($digital_bandw_ch0,0)</callback>
+    <callback>set_digital_filter($digital_bandw_ch1,1)</callback>
+    <callback>set_gain($gain_dB_ch0,0)</callback>
+    <callback>set_gain($gain_dB_ch1,1)</callback>
+	  <callback>set_tcxo_dac($dacVal)</callback>
+		       
+    <param_tab_order>
+      <tab>General</tab>
+      <tab>Channel A</tab>
+      <tab>Channel B</tab>
+    </param_tab_order>
+
+    <param>
+        <name>Device Serial</name>
+        <key>serial</key>
+        <value></value>
+        <type>string</type>
+        <hide>none</hide>
+    </param>
+
+    <param>
+        <name>File</name>
+        <key>filename</key>
+        <value></value>
+        <type>file_open</type>
+        <tab>Advanced</tab>
+    </param>
+
+    <param>
+        <name>Channel</name>
+        <key>channel_mode</key>
+        <value>0</value>
+        <type>int</type>
+        <option>
+            <name>A</name>
+            <key>0</key>
+        </option>
+        <option>
+            <name>B</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>A+B (MIMO)</name>
+            <key>2</key>
+        </option>
+    </param>
+
+    <param>
+        <name>RF Frequency</name>
+        <key>rf_freq</key>
+        <value>100e6</value>
+        <type>float</type>
+    </param>
+
+    <param>
+        <name>Sample Rate</name>
+        <key>samp_rate</key>
+        <value>samp_rate</value>
+        <type>float</type>
+        <hide>
+	  #if $filename() != ""
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+    </param>
+
+    <param>
+        <name>Oversample</name>
+        <key>oversample</key>
+        <value>0</value>
+        <type>int</type>
+        <hide>
+	  #if $filename() != ""
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+        <option>
+            <name>Default</name>
+            <key>0</key>
+        </option>
+        <option>
+            <name>1</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>2</name>
+            <key>2</key>
+        </option>
+        <option>
+            <name>4</name>
+            <key>4</key>
+        </option>
+        <option>
+            <name>8</name>
+            <key>8</key>
+        </option>
+        <option>
+            <name>16</name>
+            <key>16</key>
+        </option>
+        <option>
+            <name>32</name>
+            <key>32</key>
+        </option>
+    </param>
+
+	<param>
+		<name>TCXO DAC Value</name>
+		<key>dacVal</key>
+		<value>125</value>
+		<type>int</type>
+    <hide>
+	  #if $allow_tcxo_dac() == 0
+	    all
+	  #else
+	    none
+	  #end if
+    </hide>
+	</param>
+	
+    <param>
+        <name>NCO Frequency</name>
+        <key>nco_freq_ch0</key>
+        <value>0</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 1
+      all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel A</tab>
+    </param>
+
+    <param>
+        <name>Calibration BW</name>
+        <key>calibr_bandw_ch0</key>
+        <value>5e6</value>
+        <type>float</type>
+        <hide>
+	#if $filename() != ""
+	  all
+  #else if $channel_mode() == 1
+    all
+	#else
+	  none
+	#end if
+	</hide>
+	<tab>Channel A</tab>
+    </param>
+    <param>
+        <name>LNA Path</name>
+        <key>lna_path_ch0</key>
+        <value>255</value>
+        <type>int</type>
+        <hide>
+	  #if $channel_mode() == 1
+      all
+	  #else
+	    none
+	  #end if
+	</hide>
+        <option>
+            <name>Auto(Default)</name>
+            <key>255</key>
+        </option>
+        <option>
+            <name>H</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>L</name>
+            <key>2</key>
+        </option>
+        <option>
+            <name>W</name>
+            <key>3</key>
+        </option>
+	<tab>Channel A</tab>
+    </param>
+
+    <param>
+        <name>Analog Filter BW</name>
+        <key>analog_bandw_ch0</key>
+        <value>5e6</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 1
+      all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel A</tab>
+    </param>
+
+    <param>
+        <name>Digital Filter BW</name>
+        <key>digital_bandw_ch0</key>
+        <value>0</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 1
+      all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel A</tab>
+    </param>
+
+    <param>
+        <name>Gain (dB)</name>
+        <key>gain_dB_ch0</key>
+        <value>30</value>
+        <type>int</type>
+        <hide>
+	  #if $channel_mode() == 1
+      all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel A</tab>
+    </param>
+    
+    <param>
+        <name>NCO Frequency</name>
+        <key>nco_freq_ch1</key>
+        <value>0</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+
+    <param>
+        <name>Calibration BW</name>
+        <key>calibr_bandw_ch1</key>
+        <value>5e6</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else if $filename() != ""
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+
+    <param>
+        <name>LNA Path</name>
+        <key>lna_path_ch1</key>
+        <value>2</value>
+        <type>int</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+        <option>
+            <name>H</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>L</name>
+            <key>2</key>
+        </option>
+        <option>
+            <name>W</name>
+            <key>3</key>
+        </option>
+	<tab>Channel B</tab>
+    </param>
+
+    <param>
+        <name>Analog Filter BW</name>
+        <key>analog_bandw_ch1</key>
+        <value>5e6</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+
+    <param>
+        <name>Digital Filter BW</name>
+        <key>digital_bandw_ch1</key>
+        <value>0</value>
+        <type>float</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+
+    <param>
+        <name>Gain (dB)</name>
+        <key>gain_dB_ch1</key>
+        <value>30</value>
+        <type>int</type>
+        <hide>
+	  #if $channel_mode() == 0
+	    all
+	  #else
+	    none
+	  #end if
+	</hide>
+	<tab>Channel B</tab>
+    </param>
+
+    <param>
+        <name>Allow TCXO DAC Control</name>
+        <key>allow_tcxo_dac</key>
+        <value>0</value>
+        <type>int</type>
+        <hide>part</hide>
+        <option>
+            <name>Yes</name>
+            <key>1</key>
+        </option>
+        <option>
+            <name>No</name>
+            <key>0</key>
+        </option>
+        <tab>Advanced</tab>
+    </param>
+
+    <check> $channel_mode >= 0 </check>
+    <check> 2 >= $channel_mode </check>
+
+    <check> $rf_freq > 0  </check>
+
+    <check> $calibr_bandw_ch0 >= 2.5e6 or $calibr_bandw_ch0 == 0</check>
+    <check> 120e6 >= $calibr_bandw_ch0</check>
+  
+    <check> $calibr_bandw_ch1 >= 2.5e6 or $calibr_bandw_ch1 == 0 </check>
+    <check> 120e6 >= $calibr_bandw_ch1</check>
+  
+    <check> $analog_bandw_ch0 >= 1.5e6 or $analog_bandw_ch0 == 0 </check>
+    <check> 130e6 >= $analog_bandw_ch0</check>
+  
+    <check> $analog_bandw_ch1 >= 1.5e6 or $analog_bandw_ch1 == 0</check>
+    <check> 130e6 >= $analog_bandw_ch1</check>
+
+    <check> $digital_bandw_ch0 >= 0 </check>
+    <check> $samp_rate >= $digital_bandw_ch0 or $digital_bandw_ch0 == 0 </check>
+  
+    <check> $digital_bandw_ch1 >= 0 </check>
+    <check> $samp_rate >= $digital_bandw_ch1 or $digital_bandw_ch0 == 0 </check>
+
+    <check> $gain_dB_ch0 >= 0 </check>
+    <check> 73 >= $gain_dB_ch0 </check>
+
+    <check> $gain_dB_ch1 >= 0 </check>
+    <check> 73 >= $gain_dB_ch1 </check>
+
+    <check> $samp_rate > 0 </check>
+    <check> 61.44e6 >= $samp_rate </check>
+
+    <!--<check> $txco_dac >= 0 </check>
+    <check> 255 > $tcxo_dac </check>-->
+
+    <source>
+        <name>out</name>
+        <type>complex</type>
+        <nports>$channel_mode</nports>
+    </source>
+
+<doc>
+-------------------------------------------------------------------------------------------------------------------
+DEVICE SERIAL
+
+Device serial number obtained by running
+
+	LimeUtil --find
+
+If left blank, the first device in the list is used.
+-------------------------------------------------------------------------------------------------------------------
+CHANNEL
+
+Use this setting to choose between SISO channels or MIMO mode.
+
+Note: not all devices support MIMO mode and have more than one channel.
+-------------------------------------------------------------------------------------------------------------------
+RF FREQUENCY
+
+Set RF center frequency for RX (both channels).
+LimeSDR-USB supports 	  [100e3,3800e6] 	Hz.
+LimeSDR-PCIe supports 	[100e3,3800e6] 	Hz.
+LimeSDR-Mini supports 	[10e6,3500e6] 	Hz.
+LimeSDR-Micro supports 	[10e6,3500e6] 	Hz.
+-------------------------------------------------------------------------------------------------------------------
+SAMPLE RATE
+
+Here you can enter sample rate for RX.
+
+LimeSDR-USB sample rate must be no more than 61.44e6 S/s.
+LimeSDR-PCIe sample rate must be no more than 61.44e6 S/s.
+LimeSDR-Mini sample rate must be no more than 30.72e6 S/s.
+LimeSDR-Micro sample rate must be no more than 10e6 S/s.
+
+Note: LimeSDR-Mini and LimeSDR-Micro supports only the same sample rate for TX and RX.
+-------------------------------------------------------------------------------------------------------------------
+OVERSAMPLE
+
+Here you can select oversampling value for RX. Default value uses highest possible oversampling value.
+
+Note: LimeSDR-Mini and LimeSDR-Micro supports only the same oversampling value for TX and RX.
+-------------------------------------------------------------------------------------------------------------------
+NCO FREQUENCY
+
+Adjust numerically controlled oscillator for each channel. 0 means that NCO is OFF.
+-------------------------------------------------------------------------------------------------------------------
+CALIBRATION BANDW.
+
+This setting is used to set bandwidth for calibration for each channel. This value should be equal to your signal bandwidth.
+Calibration is off when bandwidth is set to 0.
+
+Calibration bandwidth range must be [2.5e6,120e6] Hz.
+-------------------------------------------------------------------------------------------------------------------
+LNA PATH
+
+Select active low-noise amplifier path of each channel.
+For LimeSDR-Mini and LimeNET-Micro Auto(Default) option sets preferred LNA path depending on RF frequency.
+For LimeSDR-USB and LimeSDR-PCIe Auto(Default) sets LNA path to LNAL.
+-------------------------------------------------------------------------------------------------------------------
+ANALOG FILTER BANDW.
+
+Enter analog filter bandwidth for each channel. Analog filter is off if bandwidth is set to 0.
+Analog filter bandwidth range must be [1.5e6,130e6] Hz.
+-------------------------------------------------------------------------------------------------------------------
+DIGITAL FILTER BANDW.
+
+Enter digital filter bandwidth for each channel. Digital filter if off if bandwidth is set to 0.
+Bandwidth should not be higher than sample rate.
+-------------------------------------------------------------------------------------------------------------------
+GAIN
+
+Controls combined RX gain settings. Gain range must be [0,73] dB.
+-------------------------------------------------------------------------------------------------------------------
+FILE
+
+This setting is available in "Advanced" tab of grc block. 
+Use .ini file generated by LimeSuiteGUI to configure the device.
+RF frequency, sampling rate, oversampling, filters, gain and antenna settings won't be used from GRC blocks when 
+device is started. Runtime variables(RF frequency, gain...) can still be modified when flowgraph is running.
+
+Note: setting must match in LimeSuite Source and Sink for the same device.
+-------------------------------------------------------------------------------------------------------------------
+TCXO DAC
+
+Controls 40 MHz TCXO DAC settings.  To enable this parameter "Allow TCXO DAC control" in the "Advanced" tab must be set to "Yes"
+Care must be taken as this parameter is returned to default value only after power off.
+
+LimeSDR-Mini default value is 180 range is [0,255]
+LimeSDR-USB default value is 125 range is [0,255]
+LimeSDR-PCIe default value is 134 range is [0,255]
+LimeNET-Micro default value is 30714 range is [0,65535]
+-------------------------------------------------------------------------------------------------------------------
+</doc>
+</block>
\ No newline at end of file
diff --git a/include/limesdr/CMakeLists.txt b/include/limesdr/CMakeLists.txt
index 8197333..79db477 100644
--- a/include/limesdr/CMakeLists.txt
+++ b/include/limesdr/CMakeLists.txt
@@ -3,26 +3,19 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 
 ########################################################################
 # Install public header files
 ########################################################################
 install(FILES
     api.h
+    sink.h
     source.h
-    sink.h DESTINATION include/limesdr
+    DESTINATION include/limesdr
 )
+if(ENABLE_RFE)
+    install(FILES rfe.h DESTINATION include/limesdr
+    )
+endif()
diff --git a/include/limesdr/api.h b/include/limesdr/api.h
index 38ea315..82d99e3 100644
--- a/include/limesdr/api.h
+++ b/include/limesdr/api.h
@@ -1,23 +1,11 @@
 /*
- * Copyright 2019 Lime Microsystems <info@limemicro.com>
+ * Copyright 2011 Free Software Foundation, Inc.
  *
  * This file was generated by gr_modtool, a tool from the GNU Radio framework
  * This file is a part of gr-limesdr
  *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
  */
 
 #ifndef INCLUDED_LIMESDR_API_H
diff --git a/include/limesdr/rfe.h b/include/limesdr/rfe.h
new file mode 100644
index 0000000..0a63f2f
--- /dev/null
+++ b/include/limesdr/rfe.h
@@ -0,0 +1,124 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2020 Lime Microsystems <info@limemicro.com>
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_LIMERFE_H
+#define INCLUDED_LIMERFE_H
+
+#include <lime/limeRFE.h>
+#include <limesdr/api.h>
+#include <iostream>
+#include <string>
+
+namespace gr {
+namespace limesdr {
+
+/*!
+ * \brief GNURadio block to control LimeRFE boards
+ * \ingroup limesdr
+ *
+ */
+class LIMESDR_API rfe
+{
+public:
+    rfe(int comm_type,
+        std::string device,
+        std::string config_file,
+        char IDRX,
+        char IDTX,
+        char PortRX,
+        char PortTX,
+        char Mode,
+        char Notch,
+        char Atten);
+    ~rfe();
+    /**
+     * Change LimeRFE Mode
+     *
+     * @param   mode  Mode to be set: RX(0), TX(1), NONE(2), TXRX(3)
+     *
+     * @return 0 on success, other on failure (see LimeRFE error codes)
+     */
+    int change_mode(int mode);
+    /**
+     * Enable or disbale fan
+     *
+     * @param   enable  fan state: 0 - disable; 1 - enable.
+     *
+     * @return 0 on success, other on failure (see LimeRFE error codes)
+     */
+    int set_fan(int enable);
+    /**
+     * Set RX Attenuation value
+     *
+     * @param   attenuation  Specifies the attenuation in the RX path. Attenuation [dB] =
+     * 2 * attenuation. Value range: [0,7]
+     *
+     * @return 0 on success, other on failure (see LimeRFE error codes)
+     */
+    int set_attenuation(int attenuation);
+    /**
+     * Enable or disable AM/FM notch filter
+     *
+     * @param   enable notch state: 0 - disable; 1 - enable
+     *
+     * @note Notch filter is only possible up to HAM 430-440 MHz, or Wideband 1-1000 MHz
+     * @return 0 on success, other on failure (see LimeRFE error codes)
+     */
+    int set_notch(int enable);
+
+private:
+    rfe_dev_t* rfe_dev = nullptr;
+    rfe_boardState boardState = { RFE_CID_WB_1000,
+                                  RFE_CID_WB_1000,
+                                  RFE_PORT_1,
+                                  RFE_PORT_1,
+                                  RFE_MODE_NONE,
+                                  RFE_NOTCH_OFF,
+                                  0,
+                                  0,
+                                  0 };
+    int sdr_device_num = 0;
+
+    void print_error(int error);
+
+    void get_board_state()
+    {
+        rfe_boardState currentState = { 0 };
+        if (RFE_GetState(rfe_dev, &currentState) != 0) {
+            std::cout << "LimeRFE: failed to get board state" << std::endl;
+            return;
+        }
+
+        std::cout << "LimeRFE: RX channel: " << (int)currentState.channelIDRX << std::endl;
+        std::cout << "LimeRFE: TX channel: " << (int)currentState.channelIDTX << std::endl;
+        std::cout << "LimeRFE: PortRX: " << (int)currentState.selPortRX << std::endl;
+        std::cout << "LimeRFE: PortTx: " << (int)currentState.selPortTX << std::endl;
+        std::cout << "LimeRFE: Mode: " << (int)currentState.mode << std::endl;
+        std::cout << "LimeRFE: Notch: " << (int)currentState.notchOnOff << std::endl;
+        std::cout << "LimeRFE: Attenuation: " << (int)currentState.attValue << std::endl;
+        std::cout << "LimeRFE: Enable SWR: " << (int)currentState.enableSWR << std::endl;
+        std::cout << "LimeRFE: SourceSWR: " << (int)currentState.sourceSWR << std::endl;
+    }
+};
+
+} // namespace limesdr
+} // namespace gr
+
+#endif /* INCLUDED_LIMERFE_H */
diff --git a/include/limesdr/sink.h b/include/limesdr/sink.h
index 76b3fa9..578dd80 100755
--- a/include/limesdr/sink.h
+++ b/include/limesdr/sink.h
@@ -1,19 +1,19 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2019 Lime Microsystems <info@limemicro.com>
+ * Copyright 2018 Lime Microsystems info@limemicro.com
  *
- * This is free software; you can redistribute it and/or modify
+ * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  *
- * This software is distributed in the hope that it will be useful,
+ * GNU Radio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING.  If not, write to
+ * along with GNU Radio; see the file COPYING.  If not, write to
  * the Free Software Foundation, Inc., 51 Franklin Street,
  * Boston, MA 02110-1301, USA.
  */
@@ -21,15 +21,14 @@
 #ifndef INCLUDED_LIMESDR_SINK_H
 #define INCLUDED_LIMESDR_SINK_H
 
-#include <gnuradio/sync_block.h>
+#include <gnuradio/block.h>
 #include <limesdr/api.h>
 
 namespace gr {
 namespace limesdr {
-class LIMESDR_API sink : virtual public gr::sync_block
-{
-public:
-    typedef boost::shared_ptr<sink> sptr;
+class LIMESDR_API sink : virtual public gr::block {
+    public:
+    typedef std::shared_ptr<sink> sptr;
     /*!
      * @brief Return a shared_ptr to a new instance of sink.
      *
@@ -65,8 +64,8 @@ public:
     /**
      * Set which antenna is used
      *
-     * @note setting antenna to BAND1 or BAND2 will enable PA path and because of that
-     * Lime boards will transmit CW signal, even when stream is stopped.
+     * @note setting antenna to BAND1 or BAND2 will enable PA path and because of that Lime boards
+     * will transmit CW signal, even when stream is stopped.
      *
      * @param   antenna Antenna to set: None(0), BAND1(1), BAND(2), NONE(3), AUTO(255)
      *
@@ -107,7 +106,7 @@ public:
      * @note actual gain depends on LO frequency and analog LPF configuration and
      * resulting output signal level may be different when those values are changed
      *
-     * @param   gain_dB        Desired gain: [0,60]
+     * @param   gain_dB        Desired gain: [0,73] dB
      *
      * @param   channel        Channel selection: A(LMS_CH_0),B(LMS_CH_1).
      *
@@ -144,8 +143,7 @@ public:
     virtual void set_buffer_size(uint32_t size) = 0;
     /**
      * Set TCXO DAC.
-     * @note Care must be taken as this parameter is returned to default value only after
-     * power off.
+     * @note Care must be taken as this parameter is returned to default value only after power off.
      * @note LimeSDR-Mini default value is 180 range is [0,255]
      * LimeSDR-USB default value is 125 range is [0,255]
      * LimeSDR-PCIe default value is 134 range is [0,255]
@@ -153,7 +151,7 @@ public:
      *
      * @param   dacVal		   DAC value (0-65535)
      */
-    virtual void set_tcxo_dac(uint16_t dacVal = 125) = 0;
+     virtual void set_tcxo_dac(uint16_t dacVal = 125 ) = 0;
 };
 } // namespace limesdr
 } // namespace gr
diff --git a/include/limesdr/source.h b/include/limesdr/source.h
old mode 100644
new mode 100755
index 7c0454d..82fda31
--- a/include/limesdr/source.h
+++ b/include/limesdr/source.h
@@ -1,19 +1,19 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2019 Lime Microsystems <info@limemicro.com>
+ * Copyright 2018 Lime Microsystems info@limemicro.com
  *
- * This is free software; you can redistribute it and/or modify
+ * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  *
- * This software is distributed in the hope that it will be useful,
+ * GNU Radio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING.  If not, write to
+ * along with GNU Radio; see the file COPYING.  If not, write to
  * the Free Software Foundation, Inc., 51 Franklin Street,
  * Boston, MA 02110-1301, USA.
  */
@@ -21,29 +21,22 @@
 #ifndef INCLUDED_LIMESDR_SOURCE_H
 #define INCLUDED_LIMESDR_SOURCE_H
 
-#include <gnuradio/sync_block.h>
+#include <gnuradio/block.h>
 #include <limesdr/api.h>
 
 namespace gr {
 namespace limesdr {
-
-/*!
- * \brief <+description of block+>
- * \ingroup limesdr
- *
- */
-class LIMESDR_API source : virtual public gr::sync_block
-{
-public:
-    typedef boost::shared_ptr<source> sptr;
+class LIMESDR_API source : virtual public gr::block {
+    public:
+    typedef std::shared_ptr<source> sptr;
 
     /*!
-     * \brief Return a shared_ptr to a new instance of limesdr::source.
+     * @brief Return a shared_ptr to a new instance of source.
+     *
+     * To avoid accidental use of raw pointers, source's
+     * constructor is private.  limesdr::source::make is the public
+     * interface for creating new instances.
      *
-     * To avoid accidental use of raw pointers, limesdr::source's
-     * constructor is in a private implementation
-     * class. limesdr::source::make is the public interface for
-     * creating new instances.
      * @param serial Device serial number. Cannot be left blank.
      *
      * @param channel_mode Channel and mode selection A(1), B(2), (A+B)MIMO(3).
@@ -60,7 +53,7 @@ public:
      * @param   freq Frequency to set in Hz
      *
      * @param   chan Channel (not used)
-     *
+     * 
      * @return  actual center frequency in Hz
      */
     virtual double set_center_freq(double freq, size_t chan = 0) = 0;
@@ -69,92 +62,82 @@ public:
      * Set which antenna is used
      *
      * @param   antenna Antenna to set: None(0), LNAH(1), LNAL(2), LNAW(3), AUTO(255)
-     *
+     *     
      * @param   channel  Channel selection: A(LMS_CH_0),B(LMS_CH_1).
      */
     virtual void set_antenna(int antenna, int channel = 0) = 0;
-
     /**
      * Set NCO (numerically controlled oscillator).
      * By selecting NCO frequency
      * configure NCO. When NCO frequency is 0, NCO is off.
      *
      * @param   nco_freq       NCO frequency in Hz.
-     *
+     *      
      * @param   channel        Channel index.
      */
     virtual void set_nco(float nco_freq, int channel) = 0;
-
     /**
      * Set analog filters.
-     *
+     * 
      * @param   analog_bandw  Channel filter bandwidth in Hz.
-     *
+     * 
      * @param   channel  Channel selection: A(LMS_CH_0),B(LMS_CH_1).
-     *
+     * 
      * @return actual filter bandwidth in Hz
      */
     virtual double set_bandwidth(double analog_bandw, int channel = 0) = 0;
-
     /**
      * Set digital filters (GFIR).
-     *
+     * 
      * @param   digital_bandw  Channel filter bandwidth in Hz.
-     *
+     * 
      * @param   channel  Channel selection: A(LMS_CH_0),B(LMS_CH_1).
      */
     virtual void set_digital_filter(double digital_bandw, int channel) = 0;
-
     /**
      * Set the combined gain value in dB
-     *
+     * 
      * @note actual gain depends on LO frequency and analog LPF configuration and
      * resulting output signal level may be different when those values are changed
      *
-     * @param   gain_dB        Desired gain: [0,70] RX
-     *
+     * @param   gain_dB        Desired gain: [0,73] dB
+     * 
      * @param   channel        Channel selection: A(LMS_CH_0),B(LMS_CH_1).
-     *
+     * 
      * @return actual gain in dB
      */
     virtual unsigned set_gain(unsigned gain_dB, int channel = 0) = 0;
-
     /**
      * Set the same sample rate for both channels.
      *
      * @param   rate  Sample rate in S/s.
-     *
+     * 
      * @return actual sample rate in S/s
      */
     virtual double set_sample_rate(double rate) = 0;
-
     /**
      * Set oversampling for both channels.
      *
      * @param oversample Oversampling value (0 (default),1,2,4,8,16,32).
      */
     virtual void set_oversampling(int oversample) = 0;
-
     /**
      * Perform device calibration.
      *
      * @param   bandw Set calibration bandwidth in Hz.
-     *
+     * 
      * @param   channel  Channel selection: A(LMS_CH_0),B(LMS_CH_1).
      */
-    virtual void calibrate(double bandw, int channel = 0) = 0;
-
+    virtual void calibrate(double bandw, int channel = 0) = 0;   
     /**
      * Set stream buffer size
      *
      * @param   size FIFO buffer size in samples
      */
     virtual void set_buffer_size(uint32_t size) = 0;
-
     /**
      * Set TCXO DAC.
-     * @note Care must be taken as this parameter is returned to default value only after
-     * power off.
+     * @note Care must be taken as this parameter is returned to default value only after power off.
      * @note LimeSDR-Mini default value is 180 range is [0,255]
      * LimeSDR-USB default value is 125 range is [0,255]
      * LimeSDR-PCIe default value is 134 range is [0,255]
@@ -162,10 +145,9 @@ public:
      *
      * @param   dacVal		   DAC value (0-65535)
      */
-    virtual void set_tcxo_dac(uint16_t dacVal = 125) = 0;
+     virtual void set_tcxo_dac(uint16_t dacVal = 125 ) = 0;
 };
-
 } // namespace limesdr
 } // namespace gr
 
-#endif /* INCLUDED_LIMESDR_SOURCE_H */
+#endif
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index dc18ca7..81c9482 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -3,20 +3,8 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 
 ########################################################################
 # Setup library
@@ -24,11 +12,17 @@
 include(GrPlatform) #define LIB_SUFFIX
 
 list(APPEND limesdr_sources
-    device_handler.cc
     source_impl.cc
     sink_impl.cc
+    common/device_handler.cc
 )
 
+if(ENABLE_RFE)
+    list(APPEND limesdr_sources
+    rfe_impl.cc
+    )
+endif()
+
 set(limesdr_sources "${limesdr_sources}" PARENT_SCOPE)
 if(NOT limesdr_sources)
     MESSAGE(STATUS "No C++ sources... skipping lib/")
@@ -36,8 +30,7 @@ if(NOT limesdr_sources)
 endif(NOT limesdr_sources)
 
 add_library(gnuradio-limesdr SHARED ${limesdr_sources})
-target_link_libraries(gnuradio-limesdr gnuradio::gnuradio-runtime ${LIMESUITE_LIBRARY})
-
+target_link_libraries(gnuradio-limesdr gnuradio::gnuradio-runtime LimeSuite)
 target_include_directories(gnuradio-limesdr
     PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
     PUBLIC $<INSTALL_INTERFACE:include>
@@ -50,8 +43,6 @@ if(APPLE)
     )
 endif(APPLE)
 
-add_definitions( -DGR_LIMESDR_VER="${VERSION}" )
-
 ########################################################################
 # Install built library files
 ########################################################################
diff --git a/lib/device_handler.cc b/lib/common/device_handler.cc
old mode 100644
new mode 100755
similarity index 75%
rename from lib/device_handler.cc
rename to lib/common/device_handler.cc
index 478d663..80070fb
--- a/lib/device_handler.cc
+++ b/lib/common/device_handler.cc
@@ -19,24 +19,21 @@
  */
 
 #include "device_handler.h"
-#include <LMS7002M_parameters.h>
+#include <lime/LMS7002M_parameters.h>
 
 device_handler::~device_handler() { delete list; }
 
-void device_handler::error(int device_number)
-{
+void device_handler::error(int device_number) {
     // std::cout << "ERROR: " << LMS_GetLastErrorMessage() << std::endl;
     if (this->device_vector[device_number].address != NULL)
         close_all_devices();
 }
 
-lms_device_t* device_handler::get_device(int device_number)
-{
+lms_device_t* device_handler::get_device(int device_number) {
     return this->device_vector[device_number].address;
 }
 
-int device_handler::open_device(std::string& serial)
-{
+int device_handler::open_device(std::string& serial) {
 
     int device_number;
     std::string search_name;
@@ -67,8 +64,7 @@ int device_handler::open_device(std::string& serial)
     }
 
     if (serial.empty()) {
-        std::cout << "INFO: device_handler::open_device(): no serial number. Using first "
-                     "device in "
+        std::cout << "INFO: device_handler::open_device(): no serial number. Using first device in "
                      "the list."
                   << std::endl
                   << "Use \"LimeUtil --find\" in terminal to find prefered device serial."
@@ -93,8 +89,7 @@ int device_handler::open_device(std::string& serial)
         }
         // If program was unable to find device in list print error and stop program
         else if (i == device_count - 1 && (aquired_serial != serial)) {
-            std::cout << "Unable to find LMS device with serial " << serial << "."
-                      << std::endl;
+            std::cout << "Unable to find LMS device with serial " << serial << "." << std::endl;
             std::cout << "##################" << std::endl;
             close_all_devices();
         }
@@ -106,8 +101,7 @@ int device_handler::open_device(std::string& serial)
             LMS_SUCCESS)
             exit(0);
         LMS_Init(device_vector[device_number].address);
-        const lms_dev_info_t* info =
-            LMS_GetDeviceInfo(device_vector[device_number].address);
+        const lms_dev_info_t* info = LMS_GetDeviceInfo(device_vector[device_number].address);
         std::cout << "Using device: " << info->deviceName << "(" << serial
                   << ") GW: " << info->gatewareVersion << " FW: " << info->firmwareVersion
                   << std::endl;
@@ -124,13 +118,11 @@ int device_handler::open_device(std::string& serial)
     }
 
 
-    return device_number; // return device number to identify
-                          // device_vector[device_number].address connection in other
-                          // functions
+    return device_number; // return device number to identify device_vector[device_number].address
+                          // connection in other functions
 }
 
-void device_handler::close_device(int device_number, int block_type)
-{
+void device_handler::close_device(int device_number, int block_type) {
     // Check if other block finished and close device
     if (device_vector[device_number].source_flag == false ||
         device_vector[device_number].sink_flag == false) {
@@ -141,8 +133,7 @@ void device_handler::close_device(int device_number, int block_type)
                 error(device_number);
             if (LMS_Close(this->device_vector[device_number].address) != LMS_SUCCESS)
                 error(device_number);
-            std::cout << "INFO: device_handler::close_device(): Disconnected from device "
-                         "number "
+            std::cout << "INFO: device_handler::close_device(): Disconnected from device number "
                       << device_number << "." << std::endl;
             device_vector[device_number].address = NULL;
             std::cout << "##################" << std::endl;
@@ -161,8 +152,7 @@ void device_handler::close_device(int device_number, int block_type)
     }
 }
 
-void device_handler::close_all_devices()
-{
+void device_handler::close_all_devices() {
     if (close_flag == false) {
         for (int i = 0; i <= open_devices; i++) {
             if (this->device_vector[i].address != NULL) {
@@ -178,14 +168,12 @@ void device_handler::close_all_devices()
 void device_handler::check_blocks(int device_number,
                                   int block_type,
                                   int channel_mode,
-                                  const std::string& filename)
-{
+                                  const std::string& filename) {
     // Get each block settings
     switch (block_type) {
     case 1: // Source block
         if (device_vector[device_number].source_flag == true) {
-            std::cout << "ERROR: device_handler::check_blocks(): only one LimeSuite "
-                         "Source (RX) "
+            std::cout << "ERROR: device_handler::check_blocks(): only one LimeSuite Source (RX) "
                          "block is allowed per device."
                       << std::endl;
             close_all_devices();
@@ -198,10 +186,9 @@ void device_handler::check_blocks(int device_number,
 
     case 2: // Sink block
         if (device_vector[device_number].sink_flag == true) {
-            std::cout
-                << "ERROR: device_handler::check_blocks(): only one LimeSuite Sink (TX) "
-                   "block is allowed per device."
-                << std::endl;
+            std::cout << "ERROR: device_handler::check_blocks(): only one LimeSuite Sink (TX) "
+                         "block is allowed per device."
+                      << std::endl;
             close_all_devices();
         } else {
             device_vector[device_number].sink_flag = true;
@@ -217,30 +204,25 @@ void device_handler::check_blocks(int device_number,
     }
 
     // Check block settings which must match
-    if (device_vector[device_number].source_flag &&
-        device_vector[device_number].sink_flag) {
+    if (device_vector[device_number].source_flag && device_vector[device_number].sink_flag) {
         // Chip_mode must match in blocks with the same serial
         if (device_vector[device_number].source_channel_mode !=
             device_vector[device_number].sink_channel_mode) {
             std::cout << "Source: " << device_vector[device_number].source_channel_mode
                       << std::endl;
-            std::cout << "Sink: " << device_vector[device_number].sink_channel_mode
+            std::cout << "Sink: " << device_vector[device_number].sink_channel_mode << std::endl;
+            std::cout << "ERROR: device_handler::check_blocks(): channel mismatch in LimeSuite "
+                         "Source (RX) and LimeSuite Sink (TX)."
                       << std::endl;
-            std::cout
-                << "ERROR: device_handler::check_blocks(): channel mismatch in LimeSuite "
-                   "Source (RX) and LimeSuite Sink (TX)."
-                << std::endl;
             close_all_devices();
         }
 
-        // When file_switch is 1 check filename match throughout the blocks with the same
-        // serial
+        // When file_switch is 1 check filename match throughout the blocks with the same serial
         if (device_vector[device_number].source_filename !=
             device_vector[device_number].sink_filename) {
-            std::cout
-                << "ERROR: device_handler::check_blocks(): file must match in LimeSuite "
-                   "Source (RX) and LimeSuite Sink (TX)."
-                << std::endl;
+            std::cout << "ERROR: device_handler::check_blocks(): file must match in LimeSuite "
+                         "Source (RX) and LimeSuite Sink (TX)."
+                      << std::endl;
             close_all_devices();
         }
     }
@@ -248,15 +230,13 @@ void device_handler::check_blocks(int device_number,
 
 void device_handler::settings_from_file(int device_number,
                                         const std::string& filename,
-                                        int* pAntenna_tx)
-{
-    if (LMS_LoadConfig(device_handler::getInstance().get_device(device_number),
-                       filename.c_str()))
+                                        int* pAntenna_tx) {
+    if (LMS_LoadConfig(device_handler::getInstance().get_device(device_number), filename.c_str()))
         device_handler::getInstance().error(device_number);
 
     // Set LimeSDR-Mini switches based on .ini file
     int antenna_rx = LMS_PATH_NONE;
-    int antenna_tx[2] = { LMS_PATH_NONE };
+    int antenna_tx[2] = {LMS_PATH_NONE};
     antenna_tx[0] = LMS_GetAntenna(
         device_handler::getInstance().get_device(device_number), LMS_CH_TX, LMS_CH_0);
     /* Don't print error message for the mini board */
@@ -276,14 +256,11 @@ void device_handler::settings_from_file(int device_number,
                    LMS_CH_TX,
                    LMS_CH_0,
                    antenna_tx[0]);
-    LMS_SetAntenna(device_handler::getInstance().get_device(device_number),
-                   LMS_CH_RX,
-                   LMS_CH_0,
-                   antenna_rx);
+    LMS_SetAntenna(
+        device_handler::getInstance().get_device(device_number), LMS_CH_RX, LMS_CH_0, antenna_rx);
 }
 
-void device_handler::enable_channels(int device_number, int channel_mode, bool direction)
-{
+void device_handler::enable_channels(int device_number, int channel_mode, bool direction) {
     std::cout << "INFO: device_handler::enable_channels(): ";
     if (channel_mode < 2) {
 
@@ -292,8 +269,19 @@ void device_handler::enable_channels(int device_number, int channel_mode, bool d
                               channel_mode,
                               true) != LMS_SUCCESS)
             device_handler::getInstance().error(device_number);
-        std::cout << "SISO CH" << channel_mode << " set for device number "
+        std::cout << "SISO CH" << channel_mode << " set for device number " << device_number << "."
+                  << std::endl;
+                          std::cout << "SISO CH" << channel_mode << " set for device number "
                   << device_number << "." << std::endl;
+
+        if (direction)
+            rfe_device.tx_channel = channel_mode;
+        else
+            rfe_device.rx_channel = channel_mode;
+
+        if (rfe_device.rfe_dev) {
+            update_rfe_channels();
+        }
     } else if (channel_mode == 2) {
         if (LMS_EnableChannel(device_handler::getInstance().get_device(device_number),
                               direction,
@@ -305,17 +293,14 @@ void device_handler::enable_channels(int device_number, int channel_mode, bool d
                               LMS_CH_1,
                               true) != LMS_SUCCESS)
             device_handler::getInstance().error(device_number);
-        std::cout << "MIMO mode set for device number " << device_number << "."
-                  << std::endl;
+        std::cout << "MIMO mode set for device number " << device_number << "." << std::endl;
     }
 }
 
-void device_handler::set_samp_rate(int device_number, double& rate)
-{
+void device_handler::set_samp_rate(int device_number, double& rate) {
     std::cout << "INFO: device_handler::set_samp_rate(): ";
-    if (LMS_SetSampleRate(device_handler::getInstance().get_device(device_number),
-                          rate,
-                          0) != LMS_SUCCESS)
+    if (LMS_SetSampleRate(device_handler::getInstance().get_device(device_number), rate, 0) !=
+        LMS_SUCCESS)
         device_handler::getInstance().error(device_number);
     double host_value;
     double rf_value;
@@ -329,8 +314,7 @@ void device_handler::set_samp_rate(int device_number, double& rate)
     rate = host_value; // Get the real rate back;
 }
 
-void device_handler::set_oversampling(int device_number, int oversample)
-{
+void device_handler::set_oversampling(int device_number, int oversample) {
     if (oversample == 0 || oversample == 1 || oversample == 2 || oversample == 4 ||
         oversample == 8 || oversample == 16 || oversample == 32) {
         std::cout << "INFO: device_handler::set_oversampling(): ";
@@ -350,21 +334,17 @@ void device_handler::set_oversampling(int device_number, int oversample)
 
         std::cout << "Oversampling set to: " << oversample << std::endl;
     } else {
-        std::cout
-            << "ERROR: device_handler::set_oversampling(): valid oversample values are: "
-               "0,1,2,4,8,16,32."
-            << std::endl;
+        std::cout << "ERROR: device_handler::set_oversampling(): valid oversample values are: "
+                     "0,1,2,4,8,16,32."
+                  << std::endl;
         close_all_devices();
     }
 }
 
-double
-device_handler::set_rf_freq(int device_number, bool direction, int channel, float rf_freq)
-{
+double device_handler::set_rf_freq(int device_number, bool direction, int channel, float rf_freq) {
     if (rf_freq <= 0) {
-        std::cout
-            << "ERROR: device_handler::set_rf_freq(): rf_freq must be more than 0 Hz."
-            << std::endl;
+        std::cout << "ERROR: device_handler::set_rf_freq(): rf_freq must be more than 0 Hz."
+                  << std::endl;
         close_all_devices();
     } else {
         std::cout << "INFO: device_handler::set_rf_freq(): ";
@@ -375,29 +355,21 @@ device_handler::set_rf_freq(int device_number, bool direction, int channel, floa
             device_handler::getInstance().error(device_number);
 
         double value = 0;
-        LMS_GetLOFrequency(device_handler::getInstance().get_device(device_number),
-                           direction,
-                           channel,
-                           &value);
+        LMS_GetLOFrequency(
+            device_handler::getInstance().get_device(device_number), direction, channel, &value);
 
-        std::string s_dir[2] = { "RX", "TX" };
-        std::cout << "RF frequency set [" << s_dir[direction] << "]: " << value / 1e6
-                  << " MHz." << std::endl;
+        std::string s_dir[2] = {"RX", "TX"};
+        std::cout << "RF frequency set [" << s_dir[direction] << "]: " << value / 1e6 << " MHz."
+                  << std::endl;
         return value;
     }
 }
 
-void device_handler::calibrate(int device_number,
-                               int direction,
-                               int channel,
-                               double bandwidth)
-{
+void device_handler::calibrate(int device_number, int direction, int channel, double bandwidth) {
     std::cout << "INFO: device_handler::calibrate(): ";
     double rf_freq = 0;
-    LMS_GetLOFrequency(device_handler::getInstance().get_device(device_number),
-                       direction,
-                       channel,
-                       &rf_freq);
+    LMS_GetLOFrequency(
+        device_handler::getInstance().get_device(device_number), direction, channel, &rf_freq);
     if (rf_freq > 31e6) // Normal calibration
         LMS_Calibrate(device_handler::getInstance().get_device(device_number),
                       direction,
@@ -405,38 +377,28 @@ void device_handler::calibrate(int device_number,
                       bandwidth,
                       0);
     else { // Workaround
-        LMS_SetLOFrequency(device_handler::getInstance().get_device(device_number),
-                           direction,
-                           channel,
-                           50e6);
+        LMS_SetLOFrequency(
+            device_handler::getInstance().get_device(device_number), direction, channel, 50e6);
         LMS_Calibrate(device_handler::getInstance().get_device(device_number),
                       direction,
                       channel,
                       bandwidth,
                       0);
-        LMS_SetLOFrequency(device_handler::getInstance().get_device(device_number),
-                           direction,
-                           channel,
-                           rf_freq);
+        LMS_SetLOFrequency(
+            device_handler::getInstance().get_device(device_number), direction, channel, rf_freq);
     }
 }
 
-void device_handler::set_antenna(int device_number,
-                                 int channel,
-                                 int direction,
-                                 int antenna)
-{
+void device_handler::set_antenna(int device_number, int channel, int direction, int antenna) {
     std::cout << "INFO: device_handler::set_antenna(): ";
-    LMS_SetAntenna(device_handler::getInstance().get_device(device_number),
-                   direction,
-                   channel,
-                   antenna);
-    int antenna_value = LMS_GetAntenna(
-        device_handler::getInstance().get_device(device_number), direction, channel);
+    LMS_SetAntenna(
+        device_handler::getInstance().get_device(device_number), direction, channel, antenna);
+    int antenna_value =
+        LMS_GetAntenna(device_handler::getInstance().get_device(device_number), direction, channel);
 
-    std::string s_antenna[2][4] = { { "Auto(NONE)", "LNAH", "LNAL", "LNAW" },
-                                    { "Auto(NONE)", "BAND1", "BAND2", "NONE" } };
-    std::string s_dir[2] = { "RX", "TX" };
+    std::string s_antenna[2][4] = {{"Auto(NONE)", "LNAH", "LNAL", "LNAW"},
+                                   {"Auto(NONE)", "BAND1", "BAND2", "NONE"}};
+    std::string s_dir[2] = {"RX", "TX"};
 
     std::cout << "CH" << channel << " antenna set [" << s_dir[direction]
               << "]: " << s_antenna[direction][antenna_value] << "." << std::endl;
@@ -445,8 +407,7 @@ void device_handler::set_antenna(int device_number,
 double device_handler::set_analog_filter(int device_number,
                                          bool direction,
                                          int channel,
-                                         double analog_bandw)
-{
+                                         double analog_bandw) {
     if (channel == 0 || channel == 1) {
         if (direction == LMS_CH_TX || direction == LMS_CH_RX) {
             std::cout << "INFO: device_handler::set_analog_filter(): ";
@@ -477,8 +438,7 @@ double device_handler::set_analog_filter(int device_number,
 double device_handler::set_digital_filter(int device_number,
                                           bool direction,
                                           int channel,
-                                          double digital_bandw)
-{
+                                          double digital_bandw) {
     if (channel == 0 || channel == 1) {
         if (direction == LMS_CH_TX || direction == LMS_CH_RX) {
             bool enable = (digital_bandw > 0) ? true : false;
@@ -488,9 +448,8 @@ double device_handler::set_digital_filter(int device_number,
                            channel,
                            enable,
                            digital_bandw);
-            std::string s_dir[2] = { "RX", "TX" };
-            std::cout << "digital filter CH" << channel << " [" << s_dir[direction]
-                      << "]: ";
+            std::string s_dir[2] = {"RX", "TX"};
+            std::cout << "digital filter CH" << channel << " [" << s_dir[direction] << "]: ";
             if (enable)
                 std::cout << digital_bandw / 1e6 << " MHz." << std::endl;
             else
@@ -503,60 +462,45 @@ double device_handler::set_digital_filter(int device_number,
             close_all_devices();
         }
     } else {
-        std::cout
-            << "ERROR: device_handler::set_digital_filter(): channel must be 0 or 1."
-            << std::endl;
+        std::cout << "ERROR: device_handler::set_digital_filter(): channel must be 0 or 1."
+                  << std::endl;
         close_all_devices();
     }
 }
 
 unsigned
-device_handler::set_gain(int device_number, bool direction, int channel, unsigned gain_dB)
-{
-    if ((direction == LMS_CH_RX && gain_dB >= 0 && gain_dB <= 70) ||
-        (direction == LMS_CH_TX && gain_dB >= 0 && gain_dB <= 60)) {
+device_handler::set_gain(int device_number, bool direction, int channel, unsigned gain_dB) {
+    if (gain_dB >= 0 && gain_dB <= 73) {
         std::cout << "INFO: device_handler::set_gain(): ";
-        LMS_SetGaindB(device_handler::getInstance().get_device(device_number),
-                      direction,
-                      channel,
-                      gain_dB);
+        LMS_SetGaindB(
+            device_handler::getInstance().get_device(device_number), direction, channel, gain_dB);
 
-        std::string s_dir[2] = { "RX", "TX" };
+        std::string s_dir[2] = {"RX", "TX"};
 
         unsigned int gain_value;
         LMS_GetGaindB(device_handler::getInstance().get_device(device_number),
                       direction,
                       channel,
                       &gain_value);
-        std::cout << "set gain [" << s_dir[direction] << "] CH" << channel << ": "
-                  << gain_value << " dB." << std::endl;
+        std::cout << "set gain [" << s_dir[direction] << "] CH" << channel << ": " << gain_value
+                  << " dB." << std::endl;
         return gain_value;
     } else {
-        std::cout
-            << "ERROR: device_handler::set_gain(): valid RX gain range [0, 70], TX gain "
-               "range [0, 60]."
-            << std::endl;
+        std::cout << "ERROR: device_handler::set_gain(): valid gain range [0, 73] "
+                  << std::endl;
         close_all_devices();
     }
 }
 
-void device_handler::set_nco(int device_number,
-                             bool direction,
-                             int channel,
-                             float nco_freq)
-{
-    std::string s_dir[2] = { "RX", "TX" };
+void device_handler::set_nco(int device_number, bool direction, int channel, float nco_freq) {
+    std::string s_dir[2] = {"RX", "TX"};
     std::cout << "INFO: device_handler::set_nco(): ";
     if (nco_freq == 0) {
-        LMS_SetNCOIndex(device_handler::getInstance().get_device(device_number),
-                        direction,
-                        channel,
-                        -1,
-                        0);
-        std::cout << "NCO [" << s_dir[direction] << "] CH" << channel << " disabled"
-                  << std::endl;
+        LMS_SetNCOIndex(
+            device_handler::getInstance().get_device(device_number), direction, channel, -1, 0);
+        std::cout << "NCO [" << s_dir[direction] << "] CH" << channel << " disabled" << std::endl;
     } else {
-        double freq_value_in[16] = { nco_freq };
+        double freq_value_in[16] = {nco_freq};
         int cmix_mode;
 
         if (nco_freq > 0)
@@ -574,7 +518,7 @@ void device_handler::set_nco(int device_number,
                         channel,
                         0,
                         cmix_mode);
-        std::string s_cmix[2] = { "UPCONVERT", "DOWNCONVERT" };
+        std::string s_cmix[2] = {"UPCONVERT", "DOWNCONVERT"};
         std::string cmix_mode_string;
 
         double freq_value_out[16];
@@ -590,24 +534,18 @@ void device_handler::set_nco(int device_number,
     }
 }
 
-void device_handler::disable_DC_corrections(int device_number)
-{
-    LMS_WriteParam(
-        device_handler::getInstance().get_device(device_number), LMS7_DC_BYP_RXTSP, 1);
-    LMS_WriteParam(
-        device_handler::getInstance().get_device(device_number), LMS7_DCLOOP_STOP, 1);
+void device_handler::disable_DC_corrections(int device_number) {
+    LMS_WriteParam(device_handler::getInstance().get_device(device_number), LMS7_DC_BYP_RXTSP, 1);
+    LMS_WriteParam(device_handler::getInstance().get_device(device_number), LMS7_DCLOOP_STOP, 1);
 }
 
-void device_handler::set_tcxo_dac(int device_number, uint16_t dacVal)
-{
+void device_handler::set_tcxo_dac(int device_number, uint16_t dacVal) {
     if (dacVal >= 0 && dacVal <= 65535) {
         std::cout << "INFO: device_handler::set_tcxo_dac(): ";
         float_type dac_value = dacVal;
 
-        LMS_WriteCustomBoardParam(device_handler::getInstance().get_device(device_number),
-                                  BOARD_PARAM_DAC,
-                                  dacVal,
-                                  NULL);
+        LMS_WriteCustomBoardParam(
+            device_handler::getInstance().get_device(device_number), BOARD_PARAM_DAC, dacVal, NULL);
 
         LMS_ReadCustomBoardParam(device_handler::getInstance().get_device(device_number),
                                  BOARD_PARAM_DAC,
@@ -616,8 +554,27 @@ void device_handler::set_tcxo_dac(int device_number, uint16_t dacVal)
 
         std::cout << "VCTCXO DAC value set to: " << dac_value << std::endl;
     } else {
-        std::cout << "ERROR: device_handler::set_tcxo_dac(): valid range [0, 65535]"
-                  << std::endl;
+        std::cout << "ERROR: device_handler::set_tcxo_dac(): valid range [0, 65535]" << std::endl;
         close_all_devices();
     }
 }
+
+void device_handler::set_rfe_device(rfe_dev_t* rfe_dev) { rfe_device.rfe_dev = rfe_dev; }
+
+void device_handler::update_rfe_channels()
+{
+    if (rfe_device.rfe_dev) {
+        std::cout << "INFO: device_handler::update_rfe_channels(): ";
+        if (RFE_AssignSDRChannels(
+                rfe_device.rfe_dev, rfe_device.rx_channel, rfe_device.tx_channel) != 0) {
+            std::cout << std::endl << "ERROR: Failed to assign SDR channels" << std::endl;
+            return;
+        }
+        std::cout << "RFE RX channel: " << rfe_device.rx_channel
+                  << " TX channel: " << rfe_device.tx_channel << std::endl;
+    } else {
+        std::cout
+            << "ERROR: device_handler::update_rfe_channels(): no assigned RFE device"
+            << std::endl;
+    }
+}
diff --git a/lib/device_handler.h b/lib/common/device_handler.h
old mode 100644
new mode 100755
similarity index 87%
rename from lib/device_handler.h
rename to lib/common/device_handler.h
index fa4d549..d34756e
--- a/lib/device_handler.h
+++ b/lib/common/device_handler.h
@@ -21,11 +21,12 @@
 #ifndef DEVICE_HANDLER_H
 #define DEVICE_HANDLER_H
 
-#include <LimeSuite.h>
-#include <math.h>
+#include <lime/LimeSuite.h>
+#include <lime/limeRFE.h>
 #include <cmath>
 #include <iostream>
 #include <list>
+#include <math.h>
 #include <mutex>
 #include <string>
 #include <vector>
@@ -37,9 +38,10 @@
 #define LimeNET_Micro 2
 #define LimeSDR_USB 3
 
-class device_handler
-{
-private:
+#define GR_LIMESDR_VER "2.2.7"
+
+class device_handler {
+    private:
     int open_devices = 0;
     // Read device list once flag
     bool list_read = false;
@@ -60,6 +62,12 @@ private:
         std::string sink_filename;
     };
 
+    struct rfe_device
+    {
+        int rx_channel = 0;
+        int tx_channel = 0;
+        rfe_dev_t* rfe_dev = nullptr;
+    }rfe_device;
     // Device list
     lms_info_str_t* list = new lms_info_str_t[20];
     // Device vector. Adds devices from the list
@@ -72,9 +80,8 @@ private:
     void operator=(device_handler const&);
 
 
-public:
-    static device_handler& getInstance()
-    {
+    public:
+    static device_handler& getInstance() {
         static device_handler instance;
         return instance;
     }
@@ -129,10 +136,8 @@ public:
      *
      * @param   filename  Path to file if file switch is turned on.
      */
-    void check_blocks(int device_number,
-                      int block_type,
-                      int channel_mode,
-                      const std::string& filename);
+    void
+    check_blocks(int device_number, int block_type, int channel_mode, const std::string& filename);
 
     /**
      * Load settings from .ini file.
@@ -140,12 +145,10 @@ public:
      * @param   device_number Device number from the list of LMS_GetDeviceList.
      *
      * @param   filename Path to file if file switch is turned on.
-     *
-     * @param   antenna_tx Pointer to TX antenna, so PA path would be updated in sink
-     * block
+     * 
+     * @param   antenna_tx Pointer to TX antenna, so PA path would be updated in sink block
      */
-    void
-    settings_from_file(int device_number, const std::string& filename, int* antenna_tx);
+    void settings_from_file(int device_number, const std::string& filename, int* antenna_tx);
 
     /**
      * Set used channels
@@ -231,10 +234,7 @@ public:
      *
      * @param   analog_bandw  Channel filter bandwidth in Hz.
      */
-    double set_analog_filter(int device_number,
-                             bool direction,
-                             int channel,
-                             double analog_bandw);
+    double set_analog_filter(int device_number, bool direction, int channel, double analog_bandw);
 
     /**
      * Set digital filters (GFIR).
@@ -247,10 +247,7 @@ public:
      *
      * @param   digital_bandw  Channel filter bandwidth in Hz.
      */
-    double set_digital_filter(int device_number,
-                              bool direction,
-                              int channel,
-                              double digital_bandw);
+    double set_digital_filter(int device_number, bool direction, int channel, double digital_bandw);
 
     /**
      * Set the combined gain value in dB
@@ -266,7 +263,7 @@ public:
      *
      * @param   channel        Channel selection: A(LMS_CH_0),B(LMS_CH_1).
      *
-     * @param   gain_dB        Desired gain: [0,70] RX, [0,60] TX.
+     * @param   gain_dB        Desired gain: [0,73] dB
      */
     unsigned set_gain(int device_number, bool direction, int channel, unsigned gain_dB);
 
@@ -289,18 +286,27 @@ public:
 
     /**
      * Set TCXO DAC.
-     * @note Care must be taken as this parameter is returned to default value only after
-     * power off.
+     * @note Care must be taken as this parameter is returned to default value only after power off.
      * @note LimeSDR-Mini default value is 180 range is [0,255]
      * LimeSDR-USB default value is 125 range is [0,255]
      * LimeSDR-PCIe default value is 134 range is [0,255]
      * LimeNET-Micro default value is 30714 range is [0,65535]
-     *
+     * 
      * @param   device_number  Device number from the list of LMS_GetDeviceList.
      *
      * @param   dacVal		   DAC value (0-65535)
      */
     void set_tcxo_dac(int device_number, uint16_t dacVal);
+        /**
+     * Sets up LimeRFE device pointer so that automatic channel configuration could be made
+     * @param   rfe_dev  Pointer to LimeRFE device descriptor
+     */
+    void set_rfe_device(rfe_dev_t* rfe_dev);
+    /**
+     * Assigns configured LimeSDR channels to LimeRFE for automatic channel switching
+     */
+    void update_rfe_channels();
+
 };
 
 
diff --git a/lib/rfe_impl.cc b/lib/rfe_impl.cc
new file mode 100644
index 0000000..611daf7
--- /dev/null
+++ b/lib/rfe_impl.cc
@@ -0,0 +1,262 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2020 Lime Microsystems.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "common/device_handler.h"
+#include <limesdr/rfe.h>
+
+namespace gr {
+namespace limesdr {
+rfe::rfe(int comm_type,
+         std::string device,
+         std::string config_file,
+         char IDRX,
+         char IDTX,
+         char PortRX,
+         char PortTX,
+         char Mode,
+         char Notch,
+         char Atten)
+{
+    std::cout << "---------------------------------------------------------------"
+              << std::endl;
+    std::cout << "LimeSuite RFE info" << std::endl;
+    std::cout << std::endl;
+
+    boardState.channelIDRX = IDRX;
+    boardState.channelIDTX = IDTX;
+    boardState.selPortRX = PortRX;
+    boardState.selPortTX = PortTX;
+    boardState.mode = Mode;
+    boardState.notchOnOff = Notch;
+    boardState.attValue = Atten;
+
+    if (comm_type) // SDR GPIO communication
+    {
+        sdr_device_num = device_handler::getInstance().open_device(device);
+
+        std::cout << "LimeRFE: Opening through GPIO communication" << std::endl;
+        rfe_dev =
+            RFE_Open(nullptr, device_handler::getInstance().get_device(sdr_device_num));
+        if (!rfe_dev) {
+            std::cout << "LimeRFE: Failed to open device, exiting" << std::endl;
+            exit(0);
+        }
+
+        // No need to set up this if it isn't automatic
+        if (boardState.channelIDRX == RFE_CID_AUTO ||
+            boardState.channelIDTX == RFE_CID_AUTO) {
+            device_handler::getInstance().set_rfe_device(rfe_dev);
+
+            // Update the channels since the SDR could already be set up and working
+            device_handler::getInstance().update_rfe_channels();
+        }
+    } else // Direct USB
+    {
+        // Not using device handler so print the version
+        std::cout << "##################" << std::endl;
+        std::cout << "LimeSuite version: " << LMS_GetLibraryVersion() << std::endl;
+        std::cout << "gr-limesdr version: " << GR_LIMESDR_VER << std::endl;
+        std::cout << "##################" << std::endl;
+
+        std::cout << "LimeRFE: Opening " << device << std::endl;
+        rfe_dev = RFE_Open(device.c_str(), nullptr);
+        if (!rfe_dev) {
+            std::cout << "LimeRFE: Failed to open device, exiting" << std::endl;
+            exit(0);
+        }
+    }
+
+    int error = 0;
+    unsigned char info[4] = { 0 };
+    if ((error = RFE_GetInfo(rfe_dev, info)) != 0) {
+        std::cout << "LimeRFE: Failed to get device info: ";
+        print_error(error);
+        exit(0);
+    }
+    std::cout << "LimeRFE: FW: " << (int)info[0] << " HW: " << (int)info[1] << std::endl;
+
+    if (config_file.empty()) {
+        if ((error = RFE_ConfigureState(rfe_dev, boardState)) != 0) {
+            std::cout << "LimeRFE: Failed to configure device: ";
+            print_error(error);
+            exit(0);
+        }
+    } else {
+        std::cout << "LimeRFE: Loading configuration file" << std::endl;
+        if ((error = RFE_LoadConfig(rfe_dev, config_file.c_str())) != 0) {
+            std::cout << "LimeRFE: Failed to load configuration file: ";
+            print_error(error);
+            exit(0);
+        }
+    }
+    std::cout << "LimeRFE: Board state: " << std::endl;
+    get_board_state();
+    std::cout << "---------------------------------------------------------------"
+              << std::endl;
+}
+
+rfe::~rfe()
+{
+    std::cout << "LimeRFE: closing" << std::endl;
+    if (rfe_dev) {
+        RFE_Reset(rfe_dev);
+        RFE_Close(rfe_dev);
+    }
+}
+
+int rfe::change_mode(int mode)
+{
+    if (rfe_dev) {
+        if (mode == RFE_MODE_TXRX) {
+            if (boardState.selPortRX == boardState.selPortTX &&
+                boardState.channelIDRX < RFE_CID_CELL_BAND01) {
+                std::cout
+                    << "LimeRFE: mode cannot be set to RX+TX when same port is selected"
+                    << std::endl;
+                return -1;
+            }
+        }
+        int error = 0;
+        if (mode > 3 || mode < 0)
+            std::cout << "LimeRFE: invalid mode" << std::endl;
+        std::string mode_str[4] = { "RX", "TX", "NONE", "RX+TX" };
+        std::cout << "LimeRFE: changing mode to " << mode_str[mode] << std::endl;
+        if ((error = RFE_Mode(rfe_dev, mode)) != 0) {
+            std::cout << "LimeRFE: failed to change mode:";
+            print_error(error);
+        }
+        boardState.mode = mode;
+        return error;
+    }
+    std::cout << "LimeRFE: no RFE device opened" << std::endl;
+    return -1;
+}
+
+int rfe::set_fan(int enable)
+{
+    if (rfe_dev) {
+        std::string enable_str[2] = { "disabling", "enabling" };
+        std::cout << "LimeRFE: " << enable_str[enable] << " fan" << std::endl;
+        int error = 0;
+        if ((error = RFE_Fan(rfe_dev, enable)) != 0) {
+            std::cout << "LimeRFE: failed to change mode:";
+            print_error(error);
+        }
+        return error;
+    }
+    std::cout << "LimeRFE: no RFE device opened" << std::endl;
+    return -1;
+}
+
+int rfe::set_attenuation(int attenuation)
+{
+    if (rfe_dev) {
+        int error = 0;
+        if (attenuation > 7) {
+            std::cout << "LimeRFE: attenuation value too high, valid range [0, 7]"
+                      << std::endl;
+            return -1;
+        }
+        std::cout << "LimeRFE: changing attenuation value to: " << attenuation
+                  << std::endl;
+        ;
+
+        boardState.attValue = attenuation;
+        if ((error = RFE_ConfigureState(rfe_dev, boardState)) != 0) {
+            std::cout << "LimeRFE: failed to change attenuation: ";
+            print_error(error);
+        }
+        return error;
+    }
+    std::cout << "LimeRFE: no RFE device opened" << std::endl;
+    return -1;
+}
+
+int rfe::set_notch(int enable)
+{
+    if (rfe_dev) {
+        if (boardState.channelIDRX > RFE_CID_HAM_0920 ||
+            boardState.channelIDRX == RFE_CID_WB_4000) {
+            std::cout << "LimeRFE: notch filter cannot be se for this RX channel"
+                      << std::endl;
+            return -1;
+        }
+        int error = 0; //! TODO: might need renaming
+        boardState.notchOnOff = enable;
+        std::string en_dis[2] = { "disabling", "enabling" };
+        std::cout << "LimeRFE: " << en_dis[enable] << " notch filter" << std::endl;
+        if ((error = RFE_ConfigureState(rfe_dev, boardState)) != 0) {
+            std::cout << "LimeRFE: failed to change change attenuation: ";
+            print_error(error);
+        }
+        return error;
+    }
+    return -1;
+}
+void rfe::print_error(int error)
+{
+    switch (error) {
+    case -4:
+        std::cout << "error synchronizing communication" << std::endl;
+        break;
+    case -3:
+        std::cout
+            << "non-configurable GPIO pin specified. Only pins 4 and 5 are configurable."
+            << std::endl;
+        break;
+    case -2:
+        std::cout << "couldn't read the .ini configuration file" << std::endl;
+        break;
+    case -1:
+        std::cout << "communication error" << std::endl;
+        break;
+    case 1:
+        std::cout << "wrong TX port - not possible to route selected TX channel"
+                  << std::endl;
+        break;
+    case 2:
+        std::cout << "wrong RX port - not possible to route selected RX channel"
+                  << std::endl;
+        break;
+    case 3:
+        std::cout << "TX+RX mode cannot be used when same TX and RX port is used"
+                  << std::endl;
+        break;
+    case 4:
+        std::cout << "wrong mode for the cellular channel" << std::endl;
+        break;
+    case 5:
+        std::cout << "cellular channels must be the same both for RX and TX" << std::endl;
+        break;
+    case 6:
+        std::cout << "requested channel code is wrong" << std::endl;
+        break;
+    default:
+        std::cout << "error code doesn't match" << std::endl;
+        break;
+    }
+}
+
+} // namespace limesdr
+} // namespace gr
diff --git a/lib/sink_impl.cc b/lib/sink_impl.cc
index 4fc7d34..d33ecf4 100755
--- a/lib/sink_impl.cc
+++ b/lib/sink_impl.cc
@@ -1,19 +1,19 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2019 Lime Microsystems.
+ * Copyright 2018 Lime Microsystems info@limemicro.com
  *
- * This is free software; you can redistribute it and/or modify
+ * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  *
- * This software is distributed in the hope that it will be useful,
+ * GNU Radio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING.  If not, write to
+ * along with GNU Radio; see the file COPYING.  If not, write to
  * the Free Software Foundation, Inc., 51 Franklin Street,
  * Boston, MA 02110-1301, USA.
  */
@@ -30,8 +30,7 @@ namespace limesdr {
 sink::sptr sink::make(std::string serial,
                       int channel_mode,
                       const std::string& filename,
-                      const std::string& length_tag_name)
-{
+                      const std::string& length_tag_name) {
     return gnuradio::get_initial_sptr(
         new sink_impl(serial, channel_mode, filename, length_tag_name));
 }
@@ -40,23 +39,22 @@ sink_impl::sink_impl(std::string serial,
                      int channel_mode,
                      const std::string& filename,
                      const std::string& length_tag_name)
-    : gr::sync_block(
-          "sink", args_to_io_signature(channel_mode), gr::io_signature::make(0, 0, 0))
-{
-    std::cout << "---------------------------------------------------------------"
-              << std::endl;
+    : gr::block(
+          "sink",
+          args_to_io_signature(
+              channel_mode), // Based on channel_mode SISO/MIMO use appropriate input signature
+          gr::io_signature::make(0, 0, 0)) {
+    std::cout << "---------------------------------------------------------------" << std::endl;
     std::cout << "LimeSuite Sink (TX) info" << std::endl;
     std::cout << std::endl;
 
-    LENGTH_TAG =
-        length_tag_name.empty() ? pmt::PMT_NIL : pmt::string_to_symbol(length_tag_name);
+    LENGTH_TAG = length_tag_name.empty() ? pmt::PMT_NIL : pmt::string_to_symbol(length_tag_name);
     // 1. Store private variables upon implementation to protect from changing them later
     stored.serial = serial;
     stored.channel_mode = channel_mode;
 
     if (stored.channel_mode < 0 && stored.channel_mode > 2) {
-        std::cout << "ERROR: sink_impl::sink_impl(): Channel must be A(1), B(2) or (A+B) "
-                     "MIMO(3)"
+        std::cout << "ERROR: sink_impl::sink_impl(): Channel must be A(1), B(2) or (A+B) MIMO(3)"
                   << std::endl;
         exit(0);
     }
@@ -65,8 +63,7 @@ sink_impl::sink_impl(std::string serial,
     stored.device_number = device_handler::getInstance().open_device(stored.serial);
     // 3. Check where to load settings from (file or block)
     if (!filename.empty()) {
-        device_handler::getInstance().settings_from_file(
-            stored.device_number, filename, pa_path);
+        device_handler::getInstance().settings_from_file(stored.device_number, filename, pa_path);
         device_handler::getInstance().check_blocks(
             stored.device_number, sink_block, stored.channel_mode, filename);
     } else {
@@ -83,8 +80,7 @@ sink_impl::sink_impl(std::string serial,
     }
 }
 
-sink_impl::~sink_impl()
-{
+sink_impl::~sink_impl() {
     // Stop and destroy stream for channel 0 (if channel_mode is SISO)
     if (stored.channel_mode < 2) {
         this->release_stream(stored.device_number, &streamId[stored.channel_mode]);
@@ -97,10 +93,8 @@ sink_impl::~sink_impl()
     device_handler::getInstance().close_device(stored.device_number, sink_block);
 }
 
-bool sink_impl::start(void)
-{
-    std::unique_lock<std::recursive_mutex> lock(
-        device_handler::getInstance().block_mutex);
+bool sink_impl::start(void) {
+    std::unique_lock<std::recursive_mutex> lock(device_handler::getInstance().block_mutex);
     // Init timestamp
     tx_meta.timestamp = 0;
 
@@ -124,15 +118,12 @@ bool sink_impl::start(void)
         LMS_StartStream(&streamId[LMS_CH_0]);
         LMS_StartStream(&streamId[LMS_CH_1]);
     }
-    std::unique_lock<std::recursive_mutex> unlock(
-        device_handler::getInstance().block_mutex);
+    std::unique_lock<std::recursive_mutex> unlock(device_handler::getInstance().block_mutex);
     return true;
 }
 
-bool sink_impl::stop(void)
-{
-    std::unique_lock<std::recursive_mutex> lock(
-        device_handler::getInstance().block_mutex);
+bool sink_impl::stop(void) {
+    std::unique_lock<std::recursive_mutex> lock(device_handler::getInstance().block_mutex);
     // Stop stream for channel 0 (if channel_mode is SISO)
     if (stored.channel_mode < 2) {
         this->release_stream(stored.device_number, &streamId[stored.channel_mode]);
@@ -144,15 +135,14 @@ bool sink_impl::stop(void)
     }
     // Disable PA path
     this->toggle_pa_path(stored.device_number, false);
-    std::unique_lock<std::recursive_mutex> unlock(
-        device_handler::getInstance().block_mutex);
+    std::unique_lock<std::recursive_mutex> unlock(device_handler::getInstance().block_mutex);
     return true;
 }
 
-int sink_impl::work(int noutput_items,
-                    gr_vector_const_void_star& input_items,
-                    gr_vector_void_star& output_items)
-{
+int sink_impl::general_work(int noutput_items,
+                            gr_vector_int& ninput_items,
+                            gr_vector_const_void_star& input_items,
+                            gr_vector_void_star& output_items) {
     // Init number of items to be sent and timestamps
     nitems_send = noutput_items;
     int current_sample = nitems_read(0);
@@ -192,10 +182,8 @@ int sink_impl::work(int noutput_items,
         if (stream_analyzer == true) {
             this->print_stream_stats(LMS_CH_0);
         }
-        ret[0] = LMS_SendStream(
-            &streamId[LMS_CH_0], input_items[0], nitems_send, &tx_meta, 100);
-        ret[1] = LMS_SendStream(
-            &streamId[LMS_CH_1], input_items[1], nitems_send, &tx_meta, 100);
+        ret[0] = LMS_SendStream(&streamId[LMS_CH_0], input_items[0], nitems_send, &tx_meta, 100);
+        ret[1] = LMS_SendStream(&streamId[LMS_CH_1], input_items[1], nitems_send, &tx_meta, 100);
         // Send data
         if (ret[0] < 0 || ret[1] < 0) {
             return 0;
@@ -207,8 +195,7 @@ int sink_impl::work(int noutput_items,
     }
     return 0;
 }
-void sink_impl::work_tags(int noutput_items)
-{
+void sink_impl::work_tags(int noutput_items) {
     std::vector<tag_t> tags;
     int current_sample = nitems_read(0);
     get_tags_in_range(tags, 0, current_sample, current_sample + noutput_items);
@@ -251,11 +238,9 @@ void sink_impl::work_tags(int noutput_items)
     }
 }
 // Print stream status
-void sink_impl::print_stream_stats(int channel)
-{
+void sink_impl::print_stream_stats(int channel) {
     t2 = std::chrono::high_resolution_clock::now();
-    auto timePeriod =
-        std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
+    auto timePeriod = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
     if (timePeriod >= 1000) {
         lms_stream_status_t status;
         LMS_GetStreamStatus(&streamId[channel], &status);
@@ -269,8 +254,7 @@ void sink_impl::print_stream_stats(int channel)
     }
 }
 // Setup stream
-void sink_impl::init_stream(int device_number, int channel)
-{
+void sink_impl::init_stream(int device_number, int channel) {
     streamId[channel].channel = channel;
     streamId[channel].fifoSize =
         (stored.FIFO_size == 0) ? (int)stored.samp_rate / 10 : stored.FIFO_size;
@@ -282,50 +266,42 @@ void sink_impl::init_stream(int device_number, int channel)
                         &streamId[channel]) != LMS_SUCCESS)
         device_handler::getInstance().error(device_number);
 
-    std::cout << "INFO: sink_impl::init_stream(): sink channel " << channel
-              << " (device nr. " << device_number << ") stream setup done." << std::endl;
+    std::cout << "INFO: sink_impl::init_stream(): sink channel " << channel << " (device nr. "
+              << device_number << ") stream setup done." << std::endl;
 }
 
-void sink_impl::release_stream(int device_number, lms_stream_t* stream)
-{
+void sink_impl::release_stream(int device_number, lms_stream_t* stream) {
     if (stream->handle != 0) {
         LMS_StopStream(stream);
-        LMS_DestroyStream(device_handler::getInstance().get_device(device_number),
-                          stream);
+        LMS_DestroyStream(device_handler::getInstance().get_device(device_number), stream);
     }
 }
 
 // Return io_signature to manage module input count
 // based on SISO (one input) and MIMO (two inputs) modes
-inline gr::io_signature::sptr sink_impl::args_to_io_signature(int channel_number)
-{
+inline gr::io_signature::sptr sink_impl::args_to_io_signature(int channel_number) {
     if (channel_number < 2) {
         return gr::io_signature::make(1, 1, sizeof(gr_complex));
     } else if (channel_number == 2) {
         return gr::io_signature::make(2, 2, sizeof(gr_complex));
     } else {
-        std::cout << "ERROR: sink_impl::args_to_io_signature(): channel_number must be "
-                     "0,1 or 2."
+        std::cout << "ERROR: sink_impl::args_to_io_signature(): channel_number must be 0,1 or 2."
                   << std::endl;
         exit(0);
     }
 }
 
-double sink_impl::set_center_freq(double freq, size_t chan)
-{
+double sink_impl::set_center_freq(double freq, size_t chan) {
     return device_handler::getInstance().set_rf_freq(
         stored.device_number, LMS_CH_TX, LMS_CH_0, freq);
 }
 
-void sink_impl::set_antenna(int antenna, int channel)
-{
+void sink_impl::set_antenna(int antenna, int channel) {
     pa_path[channel] = antenna;
-    device_handler::getInstance().set_antenna(
-        stored.device_number, channel, LMS_CH_TX, antenna);
+    device_handler::getInstance().set_antenna(stored.device_number, channel, LMS_CH_TX, antenna);
 }
 
-void sink_impl::toggle_pa_path(int device_number, bool enable)
-{
+void sink_impl::toggle_pa_path(int device_number, bool enable) {
     LMS_RegisterLogHandler([](int, const char*) {});
     if (stored.channel_mode < 2) {
         LMS_SetAntenna(device_handler::getInstance().get_device(device_number),
@@ -345,40 +321,32 @@ void sink_impl::toggle_pa_path(int device_number, bool enable)
     LMS_RegisterLogHandler(nullptr);
 }
 
-void sink_impl::set_nco(float nco_freq, int channel)
-{
-    device_handler::getInstance().set_nco(
-        stored.device_number, LMS_CH_TX, channel, nco_freq);
+void sink_impl::set_nco(float nco_freq, int channel) {
+    device_handler::getInstance().set_nco(stored.device_number, LMS_CH_TX, channel, nco_freq);
 }
 
-double sink_impl::set_bandwidth(double analog_bandw, int channel)
-{
+double sink_impl::set_bandwidth(double analog_bandw, int channel) {
     return device_handler::getInstance().set_analog_filter(
         stored.device_number, LMS_CH_TX, channel, analog_bandw);
 }
 
-void sink_impl::set_digital_filter(double digital_bandw, int channel)
-{
+void sink_impl::set_digital_filter(double digital_bandw, int channel) {
     device_handler::getInstance().set_digital_filter(
         stored.device_number, LMS_CH_TX, channel, digital_bandw);
 }
 
-unsigned sink_impl::set_gain(unsigned gain_dB, int channel)
-{
+unsigned sink_impl::set_gain(unsigned gain_dB, int channel) {
     return device_handler::getInstance().set_gain(
         stored.device_number, LMS_CH_TX, channel, gain_dB);
 }
-void sink_impl::calibrate(double bandw, int channel)
-{
+void sink_impl::calibrate(double bandw, int channel) {
     // PA path needs to be enabled for calibration
     this->toggle_pa_path(stored.device_number, true);
-    device_handler::getInstance().calibrate(
-        stored.device_number, LMS_CH_TX, channel, bandw);
+    device_handler::getInstance().calibrate(stored.device_number, LMS_CH_TX, channel, bandw);
     this->toggle_pa_path(stored.device_number, false);
 }
 
-double sink_impl::set_sample_rate(double rate)
-{
+double sink_impl::set_sample_rate(double rate) {
     device_handler::getInstance().set_samp_rate(stored.device_number, rate);
     stored.samp_rate = rate;
     return rate;
@@ -386,13 +354,11 @@ double sink_impl::set_sample_rate(double rate)
 
 void sink_impl::set_buffer_size(uint32_t size) { stored.FIFO_size = size; }
 
-void sink_impl::set_oversampling(int oversample)
-{
+void sink_impl::set_oversampling(int oversample) {
     device_handler::getInstance().set_oversampling(stored.device_number, oversample);
 }
 
-void sink_impl::set_tcxo_dac(uint16_t dacVal)
-{
+void sink_impl::set_tcxo_dac(uint16_t dacVal) {
     device_handler::getInstance().set_tcxo_dac(stored.device_number, dacVal);
 }
 
diff --git a/lib/sink_impl.h b/lib/sink_impl.h
index 890a89a..5a88135 100755
--- a/lib/sink_impl.h
+++ b/lib/sink_impl.h
@@ -1,19 +1,19 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2019 Lime Microsystems.
+ * Copyright 2018 Lime Microsystems info@limemicro.com
  *
- * This is free software; you can redistribute it and/or modify
+ * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  *
- * This software is distributed in the hope that it will be useful,
+ * GNU Radio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING.  If not, write to
+ * along with GNU Radio; see the file COPYING.  If not, write to
  * the Free Software Foundation, Inc., 51 Franklin Street,
  * Boston, MA 02110-1301, USA.
  */
@@ -21,7 +21,7 @@
 #ifndef INCLUDED_LIMESDR_SINK_IMPL_H
 #define INCLUDED_LIMESDR_SINK_IMPL_H
 
-#include "device_handler.h"
+#include "common/device_handler.h"
 #include <limesdr/sink.h>
 
 
@@ -29,9 +29,8 @@ static const pmt::pmt_t TIME_TAG = pmt::string_to_symbol("tx_time");
 
 namespace gr {
 namespace limesdr {
-class sink_impl : public sink
-{
-private:
+class sink_impl : public sink {
+    private:
     lms_stream_t streamId[2];
 
     bool stream_analyzer = false;
@@ -42,8 +41,8 @@ private:
     lms_stream_meta_t tx_meta;
     long burst_length = 0;
     int nitems_send = 0;
-    int ret[2] = { 0 };
-    int pa_path[2] = { 0 }; // TX PA path NONE
+    int ret[2] = {0};
+    int pa_path[2] = {0}; // TX PA path NONE
 
     struct constant_data {
         std::string serial;
@@ -59,16 +58,17 @@ private:
 
     void print_stream_stats(int channel);
 
-public:
+    public:
     sink_impl(std::string serial,
               int channel_mode,
               const std::string& filename,
               const std::string& length_tag_name);
     ~sink_impl();
 
-    int work(int noutput_items,
-             gr_vector_const_void_star& input_items,
-             gr_vector_void_star& output_items);
+    int general_work(int noutput_items,
+                     gr_vector_int& ninput_items,
+                     gr_vector_const_void_star& input_items,
+                     gr_vector_void_star& output_items);
 
     bool start(void);
 
@@ -80,7 +80,7 @@ public:
     void release_stream(int device_number, lms_stream_t* stream);
 
     double set_center_freq(double freq, size_t chan = 0);
-
+    
     void set_antenna(int antenna, int channel = 0);
     void toggle_pa_path(int device_number, bool enable);
 
@@ -99,7 +99,7 @@ public:
     void set_buffer_size(uint32_t size);
 
     void calibrate(double bandw, int channel = 0);
-
+    
     void set_tcxo_dac(uint16_t dacVal = 125);
 };
 } // namespace limesdr
diff --git a/lib/source_impl.cc b/lib/source_impl.cc
old mode 100644
new mode 100755
index a756d15..8650f36
--- a/lib/source_impl.cc
+++ b/lib/source_impl.cc
@@ -1,19 +1,19 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2019 Lime Microsystems.
+ * Copyright 2018 Lime Microsystems info@limemicro.com
  *
- * This is free software; you can redistribute it and/or modify
+ * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  *
- * This software is distributed in the hope that it will be useful,
+ * GNU Radio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING.  If not, write to
+ * along with GNU Radio; see the file COPYING.  If not, write to
  * the Free Software Foundation, Inc., 51 Franklin Street,
  * Boston, MA 02110-1301, USA.
  */
@@ -27,39 +27,27 @@
 
 namespace gr {
 namespace limesdr {
-
-source::sptr
-source::make(std::string serial, int channel_mode, const std::string& filename)
-{
+source::sptr source::make(std::string serial, int channel_mode, const std::string& filename) {
     return gnuradio::get_initial_sptr(new source_impl(serial, channel_mode, filename));
 }
 
-/*
- * The private constructor
- */
-// gr::sync_block("source", gr::io_signature::make(0, 0, 0), gr::io_signature::make(1, 1,
-// sizeof(gr_complex)))
-
-source_impl::source_impl(std::string serial,
-                         int channel_mode,
-                         const std::string& filename)
-    : gr::sync_block(
-          "source", gr::io_signature::make(0, 0, 0), args_to_io_signature(channel_mode))
-{
-    std::cout << "---------------------------------------------------------------"
-              << std::endl;
+source_impl::source_impl(std::string serial, int channel_mode, const std::string& filename)
+    : gr::block("source",
+                gr::io_signature::make(
+                    0, 0, 0), // Based on channel_mode SISO/MIMO use appropriate output signature
+                args_to_io_signature(channel_mode)) {
+    std::cout << "---------------------------------------------------------------" << std::endl;
     std::cout << "LimeSuite Source (RX) info" << std::endl;
     std::cout << std::endl;
 
-    // 1. Store private variables upon implementation to protect from changing
-    // them later
+    // 1. Store private variables upon implementation to protect from changing them later
     stored.serial = serial;
     stored.channel_mode = channel_mode;
 
     if (stored.channel_mode < 0 && stored.channel_mode > 2) {
-        std::cout << "ERROR: source_impl::source_impl(): Channel must be A(0), "
-                     "B(1) or (A+B) MIMO(2)"
-                  << std::endl;
+        std::cout
+            << "ERROR: source_impl::source_impl(): Channel must be A(0), B(1) or (A+B) MIMO(2)"
+            << std::endl;
         exit(0);
     }
 
@@ -67,8 +55,7 @@ source_impl::source_impl(std::string serial,
     stored.device_number = device_handler::getInstance().open_device(stored.serial);
     // 3. Check where to load settings from (file or block)
     if (!filename.empty()) {
-        device_handler::getInstance().settings_from_file(
-            stored.device_number, filename, nullptr);
+        device_handler::getInstance().settings_from_file(stored.device_number, filename, nullptr);
         device_handler::getInstance().check_blocks(
             stored.device_number, source_block, stored.channel_mode, filename);
     } else {
@@ -82,11 +69,7 @@ source_impl::source_impl(std::string serial,
     }
 }
 
-/*
- * Our virtual destructor.
- */
-source_impl::~source_impl()
-{
+source_impl::~source_impl() {
     // Stop and destroy stream for channel 0 (if channel_mode is SISO)
     if (stored.channel_mode < 2) {
         this->release_stream(stored.device_number, &streamId[stored.channel_mode]);
@@ -99,10 +82,8 @@ source_impl::~source_impl()
     device_handler::getInstance().close_device(stored.device_number, source_block);
 }
 
-bool source_impl::start(void)
-{
-    std::unique_lock<std::recursive_mutex> lock(
-        device_handler::getInstance().block_mutex);
+bool source_impl::start(void) {
+    std::unique_lock<std::recursive_mutex> lock(device_handler::getInstance().block_mutex);
     // Initialize and start stream for channel 0 (if channel_mode is SISO)
     if (stored.channel_mode < 2) // If SISO configure prefered channel
     {
@@ -122,8 +103,7 @@ bool source_impl::start(void)
         if (LMS_StartStream(&streamId[LMS_CH_1]) != LMS_SUCCESS)
             device_handler::getInstance().error(stored.device_number);
     }
-    std::unique_lock<std::recursive_mutex> unlock(
-        device_handler::getInstance().block_mutex);
+    std::unique_lock<std::recursive_mutex> unlock(device_handler::getInstance().block_mutex);
 
     if (stream_analyzer) {
         t1 = std::chrono::high_resolution_clock::now();
@@ -135,10 +115,8 @@ bool source_impl::start(void)
     return true;
 }
 
-bool source_impl::stop(void)
-{
-    std::unique_lock<std::recursive_mutex> lock(
-        device_handler::getInstance().block_mutex);
+bool source_impl::stop(void) {
+    std::unique_lock<std::recursive_mutex> lock(device_handler::getInstance().block_mutex);
     // Stop stream for channel 0 (if channel_mode is SISO)
     if (stored.channel_mode < 2) {
         this->release_stream(stored.device_number, &streamId[stored.channel_mode]);
@@ -148,27 +126,21 @@ bool source_impl::stop(void)
         this->release_stream(stored.device_number, &streamId[LMS_CH_0]);
         this->release_stream(stored.device_number, &streamId[LMS_CH_1]);
     }
-    std::unique_lock<std::recursive_mutex> unlock(
-        device_handler::getInstance().block_mutex);
+    std::unique_lock<std::recursive_mutex> unlock(device_handler::getInstance().block_mutex);
     return true;
 }
 
-int source_impl::work(int noutput_items,
-                      gr_vector_const_void_star& input_items,
-                      gr_vector_void_star& output_items)
-{
-    gr_complex* out = (gr_complex*)output_items[0];
-
+int source_impl::general_work(int noutput_items,
+                              gr_vector_int& ninput_items,
+                              gr_vector_const_void_star& input_items,
+                              gr_vector_void_star& output_items) {
     // Receive stream for channel 0 (if channel_mode is SISO)
     if (stored.channel_mode < 2) {
         lms_stream_status_t status;
         lms_stream_meta_t rx_metadata;
 
-        int ret0 = LMS_RecvStream(&streamId[stored.channel_mode],
-                                  output_items[0],
-                                  noutput_items,
-                                  &rx_metadata,
-                                  100);
+        int ret0 = LMS_RecvStream(
+            &streamId[stored.channel_mode], output_items[0], noutput_items, &rx_metadata, 100);
         if (ret0 < 0) {
             return 0;
         }
@@ -205,9 +177,8 @@ int source_impl::work(int noutput_items,
         LMS_GetStreamStatus(&streamId[LMS_CH_1], &status[1]);
 
         if (add_tag || status[0].droppedPackets > 0 || status[1].droppedPackets > 0) {
-            pktLoss +=
-                status[0].droppedPackets; // because every time GetStreamStatus is called,
-            // packet loss is reset
+            pktLoss += status[0].droppedPackets; // because every time GetStreamStatus is called,
+                                                 // packet loss is reset
             add_tag = false;
             this->add_time_tag(LMS_CH_0, rx_metadata[0]);
             this->add_time_tag(LMS_CH_1, rx_metadata[1]);
@@ -226,8 +197,7 @@ int source_impl::work(int noutput_items,
 }
 
 // Setup stream
-void source_impl::init_stream(int device_number, int channel)
-{
+void source_impl::init_stream(int device_number, int channel) {
     streamId[channel].channel = channel;
     streamId[channel].fifoSize =
         (stored.FIFO_size == 0) ? (int)stored.samp_rate / 10 : stored.FIFO_size;
@@ -239,25 +209,21 @@ void source_impl::init_stream(int device_number, int channel)
                         &streamId[channel]) != LMS_SUCCESS)
         device_handler::getInstance().error(stored.device_number);
 
-    std::cout << "INFO: source_impl::init_stream(): source channel " << channel
-              << " (device nr. " << device_number << ") stream setup done." << std::endl;
+    std::cout << "INFO: source_impl::init_stream(): source channel " << channel << " (device nr. "
+              << device_number << ") stream setup done." << std::endl;
 }
 
-void source_impl::release_stream(int device_number, lms_stream_t* stream)
-{
+void source_impl::release_stream(int device_number, lms_stream_t* stream) {
     if (stream->handle != 0) {
         LMS_StopStream(stream);
-        LMS_DestroyStream(device_handler::getInstance().get_device(device_number),
-                          stream);
+        LMS_DestroyStream(device_handler::getInstance().get_device(device_number), stream);
     }
 }
 
 // Print stream status
-void source_impl::print_stream_stats(lms_stream_status_t status)
-{
+void source_impl::print_stream_stats(lms_stream_status_t status) {
     t2 = std::chrono::high_resolution_clock::now();
-    auto timePeriod =
-        std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
+    auto timePeriod = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
     if (timePeriod >= 1000) {
         std::cout << std::endl;
         std::cout << "RX";
@@ -271,85 +237,67 @@ void source_impl::print_stream_stats(lms_stream_status_t status)
 }
 
 // Add rx_time tag to stream
-void source_impl::add_time_tag(int channel, lms_stream_meta_t meta)
-{
+void source_impl::add_time_tag(int channel, lms_stream_meta_t meta) {
 
     uint64_t u_rate = (uint64_t)stored.samp_rate;
     double f_rate = stored.samp_rate - u_rate;
     uint64_t intpart = meta.timestamp / u_rate;
-    double fracpart =
-        (meta.timestamp - intpart * u_rate - intpart * f_rate) / stored.samp_rate;
+    double fracpart = (meta.timestamp - intpart * u_rate - intpart * f_rate) / stored.samp_rate;
 
     const pmt::pmt_t ID = pmt::string_to_symbol(stored.serial);
-    const pmt::pmt_t t_val =
-        pmt::make_tuple(pmt::from_uint64(intpart), pmt::from_double(fracpart));
+    const pmt::pmt_t t_val = pmt::make_tuple(pmt::from_uint64(intpart), pmt::from_double(fracpart));
     this->add_item_tag(channel, nitems_written(channel), TIME_TAG, t_val, ID);
 }
-
 // Return io_signature to manage module output count
 // based on SISO (one output) and MIMO (two outputs) modes
-inline gr::io_signature::sptr source_impl::args_to_io_signature(int channel_number)
-{
+inline gr::io_signature::sptr source_impl::args_to_io_signature(int channel_number) {
     if (channel_number < 2) {
         return gr::io_signature::make(1, 1, sizeof(gr_complex));
     } else if (channel_number == 2) {
         return gr::io_signature::make(2, 2, sizeof(gr_complex));
     } else {
-        std::cout << "ERROR: source_impl::args_to_io_signature(): channel_number "
-                     "must be 0,1 or 2."
+        std::cout << "ERROR: source_impl::args_to_io_signature(): channel_number must be 0,1 or 2."
                   << std::endl;
         exit(0);
     }
 }
-
-double source_impl::set_center_freq(double freq, size_t chan)
-{
+double source_impl::set_center_freq(double freq, size_t chan) {
     add_tag = true;
     return device_handler::getInstance().set_rf_freq(
         stored.device_number, LMS_CH_RX, LMS_CH_0, freq);
 }
 
-void source_impl::set_nco(float nco_freq, int channel)
-{
-    device_handler::getInstance().set_nco(
-        stored.device_number, LMS_CH_RX, channel, nco_freq);
+void source_impl::set_nco(float nco_freq, int channel) {
+    device_handler::getInstance().set_nco(stored.device_number, LMS_CH_RX, channel, nco_freq);
     add_tag = true;
 }
 
-void source_impl::set_antenna(int antenna, int channel)
-{
-    device_handler::getInstance().set_antenna(
-        stored.device_number, channel, LMS_CH_RX, antenna);
+void source_impl::set_antenna(int antenna, int channel) {
+    device_handler::getInstance().set_antenna(stored.device_number, channel, LMS_CH_RX, antenna);
 }
 
-double source_impl::set_bandwidth(double analog_bandw, int channel)
-{
+double source_impl::set_bandwidth(double analog_bandw, int channel) {
     add_tag = true;
     return device_handler::getInstance().set_analog_filter(
         stored.device_number, LMS_CH_RX, channel, analog_bandw);
 }
 
-void source_impl::set_digital_filter(double digital_bandw, int channel)
-{
+void source_impl::set_digital_filter(double digital_bandw, int channel) {
     device_handler::getInstance().set_digital_filter(
         stored.device_number, LMS_CH_RX, channel, digital_bandw);
     add_tag = true;
 }
 
-unsigned source_impl::set_gain(unsigned gain_dB, int channel)
-{
+unsigned source_impl::set_gain(unsigned gain_dB, int channel) {
     return device_handler::getInstance().set_gain(
         stored.device_number, LMS_CH_RX, channel, gain_dB);
 }
 
-void source_impl::calibrate(double bandw, int channel)
-{
-    device_handler::getInstance().calibrate(
-        stored.device_number, LMS_CH_RX, channel, bandw);
+void source_impl::calibrate(double bandw, int channel) {
+    device_handler::getInstance().calibrate(stored.device_number, LMS_CH_RX, channel, bandw);
 }
 
-double source_impl::set_sample_rate(double rate)
-{
+double source_impl::set_sample_rate(double rate) {
     device_handler::getInstance().set_samp_rate(stored.device_number, rate);
     stored.samp_rate = rate;
     return rate;
@@ -357,15 +305,13 @@ double source_impl::set_sample_rate(double rate)
 
 void source_impl::set_buffer_size(uint32_t size) { stored.FIFO_size = size; }
 
-void source_impl::set_oversampling(int oversample)
-{
+void source_impl::set_oversampling(int oversample) {
     device_handler::getInstance().set_oversampling(stored.device_number, oversample);
 }
 
-void source_impl::set_tcxo_dac(uint16_t dacVal)
-{
+void source_impl::set_tcxo_dac(uint16_t dacVal) {
     device_handler::getInstance().set_tcxo_dac(stored.device_number, dacVal);
 }
 
-} /* namespace limesdr */
-} /* namespace gr */
+} // namespace limesdr
+} // namespace gr
diff --git a/lib/source_impl.h b/lib/source_impl.h
old mode 100644
new mode 100755
index 7d1bfc3..ccd4921
--- a/lib/source_impl.h
+++ b/lib/source_impl.h
@@ -1,19 +1,19 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2019 Lime Microsystems <info@limemicro.com>
+ * Copyright 2018 Lime Microsystems info@limemicro.com
  *
- * This is free software; you can redistribute it and/or modify
+ * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  *
- * This software is distributed in the hope that it will be useful,
+ * GNU Radio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING.  If not, write to
+ * along with GNU Radio; see the file COPYING.  If not, write to
  * the Free Software Foundation, Inc., 51 Franklin Street,
  * Boston, MA 02110-1301, USA.
  */
@@ -21,18 +21,16 @@
 #ifndef INCLUDED_LIMESDR_SOURCE_IMPL_H
 #define INCLUDED_LIMESDR_SOURCE_IMPL_H
 
+#include "common/device_handler.h"
 #include <limesdr/source.h>
 
-#include "device_handler.h"
 
 static const pmt::pmt_t TIME_TAG = pmt::string_to_symbol("rx_time");
 
 namespace gr {
 namespace limesdr {
-
-class source_impl : public source
-{
-private:
+class source_impl : public source {
+    private:
     lms_stream_t streamId[2];
 
     bool stream_analyzer = false;
@@ -56,23 +54,23 @@ private:
 
     void add_time_tag(int channel, lms_stream_meta_t meta);
 
-public:
+    public:
     source_impl(std::string serial, int channel_mode, const std::string& filename);
     ~source_impl();
 
+    int general_work(int noutput_items,
+                     gr_vector_int& ninput_items,
+                     gr_vector_const_void_star& input_items,
+                     gr_vector_void_star& output_items);
+
     bool start(void);
 
     bool stop(void);
 
-    // Where all the action really happens
-    int work(int noutput_items,
-             gr_vector_const_void_star& input_items,
-             gr_vector_void_star& output_items);
-
     inline gr::io_signature::sptr args_to_io_signature(int channel_mode);
 
     void init_stream(int device_number, int channel);
-    void release_stream(int device_number, lms_stream_t* stream);
+    void release_stream(int device_number, lms_stream_t *stream);
 
     double set_center_freq(double freq, size_t chan = 0);
 
@@ -93,11 +91,10 @@ public:
     void set_buffer_size(uint32_t size);
 
     void calibrate(double bandw, int channel = 0);
-
+    
     void set_tcxo_dac(uint16_t dacVal = 125);
 };
-
 } // namespace limesdr
 } // namespace gr
 
-#endif /* INCLUDED_LIMESDR_SOURCE_IMPL_H */
+#endif
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 3fc8d46..7a00d10 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -3,20 +3,8 @@
 # This file was generated by gr_modtool, a tool from the GNU Radio framework
 # This file is a part of gr-limesdr
 #
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
 
 ########################################################################
 # Include python install macros
@@ -26,6 +14,8 @@ if(NOT PYTHONINTERP_FOUND)
     return()
 endif()
 
+add_subdirectory(bindings)
+
 ########################################################################
 # Install python sources
 ########################################################################
@@ -41,5 +31,3 @@ GR_PYTHON_INSTALL(
 include(GrTest)
 
 set(GR_TEST_TARGET_DEPS gnuradio-limesdr)
-set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig)
-GR_ADD_TEST(qa_source ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_source.py)
diff --git a/python/__init__.py b/python/__init__.py
index caf39b9..6c22ce0 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -1,19 +1,7 @@
 #
 # Copyright 2008,2009 Free Software Foundation, Inc.
 #
-# This application is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This application is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
 
 # The presence of this file turns this directory into a Python package
@@ -22,13 +10,13 @@
 This is the GNU Radio LIMESDR module. Place your Python package
 description here (python/__init__.py).
 '''
-from __future__ import unicode_literals
+import os
 
-# import swig generated symbols into the limesdr namespace
+# import pybind11 generated symbols into the limesdr namespace
 try:
     # this might fail if the module is python-only
-    from .limesdr_swig import *
-except ImportError:
+    from .limesdr_python import *
+except ModuleNotFoundError:
     pass
 
 # import any pure python here
diff --git a/python/bindings/CMakeLists.txt b/python/bindings/CMakeLists.txt
new file mode 100644
index 0000000..218be96
--- /dev/null
+++ b/python/bindings/CMakeLists.txt
@@ -0,0 +1,46 @@
+# Copyright 2020 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+
+########################################################################
+# Check if there is C++ code at all
+########################################################################
+if(NOT limesdr_sources)
+    MESSAGE(STATUS "No C++ sources... skipping python bindings")
+    return()
+endif(NOT limesdr_sources)
+
+########################################################################
+# Check for pygccxml
+########################################################################
+GR_PYTHON_CHECK_MODULE_RAW(
+    "pygccxml"
+    "import pygccxml"
+    PYGCCXML_FOUND
+    )
+
+include(GrPybind)
+
+########################################################################
+# Python Bindings
+########################################################################
+
+list(APPEND limesdr_python_files
+    sink_python.cc
+    source_python.cc
+    python_bindings.cc)
+
+if(ENABLE_RFE)
+    list(APPEND limesdr_python_files rfe_python.cc)
+    add_compile_definitions(ENABLE_RFE)
+endif()
+
+GR_PYBIND_MAKE_OOT(limesdr
+   ../..
+   gr::limesdr
+   "${limesdr_python_files}")
+
+install(TARGETS limesdr_python DESTINATION ${GR_PYTHON_DIR}/limesdr COMPONENT pythonapi)
diff --git a/python/bindings/README.md b/python/bindings/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/python/bindings/bind_oot_file.py b/python/bindings/bind_oot_file.py
new file mode 100644
index 0000000..91719f7
--- /dev/null
+++ b/python/bindings/bind_oot_file.py
@@ -0,0 +1,57 @@
+import warnings
+import argparse
+import os
+from gnuradio.bindtool import BindingGenerator
+import pathlib
+import sys
+
+parser = argparse.ArgumentParser(description='Bind a GR Out of Tree Block')
+parser.add_argument('--module', type=str,
+                    help='Name of gr module containing file to bind (e.g. fft digital analog)')
+
+parser.add_argument('--output_dir', default='/tmp',
+                    help='Output directory of generated bindings')
+parser.add_argument('--prefix', help='Prefix of Installed GNU Radio')
+parser.add_argument('--src', help='Directory of gnuradio source tree',
+                    default=os.path.dirname(os.path.abspath(__file__))+'/../../..')
+
+parser.add_argument(
+    '--filename', help="File to be parsed")
+
+parser.add_argument(
+    '--defines', help='Set additional defines for precompiler',default=(), nargs='*')
+parser.add_argument(
+    '--include', help='Additional Include Dirs, separated', default=(), nargs='*')
+
+parser.add_argument(
+    '--status', help='Location of output file for general status (used during cmake)', default=None
+)
+parser.add_argument(
+    '--flag_automatic', default='0'
+)
+parser.add_argument(
+    '--flag_pygccxml', default='0'
+)
+
+args = parser.parse_args()
+
+prefix = args.prefix
+output_dir = args.output_dir
+defines = tuple(','.join(args.defines).split(','))
+includes = ','.join(args.include)
+name = args.module
+
+namespace = ['gr', name]
+prefix_include_root = name
+
+
+with warnings.catch_warnings():
+    warnings.filterwarnings("ignore", category=DeprecationWarning)
+
+    bg = BindingGenerator(prefix, namespace,
+                          prefix_include_root, output_dir, define_symbols=defines, addl_includes=includes,
+                          catch_exceptions=False, write_json_output=False, status_output=args.status,
+                          flag_automatic=True if args.flag_automatic.lower() in [
+                              '1', 'true'] else False,
+                          flag_pygccxml=True if args.flag_pygccxml.lower() in ['1', 'true'] else False)
+    bg.gen_file_binding(args.filename)
diff --git a/python/bindings/docstrings/README.md b/python/bindings/docstrings/README.md
new file mode 100644
index 0000000..295455a
--- /dev/null
+++ b/python/bindings/docstrings/README.md
@@ -0,0 +1 @@
+This directory stores templates for docstrings that are scraped from the include header files for each block
\ No newline at end of file
diff --git a/python/bindings/docstrings/rfe_pydoc_template.h b/python/bindings/docstrings/rfe_pydoc_template.h
new file mode 100644
index 0000000..239a87a
--- /dev/null
+++ b/python/bindings/docstrings/rfe_pydoc_template.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2021 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr,limesdr, __VA_ARGS__ )
+/*
+  This file contains placeholders for docstrings for the Python bindings.
+  Do not edit! These were automatically extracted during the binding process
+  and will be overwritten during the build process
+ */
+
+
+ 
+ static const char *__doc_gr_limesdr_rfe = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_rfe_rfe_0 = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_rfe_rfe_1 = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_rfe_change_mode = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_rfe_set_fan = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_rfe_set_attenuation = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_rfe_set_notch = R"doc()doc";
+
+  
diff --git a/python/bindings/docstrings/sink_pydoc_template.h b/python/bindings/docstrings/sink_pydoc_template.h
new file mode 100644
index 0000000..4a1ecac
--- /dev/null
+++ b/python/bindings/docstrings/sink_pydoc_template.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2021 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr,limesdr, __VA_ARGS__ )
+/*
+  This file contains placeholders for docstrings for the Python bindings.
+  Do not edit! These were automatically extracted during the binding process
+  and will be overwritten during the build process
+ */
+
+
+ 
+ static const char *__doc_gr_limesdr_sink = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_sink_0 = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_sink_1 = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_make = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_center_freq = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_antenna = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_nco = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_bandwidth = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_digital_filter = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_gain = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_sample_rate = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_oversampling = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_calibrate = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_buffer_size = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_sink_set_tcxo_dac = R"doc()doc";
+
+  
diff --git a/python/bindings/docstrings/source_pydoc_template.h b/python/bindings/docstrings/source_pydoc_template.h
new file mode 100644
index 0000000..c105b3d
--- /dev/null
+++ b/python/bindings/docstrings/source_pydoc_template.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2021 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr,limesdr, __VA_ARGS__ )
+/*
+  This file contains placeholders for docstrings for the Python bindings.
+  Do not edit! These were automatically extracted during the binding process
+  and will be overwritten during the build process
+ */
+
+
+ 
+ static const char *__doc_gr_limesdr_source = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_source_0 = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_source_1 = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_make = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_center_freq = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_antenna = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_nco = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_bandwidth = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_digital_filter = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_gain = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_sample_rate = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_oversampling = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_calibrate = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_buffer_size = R"doc()doc";
+
+
+ static const char *__doc_gr_limesdr_source_set_tcxo_dac = R"doc()doc";
+
+  
diff --git a/python/bindings/header_utils.py b/python/bindings/header_utils.py
new file mode 100644
index 0000000..165124e
--- /dev/null
+++ b/python/bindings/header_utils.py
@@ -0,0 +1,78 @@
+# Utilities for reading values in header files
+
+from argparse import ArgumentParser
+import re
+
+
+class PybindHeaderParser:
+    def __init__(self, pathname):
+        with open(pathname,'r') as f:
+            self.file_txt = f.read()
+
+    def get_flag_automatic(self):
+        # p = re.compile(r'BINDTOOL_GEN_AUTOMATIC\(([^\s])\)')
+        # m = p.search(self.file_txt)
+        m = re.search(r'BINDTOOL_GEN_AUTOMATIC\(([^\s])\)', self.file_txt)
+        if (m and m.group(1) == '1'):
+            return True
+        else:
+            return False
+        
+    def get_flag_pygccxml(self):    
+        # p = re.compile(r'BINDTOOL_USE_PYGCCXML\(([^\s])\)')
+        # m = p.search(self.file_txt)
+        m = re.search(r'BINDTOOL_USE_PYGCCXML\(([^\s])\)', self.file_txt)
+        if (m and m.group(1) == '1'):
+            return True
+        else:
+            return False
+
+    def get_header_filename(self):
+        # p = re.compile(r'BINDTOOL_HEADER_FILE\(([^\s]*)\)')
+        # m = p.search(self.file_txt)
+        m = re.search(r'BINDTOOL_HEADER_FILE\(([^\s]*)\)', self.file_txt)
+        if (m):
+            return m.group(1)
+        else:
+            return None
+
+    def get_header_file_hash(self):
+        # p = re.compile(r'BINDTOOL_HEADER_FILE_HASH\(([^\s]*)\)')
+        # m = p.search(self.file_txt)
+        m = re.search(r'BINDTOOL_HEADER_FILE_HASH\(([^\s]*)\)', self.file_txt)
+        if (m):
+            return m.group(1)
+        else:
+            return None
+
+    def get_flags(self):
+        return f'{self.get_flag_automatic()};{self.get_flag_pygccxml()};{self.get_header_filename()};{self.get_header_file_hash()};'
+
+
+
+def argParse():
+    """Parses commandline args."""
+    desc='Reads the parameters from the comment block in the pybind files'
+    parser = ArgumentParser(description=desc)
+    
+    parser.add_argument("function", help="Operation to perform on comment block of pybind file", choices=["flag_auto","flag_pygccxml","header_filename","header_file_hash","all"])
+    parser.add_argument("pathname", help="Pathname of pybind c++ file to read, e.g. blockname_python.cc")
+
+    return parser.parse_args()
+
+if __name__ == "__main__":
+    # Parse command line options and set up doxyxml.
+    args = argParse()
+
+    pbhp = PybindHeaderParser(args.pathname)
+
+    if args.function == "flag_auto":
+        print(pbhp.get_flag_automatic())
+    elif args.function == "flag_pygccxml":
+        print(pbhp.get_flag_pygccxml())
+    elif args.function == "header_filename":
+        print(pbhp.get_header_filename())
+    elif args.function == "header_file_hash":
+        print(pbhp.get_header_file_hash()) 
+    elif args.function == "all":
+        print(pbhp.get_flags())
\ No newline at end of file
diff --git a/python/bindings/python_bindings.cc b/python/bindings/python_bindings.cc
new file mode 100644
index 0000000..e7ad9ad
--- /dev/null
+++ b/python/bindings/python_bindings.cc
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+#include <pybind11/pybind11.h>
+
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
+#include <numpy/arrayobject.h>
+
+namespace py = pybind11;
+
+// Headers for binding functions
+/**************************************/
+// The following comment block is used for
+// gr_modtool to insert function prototypes
+// Please do not delete
+/**************************************/
+// BINDING_FUNCTION_PROTOTYPES(
+    void bind_sink(py::module& m);
+    void bind_source(py::module& m);
+#ifdef ENABLE_RFE
+    void bind_rfe(py::module& m);
+#endif
+// ) END BINDING_FUNCTION_PROTOTYPES
+
+
+// We need this hack because import_array() returns NULL
+// for newer Python versions.
+// This function is also necessary because it ensures access to the C API
+// and removes a warning.
+void* init_numpy()
+{
+    import_array();
+    return NULL;
+}
+
+PYBIND11_MODULE(limesdr_python, m)
+{
+    // Initialize the numpy C API
+    // (otherwise we will see segmentation faults)
+    init_numpy();
+
+    // Allow access to base block methods
+    py::module::import("gnuradio.gr");
+
+    /**************************************/
+    // The following comment block is used for
+    // gr_modtool to insert binding function calls
+    // Please do not delete
+    /**************************************/
+    // BINDING_FUNCTION_CALLS(
+        bind_sink(m);
+        bind_source(m);
+#ifdef ENABLE_RFE
+        bind_rfe(m);
+#endif
+    // ) END BINDING_FUNCTION_CALLS
+}
\ No newline at end of file
diff --git a/python/bindings/rfe_python.cc b/python/bindings/rfe_python.cc
new file mode 100644
index 0000000..6b9945d
--- /dev/null
+++ b/python/bindings/rfe_python.cc
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2021 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/***********************************************************************************/
+/* This file is automatically generated using bindtool and can be manually edited  */
+/* The following lines can be configured to regenerate this file during cmake      */
+/* If manual edits are made, the following tags should be modified accordingly.    */
+/* BINDTOOL_GEN_AUTOMATIC(0)                                                       */
+/* BINDTOOL_USE_PYGCCXML(0)                                                        */
+/* BINDTOOL_HEADER_FILE(rfe.h)                                        */
+/* BINDTOOL_HEADER_FILE_HASH(f9a316bfe452c1b3fe6c6ba827ced967)                     */
+/***********************************************************************************/
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <limesdr/rfe.h>
+// pydoc.h is automatically generated in the build directory
+#include <rfe_pydoc.h>
+
+void bind_rfe(py::module& m)
+{
+
+    using rfe    = ::gr::limesdr::rfe;
+
+
+    py::class_<rfe,
+        std::shared_ptr<rfe>>(m, "rfe", D(rfe))
+
+        .def(py::init<int,std::string,std::string,char,char,char,char,char,char,char>(),           py::arg("comm_type"),
+           py::arg("device"),
+           py::arg("config_file"),
+           py::arg("IDRX"),
+           py::arg("IDTX"),
+           py::arg("PortRX"),
+           py::arg("PortTX"),
+           py::arg("Mode"),
+           py::arg("Notch"),
+           py::arg("Atten"),
+           D(rfe,rfe,0)
+        )
+        .def(py::init<gr::limesdr::rfe const &>(),           py::arg("arg0"),
+           D(rfe,rfe,1)
+        )
+
+
+        
+        .def("change_mode",&rfe::change_mode,       
+            py::arg("mode"),
+            D(rfe,change_mode)
+        )
+
+
+        
+        .def("set_fan",&rfe::set_fan,       
+            py::arg("enable"),
+            D(rfe,set_fan)
+        )
+
+
+        
+        .def("set_attenuation",&rfe::set_attenuation,       
+            py::arg("attenuation"),
+            D(rfe,set_attenuation)
+        )
+
+
+        
+        .def("set_notch",&rfe::set_notch,       
+            py::arg("enable"),
+            D(rfe,set_notch)
+        )
+
+        ;
+
+
+
+
+}
+
+
+
+
+
+
+
+
diff --git a/python/bindings/sink_python.cc b/python/bindings/sink_python.cc
new file mode 100644
index 0000000..f624d7a
--- /dev/null
+++ b/python/bindings/sink_python.cc
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2021 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/***********************************************************************************/
+/* This file is automatically generated using bindtool and can be manually edited  */
+/* The following lines can be configured to regenerate this file during cmake      */
+/* If manual edits are made, the following tags should be modified accordingly.    */
+/* BINDTOOL_GEN_AUTOMATIC(0)                                                       */
+/* BINDTOOL_USE_PYGCCXML(0)                                                        */
+/* BINDTOOL_HEADER_FILE(sink.h)                                        */
+/* BINDTOOL_HEADER_FILE_HASH(86de0559ad51d7da08762714c3ed3f77)                     */
+/***********************************************************************************/
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <limesdr/sink.h>
+// pydoc.h is automatically generated in the build directory
+#include <sink_pydoc.h>
+
+void bind_sink(py::module& m)
+{
+
+    using sink    = ::gr::limesdr::sink;
+
+
+    py::class_<sink, gr::block, gr::basic_block,
+        std::shared_ptr<sink>>(m, "sink", D(sink))
+
+        .def(py::init(&sink::make),
+           py::arg("serial"),
+           py::arg("channel_mode"),
+           py::arg("filename"),
+           py::arg("length_tag_name"),
+           D(sink,make)
+        )
+        
+
+
+
+
+        
+        .def("set_center_freq",&sink::set_center_freq,       
+            py::arg("freq"),
+            py::arg("chan") = 0,
+            D(sink,set_center_freq)
+        )
+
+
+        
+        .def("set_antenna",&sink::set_antenna,       
+            py::arg("antenna"),
+            py::arg("channel") = 0,
+            D(sink,set_antenna)
+        )
+
+
+        
+        .def("set_nco",&sink::set_nco,       
+            py::arg("nco_freq"),
+            py::arg("channel"),
+            D(sink,set_nco)
+        )
+
+
+        
+        .def("set_bandwidth",&sink::set_bandwidth,       
+            py::arg("analog_bandw"),
+            py::arg("channel") = 0,
+            D(sink,set_bandwidth)
+        )
+
+
+        
+        .def("set_digital_filter",&sink::set_digital_filter,       
+            py::arg("digital_bandw"),
+            py::arg("channel"),
+            D(sink,set_digital_filter)
+        )
+
+
+        
+        .def("set_gain",&sink::set_gain,       
+            py::arg("gain_dB"),
+            py::arg("channel") = 0,
+            D(sink,set_gain)
+        )
+
+
+        
+        .def("set_sample_rate",&sink::set_sample_rate,       
+            py::arg("rate"),
+            D(sink,set_sample_rate)
+        )
+
+
+        
+        .def("set_oversampling",&sink::set_oversampling,       
+            py::arg("oversample"),
+            D(sink,set_oversampling)
+        )
+
+
+        
+        .def("calibrate",&sink::calibrate,       
+            py::arg("bandw"),
+            py::arg("channel") = 0,
+            D(sink,calibrate)
+        )
+
+
+        
+        .def("set_buffer_size",&sink::set_buffer_size,       
+            py::arg("size"),
+            D(sink,set_buffer_size)
+        )
+
+
+        
+        .def("set_tcxo_dac",&sink::set_tcxo_dac,       
+            py::arg("dacVal") = 125,
+            D(sink,set_tcxo_dac)
+        )
+
+        ;
+
+
+
+
+}
+
+
+
+
+
+
+
+
diff --git a/python/bindings/source_python.cc b/python/bindings/source_python.cc
new file mode 100644
index 0000000..d8584be
--- /dev/null
+++ b/python/bindings/source_python.cc
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2021 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/***********************************************************************************/
+/* This file is automatically generated using bindtool and can be manually edited  */
+/* The following lines can be configured to regenerate this file during cmake      */
+/* If manual edits are made, the following tags should be modified accordingly.    */
+/* BINDTOOL_GEN_AUTOMATIC(0)                                                       */
+/* BINDTOOL_USE_PYGCCXML(0)                                                        */
+/* BINDTOOL_HEADER_FILE(source.h)                                        */
+/* BINDTOOL_HEADER_FILE_HASH(202afe28ab16609914f3a3a1dbdb9e56)                     */
+/***********************************************************************************/
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <limesdr/source.h>
+// pydoc.h is automatically generated in the build directory
+#include <source_pydoc.h>
+
+void bind_source(py::module& m)
+{
+
+    using source    = ::gr::limesdr::source;
+
+
+    py::class_<source, gr::block, gr::basic_block,
+        std::shared_ptr<source>>(m, "source", D(source))
+
+        .def(py::init(&source::make),
+           py::arg("serial"),
+           py::arg("channel_mode"),
+           py::arg("filename"),
+           D(source,make)
+        )
+        
+
+
+
+
+        
+        .def("set_center_freq",&source::set_center_freq,       
+            py::arg("freq"),
+            py::arg("chan") = 0,
+            D(source,set_center_freq)
+        )
+
+
+        
+        .def("set_antenna",&source::set_antenna,       
+            py::arg("antenna"),
+            py::arg("channel") = 0,
+            D(source,set_antenna)
+        )
+
+
+        
+        .def("set_nco",&source::set_nco,       
+            py::arg("nco_freq"),
+            py::arg("channel"),
+            D(source,set_nco)
+        )
+
+
+        
+        .def("set_bandwidth",&source::set_bandwidth,       
+            py::arg("analog_bandw"),
+            py::arg("channel") = 0,
+            D(source,set_bandwidth)
+        )
+
+
+        
+        .def("set_digital_filter",&source::set_digital_filter,       
+            py::arg("digital_bandw"),
+            py::arg("channel"),
+            D(source,set_digital_filter)
+        )
+
+
+        
+        .def("set_gain",&source::set_gain,       
+            py::arg("gain_dB"),
+            py::arg("channel") = 0,
+            D(source,set_gain)
+        )
+
+
+        
+        .def("set_sample_rate",&source::set_sample_rate,       
+            py::arg("rate"),
+            D(source,set_sample_rate)
+        )
+
+
+        
+        .def("set_oversampling",&source::set_oversampling,       
+            py::arg("oversample"),
+            D(source,set_oversampling)
+        )
+
+
+        
+        .def("calibrate",&source::calibrate,       
+            py::arg("bandw"),
+            py::arg("channel") = 0,
+            D(source,calibrate)
+        )
+
+
+        
+        .def("set_buffer_size",&source::set_buffer_size,       
+            py::arg("size"),
+            D(source,set_buffer_size)
+        )
+
+
+        
+        .def("set_tcxo_dac",&source::set_tcxo_dac,       
+            py::arg("dacVal") = 125,
+            D(source,set_tcxo_dac)
+        )
+
+        ;
+
+
+
+
+}
+
+
+
+
+
+
+
+
diff --git a/python/qa_source.py b/python/qa_source.py
deleted file mode 100755
index b5c5e68..0000000
--- a/python/qa_source.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# Copyright 2019 Lime Microsystems <info@limemicro.com>
-#
-# This is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this software; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gr_unittest
-from gnuradio import blocks
-import limesdr_swig as limesdr
-
-class qa_source(gr_unittest.TestCase):
-
-    def setUp(self):
-        self.tb = gr.top_block()
-
-    def tearDown(self):
-        self.tb = None
-
-    def test_001_t(self):
-        # set up fg
-        self.tb.run()
-        # check data
-
-
-if __name__ == '__main__':
-    gr_unittest.run(qa_source)
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
deleted file mode 100644
index 5e1c011..0000000
--- a/swig/CMakeLists.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file was generated by gr_modtool, a tool from the GNU Radio framework
-# This file is a part of gr-limesdr
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-########################################################################
-# Check if there is C++ code at all
-########################################################################
-if(NOT limesdr_sources)
-    MESSAGE(STATUS "No C++ sources... skipping swig/")
-    return()
-endif(NOT limesdr_sources)
-
-########################################################################
-# Include swig generation macros
-########################################################################
-find_package(SWIG)
-find_package(PythonLibs)
-if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
-    return()
-endif()
-include(GrSwig)
-include(GrPython)
-
-########################################################################
-# Setup swig generation
-########################################################################
-set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>)
-set(GR_SWIG_TARGET_DEPS gnuradio::runtime_swig)
-
-set(GR_SWIG_LIBRARIES gnuradio-limesdr)
-
-set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/limesdr_swig_doc.i)
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
-
-GR_SWIG_MAKE(limesdr_swig limesdr_swig.i)
-
-########################################################################
-# Install the build swig module
-########################################################################
-GR_SWIG_INSTALL(TARGETS limesdr_swig DESTINATION ${GR_PYTHON_DIR}/limesdr)
-
-########################################################################
-# Install swig .i files for development
-########################################################################
-install(
-    FILES
-    limesdr_swig.i
-    ${CMAKE_CURRENT_BINARY_DIR}/limesdr_swig_doc.i
-    DESTINATION ${GR_INCLUDE_DIR}/limesdr/swig
-)
diff --git a/swig/limesdr_swig.i b/swig/limesdr_swig.i
deleted file mode 100644
index 665c560..0000000
--- a/swig/limesdr_swig.i
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- c++ -*- */
-
-#define LIMESDR_API
-
-%include "gnuradio.i"           // the common stuff
-
-//load generated python docstrings
-%include "limesdr_swig_doc.i"
-
-%{
-#include "limesdr/source.h"
-#include "limesdr/sink.h"
-%}
-
-%include "limesdr/source.h"
-%include "limesdr/sink.h"
-GR_SWIG_BLOCK_MAGIC2(limesdr, source);
-GR_SWIG_BLOCK_MAGIC2(limesdr, sink);
