How we can install HackRFOne On Matlab in Win8

In this blog post we will show installing library simulink-hackrf in MatlabRS2016a. With this library you can using HackRFOne in matlab HackRFOne is a opensource SDR hardware This library is Great it is brought for you using  HackRFone in matlab for enthusiasts of SDR. In this video you can see installing this library.


1-Install Matlab compiler MinGW64 in Matlab RS2016a

  • If you have problem in installing,you should download file seperately and copy to download package matlab: C:\MATLAB\SupportPackages\R2016a\downloads\mingw_download
  • I coppied before them for more info search forum matlab this link matlab errror installing mingw
  • After installing you should check: mex -setup c

2-Install MinGW64-posix install you should,must install posix MinGW

  • I should set path to bin of gcc

3-Install Cmake

  • you should installed before cmake

4-Download binary libusb 

  • I dowloaded libhackrf osmocom before copy libusb to directory libhackrf
  • copy libusb.h to include folder of your compiler
  • now run cmake
  • now i make with mingw32-make
  • install in deps directory simulink hackrf library

5-Install with Zadig HackRF One Driver

  • For installing  HackRF One driver i installed it before with SDRsharp

6-Make in matlab is done

  • run matlab make  .mfile

 

We compiled this liibrary according library ReadMe.

  1. Install a compiler and setup MATLAB's mex compile script: Here, we will use MinGW64 which is support since MATLAB 2015b. To set it up follow the instructions on the Mathworks page. Next, add the MinGW64 bin directory to your PATH (default is C:\TDM-GCC-64\bin) To double-check, open a MATLAB console:

     >> mex -setup C
     MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
     ...
    
  2. Get the Simulink-HackRF source from GitHub. If you aren't using git you can get the latest release. Extract the archive and create a subdirectory deps in there.

  3. Build the hackrf library (based on libhackrf README):

    • First, get the hackrf source code by cloning the repo or download it as an archive and extract. Next, you need to install CMake as well as windows binaries for libusb.

    • Start the CMake-GUI and set the source directory to your libhackrf sources, that is subdirectory 'host/libhackrf' in the repo. Create a directory 'build' in there and set it as the binaries directory in the CMake-GUI. Next, hit Configure and select 'MinGW Makefiles' as generator. Set the CMAKE_INSTALL_PREFIX to the 'deps' directory you created above. 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'. LIBUSB_LIBRARIES can point to the static library shipped with the libusb binaries, 'MinGW64/static/libusb-1.0.a'. Finally, press Generate.

    • Open the MinGW Command Prompt, navigate to the 'libhackrf/build' directory and run mingw32-make to build the hackrf library. Next, run mingw32-make install.

  4. Get Zadig, plug-in your device and run Zadig and install the driver.

  5. Run MATLAB, switch to your Simulink-HackRF directory and start the build process via

     	>> make
    

    If you get errors, create an empty file libhackrf.lib in 'deps/bin/' and rerun. Copy libhackrf.dll from 'deps/bin' into the 'build' folder. Finally, add the build directory to the MATLAB Path.

  6. After a refresh, you will find a new Toolbox named "HackRF" in the Simulink Library Browser. A simple spectrum scope model and a single-tone transmitter model is located in the directory demos. Also, there is MATLAB command >> hackrf_find_devices which you can use to test your setup.

you can see with more detail in below youtube video:

 

 

Sharing is caring!

