ADS-B's broadcast and receiving with USRP B210 and HackRF One

1 RECEIVING

1.1 Hardware and Software you need

  • USRP B210
  • googleearth
  • gr-air-modes (https://github.com/bistromath/gr-air-modes.git)
  • Python >= 2.5
  • PyZMQ
  • Gnuradio >= 3.5.0 ( Reference resources:https://www.cnblogs.com/moon1992/p/5781166.html?utm_source=itdadao&utm_medium=referral)
  • Ettus UHD >= 3.4.0 for use with - USRPs
  • osmosdr (any version) for use with RTLSDR dongles
  • SQLite 3.7 or later
  • CMake 2.6 or later

1.2 Steps

  • 1.2.1 Downloda gr-air-modes,and install with README
  • 1.2.2 Type following commands in your command line to build up environment you will need in this Experiment
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install python-setuptools
sudo easy_install pip
sudo apt-get install libzmq-dev
sudo apt-get install python-zmq

run python and type as follow

Python 2.7.12(default,Nov 19 2016,06:48:10)
[GCC 5.4.0 20160609] on linux2
Type “help”,“copyright”,“credits” or “license” for more information.
>>>import zmq
>>>zmq.zmq_version()
  • 1.2.3 Download googleearth
  • 1.2.4 Link USRP B210 to you computer and makes sure your computer can detecte USRP (maybe you should update your hardware)
    the following commands make your USRP hardware update(Reference resources:https://blog.csdn.net/yundanfengqing_nuc/article/details/78352804)
sudo uhd_images_downloader
uhd_usrp_probe

if you have this response, you are good to go


ADS-B's broadcast and receiving with USRP B210 and HackRF One_第1张图片
图片.png
  • 1.2.5 now, you can receive ADS-B signals from air with following command.
modes_rx -A RX2 -K aircraft.kml
ADS-B's broadcast and receiving with USRP B210 and HackRF One_第2张图片
图片.png

This command can make collected signals into the aircraft.kml file.
let the equipment receive signal for a while and close this program.
Now you can open aircraft.kml with googleearth.

图片.png

2 BROASCAT

2.1 Hardware and Software you need

  • HarkRF One
  • googleearth
  • ADSB-Out-master (https://github.com/lyusupov/ADSB-Out.git)

2.2 Steps

  • 2.2.1 Download and compile harkcrf's environment.
git clone --progress http://github.com/mossmann/hackrf.git
cd hackrf/host
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig

gethackrf_infoas follow

ADS-B's broadcast and receiving with USRP B210 and HackRF One_第3张图片
图片.png
  • 2.2.2 Update HackRF hardware

① download hackrf-2017.02.1.tar.xz from https://github.com/mossmann/hackrf/releases
② unzip files into home catalog
③ move four files(cmak, hackrf-tools, libhackrf, CMakeLists.txt ) into hackrf-2017.02.1catalog from home catalog
④ type command as following

cd host
mkdir build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig

⑤ get in firmware-bin catalog

hackrf_spiflash -Rw hackrf_one_usb.bin   //update SPI 
hackrf_cpldjtag -x hackrf_cpld_default.xsvf   //update  CPLD

now you can see three lights (USB、RX、TX) are twinkling, which means updating is succeed.
restart the HackRF before next step

  • 2.2.3 Broadcast signal
    get into ADSB-Out-master and type following commands one by one
ADSB_Encoder.py  0xABCDEF 12.34 56.78 9999.0   //Execute *ADSB_Encoder.py* script with `` `` `` `` arguments:

dd if=Samples.iq8s of=Samples_256K.iq8s bs=4k seek=63  //Make the raw signal file aligned to 256K buffer size:

hackrf_transfer -t Samples_256K.iq8s -f 1090000000 -s 2000000 -x 10 -R //Transmit the signal into air:

you will see the picture in the end if you succeed.


ADS-B's broadcast and receiving with USRP B210 and HackRF One_第4张图片
图片.png

you also can check README to get more informations.
now you can use USRP to receive your signal and check it with googleearth.

3 Upgrade

target:

  1. send some different signals ( different between ICAO, Latitude ,Longitude, Altitude)
    deliberately.
  2. collect signal, and select that you just broadcasted.
  3. use googleearth confirm it.

3.1 Steps

  • 3.1.1 Choose the different signals(change Latitude and Longitude.make sure the Altitude is still 200 to differ with normal fight)


    ADS-B's broadcast and receiving with USRP B210 and HackRF One_第5张图片
    图片.png
  • 3.1.2 Change the original program

ADS-B's broadcast and receiving with USRP B210 and HackRF One_第6张图片
图片.png
  • 3.1.3 Run the python program


    ADS-B's broadcast and receiving with USRP B210 and HackRF One_第7张图片
    图片.png
  • 3.1.4 Collect the signal


    ADS-B's broadcast and receiving with USRP B210 and HackRF One_第8张图片
    图片.png
  • 3.1.5 Check the adsb.db (made with aircraft.kml)

    ADS-B's broadcast and receiving with USRP B210 and HackRF One_第9张图片
    图片.png

  • 3.1.6Open with Googleearth


    图片.png

你可能感兴趣的:(ADS-B's broadcast and receiving with USRP B210 and HackRF One)