Teaser: VMA Simple Spectrum Analyzer for HackRF One
Hi,
As you know, I am a spectrum freak. There are two implementations already for the HackRF One:
This motivated me to do a preliminary hack to see if the HackRF One could be used with my VMA Simple Spectrum Analyser software and the results are very promising:
As you know, I am a spectrum freak. There are two implementations already for the HackRF One:
- qspectrumanalyzer - works well under Linux, but crashes right away under Windows
- hackrf-spectrum-analyzer - works on Windows, but crasshes frequently when changing settings
This motivated me to do a preliminary hack to see if the HackRF One could be used with my VMA Simple Spectrum Analyser software and the results are very promising:
Live spectrum (10MHz to 1000MHz)
Average Trace
Live, Min and Max Traces
Solid render of Live Trace
3D spectrum mode
The implementation is totally hacked and with errors:
- I am not reading out the data correctly and there is some unfixed bug, which is why there is a blank on the right side of the spectrum in the above images
- The frequency values are wrong
- The frequency range cannot be set, nor can any other setting, as I have not implemented the protocol, yet
However, all other measurement functionality works and speed is fantastic! This could be a dream come true.
But there is a LOT of work required to get this to work and sadly I won't be able to manage it by myself.
First things first - the TODO list:
- Better understand the hackrf_sweep protocol
- Implement correct start/end frequency setting
- Implement correct bin_width setting (FFT frequency resolution)
- Implement num_samples setting (number of samples per frequency)
- Implement interpretation of sweep output
- Implement way to change current start/end frequency and other parameters (*)
(*) This is the crucial part: as it is, the hackrf_sweep.exe needs to be stopped with CTRL+C and restarted with new settings. This is not ideal, as it causes a significant pause.
Worse than that, under Windows, every CTRL+C crashes the HackRF One and a resume requires to press the physical RESET button.
Instead of having a hackrf_sweep.exe tool running in a shell outputting the sweep data to the console (from where I am reading it right now), I would prefer a TCP/IP communication to receive the sweep data and to send any new setting.
Unfortunately this requires to change the C++ sources of the hackrf_tools, something I am not literate to do.
If you know how to program VC++ and are interested in this project, please contact me!
Regards,
Vitor
Would like to know if you ever finished your project on hackrf
ReplyDeleteI would be interested in giving a donation.
Hello,
ReplyDeleteUnfortunately not and I gave up on it.
The HackRF firmware and Windows binaries have a bug that causes the HackRF One to crash after each individual sweep. This has kind of been fixed by the sweep DLL created by the author of the HackRF One Spectrum Analyzer for Windows, but that approach does not work with my software.
I never got around the problem that the hackrf_sweep simply does not work with Windows and neither did I get any help...
This is the reverse of "open source": if you cannot fix it yourself, your screwed!
Regards,
Vitor
Hey, I just found your blog from your comments on git on hackrf_sweep. The problem isn't with the timestamp having a decimal or not in windows. QSpectrumAnalyzer uses hackrf_sweep in binary mode which doesn't have the timestamp. The issue is in binary mode, the record is supposed to start with the length, and in linux it's always consistent, but in windows, it goes haywire pretty quickly. I'm looking into what the issue is, but haven't found it yet. Also, if you use some averaging on your spectrums, they'd look a lot nicer! Like this: https://photos.app.goo.gl
Delete/HcAzTwUHPCQt9XFK7
Averaging the spectrum is nice for some measurements, but not for all!
DeleteThis is why you can select how you want to display the trace: LIVE, MIN, MAX, AVG, etc.
Let me know if you figure out how to fix the Hackrf_sweep.exe bug.
Regards,
Vitor