50 thoughts on “How we can install HackRFOne On Matlab in Win8”

  1. Hi! I know this is somewhat off topic but
    I was wondering if you knew where I could find a
    captcha plugin for my comment form? I’m using the same blog platform as yours
    and I’m having difficulty finding one? Thanks a lot!

  2. Howdy just wanted to give you a brief heads up and let you know a few of the pictures aren't loading properly. I'm not sure why but I think its a linking issue. I've tried it in two different browsers and both show the same results.

  3. Hi fantastic website! Does running a blog similar to this take a great deal of work?
    I have virtually no expertise in programming but I
    was hoping to start my own blog in the near future. Anyhow, if you
    have any ideas or tips for new blog owners please share.
    I understand this is off subject nevertheless I just wanted
    to ask. Appreciate it!

  4. I’ve been exploring for a little for any high quality articles or weblog posts on this sort of house
    . Exploring in Yahoo I finally stumbled upon this website.

    Studying this info So i am glad to convey that I have an incredibly just right uncanny feeling
    I found out just what I needed. I most certainly will make sure
    to do not put out of your mind this site and provides it a glance regularly.

  5. Howdy just wanted to give you a quick heads up.
    The text in your article seem to be running off the
    screen in Opera. I’m not sure if this is a format issue or something to do with internet browser compatibility but I thought I’d post
    to let you know. The design look great though! Hope you get the problem resolved soon. Many thanks

  6. Hello! I realize this is kind of off-topic however I had to
    ask. Does running a well-established blog like yours take a large amount of
    work? I’m completely new to writing a blog but I do write in my diary on a daily
    basis. I’d like to start a blog so I will be able to share
    my personal experience and feelings online. Please let me know if you have any suggestions or tips for
    brand new aspiring blog owners. Thankyou!

  7. Hello! I could have sworn I’ve been to this site before but after looking at a few of the posts I realized
    it’s new to me. Nonetheless, I’m certainly pleased I found it and I’ll be bookmarking it and checking back frequently!

  8. I blog quite often and I truly thank you for your content.
    Thhe article has truly peaked my interest. I am going to book mark your website and keep checking
    ffor nnew details about once a week. I opted in for your
    Feed as well.

  9. Normally I do not learn article on blogs, but I would like to say that this write-up very forced me to take a look at and do it!
    Your writing style has been surprised me. Thank you, very
    nice article.

  10. I’m now not certain where you are getting your information, but great topic.
    I needs to spend some time finding out more or working out more.
    Thanks for great info I was searching for this info for my mission.

  11. Wow, this piece of writing is good, my younger sister
    is analyzing these kinds of things, therefore I
    am going to tell her.

  12. I’m no longer sure where you’re getting your info,
    but good topic. I must spend some time learning more or understanding more.
    Thank you for great info I used to be in search of this
    information for my mission.

  13. When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get
    four emails with the same comment. Is there any way you can remove me
    from that service? Many thanks!

  14. Howdy! Do you know if they make any plugins to help with SEO?
    I’m trying to get my blog to rank for some targeted keywords but I’m not
    seeing very good results. If you know of any please share.
    Thanks!

  15. Hey there! I know this is kinda off topic however
    , I’d figured I’d ask. Would you be interested in exchanging links or maybe guest writing a blog article or vice-versa?
    My website goes over a lot of the same topics as
    yours and I believe we could greatly benefit from each other.
    If you’re interested feel free to send me an e-mail. I look
    forward to hearing from you! Wonderful blog by the way!

  16. I don’t even understand how I finished up right here, however I thought this submit was once good.
    I do not realize who you’re however definitely you’re going to a well-known blogger in case you aren’t already.
    Cheers!

  17. Wow that was unusual. I just wrote an extremely long comment
    but after I clicked submit my comment didn’t appear.
    Grrrr… well I’m not writing all that over again.
    Anyhow, just wanted to say wonderful blog!

  18. Attractive component to content. I simply stumbled upon your website and in accession capital to claim that I get in fact enjoyed account your blog posts.
    Anyway I’ll be subscribing in your feeds and even I fulfillment you
    get entry to persistently rapidly.

  19. Hey I know this is off topic but I was wondering if you
    knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and
    was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything. I truly enjoy reading your blog and I look forward
    to your new updates.

  20. Hi would you mind letting me know which webhost you’re using?
    I’ve loaded your blog in 3 different web browsers and I must say this
    blog loads a lot faster then most. Can you recommend a good internet hosting provider at a
    reasonable price? Thanks a lot, I appreciate it!

  21. May I just say what a relief to uncover someone who truly knows
    what they are discussing over the internet.
    You definitely understand how to bring an issue to light and
    make it important. More people really need to read this and understand this
    side of your story. I was surprised that you are not more popular since
    you certainly possess the gift.

  22. I think this is one of the most important information for me.
    And i am glad reading your article. But should remark on some general things, The site style is wonderful,
    the articles is really excellent : D. Good job, cheers

  23. This is a really good tip particularly to those fresh to the
    blogosphere. Brief but very accurate info… Thanks for sharing this one.
    A must read article!

  24. Heya i’m for the first time here. I came across this board and
    I find It truly helpful & it helped me out much. I hope to give something back and help others
    such as you helped me.

  25. Howdy! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a
    community in the same niche. Your blog provided us
    beneficial information to work on. You have done a extraordinary job!

Leave a Reply

Your email address will not be published. Required fields are marked *