Beta release of gr-osmosdr for Gnu Radio and GQRX

Post information or questions regarding SDRplay products here
sdrplay
Posts: 978
Joined: Wed Jan 07, 2015 7:58 am

Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by sdrplay » Sun Jan 14, 2018 1:15 am

Jeff Long has forked gr-osmosdr and added support for RSP1, RSP2/RSP2pro and RSP1A - this is currently in beta testing, but the plan is to get this pushed back into the master build of gr-osmosdr

We're currently testing it here, and this is what I've done to get Gnu Radio and GQRX installed. I've also listed Jeff's instructions to build and then run Gnu Radio/GQRX with the new gr-osmosdr interface library.

Please note: These are my test build instructions. If you already have Gnu Radio and GQRX installed/running, you can probably just go down to where the gr-osmosdr build instructions are.

Ultimately, we'll work with Jeff to find a better way to deliver this to our customers, but for now, like a lot of Linux software, this requires a lot of building. This first section installs Gnu Radio and GQRX into your local directory. This should help to avoid corrupting any system installs of these applications you have.

This all assumes you have downloaded and installed the API from our website (https://www.sdrplay.com/downloads) - please make sure you get the right API installation for your system.

sudo apt install python-pip
pip install PyBOMBS
pip install --upgrade pip
pip install git+https://github.com/gnuradio/pybombs.git
instead of
sudo pip install --upgrade git+https://github.com/gnuradio/pybombs.git
pybombs auto-config
pybombs recipes add-defaults
mkdir ~/prefix
pybombs prefix init ~/prefix -a myprefix -R gnuradio-default
pybombs -p myprefix install gqrx

Build new gr-osmosdr (use whatever directory suits you for the installation instead of my ~/gr-osmosdr)...

git clone https://github.com/willcode/gr-osmosdr
cd gr-osmosdr
git checkout sdrplay2
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/gr-osmosdr -DENABLE_NONFREE=yes ..
make
mkdir ~/gr-osmosdr
make install

Run Gnu Radio with the new gr-osmosdr...

source ~/prefix/setup_env.sh
LD_LIBRARY_PATH=~/gr-osmosdr/lib:$LD_LIBRARY_PATH \
PYTHONPATH=~/gr-osmosdr/lib/python-2.7/dist-packages:$PYTHONPATH \
gnuradio-companion

Run GQRX with the new gr-osmosdr...

source ~/prefix/setup_env.sh
LD_LIBRARY_PATH=~/gr-osmosdr/lib:$LD_LIBRARY_PATH \
PYTHONPATH=~/gr-osmosdr/lib/python-2.7/dist-packages:$PYTHONPATH \
gqrx

When the master gr-osmosdr is updated, the building and running of these applications should be easier. Please note that this is all still in beta, please post any feedback and comments you have. The more feedback Jeff gets, the better implementation he'll be able to deliver.

Best regards,

Andy
SDRplay Software Development

Reason: No reason

Sasan
Posts: 124
Joined: Sat Jun 27, 2015 1:15 am
Location: Berlin

Re: Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by Sasan » Sun Jan 14, 2018 9:16 pm

Hey Andy
Thanks for the update.
I've already written about a list of problems I've encountered before, here: viewtopic.php?f=9&t=2798
I can confirm that it works (tested with "GRC", "gqrx" and "osmocom_fft")
I compiled and tested this new code. I still have the problem number 4 described in the above post (latest GNURadio built from source, on OS X 10.13.2)

Reason: No reason
DF2HF, NM9A, EP2C

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

Re: Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by sdrplay » Sun Jan 14, 2018 9:31 pm

What were your gain settings in the image you posted in the other thread? We've been testing Gnu Radio and GQRX with this new gr-osmosdr and it's working fine - there are things to improve, which we'll work with Jeff on.

Best regards,

Andy

Reason: No reason

Sasan
Posts: 124
Joined: Sat Jun 27, 2015 1:15 am
Location: Berlin

Re: Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by Sasan » Sun Jan 14, 2018 11:27 pm

I was/am using automatic gain.
I believe it has nothing to do with gain, but with the GRC block.
For your info: I can decode FM broadcast on GRC, which means it is working; I just have problem with the spectrum.

I've attached some screenshots (with captions): https://imgur.com/a/kfp6S

Reason: No reason
DF2HF, NM9A, EP2C

Sasan
Posts: 124
Joined: Sat Jun 27, 2015 1:15 am
Location: Berlin

Re: Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by Sasan » Mon Jan 15, 2018 3:29 pm

Update:
I fetched the latest changes and built it again;
I noticed a new "SDRPlay Source" is added to the source.
With the new "SDRPlay Source" in GRC (instead of "osmocom Source"), it works great now.

Reason: No reason
DF2HF, NM9A, EP2C

johntron
Posts: 3
Joined: Sat Jan 13, 2018 11:09 pm

Re: Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by johntron » Mon Jan 15, 2018 7:22 pm

On Debian 9 Stretch, I got an error about missing libcrypto when building the dependency, apache-thrift:

Code: Select all

checking for setsockopt in -lsocket... no
checking for BN_init in -lcrypto... no
configure: error: "Error: libcrypto required."
PyBOMBS.Packager.source - ERROR - Configuration failed after running at least twice.
PyBOMBS.Packager.source - ERROR - Problem occurred while building package apache-thrift:
Configuration failed
PyBOMBS.PackageManager - WARNING - Optional package apache-thrift failed to install. Will pretend as if it had worked.
This was fixed by patching apache-thrift.lwr to use version 0.10.0 (see https://github.com/gnuradio/gr-recipes/pull/105). After I got past this step, I found this alternative that might be something we could just add as part of the steps already listed: https://github.com/gnuradio/gr-recipes/ ... -301593175

Then I was getting this error building gnuradio itself:

Code: Select all

[ 87%] Building CXX object gr-uhd/swig/CMakeFiles/_uhd_swig.dir/uhd_swigPYTHON_wrap.cxx.o
/home/johntron/prefix/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx: In function ‘PyObject* _wrap_dboard_iface_set_gpio_debug(PyObject*, PyObject*, PyObject*)’:
/home/johntron/prefix/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:28044:15: error: ‘class uhd::usrp::dboard_iface’ has no member named ‘set_gpio_debug’; did you mean ‘set_gpio_ddr’?
       (arg1)->set_gpio_debug(arg2,arg3);
               ^~~~~~~~~~~~~~
/home/johntron/prefix/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx: In function ‘PyObject* _wrap_dboard_iface_sptr_set_gpio_debug(PyObject*, PyObject*, PyObject*)’:
/home/johntron/prefix/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:29410:16: error: ‘class uhd::usrp::dboard_iface’ has no member named ‘set_gpio_debug’; did you mean ‘set_gpio_ddr’?
       (*arg1)->set_gpio_debug(arg2,arg3);
                ^~~~~~~~~~~~~~
/home/johntron/prefix/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx: In function ‘void init_uhd_swig()’:
/home/johntron/prefix/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:48708:91: error: ‘ATR_REG_IDLE’ is not a member of ‘uhd::usrp::dboard_iface’
   SWIG_Python_SetConstant(d, "dboard_iface_ATR_REG_IDLE",SWIG_From_int(static_cast< int >(uhd::usrp::dboard_iface::ATR_REG_IDLE)));
                                                                                           ^~~
/home/johntron/prefix/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:48709:94: error: ‘ATR_REG_TX_ONLY’ is not a member of ‘uhd::usrp::dboard_iface’
   SWIG_Python_SetConstant(d, "dboard_iface_ATR_REG_TX_ONLY",SWIG_From_int(static_cast< int >(uhd::usrp::dboard_iface::ATR_REG_TX_ONLY)));
                                                                                              ^~~
/home/johntron/prefix/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:48710:94: error: ‘ATR_REG_RX_ONLY’ is not a member of ‘uhd::usrp::dboard_iface’
   SWIG_Python_SetConstant(d, "dboard_iface_ATR_REG_RX_ONLY",SWIG_From_int(static_cast< int >(uhd::usrp::dboard_iface::ATR_REG_RX_ONLY)));
                                                                                              ^~~
/home/johntron/prefix/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:48711:98: error: ‘ATR_REG_FULL_DUPLEX’ is not a member of ‘uhd::usrp::dboard_iface’
   SWIG_Python_SetConstant(d, "dboard_iface_ATR_REG_FULL_DUPLEX",SWIG_From_int(static_cast< int >(uhd::usrp::dboard_iface::ATR_REG_FULL_DUPLEX)));
                                                                                                  ^~~
gr-uhd/swig/CMakeFiles/_uhd_swig.dir/build.make:70: recipe for target 'gr-uhd/swig/CMakeFiles/_uhd_swig.dir/uhd_swigPYTHON_wrap.cxx.o' failed
make[2]: *** [gr-uhd/swig/CMakeFiles/_uhd_swig.dir/uhd_swigPYTHON_wrap.cxx.o] Error 1
CMakeFiles/Makefile2:13452: recipe for target 'gr-uhd/swig/CMakeFiles/_uhd_swig.dir/all' failed
make[1]: *** [gr-uhd/swig/CMakeFiles/_uhd_swig.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
PyBOMBS.Packager.source - ERROR - Build failed. See output above for error messages.
PyBOMBS.Packager.source - ERROR - Problem occurred while building package gnuradio:
Build failed.
PyBOMBS.install_manager - ERROR - Error installing package gnuradio. Aborting.
I'm not sure uhd is required - I think that's only used for USRP's, so I removed everything under ~/.pybombs and ~/prefix, then started over. Before I ran the command to build/install gnuradio, I edited the recipes in ~/.pybombs/recipes/gr-recipes/ - to install the newer apache-thrift, and to disable uhd in gnuradio.lwr.

After rebuilding, I tried GRC, and it still didn't work, but I felt it was close, so I started over. First I uninstalled everything - using `which gnuradio-companion` until it returned nothing to ensure I removed all previous installations of gnuradio. Then I removed everything under ~/prefix and the build directories again and recompiled.

At this point things were working fine, but I didn't realize it, because my settings in the gnuradio recipe I built wasn't quite right. It's simply an FFT waterfall sink connected to the osmosdr source; however, I had the minimum intensity set too high. Here's that recipe in case someone else is looking for a way to debug/test their new build - just change the frequency to match your local NOAA weather station (or some similar strong signal): https://gist.github.com/johntron/c3bbed ... db903a694e

Thank you for your hard work Jeff, Andy, and everyone that conntributed! I'm going to try to get gqrx working this week sometime.
Last edited by johntron on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

bguthrie
Posts: 1
Joined: Sat Feb 10, 2018 9:44 pm

Re: Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by bguthrie » Sat Feb 10, 2018 10:47 pm

My Distro: Debian 8 upgraded to 9 with a RSP1A

I too was getting an error in regards to 'libcrypto' and 'apache-thrift.lwr'; unfortunately, that will have to get fixed upstream on johntron's pull-request; with that being said, It is not clear for the typical Non-Technical Linux Desktop User on how one would go about "patching apache-thrift.lwr".

I just backed up the current file, installed wget, and wget the updated file " apache-thrift.lwr" that johntron so kindly provided:

Code: Select all

mv ~/prefix/.pybombs/recipes/gr-recipes/apache-thrift.lwr ~/prefix/.pybombs/recipes/gr-recipes/apache-thrift.lwr-0.9.3

Code: Select all

apt-get install wget

Code: Select all

wget https://raw.githubusercontent.com/johntron/gr-recipes/patch-1/apache-thrift.lwr ~/prefix/.pybombs/recipes/gr-recipes/apache-thrift.lwr
I am sure there is an easier way, as there are several ways to skin a cat, this is what worked for me.

Then I re-ran the installation.

Then ran into the same issue with UHD, but was not keen to just disabling UHD as someone else might require it; had a little time to take a deeper dive. I found that my gcc and g++ were not linked to the same source. I had to upgrade my g++ to 6, as it was 5.

Code: Select all

apt-get upgrade g++
Once I upgrade g++ to 6, re-ran the installation, installation went without a hitch.
Last edited by bguthrie on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

nk2042
Posts: 12
Joined: Thu Dec 21, 2017 3:41 pm

Re: Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by nk2042 » Sat Feb 24, 2018 10:45 am

Hi,

I just compiled this gr-osmosdr fork on my ubuntu 17.10 for use my RSP2pro with GQRX.

It's working fine: BCAM / BCFM filter can be enabled/disabled, antenna select works too, gains can be modified.
I have a DAB filter option too but it is for RSP1A only I think.

Even the bias-t can be used by adding bias=1 in the device string.

It's a great improvement.

Thank to Jeff for his work.

I have one question: Can refclock input be used ? I didn't find any option to enable it.
Last edited by nk2042 on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

josephj
Posts: 9
Joined: Fri Mar 23, 2018 5:53 pm

Re: Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by josephj » Sun Mar 25, 2018 1:41 pm

I need some help.
I followed the procedure in the Beta post above for my UBUNTU 16 machine
I got GNUradio companion to run but I get no input from the RSP2.
It says "no supported device found".
I did run the SDRplay driver for Linux
lsusb shows a device ID of 1df7:3010 when I plug it in, with no name.
SoapySDRUtil --info shows an sdrplay factory

any suggestions

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

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

Re: Beta release of gr-osmosdr for Gnu Radio and GQRX

Post by sdrplay » Sun Mar 25, 2018 11:44 pm

As mentioned on the ticket system, please post more information such as error messages, build command lines, application run command lines, etc. - this will hopefully help identify the issue.

Best regards,

SDRplay Support

Reason: No reason

Post Reply