Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#48451 closed enhancement (fixed)

sdrplay support for gr-osmosdr

Reported by: fjturk@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kurthindenburg (Kurt Hindenburg), michaelld (Michael Dickens), markjohnson@…, k_a_i@…
Port: gr-osmosdr

Description

Currently, gr-osmosdr has support for the SDRplay functionality, see

http://sdr.osmocom.org/trac/wiki/GrOsmoSDR

But the current build of gr-osmosdr (20150716) on macports and its variants, at least from what I can see, does not offer the option for -DENABLE_NONFREE=TRUE which would look for the SDRplay lib and include (which are available from http://www.sdrplay.com/mac.html).

From SDRplay community forums, see http://www.sdrplay.com/community/viewtopic.php?f=5&t=99, For gr-osmosdr to find the API, the .so and .h will need to be in /usr/local/lib and /usr/local/include and be called

/usr/local/lib/libmirsdrapi-rsp-1.1.so

with symbolic links to /usr/local/lib/libmirsdrapi-rsp.so and /usr/local/lib/libmir_sdr.so

/usr/local/include/mirsdrapi-rsp.h

I tried building gr-osmosdr manually with the gr-osmosdr code build:

http://sdr.osmocom.org/trac/wiki/GrOsmoSDR

and it worked (from the output of cmake ../ -DENABLE_NONFREE=TRUE below):

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

-- ######################################################
-- # Gnuradio enabled components                         
-- ######################################################
--   * Python support
--   * FUNcube Dongle
--   * FUNcube Dongle Pro+
--   * IQ File Source
--   * Osmocom RTLSDR
--   * RTLSDR TCP Client
--   * Ettus USRP Devices
--   * Osmocom MiriSDR
--   * SDRplay RSP (NONFREE)
--   * HackRF Jawbreaker
--   * nuand bladeRF
--   * RFSPACE Receivers
--   * AIRSPY Receiver

Would it be possible for the next update to gr-osmosdr on macports be made to have the support option for SDRplay? That way everything needed for SDR radio people (gnuradio, gqrx etc) are all under macports and users don't need to maintain gr-osmosdr separately. (Or, perhaps there is an option that I have not located on the current build...?).

Attachments (4)

gr-osmosdr_sdrplay.diff (2.1 KB) - added by michaelld (Michael Dickens) 9 years ago.
gr-osmosdr_sdrplay_1.7.diff (2.4 KB) - added by michaelld (Michael Dickens) 9 years ago.
gr-osmosdr_sdrplay_1.9.8.diff (2.4 KB) - added by michaelld (Michael Dickens) 8 years ago.
gr-osmosdr_sdrplay_1.95.1.diff (2.4 KB) - added by k_a_i@… 8 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

Cc Me!

comment:2 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Cc: michaelld@… added; fjturk@… removed

CC michaelld to get his opinion

Changed 9 years ago by michaelld (Michael Dickens)

Attachment: gr-osmosdr_sdrplay.diff added

comment:3 Changed 9 years ago by michaelld (Michael Dickens)

I just attached a patch for the gr-osmosdr Portfile that adds a non-default variant +sdrplay. It's a bit of a hack, but it does work. It downloads and installs the sdrplay library and header, tweaking them to work within the MacPorts install. I do not have an sdrplay to do testing on, but another user reported back that it looks like the SDRPlay Mac OS X drivers are not ready for prime time yet. See also: https://groups.google.com/forum/#!topic/gqrx/OtTNWVTTjFU .

Last edited 9 years ago by michaelld (Michael Dickens) (previous) (diff)

comment:4 in reply to:  3 Changed 9 years ago by markjohnson@…

I have an SDRPlay, and I applied this diff to my Portfile, and I can confirm this allowed me to do "port install gr-osmosdr +sdrplay" and have the SDRPlay work reasonably well with gqrx, also installed via MacPorts.

Regarding the Mac OS X drivers not being ready for prime time... They are outdated compared to the Windows drivers. I believe the main issue for me was actually bugs in part of the gr-osmosdr library code, which resulted in lots of pops and static.

The diff that improved gr-osmosdr SDRPlay functionality greatly for me is: https://github.com/SDRplay/gr-osmosdr/commit/6b0454f6e1d8a4a8dde8956d74466b30e02b1db9

It looks like this code has not yet been added to git://git.osmocom.org/gr-osmosdr

I'm also looking into fixing that code completely via a separate thread to read from the device, a FIFO circular buffer, etc.

Anyway, I think even in the current state, before the above diff is applied to the main gr-osmosdr repo, this patch is still very useful. Thanks.

comment:5 Changed 9 years ago by markjohnson@…

Cc: markjohnson@… added

Cc Me!

comment:6 Changed 9 years ago by mf2k (Frank Schima)

Keywords: sdrplay gnuradio gqrx gr-osmosdr removed
Type: updateenhancement
Version: 2.3.3

comment:7 Changed 9 years ago by michaelld (Michael Dickens)

Thanks for the feedback. It looks like the SDRPlay folks have moved the download behind a serial # check; the actual download still works, but one cannot get new download info with a valid serial #. This move does not bode well for FOSS such as MacPorts. Does anyone know one of the SDRPlay developers with whom we can discuss this issue & try to find a reasonable compromise? I'll leave this patch here for now for folks to try out, but I can't commit in in good faith until the SDRPlay folks have told me directly that they are on board and willing to work with me to keep their software available to MacPorts users without a serial #.

Changed 9 years ago by michaelld (Michael Dickens)

Attachment: gr-osmosdr_sdrplay_1.7.diff added

comment:8 Changed 9 years ago by michaelld (Michael Dickens)

New patch for SDRplay 1.7. You'll need to revert your prior patch before testing this one. A good way to do this would be:

cd $(port dir gr-osmosdr)
svn revert Portfile
patch -p0 < PATH_TO/gr-osmosdr_sdrplay_1.7.diff

or the equivalent. You could also do

patch -R -p0 < PATH_TO/gr-osmosdr_sdrplay.diff

if you've downloaded and used the prior patch.

If you already have gr-osmosdr +sdrplay installed, then just do:

sudo port upgrade gr-osmosdr

If you don't then you'll need to do:

sudo port install gr-osmosdr +sdrplay

I don't have an SDRplay to do testing on, but this patch works for installing it with gr-osmosdr. That said, according to the SDRplay folks gr-osmosdr needs some fixes to take full advantage of the SDRplay API / ABI / hardware. I'm leaving that up to those developers, respectively, though I'm happy to play intermediary.

Also: SDRplay customer support has contacted me about this ticket. We're working on it.

comment:9 in reply to:  8 Changed 9 years ago by markjohnson@…

Replying to michaelld@…:

New patch for SDRplay 1.7. You'll need to revert your prior patch before testing this one.

I downloaded the gr-osmosdr_sdrplay_1.7.diff​ file and applied it and I can confirm it works for me.

Marks-Mac-mini:~ mrj$ grep MIR_SDR_API_VERSION /opt/local/include/mir_sdr.h

#define MIR_SDR_API_VERSION (float)(1.70)

Definitely downloaded the new API version and compiled gr-osmosdr successfully using +sdrplay. Installed and started up gqrx and successfully saw signal from my SDRPlay.

I'm using Yosemite -- 10.10.5 (14F27).

Last edited 9 years ago by markjohnson@… (previous) (diff)

comment:10 Changed 9 years ago by k_a_i@…

Cc: k_a_i@… added

Cc Me!

Changed 8 years ago by michaelld (Michael Dickens)

comment:11 Changed 8 years ago by michaelld (Michael Dickens)

I just attached a new patch that provides the latest SDRplay ABI, 1.9.8, obtained from the PKG now provided (1.7 was a tarball).

Changed 8 years ago by k_a_i@…

comment:12 Changed 8 years ago by k_a_i@…

Upgraded patch from michaelld to latest SDRplay API version 1.95.1.

comment:13 Changed 8 years ago by michaelld (Michael Dickens)

Thanks! Question: Is 1.95.1 newer than 1.9.8? Seems like their versioning could use a little work ...

comment:14 Changed 8 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

I added SDRplay in r150483. I then added in gr-osmosdr +sdrplay in r150484. Please note that +sdrplay is NOT enabled by default. You have to choose it. I might change this in the future to be a default variant, but for now I'd like others to try this out & verify it. You'll want to do "sudo port sync" or "sudo port selfupdate" to get the changes.

comment:15 Changed 8 years ago by michaelld (Michael Dickens)

BTW> SDRplay version is 1.95.2, which is the latest provided according to their website.

Note: See TracTickets for help on using tickets.