HackRF - Using the HackRF One as a spectrum analyzer - Page 1
Forum section: electronics / rf-microwave

author: Bicurico
author_rank: Super Contributor
timestamp: December 04, 2017, 11:05:17 am
content: 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 2018so 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/qspectrumanalyzerThis 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.htmlOther 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-analyzerIt 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

author: hagster
author_rank: Frequent Contributor
timestamp: December 08, 2017, 09:27:22 am
content: 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 Githubhttps://github.com/mossmann/hackrf/issues

author: Bicurico
author_rank: Super Contributor
timestamp: December 08, 2017, 06:41:36 pm
content: 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!Now I can activate/deactivate my alarm with my laptop and HackRF. I bet burglars can, too.Cheers,Vitor

author: hagster
author_rank: Frequent Contributor
timestamp: December 08, 2017, 09:02:47 pm
content: 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.

author: Bicurico
author_rank: Super Contributor
timestamp: December 09, 2017, 10:32:45 pm
content: 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

author: hendorog
author_rank: Super Contributor
timestamp: December 10, 2017, 07:18:24 pm
content: 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.