Skip to content

B44D3R/SDR-GPS-SPOOF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 

Repository files navigation

How to spoof GPS signal

Hardware

SDR: HackRF One - 265€

+ HackRF One + Ant500

Clock: LeoBodnar Precision Frequency Reference GPS Clock - 197€

+ GPS Clock

Cables

+ Reduction SMA(M) - BNC(F) 50R + Coaxial cable BNC(M) - BNC(M) 1m 50R + USB A-B

Software

https://mborgerson.com/getting-started-with-the-hackrf-one-on-ubuntu-14-04

Figuring out what you need to install to get going can be a drag, so I’ll spare you the work and tell you how to quickly get started on an Ubuntu 14.04 LTS system.

Don’t worry, this is going to be relatively painless.

Here’s what we’re going to do:

  • Install some dependencies,
  • Build and Install the HackRF Host Software (libraries and tools),
  • Install GNU Radio,
  • Build and Install GrOsmoSDR,
  • Build and Install Gqrx, and finally
  • Use Gqrx to tune into a local FM radio station.

Install Dependencies

  1. Install the build dependencies.

    $ sudo apt-get install git \
                           build-essential \
                           cmake \
                           libusb-1.0-0-dev \
                           liblog4cpp5-dev \
                           libboost-dev \
                           libboost-system-dev \
                           libboost-thread-dev \
                           libboost-program-options-dev \
                           swig
    
  2. Create a working directory.

    $ mkdir ~/sdr
    

Build HackRF Host Software

  1. Clone the HackRF repository.

    $ cd ~/sdr
    $ git clone https://github.com/mossmann/hackrf.git
    

Note: When I cloned, I got changeset 740940f8. As this article ages, you will likely get a different version, and that’s okay. I’m just recording this as a known-working version.

  1. Move to the hackrf/host directory.

    $ cd hackrf/host
    
  2. Create the build directory, move to it, and use Cmake (installed earlier) to create the Makefiles required for building.

    $ mkdir build && cd build
    $ cmake ../ -DINSTALL_UDEV_RULES=ON
    
  3. Build and Install.

    $ make
    $ sudo make install
    $ sudo ldconfig
    

Test the HackRF Device

  1. Connect the your HackRF One.

  2. Run the hackrf_info tool to get some device information.

    $ hackrf_info
    Found HackRF board.
    Board ID Number: 2 (HackRF One)
    Firmware Version: ...
    Part ID Number: ...
    Serial Number: ...
    

Download and Install GNU Radio

Now let’s download and install GNU Radio.

$ sudo apt-get install gnuradio \
                       gnuradio-dev \
                       gr-iqbal

Note: When I installed, I got version 3.7.2.1.

Download, Build, and Install GrOsmoSDR

Now we’ll download, build, and install GrOsmoSDR. GrOsmoSDR is essentially middle-ware that allows GNU Radio to communicate with the HackRF software to control your HackRF One.

  1. Clone the GrOsmoSDR repository:

    $ cd ~/sdr
    $ git clone git://git.osmocom.org/gr-osmosdr
    

Note: When I cloned, I got changeset 58d95b51.

  1. Move to the repository:

    $ cd gr-osmosdr
    
  2. Create the build directory, move to it, and use Cmake to create the Makefiles required for building.

    $ mkdir build && cd build
    $ cmake ../
    
  3. Build and Install.

    $ make
    $ sudo make install
    $ sudo ldconfig
    

Download, Build, and Install Gqrx

  1. Follow this instructions:

    $ sudo apt-get install gqrx-sdr
    $ sudo apt-get install libvolk1-bin
    $ volk_profile
    

Download, Build, and Install GPS-SDR-SIM

  1. Clone the GPS-SDR-SIM repository:

    $ cd ~/sdr
    $ git clone https://github.com/osqzss/gps-sdr-sim
    
  1. Move to the repository:

    $ cd gps-sdr-sim
    
  2. To build it use GCC:

    $ gcc gpssim.c -lm -fopenmp -o gps-sdr-sim
    

How to add path to home directory

  • open file browser home dir
  • Ctrl-H to show hidden files
  • open file: .bashrc
  • add this line:
export PATH="/home/user/sdr/gps-sdr-sim:$PATH"

How to test external clock

$ hackrf_si5351c -n 0 -r
+ [ 0] -> 0x01 clock is working + [ 0] -> 0x51 no clock

How to create NMEA path

+ create path in Google Earth + export the path as .KLM file + Import .KLM file and export NMEA text file using SatGen + example file name: nmea.txt

How to get BRDC file

+ Download latest daily GPS broadcast ephemers file (brdc) from ftp://cddis.gsfc.nasa.gov/gnss/data/daily/2016/brdc/ + Example file name: brdc2400.16g

Prepare broadcast file

+ put both files into gps-sdr-sim folder + create gpssim.bin file by running:

Dynamic mode:

$ gps-sdr-sim -b 8 -e brdc2400.16n -g nmea.txt

Static mode (location China):

$ gps-sdr-sim -b 8 -e brdc2400.16n -l 30.286502,120.032669,100

Initiate broadcast

$ hackrf_transfer -t gpssim.bin -f 1575420000 -s 2600000 -a 1 -x 0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published