SDRPlay on Mac OSX

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

Re: SDRPlay on Mac OSX

Post by sdrplay » Thu Aug 13, 2015 8:45 am

Toontje wrote:Thanks for getting back to us. And yes, from the little time i know SDRplay i did experience that you are communicating with the community. Keep it up, so we know what to expect.
What are you doing with ADS-B? I hope you are not going to write the next SDR software. Or at least, that writing SDR software has a higher priority than writing platform support. We already have plenty of software already available and using VAC's we can link them all together. So if i were you, which i perfectly realise i am not, i would give platform support and driver optimisation a higher priority than protocol support.

Just my €0.02
We really do appreciate and build everyone's feedback into our plans, that's why we have focused on platform support (hence separating those platforms out and being explicit as to what each platform can do, etc.) and things like ADS-B have dropped down the list. You will see from above that ADS-B is lower priority than other things but we have people with different skill sets so it's matching those skill sets to the tasks in hand.

All we are doing with ADS-B is looking to provide a simple application that does a similar job to dump1090 but for the RSP. It is a lower priority but if it appears sooner than some of the other stuff it just means that it's been done by someone else and please don't assume that we are taking our focus away from platform support. Getting stable and robust platform tools is our main priority.

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: 67
Joined: Fri Aug 07, 2015 8:36 am

Re: SDRPlay on Mac OSX

Post by Toontje » Thu Aug 13, 2015 9:00 am

That's exactly what i mean. When you read through all the platform support on the website you realise that SDRplay is a development platform unless you are using Windows. No need for building Windows executables, they are ready and available for use. There are even instructions on how to get the ExtIO into SDR# or HDSDR. While this is great for Windows users, it's a big contrast with what is available for the other platforms. Where Windows users have ready-to-run drivers available, Android, Linux, Mac and Pi users are supposed to build them themselves. Apparently with more or less success.
Anyway, writing and answering here on the forum takes time away from development, so i close my case. ;)
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

kaig
Posts: 1
Joined: Wed Aug 19, 2015 4:15 pm

Re: SDRPlay on Mac OSX

Post by kaig » Wed Aug 19, 2015 4:20 pm

What worked for me with macports:
sudo port uninstall -f gr-osmosdr

Then setup your /opt/local/lib like this with the api provide under SDRplay OS X platform:
-rwxr-xr-x@ 1 root wheel 71876 19 Aug 17:52 /opt/local/lib/libmir_sdr.so
-rwxr-xr-x 1 root wheel 25104 25 Mai 15:34 /opt/local/lib/libmirisdr.0.0git.dylib
lrwxr-xr-x 1 root wheel 23 25 Mai 15:34 /opt/local/lib/libmirisdr.0.dylib -> libmirisdr.0.0git.dylib
-rw-r--r-- 1 root wheel 19432 25 Mai 15:34 /opt/local/lib/libmirisdr.a
lrwxr-xr-x 1 root wheel 18 25 Mai 15:34 /opt/local/lib/libmirisdr.dylib -> libmirisdr.0.dylib
lrwxr-xr-x 1 root wheel 13 19 Aug 18:03 /opt/local/lib/libmirsdrapi-rsp-x86_64-1.1.so -> libmir_sdr.so
lrwxr-xr-x 1 root wheel 13 19 Aug 17:56 /opt/local/lib/libmirsdrapi-rsp.so -> libmir_sdr.so

/opt/local/include like this:
-rw-r--r--@ 1 root wheel 4903 19 Aug 17:52 /opt/local/include/mir_sdr.h
-rw-r--r-- 1 root wheel 5903 25 Mai 15:33 /opt/local/include/mirisdr.h
-rw-r--r-- 1 root wheel 1374 25 Mai 15:33 /opt/local/include/mirisdr_export.h

Re-install gr-osmosdr
sudo port install -f gr-somosdr

Now osmosdr_fft found the sdrplay.

Have a nice day!
kai
Last edited by kaig on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRPlay on Mac OSX

Post by Toontje » Fri Sep 11, 2015 8:27 am

Where did you get libmirisdr.0.0git.dylib, libmirisdr.a, mirisdr.h and mirisdr_export.h from? The OSX API only contains libmir_sdr.so and mir_sdr.h. Do you use the Linux versions?
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRPlay on Mac OSX

Post by Toontje » Fri Sep 11, 2015 8:45 am

Ok, i found the header files here: https://code.google.com/p/libmirisdr-2/
I am still missing the libraries.
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRPlay on Mac OSX

