From charlesreid1

 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Instructions: Debian Virtualbox=
Notes from June 2016 - getting the HackRF up and operational, in preparation for a ham shack, antenna, and Defcon.


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.
I was running a MacBook Pro, OS X 10.11.4. The HackRF was running the 2014-08 firmware.


==Create Debian VirtualBox==
=Installing everything=


I created a VirtualBox running Debian 8.4 and the XFCE desktop.  
To get the HackRF working, you need to install GnuRadio - not a trivial task. A bit of advice:
* Check that you will have the latest-and-greatest Gnuradio, 3.7.8. Even minor version numbers like 3.7.5 can cause other things to break.
* Some operating systems only have the latest-and-greatest in the unstable/bleeding-edge repositories (like Debian - the stable branch installs Gnuradio 3.7.5 and breaks all your hackrf stuff, while the unstable Sid branch installs Gnuradio 3.7.8, and will probably break everything except your hackrf stuff.)
* If you can abstract away the details, and avoid installing everything from source, by all means do it. Choose your operating system wisely.
* HackRF folks recommend using [[Pentoo]]. Take the hint.


==Install Libhackrf==
Instructions for using the HackRF via the Mac: [[HackRF/Mac]]


Next step was to install HackRF libraries:
Instructions for using the HackRF via a VirtualBox (only if you have a beefy machine): [[HackRF/VirtualBox]]


<pre>
=Components=
$ aptitude search hackrf
$ apt-get install libhackrf0 libhackrf-dev
</pre>


==Install GnuRadio==
There were a few links I found useful. But first, an explanation of how different tools separate out and how they are organized.


Next step was to install GnuRadio:
==Hardware==


<pre>
===HackRF===
$ aptitude search GnuRadio
$ apt-get install gnuradio gnuradio-dev
</pre>


This installs version 3.7.5, which is what's in the Debian repos.
The HackRF is the hardware we're using - it enables conversion of analog to digital signals. The creator is Michael Ossmann - no connection to Osmo, the Open Source Mobile project.
* Getting started notes for the HackRF: https://github.com/mossmann/hackrf/wiki/Getting-Started-with-HackRF-and-GNU-Radio


==Install More Stuff==
I'm using the HackRF version (?) with 2014-08 firmware


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


<pre>
I'm also experimenting with Zigbee board. I have two Zigbee radio headers, and two breakout boards. Would like to be able to send/receive signals using 802.15 protocol (useful for sensor networks, used by Zigbee).
$ apt-get install cmake
$ apt-get instlal libboost-dev
</pre>


==Install GnuRadio Osmo SDR Stuff==
Here's a project implementing a Gnuradio flowchart for encoding and decoding 802.15 signals: http://wiesel.ece.utah.edu/media/documents/pdf/2010/03/25/thomas_project_report.pdf


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


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


<pre>
Also see [[Gnuradio]] page
git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr
mkdir build
cd build
cmake ../
</pre>


This will generate a makefile that you can use to build the osmo blocks for gnuradio.
GnuRadio is the software - it implements digital signal processing and other signal analysis functions in software. (This replaces the radio.)


<pre>
===Osmo===
make clean
make
sudo make install
</pre>


Whatever you do, '''do not''' use <code>make -j2</code>, or the Python SWIG bindings will be broken.
Osmo - Open Source Mobile project - provides the Osmocom and Osmosdr software, which provide a bridge for signals passing between hardware and software. This provides the door through which signals on the HackRF enter and exit GnuRadio.


===Testing GnuRadio Osmocom Blocks===
* Link: osmocom blocks/modules: http://gmr.osmocom.org/trac/wiki/GettingStarted


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


<pre>
GnuRadio Companion is the drag-and-drop gui. This is not GnuRadio - GnuRadio is a library of signal processing functions, while GnuRadio Companion is a graphical interface that enables you to use it in one particular way.
$ gnuradio-companion
* Gnuradio (Companion) tutorials (meh): http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorials
</pre>


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


[[Image:GnuRadioOsmocom.png|500px]]
Also see [[Gqrx]] page


=Old Instructions=
Gqrx is also a software tool. It utilizes GnuRadio to provide a GUI interface for interacting with and modifying signals. Think of this as an alternative interface to the GnuRadio Companion, that uses the same powerful signal processing library under the hood.


==Download KB1OIQ Andy's Ham Radio Linux==
=Testing=


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.
The way you test the HackRF depends on the operating system and software you're using. But the basic "hello world" test is making sure you can receive a radio signal with the HackRF.


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.
==Testing Receiver==


https://github.com/mossmann/hackrf/wiki/Getting-Started-with-HackRF-and-GNU-Radio
The HackRF has a high range, and can listen to signals in the Gigahertz (GHz) range. This means we can listen to wifi signals, and that in turn means that if we are in an area with wifi, we can test the HackRF to see if it is receiving signals.


==Install KB1OIQ Linux==
[[Image:HackRFWifiVideoShot.png|500px]]


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]]
https://vimeo.com/169412313


