Getting Started

First, join this facebook group or find us on Twitter and send pictures of your setup when you get things working. If you have any questions, asking in the group is a good way to get a quick answer.

The HackRF has quite a steep learning curve but once you start getting used to its behaviour you’ll easily become addicted.

The first thing to understand is that this is a sensitive device. Do not use powerful transmitters near the HackRF or you will damage it. Don’t touch the board except on the edges, treat it with extreme care. Simply touching the RF section of the board can be enough to permanently reduce the board’s RF sensitivity or kill it entirely due to electrostatic discharge. If you bought an acrylic case, the first thing to do, before you even plug the device in, is attach the case (carefully). If you don’t have a case, just be careful with how you handle the board, you can also make a case quite easily with acrylic sheeting and motherboard risers, the designs are here.

There are a number of existing resources, including a very good video series by Michael Ossmann on getting started with GNU Radio etc.

The easiest way to get started is to download Pentoo and use that as everything is already installed and ready to go. If you have trouble using your HackRF on an environment you set up yourself, the first step is to test your device in Pentoo to eliminate hardware errors as a cause.

This page will give you a quick guide on setting up your MacOS or Ubuntu system for the HackRF and making sure your HackRF is working properly. If you are using Windows, you should use SDR Sharp, or the more powerful SDR Radio. I don’t have a Windows system and would need to install one first before I can make a guide, so if you use a HackRF on Windows and want to make a guide on getting it working please send it over and I’ll put it up on this page

MacOS (tested with Yosemite):

First, you need to install MacPorts. Once you have that set up and working, do the following:

$sudo port -v selfupdate

$sudo port install xorg-server

$sudo port install gr-osmosdr +full

(this will take a long time)

$sudo port install gr-fosphor

Plug in your HackRF and:

$hackrf_info

This should give you your firmware version etc. If you receive:

hackrf_open() failed: HACKRF_ERROR_NOT_FOUND (-5)

make sure the “USB” LED is on when you plug in the HackRF and try restarting.

make sure the “USB” LED is on when you plug in the HackRF and try restarting.

Run GQRX (MacOS, Ubuntu or Pentoo)

Launch GQRX:

$gqrx

Attach an antenna, preferably something about 60-100cm long, we’re going to listen to the radio.

Make everything look like this:

Set the frequency to 100MHz:

Make sure that all the amps and gain are set to 0 (you should always start with 0 in case there’s a strong signal that can damage the HackRF):

Set demodulation to WFM:

Click the power button:

Depending on where you are, the length and angle of your antenna, the RF interference around you, how ‘noisy’ your computer is, and if you are behind walls etc or not, you should see something like to this. The signals could be stronger or weaker, but in most (not all) cases you’ll see something:

The HackRF can be a strange animal, it can seem at some times as if it’s working great, and then the same board can seem completely RF deaf at other times. If you don’t see any signals at this point, proceed though this guide anyway. Come back later to this part and try a different computer, a different location, a different antenna (starting with 1.5m of plain wire), different sample rates, try it in the middle of the day and the middle of the night. You’ll eventually get a ‘feel’ for how to ‘ride’ this beast.

Now slowly turn up the baseband and IF gain, but leave the amp (RF Gain) at 0, you should start to see the signals increase in power and definition:

What you are looking at (if everything is working) are FM radio broadcasts.

The gain stages are your friends and the HackRF is not much use without them, get to know them intimately. Turning the gain up and mixing different amounts of BB vs. IF gain should clean up the spectrum. What you want to do is get the best signal to noise ratio, if the gain is too high there will be a lot of noise, if it’s too low the signal won’t be strong enough. Try to get it looking something like this (and notice the difference between this, and the images above):

Now for the audio. Leave the frequency where it is (100MHz), but click on one of the signals. This will adjust the frequency offset and select which part of the spectrum your computer will ‘listen’ to. Adjust the audio gain (bottom-right corner). There are usually some other rogue signals around this part of the spectrum (even shadows of USB traffic), but if it’s an FM radio station you should now be able to hear it. If you don’t hear anything, check your system volume and the audio gain in gqrx.

