

Finally, add the build directory to the MATLAB Path.Īfter a refresh, you will find a new Toolbox named "HackRF" in the Simulink Library Browser. Copy libhackrf.dll from 'deps/bin' into the 'build' folder. If you get errors, create an empty file libhackrf.lib in 'deps/bin/' and rerun. Run MATLAB, switch to your Simulink-HackRF directory and start the build process via
#Rf toolbox matlab youtube install#
Get Zadig, plug-in your device and run Zadig and install the driver. Open the MinGW Command Prompt, navigate to the 'libhackrf/build' directory and run mingw32-make to build the hackrf library. LIBUSB_LIBRARIES can point to the static library shipped with the libusb binaries, 'MinGW64/static/libusb-1.0.a'. You will probably have to set the the include and lib settings for libusb manually: LIBUSB_INCLUDE_DIR must be set to the libusb directory, subfolder 'include/libusb-1.0'. Set the CMAKE_INSTALL_PREFIX to the 'deps' directory you created above. Next, hit Configure and select 'MinGW Makefiles' as generator. Create a directory 'build' in there and set it as the binaries directory in the CMake-GUI. Start the CMake-GUI and set the source directory to your libhackrf sources, that is subdirectory 'host/libhackrf' in the repo. Next, you need to install CMake as well as windows binaries for libusb.

Extract the archive and create a subdirectory deps in there.īuild the hackrf library (based on libhackrf README):įirst, get the hackrf source code by cloning the repo or download it as an archive and extract. If you aren't using git you can get the latest release. Get the Simulink-HackRF source from GitHub. MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
