Need help getting SDRplay source block in gnuradio

Add useful snippets of code or links to entire SDR projects.
Toontje
Posts: 48
Joined: Fri Aug 07, 2015 8:36 am

Need help getting SDRplay source block in gnuradio

Postby Toontje » Thu Aug 13, 2015 11:09 am

Hi all!

I have compiled the latest gr-osmosdr and installed gnuradio. When i launch gnuradio-companion i don't see a source block for the SDRplay. How do i get that source block into gnuradio?

Mac OSX 10.10.4
gnuradio 3.7.7 installed using homebrew

Thanks,

Ton.
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

sdrplay
Posts: 542
Joined: Wed Jan 07, 2015 7:58 am

Re: Need help getting SDRplay source block in gnuradio

Postby sdrplay » Thu Aug 13, 2015 12:29 pm

You want the osmocom source block

See the examples in the Linux topic within the Code Corner section of this forum. There are links to download the examples as well.

Best regards,

SDRplay
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Toontje
Posts: 48
Joined: Fri Aug 07, 2015 8:36 am

Re: Need help getting SDRplay source block in gnuradio

Postby Toontje » Sat Aug 15, 2015 9:50 am

I've got a really weird problem.

I install gnuradio using homebrew according to the steps provided on https://github.com/metacollin/homebrew-gnuradio.
I start gnuradio-companion and all seems to work fine.
Then i build gr-osmosdr according to the instructions on http://www.sdrplay.com/docs/Mirics_SDR_ ... e_r2p0.pdf. All went fine there as well, no errors.
Now, when i start gnuradio-companion i get the "maldito" error Fatal Python error: PyThreadState_Get: no current thread

So apparently i compile against the homebrew python, but on runtime i use the Darwin python. Understood, but does the building of gr-osmosdr change that in the gnuradio-companion executable? I cannot believe this.

What's going wrong here?
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

sdrplay
Posts: 542
Joined: Wed Jan 07, 2015 7:58 am

Re: Need help getting SDRplay source block in gnuradio

Postby sdrplay » Sat Aug 15, 2015 2:53 pm

No idea why this would be happening. There are some comments Re: python woes on the homebrew website, not sure if any of those solutions will help you?

We have started work on the Mac platform again and hopefully can provide a working path with gr-osmosdr for you guys very soon.

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Toontje
Posts: 48
Joined: Fri Aug 07, 2015 8:36 am

Re: Need help getting SDRplay source block in gnuradio

Postby Toontje » Sat Aug 15, 2015 2:59 pm

I have posted on the gnuradio mailinglist and on the gnuradio reddit site. I run into too many problems installing gnuradio. A provess that should be a simple brew install gnuradio turns out to be not that simple.

This is what i posted on the mailinglist and reddit:

Mac OSX 10.10.4
gnuradio 3.7.7.1 homebrew

I tried an innocent brew install gnuradio. That went wrong on the fact that gnuradio was compiled against the homebrew python and when launched uses the Darwin python as discussed here: https://github.com/titanous/homebrew-gnuradio/issues/7. Haven't found a good solution to that problem yet.
Then i used the workaround to export DYLD_FRAMEWORK_PATH=/usr/local/lib:$DYLD_FRAMEWORK_PATH, uninstalled gnuradio and installed it again. That went ok until i built gr-osmosdr with the ENABLE_NONFREE option. Then the problem came back again.
Then i tried to build gnuradio from source hoping it would use the system python and the problem would go away. That took a few hours only to result in the same error.
So i removed all the dependencies and built those from source as well. Now when building gnuradio i get the following error:
==> cmake .. -DCMAKE_PREFIX_PATH=/usr/local/Cellar/gnuradio/3.7.7.1 -DENABLE_DOXYGEN=Off -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPIL
==> make
==> make install
Error: No such file or directory - /usr/local/Cellar/gnuradio/3.7.7.1/etc/gnuradio/conf.d/grc.conf

