Wednesday, January 10, 2018

Capturing ADS-B packets using HackRF

A few weeks ago, I managed to setup my computer to capture ADS-B beacons transmitted from aircrafts flying over UCD. That was a fantastic experience. Unfortunately, I was woking on trying another tool while working on this and therefore, I cannot remember the exact tools I installed for this particular work. Therefore, I will write the steps I remember which may include some steps which are not required for this work. I did this work on a Kali Linux machine.

(1) Install some required packages using the apt-get command as follows.

sudo apt-get install gqrx gr-air-modes cmake g++ libpython-dev python-numpy swig hackrf libhackrf-dev

(2) Install the tool called SoapySDR which is available on the Github.

git clone https://github.com/pothosware/SoapySDR.git
mkdir build
cd build
cmake ..
make -j4
sudo make install
sudo ldconfig #needed on debian systems
SoapySDRUtil --info

(3) Install the tool called SoapyHackRF which is again available on Github.

git clone https://github.com/pothosware/SoapyHackRF.git
cd SoapyHackRF
mkdir build
cd build
cmake ..
make
sudo make install
SoapySDRUtil --probe="driver=hackrf"

(4) As a part of the two tools installed on the previous steps, we need some extra stuff which we can get using apt-get command.

sudo apt-get install soapysdr-module-uhd libuhd003.010.002 libuhd-dev

(5) Now, we need to add some UDEV rules which is explained in the following link.


(6) We are good to go now. Let's connet the HackRF to the computer and run the following command to start the ADS-B receiver.

modes_rx -s osmocom -r 10e6

It takes some time to pick some signals from an aircraft which is not very frequent around our building. Whenever an ADS-B transmission is picked from by our setup, it will be displayed on the terminal.

~*****************~

1 comment:

  1. sudo modes_rx -s osmocom -r 10e6
    gr-air-modes warning: numpy+scipy not installed, FlightGear interface not supported
    gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.9.2
    built-in source types: file fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp xtrx
    [INFO] [UHD] linux; GNU C++ version 13.2.0; Boost_108300; UHD_4.6.0.0+ds1-5+b2

    RtApiPulse::DeviceInfo pa_context_connect() failed: Connection refused


    RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (default), No such file or directory.

    libusb: warning [libusb_exit] device 2.1 still referenced
    libusb: warning [libusb_exit] device 1.12 still referenced
    libusb: warning [libusb_exit] device 1.13 still referenced
    libusb: warning [libusb_exit] device 1.11 still referenced
    libusb: warning [libusb_exit] device 1.2 still referenced
    libusb: warning [libusb_exit] device 1.1 still referenced
    Using HackRF One with firmware 2023.01.1
    Gain is 14
    Rate is 10000000
    i have followed the above steps with kali os loaded raspberry pi4 board, I am getting the above warnings , and how i can i get the data on terminal , can you please share full details

    ReplyDelete