==Install Libhackrf==
[[HackRF/Testing]]


<pre>
=Project=
apt-get install libhackrf0 libhackrf-dev
</pre>
 
==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
 
<pre>
git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr
mkdir build
cd build
cmake ../
</pre>
 
This will generate a makefile that you can use to build the osmo blocks for gnuradio.
 
<pre>
make clean
make
sudo make install
</pre>
 
Whatever you do, '''do not''' use <code>make -j2</code>, 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":
 
[[Image:GnuRadioOsmocom.png|500px]]
 
==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:
 
<pre>
$ hackrf_info
</pre>
 
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:
 
<pre>
$ python fm_radio_rx.py
</pre>


=Links=
=Links=


Getting started notes for the HackRF: https://github.com/mossmann/hackrf/wiki/Getting-Started-with-HackRF-and-GNU-Radio
screen command, set baud rate, connect to firmware (e.g., zigbee or embedded router): http://www.cyberciti.biz/faq/unix-linux-apple-osx-bsd-screen-set-baud-rate/


Getting started notes for osmocom blocks/modules: http://gmr.osmocom.org/trac/wiki/GettingStarted
wx to img: http://www.wxtoimg.com/


Gnuradio tutorials (meh): http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorials
index of wlan channels: https://en.wikipedia.org/wiki/List_of_WLAN_channels
 
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=
=Flags=


{{HackRFFlag}}
{{HackRFFlag}}
[[Category:June 2016]]

Latest revision as of 00:37, 11 April 2017

Notes from June 2016 - getting the HackRF up and operational, in preparation for a ham shack, antenna, and Defcon.

I was running a MacBook Pro, OS X 10.11.4. The HackRF was running the 2014-08 firmware.

Installing everything

To get the HackRF working, you need to install GnuRadio - not a trivial task. A bit of advice:

  • Check that you will have the latest-and-greatest Gnuradio, 3.7.8. Even minor version numbers like 3.7.5 can cause other things to break.
  • Some operating systems only have the latest-and-greatest in the unstable/bleeding-edge repositories (like Debian - the stable branch installs Gnuradio 3.7.5 and breaks all your hackrf stuff, while the unstable Sid branch installs Gnuradio 3.7.8, and will probably break everything except your hackrf stuff.)
  • If you can abstract away the details, and avoid installing everything from source, by all means do it. Choose your operating system wisely.
  • HackRF folks recommend using Pentoo. Take the hint.

Instructions for using the HackRF via the Mac: HackRF/Mac

Instructions for using the HackRF via a VirtualBox (only if you have a beefy machine): HackRF/VirtualBox

Components

There were a few links I found useful. But first, an explanation of how different tools separate out and how they are organized.

Hardware

HackRF

The HackRF is the hardware we're using - it enables conversion of analog to digital signals. The creator is Michael Ossmann - no connection to Osmo, the Open Source Mobile project.

I'm using the HackRF version (?) with 2014-08 firmware

Zigbee

I'm also experimenting with Zigbee board. I have two Zigbee radio headers, and two breakout boards. Would like to be able to send/receive signals using 802.15 protocol (useful for sensor networks, used by Zigbee).

Here's a project implementing a Gnuradio flowchart for encoding and decoding 802.15 signals: http://wiesel.ece.utah.edu/media/documents/pdf/2010/03/25/thomas_project_report.pdf

Software

GnuRadio

Also see Gnuradio page

GnuRadio is the software - it implements digital signal processing and other signal analysis functions in software. (This replaces the radio.)

Osmo

Osmo - Open Source Mobile project - provides the Osmocom and Osmosdr software, which provide a bridge for signals passing between hardware and software. This provides the door through which signals on the HackRF enter and exit GnuRadio.

GnuRadio Companion

GnuRadio Companion is the drag-and-drop gui. This is not GnuRadio - GnuRadio is a library of signal processing functions, while GnuRadio Companion is a graphical interface that enables you to use it in one particular way.

Gqrx

Also see Gqrx page

Gqrx is also a software tool. It utilizes GnuRadio to provide a GUI interface for interacting with and modifying signals. Think of this as an alternative interface to the GnuRadio Companion, that uses the same powerful signal processing library under the hood.

Testing

The way you test the HackRF depends on the operating system and software you're using. But the basic "hello world" test is making sure you can receive a radio signal with the HackRF.

Testing Receiver

The HackRF has a high range, and can listen to signals in the Gigahertz (GHz) range. This means we can listen to wifi signals, and that in turn means that if we are in an area with wifi, we can test the HackRF to see if it is receiving signals.

HackRFWifiVideoShot.png

https://vimeo.com/169412313

HackRF/Testing

Project

Links

screen command, set baud rate, connect to firmware (e.g., zigbee or embedded router): http://www.cyberciti.biz/faq/unix-linux-apple-osx-bsd-screen-set-baud-rate/

wx to img: http://www.wxtoimg.com/

index of wlan channels: https://en.wikipedia.org/wiki/List_of_WLAN_channels

Flags