What's going on? Is there not a relative simple way to build gnuradio on a Mac? I got these issues when following the instructions on https://github.com/metacollin/homebrew-gnuradio.
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Sasan
Posts: 92
Joined: Sat Jun 27, 2015 1:15 am

Re: Need help getting SDRplay source block in gnuradio

Postby Sasan » Sat Aug 15, 2015 3:54 pm

I had the same problem
Had to edit CMake files (using ccmake advanced mode) to find every variable that points to System Python and change it to use Homebrew path and then installed it.
Now everything's fine
(If I recall correctly, I temporarily renamed '/System/Library/Frameworks/Python.Framework' while making gr-osmosdr to make sure nothing can use it)
Last edited by Sasan on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Toontje
Posts: 48
Joined: Fri Aug 07, 2015 8:36 am

Re: Need help getting SDRplay source block in gnuradio

Postby Toontje » Sun Aug 16, 2015 11:56 am

Ok, i went the lazy route. I removed everything Homebrew and installed MacPorts. Worked straight out of the box. I built gr-osmocom with the ENABLE_NONFREE and CMAKE_INSTALL_PREFIX=/opt/local options and all seemed to work well. SDRplay is supposed to be supported.

Code: Select all

-- ######################################################
-- # Gnuradio enabled components                         
-- ######################################################
--   * Python support
--   * FUNcube Dongle
--   * FUNcube Dongle Pro+
--   * IQ File Source
--   * Osmocom RTLSDR
--   * RTLSDR TCP Client
--   * Ettus USRP Devices
--   * HackRF Jawbreaker
--   * nuand bladeRF
--   * RFSPACE Receivers
--   * AIRSPY Receiver
--
-- ######################################################
-- # Gnuradio disabled components                       
-- ######################################################
--   * Osmocom IQ Imbalance Correction
--   * sysmocom OsmoSDR
--   * Osmocom MiriSDR
--   * SDRplay RSP (NONFREE)
--   * SoapySDR support
--
-- NONFREE components have been enabled. The resulting
   binaries cannot be distributed under GPL terms.


Now i have another issue: I created a super workflow with one osmocom source block and one FFT sink. In the osmocom source my device parameter is set to 'sdrplay=0' and the rest left default.

When i run the workflow the log tells me this:

Code: Select all

Mac OS; Clang version 6.1.0 (clang-602.0.53); Boost_105800; UHD_003.008.005-MacPorts-Release

Using Volk machine: avx_64_mmx_orc
gr-osmosdr v0.1.4-48-g86ad5842 (0.1.5git) gnuradio 3.7.8
built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace airspy
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Invalid sample rate: 48000 Hz


So apparently it's using my RTL adapter instead of the SDRplay. Is my device parameter correct? Is my gr-osmosdr block installed in the right place?

Thanks for all the help,

Ton.
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

sdrplay
Posts: 542
Joined: Wed Jan 07, 2015 7:58 am

Re: Need help getting SDRplay source block in gnuradio

Postby sdrplay » Sun Aug 16, 2015 3:23 pm

That build doesn't look like SDRplay support has been enabled.

Can you say where you got the gr-osmosdr release from and what command line you used to build it please. In the build process did it say that it found the SDRplay library?

It will look for it in /usr/local/lib and /usr/local/include

I'm working on this flow at the moment and will get some time this week to document where I'm at with it.

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Toontje
Posts: 48
Joined: Fri Aug 07, 2015 8:36 am

Re: Need help getting SDRplay source block in gnuradio

Postby Toontje » Mon Aug 17, 2015 8:01 am

That build doesn't look like SDRplay support has been enabled.

Take a look at the results of the build process. It says: "NONFREE components have been enabled."

Code: Select all

Can you say where you got the gr-osmosdr release from and what command line you used to build it please.

From git://git.osmocom.org/gr-osmosdr
cmake ../ -DENABLE_NONFREE=true -DCMAKE_INSTALL_PREFIX=/opt/local

Code: Select all

