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:




Tags , , , ,

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. Everything is very open with a very clear explanation of the issues.
    It was really informative. Your website is very useful.
    Thanks for sharing!

  4. Thank you for every other informative website. The place else may I
    am getting that kind of information written in such an ideal approach?
    I have a mission that I am simply now operating on, and I have been at the glance out for such information. http://5QS.XYZ

  5. whoah this weblog is wonderful i really like studying your articles.
    Keep up the good work! You realize, many people are looking round for this
    info, you could aid them greatly.

  6. 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!

  7. 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.

  8. Greetings! Very helpful advice in this particular post! It’s the little changes that produce the greatest changes.
    Thanks for sharing!

  9. I constantly emailed this weblog post page to all my associates, because
    if like to read it then my contacts will too.

  10. These are actually wonderful ideas in concerning blogging.
    You have touched some good factors here. Any way keep up wrinting.

  11. Hiya very nice site!! Guy .. Excellent ..
    Amazing .. I will bookmark your site and take the feeds additionally?

    I’m satisfied to search out numerous helpful info here within the publish, we want work out extra techniques in this
    regard, thanks for sharing. . . . . .

  12. 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

  13. 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!

  14. 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!

  15. 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.

  16. 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.

  17. 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.

  18. Your style is unique compared to other people I have
    read stuff from. Many thanks for posting when you have the opportunity, Guess I
    will just book mark this page.

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

  20. 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.

  21. It’s very easy to find out any matter on web as
    compared to textbooks, as I found this article at this
    web page.

  22. 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!

  23. 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.

  24. Your method of explaining everything in this paragraph is actually nice, every
    one be able to simply be aware of it, Thanks a lot.

  25. 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!

  26. 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.

  27. Does your site have a contact page? I’m having trouble
    locating it but, I’d like to shoot you an email. I’ve got some recommendations for your blog you might
    be interested in hearing. Either way, great blog and I look forward to
    seeing it grow over time.

  28. 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!

  29. 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.

  30. 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.

  31. Avatar for stackprogramer says:

    I couldn’t refrain from commenting. Perfectly written!

  32. 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!

  33. 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.

  34. 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

  35. 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!

  36. 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.

  37. 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!

  38. It’s awesome to pay a visit this website and reading
    the views of all friends on the topic of this
    article, while I am also eager of getting know-how.

  39. Hello to all, how is the whole thing, I think every one is getting more
    from this web page, and your views are nice in support of new people.

  40. When someone writes an article he/she keeps the thought of a user in his/her
    mind that how a user can understand it. So that’s why this paragraph is amazing.


  41. Good web site you have here.. It’s hard to find high-quality writing like yours these
    days. I really appreciate individuals like you!
    Take care!!

  42. Pretty nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed surfing around your blog posts.
    In any case I’ll be subscribing to your rss feed and I hope you write again soon!

  43. Hi, I do think this is a great website. I stumbledupon it ;
    ) I’m going to return yet again since I book marked it.
    Money and freedom is the best way to change,
    may you be rich and continue to help other people.

Leave a Reply

Want to see your ugly mug by your comment? Get a free custom avatar at Gravatar.