Wednesday, 8 April 2015

Twinkle twinkle SDR

RF Chaos!
Just on two weeks ago I excitedly unpacked a parcel from SparkFun in the US. It was my first serious software defined radio (SDR), the HackRF One from Great Scott Gadgets. What a brilliant piece of gear for the price, even with the Australian sheckle being down on the USD it still comes in at less than AUD $400.

So, what do you get for your money?

Well, you get a little black plastic box with three SMA connectors on the ends and a mini-USB socket, along with a handful of LEDs. Actually you also get a suitable USB cable but that's about it.

Hidden in that unassuming box is a half-duplex transceiver capable of operating (officially) from 10MHz through to 6GHz, with an instantaneous bandwidth of 20MHz. Unofficially, it will cover essentially DC to 7.2GHz with a maximum bandwidth of around 21.5MHz but the performance will drop off as you venture to the far ends of this range.

Inside the HackRf One

Inside the box - which you open by loosening the three nuts on the SMA connectors and prying apart the edges with your fingernail - you will find a couple of expansion headers which give you access to various processor and I/O signals, the clearly defined RF section on the left and the large ARM processor on the right.

As I mentioned there are three SMA connectors mounted on the printed circuit board (PCB). The single connector on the same edge as the LED is the radio frequency (RF) in/out connector. This is the business end of the device where you would connect your antenna, amplifiers, filters etc. Note that these are standard SMA and not the reverse polarity SMA (RP-SMA) found on WiFi devices. If you connect a WiFi antenna with a RP-SMA connector to the HackRF the inner conductor of the cable will not actually be connected so be sure to use suitable adapters if you intend to use WiFi accessories on the HackRf.

On the other end of the board are two more SMA, these are clock-in (CLKIN) and clock-out (CLKOUT) connections which allow you to connect an external 10MHz frequency reference to the HackRF or to synchronise a second HackRF. The clocks signals are specified as 3.3V (maximum) square wave. Apparently the internal reference clock in the HackRF is automatically bypassed when you connect a suitable signal to the clock input. Using an external reference is completely optional as the on-board clock is already much more accurate and stable than that of a typical RTL-SDR TV dongle.

What can it do - I hear you ask! That would be a great question to ask if it were a normal radio transceiver like a UHF CB but being a software-defined radio the question is really what can't it do. Out of the box, it can't do anything. You need suitable software to make it do anything useful at all, luckily there are a number of applications available - almost free - to suit Windows, Linux, OSX and Android users.

Here are a couple of links to get you started:
  • SDR-Radio is an amazing Windows based application that supports the HackRF as well as a number of other SDR.
  • RF-Analyzer is an Android application which turns your Android phone or tablet into a fairly powerful handheld receiver / RF mapping tool.The RTL-SDR dongles are also supported.
  • GQRX provides OSX and Linux users with a nice multi-mode receiver.
  • GNU Radio is the single most powerful SDR tool available for Linux, OSX and Windows.
Using any of the above applications the HackRF becomes a quite capable multi-mode receiver capable of receiving SSB, AM, narrow-band (NBFM) and wide-band (WBFM) FM signals such as shortwave radio stations, CB, FM broadcast stations etc. If you want APCO25 (P25), DMR or D-STAR reception you really need to use GNU Radio with something like the examples available from VA3RFT/VE3IRR etc.

Transmitting on the HackRF is possible via GNU Radio or in a limited fashion using the command line utilities provided by the Linux drivers in the form of the hackrf_transfer command.

The hackrf_transfer command allows you to do a couple of things, it can generate a continuous unmodulated carrier on a specified frequency with adjustable output power or it can act as an RF record and playback utility. For example hackrf_transfer -r test.dat -s 8000000 -f 146000000 would record 4MHz of spectrum either side of 146MHz to a disk file called test.dat, this could then be played back again using hackrf_transfer -t test.dat -s 8000000 -f 146000000. A handy utility for taking RF snapshots for later analysis in GNU Radio or Baudline. The data file would contain interleaved 8 bit signed I & Q samples so two bytes of data per sample which turns into a lot of disk storage if left running for any significant length of time.

On the subject of 8 bits samples, this limits the HackRf to a dynamic range of 48dB (20log 2^8). Not as good as some higher end 12 or 16 bits SDR but perfectly adequate for the designed purpose of being a "hacking" SDR.

Anyway enough of an intro!

No comments:

Post a Comment