Ton@TM-MBP:/Users/Ton/gr-osmosdr/build>cmake ../ -DENABLE_NONFREE=true -DCMAKE_INSTALL_PREFIX=/opt/local
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- The C compiler identification is AppleClang 6.1.0.6020053
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
-- Found Git: /usr/bin/git (found version "2.3.2 (Apple Git-55)")
-- Extracting version information from git describe...
-- Configuring Boost C++ Libraries...
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   thread
--   system
-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.28")
Checking for GNU Radio Module: RUNTIME
-- checking for module 'gnuradio-runtime'
--   found gnuradio-runtime, version 3.7.8
 * INCLUDES=/opt/local/include
 * LIBS=/opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib
-- Found GNURADIO_RUNTIME: /opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib 
GNURADIO_RUNTIME_FOUND = TRUE
Checking for GNU Radio Module: BLOCKS
-- checking for module 'gnuradio-blocks'
--   found gnuradio-blocks, version 3.7.8
 * INCLUDES=/opt/local/include
 * LIBS=/opt/local/lib/libgnuradio-blocks.dylib;/opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib
-- Found GNURADIO_BLOCKS: /opt/local/lib/libgnuradio-blocks.dylib;/opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib 
GNURADIO_BLOCKS_FOUND = TRUE
Checking for GNU Radio Module: PMT
-- checking for module 'gnuradio-runtime'
--   found gnuradio-runtime, version 3.7.8
 * INCLUDES=/opt/local/include
 * LIBS=/opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib
-- Found GNURADIO_PMT: /opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib 
GNURADIO_PMT_FOUND = TRUE
-- checking for module 'gnuradio-iqbalance'
--   package 'gnuradio-iqbalance' not found
-- Could NOT find GNURADIO_IQBALANCE (missing:  GNURADIO_IQBALANCE_LIBRARIES GNURADIO_IQBALANCE_INCLUDE_DIRS)
-- Found UHD: /opt/local/lib/libuhd.dylib 
-- checking for module 'gnuradio-uhd'
--   found gnuradio-uhd, version 3.7.8
-- Found gnuradio-uhd: /opt/local/include, /opt/local/lib/libgnuradio-uhd.dylib
-- Found GNURADIO_UHD: /opt/local/lib/libgnuradio-uhd.dylib 
-- checking for module 'gnuradio-fcd'
--   found gnuradio-fcd, version 3.7.8
-- Found gnuradio-fcd: /opt/local/include, /opt/local/lib/libgnuradio-fcd.dylib
-- Found GNURADIO_FCD: /opt/local/lib/libgnuradio-fcd.dylib 
-- checking for module 'gnuradio-fcdproplus'
--   found gnuradio-fcdproplus, version 0.0.1
-- Found gnuradio-fcdproplus: /opt/local/include, /opt/local/lib/libgnuradio-fcdproplus.dylib
-- Found GNURADIO_FCDPP: /opt/local/lib/libgnuradio-fcdproplus.dylib 
-- checking for module 'libosmosdr'
--   package 'libosmosdr' not found
-- libosmosdr not found.
-- checking for module 'librtlsdr'
--   found librtlsdr, version
-- Found librtlsdr: /opt/local/include, /opt/local/lib/librtlsdr.dylib
-- checking for module 'libmirisdr'
--   found libmirisdr, version 59ba
-- Found libmirisdr: /opt/local/include, /opt/local/lib/libmirisdr.dylib
-- checking for module 'libsdrplay'
--   package 'libsdrplay' not found
-- libsdrplay not found.
-- checking for module 'libhackrf'
--   found libhackrf, version 0.4
-- Found LIBHACKRF: /opt/local/lib/libhackrf.dylib 
-- checking for module 'libairspy'
--   found libairspy, version 1.0
-- Found LIBAIRSPY: /opt/local/lib/libairspy.dylib 
-- checking for module 'libbladeRF'
--   found libbladeRF, version 1.4.3-MacPorts-20150805
-- Found libbladeRF: /opt/local/include, /opt/local/lib/libbladeRF.dylib
CMake Warning at CMakeLists.txt:168 (find_package):
  Could not find a package configuration file provided by "SoapySDR" with any
  of the following names:

    SoapySDRConfig.cmake
    soapysdr-config.cmake

  Add the installation prefix of "SoapySDR" to CMAKE_PREFIX_PATH or set
  "SoapySDR_DIR" to a directory containing one of the above files.  If
  "SoapySDR" provides a separate development package or SDK, be sure it has
  been installed.