Post by Toontje » Sun Sep 13, 2015 9:40 am

I think this is the longest thread on the forum. When i look at the difference between the RTL-SDR i used before (supported on the Mac) and the SDRplay then it's a bl**dy shame this device doesn't work on a Mac.

#justsaying #gettingfrustrated
Last edited by Toontje 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: SDRPlay on Mac OSX

Post by sdrplay » Sun Sep 13, 2015 5:36 pm

Depends what you mean by working. The device does work and we do support the API natively on the Mac. If you take the API library from the SDRplay website (http://www.sdrplay.com/mac.html), the following code will work. It just grabs 1024 packets, but you get the idea.

Code: Select all

// Test code for the forum (no warranty or guarantee given)

#include "mir_sdr.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

int main() {
mir_sdr_ErrT err;

unsigned int fs;
int sps, grc, rfc, fsc;
int gainR = 40;
int NUM_PKTS = 1024;
int i;
short *xi, *xq;

err = mir_sdr_Init(gainR, 2.048, 222.064, mir_sdr_BW_1_536, mir_sdr_IF_Zero, &sps);
printf("Return code for mir_sdr_Init is: %d\n", err);

if (err != 0) {
        exit(err);
}

xi = (short *)malloc(sps * NUM_PKTS * sizeof(short));
xq = (short *)malloc(sps * NUM_PKTS * sizeof(short));

        for (i = 0; i < NUM_PKTS; i++) {
                err = mir_sdr_ReadPacket(&xi[i * sps], &xq[i * sps], &fs, &grc, &rfc, &fsc);
                if (err != 0) {
                        printf("Return code for mir_sdr_ReadPacket is: %d\n", err);
                }
        }
}
If the .h and .so are in the same directory as the code, then this makefile will work (assuming the files are called mir_sdr.h and libmir_sdr.so but you can make adjustments to the makefile if they are called something different)...

Code: Select all

EXE = forum_test.exe

RM = /bin/rm -f
MV = /bin/mv -f
MKDIR = /bin/mkdir -p

CC = gcc -g
LD = gcc -g
LN = ln

CFLAGS = -fPIC -Wall
INCS = -I. 
LINKFLAGS = -L.
LIB_OBJS = forum_test.o 

all: $(EXE)   

$(EXE): $(LIB_OBJS)
        @$(LD) $(LINKFLAGS) -o $(EXE) $(LIB_OBJS) -lpthread -lc -lm -ldl -lmir_sdr

%.o: %.c
        @echo "Compiling" $<
        @$(CC) $(CFLAGS) $(INCS) -c $<

clean:
        @echo "Remove all object files"
        @$(RM) $(LIB_OBJS) $(EXE) *.h~ *.c~ Makefile~
The problem we are aware of is the implementation of the SDRplay code within the gr-osmosdr library. We know this needs to be looked at, we need to reduce the amount of debug as that is having some effect and we also need to do some tests to figure out the issue with the data flow. There is also no error checking, so invalid RF and IF bandwidth combinations could be used which will give invalid results.

Our main focus for gr-osmosdr is on Linux. I have spent some time trying to get a reliable implementation on Mac without success. This has got to be looked at as a separate issue. So we will focus on Linux first and then Mac.

I know this probably doesn't help end users but as you all know we're coming from a Windows background so the non-Windows flows will take us a bit longer to get right for end users. For developers, however, everything is in place.

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: 67
Joined: Fri Aug 07, 2015 8:36 am

Re: SDRPlay on Mac OSX

Post by Toontje » Sun Sep 13, 2015 5:54 pm

Ok, so let me rephrase the statement: The device is fabulous, it's a shame that there are no apps on the Mac that support it. Just like a Mercedes without gasoline. Nice to sit in, but it doesn't bring you anywhere. ;-)
I'll get off my soapbox now and let you fix the Linux stuff.
Last edited by Toontje on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

dc1rdb
Posts: 19
Joined: Mon Jul 27, 2015 5:57 am

Re: SDRPlay on Mac OSX

Post by dc1rdb » Fri Sep 18, 2015 2:15 pm

As of today, we have a native Mac OS X application supporting SDRPlay. Details can be found at https://github.com/cjcliffe/CubicSDR/issues/144
Currently, it still involves some manual building, but I'm confident that we will see a pre-built binary soon!
Last edited by dc1rdb on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRPlay on Mac OSX

Post by Toontje » Fri Sep 18, 2015 3:02 pm

I will be testing tomorrow, but yes, all looks good.

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

Post Reply