From charlesreid1

Line 62: Line 62:
===Testing GnuRadio Osmocom Blocks===
===Testing GnuRadio Osmocom Blocks===


To test that the Osmo sdr stuff was installed correctly, open Gnu Radio Companion, and look for an Osmo source block, listed under "Sources":
To test that the Osmo sdr stuff was installed correctly, open Gnu Radio Companion:
 
<pre>
$ gnuradio-companion
</pre>
 
Look for an Osmo source block, listed under "Sources":


[[Image:GnuRadioOsmocom.png|500px]]
[[Image:GnuRadioOsmocom.png|500px]]

Revision as of 05:42, 4 June 2016

Instructions: Debian Virtualbox

These are instructions for how to get the HackRF working with a Macbook Pro running OS X, by running the HackRF through a Debian VirtualBox.

Create Debian VirtualBox

I created a VirtualBox running Debian 8.4 and the XFCE desktop.

Install Libhackrf

Next step was to install HackRF libraries:

$ aptitude search hackrf
$ apt-get install libhackrf0 libhackrf-dev

Install GnuRadio

Next step was to install GnuRadio:

$ aptitude search GnuRadio
$ apt-get install gnuradio gnuradio-dev

This installs version 3.7.5, which is what's in the Debian repos.

Install More Stuff

We also need cmake to build osmosdr stuff, and boost because osmosdr links to it.

$ apt-get install cmake
$ apt-get instlal libboost-dev

Install GnuRadio Osmo SDR Stuff

To successfully use a HackRF with Gnu Radio, you need version 3.7 or later, and GnuRadio Osmo SDR block.

Follow these instructions for installing the block: http://sdr.osmocom.org/trac/wiki/GrOsmoSDR

git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr
mkdir build
cd build
cmake ../

This will generate a makefile that you can use to build the osmo blocks for gnuradio.

make clean
make 
sudo make install

Whatever you do, do not use make -j2, or the Python SWIG bindings will be broken.

Testing GnuRadio Osmocom Blocks

To test that the Osmo sdr stuff was installed correctly, open Gnu Radio Companion:

$ gnuradio-companion

Look for an Osmo source block, listed under "Sources":

GnuRadioOsmocom.png

Old Instructions

Download KB1OIQ Andy's Ham Radio Linux

Start by downloading Andy's Ham Radio Linux. This is a Debian distribution with a slew of useful radio programs, including NEC, the antenna simulation software. This also comes with gnuradio, gqrx, and other useful sdr tools, so this is a good candidate operating system to get the HackRF working.

Alternatively, you can use Pentoo, which is recommended by the HackRF folks, or Kali, although I understand some people have had a harder time with SDR after the January 2016 rolling release of Kali. You can also use the Gnu Radio Companion virtualbox provided by the Gnu Radio project, which runs Ubuntu.

https://github.com/mossmann/hackrf/wiki/Getting-Started-with-HackRF-and-GNU-Radio

Install KB1OIQ Linux

Once you've downloaded Andy's Ham Radio Linux and run it, you'll see that it is relatively spartan - it's using icewm, good for older, junky machines. Everything has an early 90s feel. You can take a look around at all the programs available: Andys Ham Radio Linux

Install Libhackrf

apt-get install libhackrf0 libhackrf-dev

Install GnuRadio Osmo SDR Stuff

To successfully use a HackRF with Gnu Radio, you need version 3.7 or later, and GnuRadio Osmo SDR block.

Follow these instructions for installing the block: http://sdr.osmocom.org/trac/wiki/GrOsmoSDR

git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr
mkdir build
cd build
cmake ../

This will generate a makefile that you can use to build the osmo blocks for gnuradio.

make clean
make 
sudo make install

Whatever you do, do not use make -j2, or the Python SWIG bindings will be broken.

Testing GnuRadio Osmocom Blocks

To test that the Osmo sdr stuff was installed correctly, open Gnu Radio Companion, and look for an Osmo source block, listed under "Sources":

GnuRadioOsmocom.png

Test Drive The HackRF

Now that you've installed all the requisite software, you're ready to run GnuRadio with an Osmocom SDR source, which is what will allow you to use the HackRF with GnuRadio and receive signals from it.

Start by plugging in the HackRF and making sure it is present and visible by the computer:

$ hackrf_info

Download the FM receiver test (the HackRF equivalent of "Hello world") from here: http://github.com/rrobotics/hackrf-tests

Now run the FM receiver test from the command line. You should hear some static from your speakers:

$ python fm_radio_rx.py

Links

Getting started notes for the HackRF: https://github.com/mossmann/hackrf/wiki/Getting-Started-with-HackRF-and-GNU-Radio

Getting started notes for osmocom blocks/modules: http://gmr.osmocom.org/trac/wiki/GettingStarted

Gnuradio tutorials (meh): http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorials

osmocom transmission? I don't know: https://github.com/osmocom/osmo-trx

GSM sniffing (do this later): http://www.instructables.com/id/SMART-SNIFFING-GSM-TRAFFIC-ON-WINDOWS-WORKSTATION-/

Flags