-- Found Doxygen: /opt/local/bin/doxygen (found version "1.8.9.1")
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found suitable version "2.7.6", minimum required is "2")
--
-- Checking for module SWIG
-- Found SWIG version 3.0.7.
-- Found SWIG: /opt/local/bin/swig 
-- Minimum SWIG version required is 1.3.31
--
-- The build system will automatically enable all components.
-- Use -DENABLE_DEFAULT=OFF to disable components by default.
--
-- Configuring Python support support...
--   Dependency PYTHONLIBS_FOUND = TRUE
--   Dependency SWIG_FOUND = TRUE
--   Dependency SWIG_VERSION_CHECK = TRUE
--   Enabling Python support support.
--   Override with -DENABLE_PYTHON=ON/OFF
--
-- Configuring high resolution timing...
-- Performing Test HAVE_CLOCK_GETTIME
-- Performing Test HAVE_CLOCK_GETTIME - Failed
-- Performing Test HAVE_MACH_ABSOLUTE_TIME
-- Performing Test HAVE_MACH_ABSOLUTE_TIME - Success
-- Performing Test HAVE_QUERY_PERFORMANCE_COUNTER
-- Performing Test HAVE_QUERY_PERFORMANCE_COUNTER - Failed
--   High resolution timing supported through mach_absolute_time.
--
-- Configuring Osmocom IQ Imbalance Correction support...
--   Dependency GNURADIO_IQBALANCE_FOUND = FALSE
--   Disabling Osmocom IQ Imbalance Correction support.
--   Override with -DENABLE_IQBALANCE=ON/OFF
--
-- Configuring sysmocom OsmoSDR support...
--   Dependency LIBOSMOSDR_FOUND = FALSE
--   Disabling sysmocom OsmoSDR support.
--   Override with -DENABLE_OSMOSDR=ON/OFF
--
-- Configuring FUNcube Dongle support...
--   Dependency GNURADIO_FCD_FOUND = TRUE
--   Enabling FUNcube Dongle support.
--   Override with -DENABLE_FCD=ON/OFF
--
-- Configuring FUNcube Dongle Pro+ support...
--   Dependency GNURADIO_FCDPP_FOUND = TRUE
--   Enabling FUNcube Dongle Pro+ support.
--   Override with -DENABLE_FCDPP=ON/OFF
--
-- Configuring IQ File Source support...
--   Dependency GNURADIO_BLOCKS_FOUND = TRUE
--   Enabling IQ File Source support.
--   Override with -DENABLE_FILE=ON/OFF
--
-- Configuring Osmocom RTLSDR support...
--   Dependency LIBRTLSDR_FOUND = TRUE
--   Enabling Osmocom RTLSDR support.
--   Override with -DENABLE_RTL=ON/OFF
--
-- Configuring RTLSDR TCP Client support...
--   Dependency GNURADIO_BLOCKS_FOUND = TRUE
--   Enabling RTLSDR TCP Client support.
--   Override with -DENABLE_RTL_TCP=ON/OFF
--
-- Configuring Ettus USRP Devices support...
--   Dependency UHD_FOUND = TRUE
--   Dependency GNURADIO_UHD_FOUND = TRUE
--   Enabling Ettus USRP Devices support.
--   Override with -DENABLE_UHD=ON/OFF
--
-- Configuring Osmocom MiriSDR support...
--   Dependency LIBMIRISDR_FOUND = TRUE
--   Enabling Osmocom MiriSDR support.
--   Override with -DENABLE_MIRI=ON/OFF
--
-- Configuring SDRplay RSP (NONFREE) support...
--   Dependency LIBSDRPLAY_FOUND = FALSE
--   Disabling SDRplay RSP (NONFREE) support.
--   Override with -DENABLE_SDRPLAY=ON/OFF
--
-- Configuring HackRF Jawbreaker support...
--   Dependency LIBHACKRF_FOUND = TRUE
--   Enabling HackRF Jawbreaker support.
--   Override with -DENABLE_HACKRF=ON/OFF
-- Looking for hackrf_device_list
-- Looking for hackrf_device_list - found
-- HackRF multiple device support enabled
--
-- Configuring nuand bladeRF support...
--   Dependency LIBBLADERF_FOUND = TRUE
--   Enabling nuand bladeRF support.
--   Override with -DENABLE_BLADERF=ON/OFF
--
-- Configuring RFSPACE Receivers support...
--   Enabling RFSPACE Receivers support.
--   Override with -DENABLE_RFSPACE=ON/OFF
--
-- Configuring AIRSPY Receiver support...
--   Dependency LIBAIRSPY_FOUND = TRUE
--   Enabling AIRSPY Receiver support.
--   Override with -DENABLE_AIRSPY=ON/OFF
--
-- Configuring SoapySDR support support...
--   Dependency SoapySDR_FOUND = 0
--   Disabling SoapySDR support support.
--   Override with -DENABLE_SOAPY=ON/OFF
-- Found PythonInterp: /opt/local/bin/python2 (found suitable version "2.7.10", minimum required is "2")
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Failed
--
-- ######################################################
-- # Gnuradio enabled components                         
-- ######################################################
--   * Python support
--   * FUNcube Dongle
--   * FUNcube Dongle Pro+
--   * IQ File Source
--   * Osmocom RTLSDR
--   * RTLSDR TCP Client
--   * Ettus USRP Devices
--   * Osmocom MiriSDR
--   * HackRF Jawbreaker
--   * nuand bladeRF
--   * RFSPACE Receivers
--   * AIRSPY Receiver
--
-- ######################################################
-- # Gnuradio disabled components                       
-- ######################################################
--   * Osmocom IQ Imbalance Correction
--   * sysmocom OsmoSDR
--   * SDRplay RSP (NONFREE)
--   * SoapySDR support
--
-- NONFREE components have been enabled. The resulting
   binaries cannot be distributed under GPL terms.
 