Once you find a station, play with the BB and IF gain controls and see how it affects the audio.

Now turn the IF and BB gain (both of them) off, and turn RF gain on. You should be able to make out at least some audio from the station from the previous step and depending on your exact setup and location it could be quite clear. Now slowly adjust the BB and IF gain stages and you should be able to hear a nice clear signal. Turn the RF gain off and an and notice the difference (not huge, but noticeable). There will always be a background “hiss” and a HackRF will not be as clear as a regular FM radio (which uses filters etc specifically for FM demodulation at this frequency range). Later on you’ll be able to do a much better job by using filters etc in GNU Radio but you should be able to get something quite clear and strong with GQRX.

If the audio is ‘choppy’, this is because your computer is struggling to keep up with the number of samples that are coming through. To fix this, open the settings and reduce the sample rate:

You’ll most likely need to quite and re-open GQRX after changing sample rates. Experiment until you get something that works well on your particular system.

Transmitting

Find a regular FM radio, you’ll need one for this part. Hint: your phone might have one built-in.

Tune your radio to a frequency that only has static, and note down the frequency (e.g. 100.5M).

Double click on the “wav source file” block and then click the […] button to browse for the wav file. Click apply.

Plug in your HackRF with an appropriate antenna connected (e.g. the telescopic antenna). Now click the “play” button in GNU Radio. A frequency selector should pop up, type in the frequency your radio is tuned to (e.g. 100.5M) and hit enter.

If all goes well, you should hear something being transmitted.

Troubleshooting

If you have serious trouble and believe it to be a hardware issue, get in touch with us at hackrfblue#gmail.com. We will take up to a week to reply depending on how busy we are, so it’s a good idea to do your best to solve the issue yourself first. Please keep in mind that we don’t provide tech support, so please don’t contact us if you have not tried to replicate your issue on a second computer or based on your expertise are very sure it’s a hardware issue.

No signal at all or very weak signal even when using gain:

Make sure the antenna is attached securely. Unplug the HackRF then get a multimeter and carefully (avoid touching any other part of the board) check the continuity between the antenna shaft itself and the point where the SMA connector joins the PCB:

RF Spectrum is “mirrored” around the centre DC spike:

This is a very common issue with the HackRF. Try adjusting the gain until the mirroring disappears. Also try reducing and increasing the sample rate (change the sample rate, exit GQRX, unplug the HackRF, plug it back in, re-open GQRX).

16 thoughts on “Getting Started”

Thanks for the getting started guide. Mine was delivered yesterday. I already had an SDR# install on my work Windows 7 laptop, so getting it running on Windows took less than a minute. The SDR# (sdrsharp.com) download has everything you need. You just need to know to run Zadig to get the WinUSB driver installed, It’s the same steps as getting an RTL-SDR stick running, only the drop down choice says “HackRF one” instead of “Bulk In”

One resource that might be needed is info about what, if anything, is different between the HackRF Blue and the HackRF One. For example, Should the HackRF Blue use the same firmware updates? Are there any places where the performance is (noticeably) different? Note: on the new GSG blog, Michael Ossmann, mentioned they are now listing the spec of the HackRF one as going down to 1 Mhz. I’m interested in finding out how the HackRF Blue compares to the HackRF One in the HF range.

On Linux I generally see a whole slew of things at this point. And finally, the Python packages directory has no gnuradio bits:

$ ls /opt/local/lib/python2.7/site-packages
xcbgen

Perhaps I’m just missing something simple, but I followed the steps precisely and carefully. Before I try installing gnuradio separately, and possibly hosing my working GQRX rig, I thought I’d ask here to see if any other Mac users ran into oddities with these instructions.

I’m a Linux dummy, so bear with me! When I ran “$sudo add-apt-repository ppa:gqrx/releases”, I had a problem, got the error: “Please check that the PPA name or format is correct”

I’m using Ubuntu 14.04 and I checked a different ppa repository and it worked OK on my PC. I did successfully install gqrx on a different PC last month with these same instructions, has something changed?