Note: this repository is currently unmaintained and unsupported
gr-ltetrigger is a set of utilities for sensing LTE. It is built using GNU Radio and srsLTE.
Install SWIG, GNU Radio, GNU Radio Companion, fftw and gr-osmosdr (example assumes Ubuntu 16.04, adjust as needed)
$ sudo apt install gnuradio-dev swig fftw-dev gr-osmosdr libuhd-dev
Install the dependencies of srsLTE. See https://github.com/srslte/srslte for a command for Ubuntu.
Build and install srsLTE. There is a naming collision between srsLTE and a requirement of GNU Radio (log4cpp), which we must fix before building:
$ git clone https://github.com/srslte/srslte $ cd srslte $ git checkout tags/release_18_06_1 # newer releases may work $ grep -R -l " DEBUG(" . |xargs sed -i 's/ DEBUG(/ DEBUG_(/g' $ grep -R -l " ERROR(" . |xargs sed -i 's/ ERROR(/ ERROR_(/g' $ find -name ue_cell_search.c |xargs sed -i 's/DEBUG/DEBUG_/g' $ mkdir build; cd build $ cmake ../ $ make && make test $ sudo make install
Build and install gr-ltetrigger:
$ git clone https://github.com/NTIA/gr-ltetrigger $ cd gr-ltetrigger $ mkdir build; cd build $ cmake ../ $ make && make test $ sudo make install $ sudo ldconfig
$ cd gr-ltetrigger/examples
$ ./cell_search_file.py --help
linux; GNU C++ version 5.3.1 20160413; Boost_105800; UHD_003.010.git-202-g9e0861e1
usage: cell_search_file.py [-h] -s Hz [-f Hz] [--repeat] [-c N]
[--throttle Hz] [--time-out sec]
[--threshold THRESHOLD]
filename
positional arguments:
filename
optional arguments:
-h, --help show this help message and exit
-s Hz, --sample-rate Hz
input data's sample rate [Required]
-f Hz, --frequency Hz
input data's center frequency
--repeat loop file until cell found or cut-off reached
[default=False]
-c N, --cut-off N stop looping after N samples [default=-1]
--throttle Hz throttle file source to lower CPU load [default=None]
--time-out sec max time in seconds to perform search [default=-1]
--threshold THRESHOLD
set peak to side-lobe ratio threshold [default=4]
$ ./cell_search_file.py --sample-rate 15.36M ../test_frames/lte_frame_50prb_cellid_125 --repeat --time-out 1
linux; GNU C++ version 5.3.1 20160413; Boost_105800; UHD_003.010.git-202-g9e0861e1
Using Volk machine: avx2_64_mmx
Starting cell search... done.
{'cell_id': 125L,
'cp_len': 'Normal ',
'nof_phich_resources': '1',
'nof_prb': 50L,
'nof_tx_ports': 1L,
'phich_len': 'Normal',
'sfn_offset': 0L,
'tracking_start_time': 1464123775L}
Douglas Anderson | NTIA/Institute for Telecommunication Sciences | [email protected]
See LICENSE.