-- Building for version: v0.1.4-48-g86ad5842 / 0.1.5git
-- Using install prefix: /opt/local
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   gnuradio-osmosdr

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/Ton/gr-osmosdr/build


In the build process did it say that it found the SDRplay library?

Code: Select all

-- Configuring SDRplay RSP (NONFREE) support...
--   Dependency LIBSDRPLAY_FOUND = FALSE
--   Disabling SDRplay RSP (NONFREE) support.
--   Override with -DENABLE_SDRPLAY=ON/OFF


Apparently it cannot find the libraries.

It will look for it in /usr/local/lib and /usr/local/include

There is no /usr/local/lib or /usr/local/include on the Mac. I will recompile using /opt/local/ instead of /usr/local

I'm working on this flow at the moment and will get some time this week to document where I'm at with it.

Perfect!
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Toontje
Posts: 48
Joined: Fri Aug 07, 2015 8:36 am

[SOVED] Re: Need help getting SDRplay source block in gnuradio

Postby Toontje » Tue Aug 18, 2015 8:07 pm

Success!!

Image

I do have one more issue. This workflow works ok, but if i add a WFM demod and an audio sink, after a few seconds i start to get USB buffer overflows.
Is this a gnuradio issue or a SDRplay issue?

.log, .py and .grc attached.

In any case, i am a happy camper!!

Ton.
Attachments
Archive.zip
Log, grc and py file zipped.
(4.96 KiB) Downloaded 245 times
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason


Return to “Code Corner”

Who is online

Users browsing this forum: No registered users and 2 guests