Page 1 of 1

bladerf matlab on mac

Posted: Mon Jun 27, 2016 2:52 pm
by valantis
Hello. Does the matlab code you have working on a mac? Thanks.

Re: bladerf matlab on mac

Posted: Mon Jun 27, 2016 3:06 pm
by jynik
We don't test MATLAB support on OS X, so you may find some work is required to get it working, if it doesn't work out of the box.

I am not aware of anything that would prevent it from working -- if you're able to build libbladeRF, I would imagine you have the tools to build the necessary shared library.

I would recommend you review the code for the bindings here:
https://github.com/Nuand/bladeRF/tree/m ... ngs/matlab

The bladeRF.build_think() function is what you'd need to execute to kick off a build of the thunk file.

If things do not build and operate correctly, my guess would be that you'd need to review the types used in libbladeRF_proto.m. As you can see, we had to deal with differences between *nix and Windows; I wouldn't be surprised if we need a few considerations for OS X.

Re: bladerf matlab on mac

Posted: Mon Jun 27, 2016 3:19 pm
by valantis
Thanks for the answer. So, building libbladeRF on OS X is the same as installing these drivers https://www.nuand.com/bladeRF-doc/guide ... aller.html on Windows?

Re: bladerf matlab on mac

Posted: Mon Jun 27, 2016 3:27 pm
by jynik
No - the Windows installation comes with a pre-built thunk file.

If you're running on OS X, you'd need to:
  • Download the bladeRF source
  • Build libbladeRF from source, or download it via Homebrew/Macports. You'll need the associated libbladeRF.h to be within your compiler's search path.
  • Navigate to the libbladeRF MATLAB bindings directory from within MATLAB and execute bladeRF.build_thunk() to build the thunk file. This may require that you follow the instructions for Linux (see the link in my previous message), where you may have to use a modified copy libbladeRF.h to work around some silliness from MATLAB.
You'll probably hit some bumps on the way, and we'd happily accept patches. I can almost guarantee it's not going to work out of the box on OSX, but could probably help point you in the right direction if you're familiar with building software from source.