Author Topic: HackRF - Using the HackRF One as a spectrum analyzer  (Read 446 times)

0 Members and 1 Guest are viewing this topic.

Online Bicurico

  • Frequent Contributor
  • **
  • Posts: 471
  • Country: pt
    • VMA's Satellite Blog
HackRF - Using the HackRF One as a spectrum analyzer
« on: December 04, 2017, 10:05:17 PM »
Hi,

I recently got myself a HackRF One. I guess most of you already know this device, it has been around for a couple of years.

I have ordered a PlutoSDR, but the backorder went from Dec, 4th to somewhere in Feb 2018  :wtf: so I got the HackRF meanwhile.

There are two options on purchasing the HackRF: the offical and original one from Great Scott Devices for around US$300 or chinese clones at around US$200. I went for the original one due to faster shipping, warranty and original plastic case.

Under Linux, there is qspectrumanalyzer --> https://github.com/xmikos/qspectrumanalyzer

This is impressive speedwise and in terms of frequency-range, but pretty limited in functionality. It does, however, show the great potential of this hardware platform.

On my blog I posted a first result using Windows: http://vma-satellite.blogspot.pt/2017/11/using-hackrf-one-and-gnu-radio-on.html

Other than generally found on the Internet, you can well use this device under Windows and most tools are supported.

Unfortunately, qspectrumanalyzer refuses to work with current firmware/hackrf_tools/Python/whatever releases.

There is, however a Windows solution: https://www.rtl-sdr.com/hackrf-sweep-spectrum-analyzer-windows/

Here is the GitHub page from PAVSA: https://github.com/pavsa/hackrf-spectrum-analyzer

It works relatively well, but the HackRF crashes a LOT when toggling the frequency range (easy fix, just press RESET to resume). Also, it has little functionality. BUT: this is fast and with high resolution!

Meanwhile I managed to compile the hackrf_tools and there is a fix which prevented hackrf_sweep.exe to run under Windows. It works now.

This led me to make a first quick hack to adapt my VMA Simple Spectrum Analyzer software to HackRF One. Results *promise* to be fantastic, but the current firmware/hackrf_sweep implementation are totally inadequate, as changing the start/end frequencies will actually crash the device and the RESET button has to be pressed (which is what happends with the hackrf-spectrum-analyzer for Windows).

I wonder if anyone literate in VC++ is interested in giving me a hand to modify hackrf_sweep so that it will work with my software?

This would allow a fully functional "software defined" spectrum analyser for US$200-300 and frequency range from 1MHz to 6GHz. Add to this extra functionality (recording and TX) - and it blows my mind.

Regards,
Vitor
« Last Edit: December 04, 2017, 10:25:54 PM by Bicurico »
 

Online hagster

  • Regular Contributor
  • *
  • Posts: 136
Re: HackRF - Using the HackRF One as a spectrum analyzer
« Reply #1 on: December 08, 2017, 08:27:22 PM »
Victor,

I don't have the skills to help you with this unfortunately, but it would be great to have a more reliable and full featured version of a hackRF sweep spec an. You could try posting an issue on the HackRF Github https://github.com/mossmann/hackrf/issues
 

Online Bicurico

  • Frequent Contributor
  • **
  • Posts: 471
  • Country: pt
    • VMA's Satellite Blog
Re: HackRF - Using the HackRF One as a spectrum analyzer
« Reply #2 on: December 09, 2017, 05:41:36 AM »
Hi,

I already did that, but so far I got no reply.

This is the problem with open source (in my opinon): it is said that with open source "anyone" can see the code, check it for errors or security issues and change it as required.

Well, it took me three nights to be able to compile the hackrf_tools for Windows. And I do have a legal license of Visual Studio 2015 Premium (imagine if I didn't).

I had to install CMAKE, download binaries of fttw, as compiling them myself is even more complicated - fortunately someone put them online!

Then I had to get libusb sources.

In the end you have so many source code, it is impossible for one person to understand what it all does!

And if you want to run qspectrumanalyzer (which doesn't work for me, as it crashes under Windows), you need Python, too.

With closed source at least you can expect working binaries.

I have (again) a Ubuntu partition for better HackRF support, but interstingly CubicSDR freezes the whole PC under this OS (works great on Windows).

Life is not easy!

But HackRF is a great tool, none the less. An hour ago I did some tests with my home alarm system and found out that the remotes to turn the alarm on and off do NOT use rolling code!  :palm: :wtf:

Now I can activate/deactivate my alarm with my laptop and HackRF. I bet burglars can, too.

Cheers,
Vitor
« Last Edit: December 09, 2017, 05:45:31 AM by Bicurico »
 

Online hagster

  • Regular Contributor
  • *
  • Posts: 136
Re: HackRF - Using the HackRF One as a spectrum analyzer
« Reply #3 on: December 09, 2017, 08:02:47 AM »
Victor, I kind of agree a bit, but i do think that hackRF has moved the SDR world forward significantly and need to be commended for this. The gap is having a business model that can pick up these changes to keep the platform relivent.

As open source only there is very little incentive for individual developers to spend he SIGNIFICANT effort in maintaining the software.
 

Online Bicurico

  • Frequent Contributor
  • **
  • Posts: 471
  • Country: pt
    • VMA's Satellite Blog
Re: HackRF - Using the HackRF One as a spectrum analyzer
« Reply #4 on: December 10, 2017, 09:32:45 AM »
Don't get me wrong: HackRF One is one hell of a great device! If I had known how great it is, I would have bought it much sooner.

My rant wasn't even against the existing software. It was against the fact that many people consider open source to be the non plus ultra in terms of software, when in my experience it often means that you get no support and just compiling the software is a nightmare, modifying or at least understanding the source a huge task.

Also, it astounds me that this device must have sold a lot and yet there are such evident software bugs, I wonder how they were not mentioned before and long time fixed.

So the rant was more about how "open source" can mean that everyone contributes so that HIS application works and in the end simple things don't work. I mean why are there Windows binaries for hackrf_tools and qspectrumanalyzer, if they don't work? It seems that all that was done was to just compile them. For the sake of it.

Anyway, I will continue to adapt my software to the hackrf_sweep.exe and hopefully there will be some fixed release that will not crash the device.

Cheers,
Vitor
 

Online hendorog

  • Frequent Contributor
  • **
  • Posts: 873
  • Country: nz
Re: HackRF - Using the HackRF One as a spectrum analyzer
« Reply #5 on: December 11, 2017, 06:18:24 AM »
Compiling stuff on windows which was developed on linux is often difficult. This isn't an open source thing...

This is an area where linux shines. It is a heck of a lot simpler to install development libraries and build things on linux compared to windows.

The open source thing is that you can see the broken bits. The problem is that there is nothing that tells you which bits are expected to work and which bits are not.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf