└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # How to spoof GPS signal 2 | 3 | 4 |
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.
22 | 23 |Don’t worry, this is going to be relatively painless.
24 | 25 |Here’s what we’re going to do:
26 | 27 |Install the build dependencies.
40 | 41 |$ sudo apt-get install git \
42 | build-essential \
43 | cmake \
44 | libusb-1.0-0-dev \
45 | liblog4cpp5-dev \
46 | libboost-dev \
47 | libboost-system-dev \
48 | libboost-thread-dev \
49 | libboost-program-options-dev \
50 | swig
51 | Create a working directory.
54 | 55 |$ mkdir ~/sdr
56 | Clone the HackRF repository.
63 | 64 |$ cd ~/sdr
65 | $ git clone https://github.com/mossmann/hackrf.git
66 | 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.
Move to the hackrf/host directory.
73 | 74 |$ cd hackrf/host
75 | Create the build directory, move to it, and use Cmake (installed earlier) to create the Makefiles required for building.
78 | 79 |$ mkdir build && cd build
80 | $ cmake ../ -DINSTALL_UDEV_RULES=ON
81 | Build and Install.
84 | 85 |$ make
86 | $ sudo make install
87 | $ sudo ldconfig
88 | Connect the your HackRF One.
Run the hackrf_info tool to get some device information.
$ hackrf_info
99 | Found HackRF board.
100 | Board ID Number: 2 (HackRF One)
101 | Firmware Version: ...
102 | Part ID Number: ...
103 | Serial Number: ...
104 | Now let’s download and install GNU Radio.
110 | 111 |$ sudo apt-get install gnuradio \
112 | gnuradio-dev \
113 | gr-iqbal
114 |
115 |
116 | Note: When I installed, I got version 3.7.2.1.
117 | 118 |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.
121 | 122 |Clone the GrOsmoSDR repository:
124 | 125 |$ cd ~/sdr
126 | $ git clone git://git.osmocom.org/gr-osmosdr
127 | Note: When I cloned, I got changeset 58d95b51.
Move to the repository:
134 | 135 |$ cd gr-osmosdr
136 | Create the build directory, move to it, and use Cmake to create the Makefiles required for building.
139 | 140 |$ mkdir build && cd build
141 | $ cmake ../
142 | Build and Install.
145 | 146 |$ make
147 | $ sudo make install
148 | $ sudo ldconfig
149 | Follow this instructions:
156 |$ sudo apt-get install gqrx-sdr
157 | $ sudo apt-get install libvolk1-bin
158 | $ volk_profile
159 |
160 |
161 | Clone the GPS-SDR-SIM repository:
169 | 170 |$ cd ~/sdr
171 | $ git clone https://github.com/osqzss/gps-sdr-sim
172 | Move to the repository:
177 | 178 |$ cd gps-sdr-sim
179 | To build it use GCC:
182 |$ gcc gpssim.c -lm -fopenmp -o gps-sdr-sim
183 | export PATH="/home/user/sdr/gps-sdr-sim:$PATH"
194 |
195 |
196 | $ hackrf_si5351c -n 0 -r
198 |
199 | + [ 0] -> 0x01 clock is working
200 | + [ 0] -> 0x51 no clock
201 |
202 | $ gps-sdr-sim -b 8 -e brdc2400.16n -g nmea.txt
221 |
222 |
223 | Static mode (location China):
224 | $ gps-sdr-sim -b 8 -e brdc2400.16n -l 30.286502,120.032669,100
225 |
226 |
227 |
228 | $ hackrf_transfer -t gpssim.bin -f 1575420000 -s 2600000 -a 1 -x 0
230 |
231 |
232 |
233 |
234 |
--------------------------------------------------------------------------------