├── .dockerignore ├── .gitignore ├── .gitmodules ├── .gitreview ├── .travis.yml ├── CMakeLists.txt ├── COPYING ├── LICENSE ├── MANIFEST.md ├── README.md ├── TESTING.md ├── apps ├── CMakeLists.txt ├── README ├── apps_data │ ├── CMakeLists.txt │ ├── grgsm-livemon.desktop │ └── grgsm_setup_freedesktop.in ├── grgsm_decode ├── grgsm_livemon.grc ├── grgsm_livemon_headless.grc ├── grgsm_scanner ├── grgsm_trx └── helpers │ ├── CMakeLists.txt │ ├── README │ ├── grgsm_capture │ └── grgsm_channelize ├── cmake ├── Modules │ ├── CMakeParseArgumentsCopy.cmake │ ├── FindCppUnit.cmake │ ├── FindLibosmocodec.cmake │ ├── FindLibosmocoding.cmake │ ├── FindLibosmocore.cmake │ ├── FindLibosmogsm.cmake │ ├── GrccCompile.cmake │ ├── gr-gsmConfig.cmake │ └── targetConfig.cmake.in └── cmake_uninstall.cmake.in ├── dists ├── arch │ └── PKGBUILD └── debian │ ├── build-package │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── gr-gsm.links │ ├── rules │ └── source │ └── format ├── docs ├── CMakeLists.txt ├── doxygen │ ├── CMakeLists.txt │ ├── Doxyfile.in │ ├── Doxyfile.swig_doc.in │ ├── doxyxml │ │ ├── __init__.py │ │ ├── base.py │ │ ├── doxyindex.py │ │ ├── generated │ │ │ ├── __init__.py │ │ │ ├── compound.py │ │ │ ├── compoundsuper.py │ │ │ ├── index.py │ │ │ └── indexsuper.py │ │ └── text.py │ ├── other │ │ ├── group_defs.dox │ │ └── main_page.dox │ └── swig_doc.py └── grgsm_livemon.rst ├── grc ├── CMakeLists.txt ├── decoding │ ├── CMakeLists.txt │ ├── gsm_control_channels_decoder.block.yml │ ├── gsm_tch_f_decoder.block.yml │ └── gsm_tch_h_decoder.block.yml ├── decryption │ ├── CMakeLists.txt │ └── gsm_decryption.block.yml ├── demapping │ ├── CMakeLists.txt │ ├── gsm_bcch_ccch_demapper.block.yml │ ├── gsm_bcch_ccch_sdcch4_demapper.block.yml │ ├── gsm_sdcch8_demapper.block.yml │ ├── gsm_tch_f_chans_demapper.block.yml │ ├── gsm_tch_h_chans_demapper.block.yml │ └── gsm_universal_ctrl_chans_demapper.block.yml ├── flow_control │ ├── CMakeLists.txt │ ├── gsm_burst_fnr_filter.block.yml │ ├── gsm_burst_sdcch_subslot_filter.block.yml │ ├── gsm_burst_sdcch_subslot_splitter.block.yml │ ├── gsm_burst_timeslot_filter.block.yml │ ├── gsm_burst_timeslot_splitter.block.yml │ ├── gsm_burst_type_filter.block.yml │ ├── gsm_dummy_burst_filter.block.yml │ └── gsm_uplink_downlink_splitter.block.yml ├── gsm.tree.yml ├── misc_utils │ ├── CMakeLists.txt │ ├── gsm_burst_file_sink.block.yml │ ├── gsm_burst_file_source.block.yml │ ├── gsm_burst_to_fn_time.block.yml │ ├── gsm_bursts_printer.block.yml │ ├── gsm_clock_offset_corrector_tagged.block.yml │ ├── gsm_collect_system_info.block.yml │ ├── gsm_controlled_fractional_resampler_cc.block.yml │ ├── gsm_controlled_rotator_cc.block.yml │ ├── gsm_extract_assignment_cmd.block.yml │ ├── gsm_extract_cmc.block.yml │ ├── gsm_extract_immediate_assignment.block.yml │ ├── gsm_extract_system_info.block.yml │ ├── gsm_message_file_sink.block.yml │ ├── gsm_message_file_source.block.yml │ ├── gsm_message_printer.block.yml │ ├── gsm_msg_to_tag.block.yml │ └── gsm_tmsi_dumper.block.yml ├── qa_utils │ ├── CMakeLists.txt │ ├── gsm_burst_sink.block.yml │ ├── gsm_burst_source.block.yml │ ├── gsm_message_sink.block.yml │ └── gsm_message_source.block.yml ├── receiver │ ├── CMakeLists.txt │ ├── gsm_clock_offset_control.block.yml │ ├── gsm_cx_channel_hopper.block.yml │ ├── gsm_fcch_burst_tagger.block.yml │ ├── gsm_fcch_detector.block.yml │ ├── gsm_input.block.yml │ ├── gsm_receiver.block.yml │ ├── gsm_receiver_with_uplink.block.yml │ └── gsm_sch_detector.block.yml ├── transmitter │ ├── CMakeLists.txt │ ├── gsm_gen_test_ab.block.yml │ ├── gsm_gmsk_mod.block.yml │ ├── gsm_preprocess_tx_burst.block.yml │ ├── gsm_txtime_bursts_tagger.block.yml │ └── gsm_txtime_setter.block.yml └── trx │ ├── CMakeLists.txt │ └── gsm_trx_burst_if.block.yml ├── hier_blocks ├── compile_demappers ├── demapping │ ├── gsm_bcch_ccch_demapper.grc │ ├── gsm_bcch_ccch_sdcch4_demapper.grc │ └── gsm_sdcch8_demapper.grc ├── misc_utils │ └── gsm_clock_offset_corrector_tagged.grc ├── receiver │ ├── gsm_fcch_detector.grc │ └── gsm_input.grc └── transmitter │ └── gsm_gmsk_mod.grc ├── include └── grgsm │ ├── CMakeLists.txt │ ├── api.h │ ├── constants.h │ ├── decoding │ ├── CMakeLists.txt │ ├── control_channels_decoder.h │ ├── tch_f_decoder.h │ └── tch_h_decoder.h │ ├── decryption │ ├── CMakeLists.txt │ └── decryption.h │ ├── demapping │ ├── CMakeLists.txt │ ├── tch_f_chans_demapper.h │ ├── tch_h_chans_demapper.h │ └── universal_ctrl_chans_demapper.h │ ├── endian.h │ ├── flow_control │ ├── CMakeLists.txt │ ├── burst_fnr_filter.h │ ├── burst_sdcch_subslot_filter.h │ ├── burst_sdcch_subslot_splitter.h │ ├── burst_timeslot_filter.h │ ├── burst_timeslot_splitter.h │ ├── burst_type_filter.h │ ├── common.h │ ├── dummy_burst_filter.h │ └── uplink_downlink_splitter.h │ ├── gsm_constants.h │ ├── gsmtap.h │ ├── misc_utils │ ├── CMakeLists.txt │ ├── burst_file_sink.h │ ├── burst_file_source.h │ ├── burst_to_fn_time.h │ ├── bursts_printer.h │ ├── collect_system_info.h │ ├── controlled_fractional_resampler_cc.h │ ├── controlled_rotator_cc.h │ ├── extract_assignment_cmd.h │ ├── extract_cmc.h │ ├── extract_immediate_assignment.h │ ├── extract_system_info.h │ ├── fn_time.h │ ├── message_file_sink.h │ ├── message_file_source.h │ ├── message_printer.h │ ├── msg_to_tag.h │ ├── time_spec.h │ ├── tmsi_dumper.h │ └── udp_socket.h │ ├── plotting.hpp │ ├── qa_utils │ ├── CMakeLists.txt │ ├── burst_sink.h │ ├── burst_source.h │ ├── message_sink.h │ └── message_source.h │ ├── receiver │ ├── CMakeLists.txt │ ├── clock_offset_control.h │ ├── cx_channel_hopper.h │ └── receiver.h │ ├── transmitter │ ├── CMakeLists.txt │ ├── gen_test_ab.h │ ├── preprocess_tx_burst.h │ └── txtime_setter.h │ └── trx │ ├── CMakeLists.txt │ └── trx_burst_if.h ├── lib ├── CMakeLists.txt ├── constants.cc.in ├── decoding │ ├── CMakeLists.txt │ ├── control_channels_decoder_impl.cc │ ├── control_channels_decoder_impl.h │ ├── openbts │ │ ├── AmrCoder.cpp │ │ ├── AmrCoder.h │ │ ├── BitVector.cpp │ │ ├── BitVector.h │ │ ├── CMakeLists.txt │ │ ├── GSM503Tables.cpp │ │ ├── GSM503Tables.h │ │ ├── GSM610Tables.cpp │ │ ├── GSM610Tables.h │ │ ├── GSM660Tables.cpp │ │ ├── GSM660Tables.h │ │ ├── Vector.h │ │ ├── Viterbi.h │ │ ├── ViterbiR204.cpp │ │ └── ViterbiR204.h │ ├── sch.c │ ├── tch_f_decoder_impl.cc │ ├── tch_f_decoder_impl.h │ ├── tch_h_decoder_impl.cc │ └── tch_h_decoder_impl.h ├── decryption │ ├── CMakeLists.txt │ ├── decryption_impl.cc │ └── decryption_impl.h ├── demapping │ ├── CMakeLists.txt │ ├── tch_f_chans_demapper_impl.cc │ ├── tch_f_chans_demapper_impl.h │ ├── tch_h_chans_demapper_impl.cc │ ├── tch_h_chans_demapper_impl.h │ ├── universal_ctrl_chans_demapper_impl.cc │ └── universal_ctrl_chans_demapper_impl.h ├── flow_control │ ├── CMakeLists.txt │ ├── burst_fnr_filter_impl.cc │ ├── burst_fnr_filter_impl.h │ ├── burst_sdcch_subslot_filter_impl.cc │ ├── burst_sdcch_subslot_filter_impl.h │ ├── burst_sdcch_subslot_splitter_impl.cc │ ├── burst_sdcch_subslot_splitter_impl.h │ ├── burst_timeslot_filter_impl.cc │ ├── burst_timeslot_filter_impl.h │ ├── burst_timeslot_splitter_impl.cc │ ├── burst_timeslot_splitter_impl.h │ ├── burst_type_filter_impl.cc │ ├── burst_type_filter_impl.h │ ├── dummy_burst_filter_impl.cc │ ├── dummy_burst_filter_impl.h │ ├── uplink_downlink_splitter_impl.cc │ └── uplink_downlink_splitter_impl.h ├── misc_utils │ ├── CMakeLists.txt │ ├── burst_file_sink_impl.cc │ ├── burst_file_sink_impl.h │ ├── burst_file_source_impl.cc │ ├── burst_file_source_impl.h │ ├── burst_to_fn_time_impl.cc │ ├── burst_to_fn_time_impl.h │ ├── bursts_printer_impl.cc │ ├── bursts_printer_impl.h │ ├── collect_system_info_impl.cc │ ├── collect_system_info_impl.h │ ├── controlled_fractional_resampler_cc_impl.cc │ ├── controlled_fractional_resampler_cc_impl.h │ ├── controlled_rotator_cc_impl.cc │ ├── controlled_rotator_cc_impl.h │ ├── extract_assignment_cmd_impl.cc │ ├── extract_assignment_cmd_impl.h │ ├── extract_cmc_impl.cc │ ├── extract_cmc_impl.h │ ├── extract_immediate_assignment_impl.cc │ ├── extract_immediate_assignment_impl.h │ ├── extract_system_info_impl.cc │ ├── extract_system_info_impl.h │ ├── fn_time.cc │ ├── message_file_sink_impl.cc │ ├── message_file_sink_impl.h │ ├── message_file_source_impl.cc │ ├── message_file_source_impl.h │ ├── message_printer_impl.cc │ ├── message_printer_impl.h │ ├── msg_to_tag_impl.cc │ ├── msg_to_tag_impl.h │ ├── time_spec.cc │ ├── tmsi_dumper_impl.cc │ ├── tmsi_dumper_impl.h │ └── udp_socket.cc ├── qa_utils │ ├── CMakeLists.txt │ ├── burst_sink_impl.cc │ ├── burst_sink_impl.h │ ├── burst_source_impl.cc │ ├── burst_source_impl.h │ ├── message_sink_impl.cc │ ├── message_sink_impl.h │ ├── message_source_impl.cc │ └── message_source_impl.h ├── receiver │ ├── CMakeLists.txt │ ├── clock_offset_control_impl.cc │ ├── clock_offset_control_impl.h │ ├── cx_channel_hopper_impl.cc │ ├── cx_channel_hopper_impl.h │ ├── receiver_config.cc │ ├── receiver_config.h │ ├── receiver_impl.cc │ ├── receiver_impl.h │ ├── sch.h │ ├── time_sample_ref.cc │ ├── time_sample_ref.h │ ├── viterbi_detector.cc │ └── viterbi_detector.h ├── transmitter │ ├── CMakeLists.txt │ ├── gen_test_ab_impl.cc │ ├── gen_test_ab_impl.h │ ├── preprocess_tx_burst_impl.cc │ ├── preprocess_tx_burst_impl.h │ ├── txtime_setter_impl.cc │ └── txtime_setter_impl.h └── trx │ ├── CMakeLists.txt │ ├── trx_burst_if_impl.cc │ └── trx_burst_if_impl.h ├── python ├── CMakeLists.txt ├── __init__.py ├── demapping │ ├── CMakeLists.txt │ ├── gsm_bcch_ccch_demapper.py │ ├── gsm_bcch_ccch_sdcch4_demapper.py │ └── gsm_sdcch8_demapper.py ├── grgsm ├── misc_utils │ ├── CMakeLists.txt │ ├── arfcn.py │ ├── clock_offset_corrector_tagged.py │ ├── device.py │ └── fn_time.py ├── qa_arfcn.py ├── qa_burst_file_source.py ├── qa_burst_fnr_filter.py ├── qa_burst_printer.py ├── qa_burst_sdcch_subslot_filter.py ├── qa_burst_sdcch_subslot_splitter.py ├── qa_burst_timeslot_filter.py ├── qa_burst_timeslot_splitter.py ├── qa_controlled_fractional_resampler_cc.py ├── qa_decryption.py ├── qa_dummy_burst_filter.py ├── qa_gsm_bcch_ccch_demapper.py ├── qa_gsm_bcch_ccch_sdcch4_demapper.py ├── qa_gsm_demapper_data.py ├── qa_gsm_sdcch8_demapper.py ├── qa_message_printer.py ├── qa_message_source_sink.py ├── qa_msg_to_tag.py ├── qa_tch_f_chans_demapper.py ├── qa_tch_f_decoder.py ├── qa_tch_h_chans_demapper.py ├── qa_tch_h_decoder.py ├── qa_txtime_bursts_tagger.py ├── qa_txtime_setter.py ├── qa_uplink_downlink_splitter.py ├── receiver │ ├── CMakeLists.txt │ ├── README │ ├── chirpz.py │ ├── fcch_burst_tagger.py │ ├── fcch_detector.py │ ├── gsm_input.py │ └── sch_detector.py ├── transmitter │ ├── CMakeLists.txt │ ├── gsm_gmsk_mod.py │ └── txtime_bursts_tagger.py └── trx │ ├── CMakeLists.txt │ ├── __init__.py │ ├── ctrl_if.py │ ├── ctrl_if_bb.py │ ├── dict_toggle_sign.py │ ├── radio_if.py │ ├── radio_if_lms.py │ ├── radio_if_uhd.py │ ├── transceiver.py │ └── udp_link.py ├── swig ├── CMakeLists.txt ├── constants.i └── grgsm_swig.i └── tests ├── dockerfiles ├── Debian_testing.docker └── Ubuntu_20_04.docker ├── fixtures ├── grgsm_decode_decrypt1_expected └── grgsm_decode_test1_expected └── scripts ├── decode.sh ├── decrypt.sh └── scanner.sh /.dockerignore: -------------------------------------------------------------------------------- 1 | build* 2 | .git 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.o 3 | *.log 4 | *~ 5 | *.pyc 6 | *.pyo 7 | .unittests 8 | build*/ 9 | debian/tmp/ 10 | debian/files 11 | .directory 12 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "test_data"] 2 | path = test_data 3 | url = https://git.osmocom.org/ptrkrysik/test_data 4 | [submodule "examples"] 5 | path = examples 6 | url = https://git.osmocom.org/ptrkrysik/examples 7 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=gerrit.osmocom.org 3 | project=gr-gsm 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: bionic 3 | 4 | language: ruby 5 | 6 | env: 7 | - DOCKERFILE=tests/dockerfiles/Ubuntu_20_04.docker IMGNAME=ubuntu_20_04 8 | - DOCKERFILE=tests/dockerfiles/Debian_testing.docker IMGNAME=debian_testing 9 | 10 | services: 11 | - docker 12 | 13 | before_install: 14 | - cat $DOCKERFILE > Dockerfile ; docker build -t $IMGNAME . 15 | 16 | script: 17 | - docker run -it --rm $IMGNAME sh -c 'cd /src/build;make test' 18 | - docker run -it --rm $IMGNAME /src/tests/scripts/decode.sh 19 | - docker run -it --rm $IMGNAME /src/tests/scripts/decrypt.sh 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | @file 2 | @author Piotr Krysik 3 | @section LICENSE 4 | 5 | Gr-gsm is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 3, or (at your option) 8 | any later version. 9 | 10 | Gr-gsm is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with gr-gsm; see the file COPYING. If not, write to 17 | the Free Software Foundation, Inc., 51 Franklin Street, 18 | Boston, MA 02110-1301, USA. 19 | 20 | -------------------------------------------------------------------------------- /TESTING.md: -------------------------------------------------------------------------------- 1 | # Testing gr-gsm 2 | 3 | ## CI Testing 4 | 5 | CI testing currently consists of attempting to build gr-gsm as described in the .docker files located under gr-gsm/tests/dockerfiles using travis-ci.org. If the build is successful, travis-ci will attempt to decode the test file located under gr-gsm/test_data and compare the results to this file: gr-gsm/tests/fixtures/grgsm_decode_test1_expected. See the gr-gsm/tests/scripts/decode.sh file for details. 6 | 7 | ## Integration testing 8 | 9 | Integration testing with use of the grgsm_scanner application: 10 | * Make sure that your RTL SDR dongle is plugged into the system and if you're running on Mac, you need to have the dongle accessible to the VirtualBox VM that's running Docker. 11 | * cd gr-gsm/tests/scripts 12 | * scanner.sh 13 | 14 | This will copy the entire contents of the currently checked out branch of gr-gsm to a temp folder, and attempt to build the docker images according to the definitions in the .docker files located under gr-gsm/dockerfiles. 15 | Once the images are created, the script instantiates a container for testing the rtlsdr scanner on each band, against each Docker image built. This can take quite a while. If you're running on Mac, consider using the ```caffeinate``` command to keep your machine from sleeping. 16 | -------------------------------------------------------------------------------- /apps/apps_data/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | set(grgsm_freedesktop_path ${GR_PKG_DATA_DIR}/gr-gsm/freedesktop) 21 | 22 | install( 23 | FILES 24 | grgsm-livemon.desktop 25 | DESTINATION ${grgsm_freedesktop_path} 26 | COMPONENT "gr-gsm" 27 | ) 28 | 29 | find_program(HAVE_XDG_UTILS xdg-desktop-menu) 30 | 31 | if(UNIX AND HAVE_XDG_UTILS) 32 | set(SRCDIR ${CMAKE_INSTALL_PREFIX}/${grgsm_freedesktop_path}) 33 | configure_file( 34 | ${CMAKE_CURRENT_SOURCE_DIR}/grgsm_setup_freedesktop.in 35 | ${CMAKE_CURRENT_BINARY_DIR}/grgsm_setup_freedesktop 36 | @ONLY) 37 | install( 38 | PROGRAMS 39 | ${CMAKE_CURRENT_BINARY_DIR}/grgsm_setup_freedesktop 40 | DESTINATION ${GR_PKG_LIBEXEC_DIR} 41 | COMPONENT "gr-gsm" 42 | ) 43 | endif(UNIX AND HAVE_XDG_UTILS) 44 | -------------------------------------------------------------------------------- /apps/apps_data/grgsm-livemon.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Version=1.0 4 | Name=GNU Radio GSM live monitor 5 | GenericName=GSM channel monitor 6 | Comment=Interactive monitor of a single GSM C0 channel for analysis with network sniffers like Wireshark 7 | Exec=grgsm_livemon 8 | Terminal=false 9 | #Icon= 10 | Categories=Network;HamRadio;Development; 11 | Keywords=SDR;Radio;HAM;GSM; 12 | -------------------------------------------------------------------------------- /apps/apps_data/grgsm_setup_freedesktop.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2008-2011 Free Software Foundation, Inc. 4 | # 5 | # This file is part of GNU Radio 6 | # 7 | # GNU Radio is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 3, or (at your option) 10 | # any later version. 11 | # 12 | # GNU Radio is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with GNU Radio; see the file COPYING. If not, write to 19 | # the Free Software Foundation, Inc., 51 Franklin Street, 20 | # Boston, MA 02110-1301, USA. 21 | # 22 | ################################################## 23 | # setup grc on a freedesktop platform 24 | # $1 should be install or uninstall 25 | # $2 is the optional path to the files 26 | # when $2 is unspecified, the path is: 27 | # @SRCDIR@ 28 | ################################################## 29 | 30 | if [ -n "$2" ]; then 31 | SRCDIR="$2" 32 | else 33 | SRCDIR="@SRCDIR@" 34 | fi 35 | 36 | case "$1" in 37 | 'install') 38 | echo "Begin freedesktop install..." 39 | echo "Install menu items" 40 | xdg-desktop-menu install ${SRCDIR}/*.desktop 41 | echo "Done!" 42 | echo "" 43 | ;; 44 | 'uninstall') 45 | echo "Begin freedesktop uninstall..." 46 | echo "Uninstall menu items" 47 | xdg-desktop-menu uninstall `ls ${SRCDIR}/*.desktop | xargs -n1 basename` 48 | echo "Done!" 49 | echo "" 50 | ;; 51 | *) 52 | echo "Usage: $0 [install|uninstall]" 53 | ;; 54 | esac 55 | -------------------------------------------------------------------------------- /apps/helpers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012,2014,2016,2018 Free Software Foundation, Inc. 2 | # 3 | # This file was generated by gr_modtool, a tool from the GNU Radio framework 4 | # This file is a part of gr-gsm 5 | # 6 | # GNU Radio is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 3, or (at your option) 9 | # any later version. 10 | # 11 | # GNU Radio is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with GNU Radio; see the file COPYING. If not, write to 18 | # the Free Software Foundation, Inc., 51 Franklin Street, 19 | # Boston, MA 02110-1301, USA. 20 | 21 | include(GrPython) 22 | 23 | GR_PYTHON_INSTALL( 24 | PROGRAMS 25 | grgsm_capture 26 | grgsm_channelize 27 | DESTINATION bin 28 | ) 29 | 30 | install( 31 | PROGRAMS 32 | DESTINATION bin 33 | ) 34 | 35 | -------------------------------------------------------------------------------- /apps/helpers/README: -------------------------------------------------------------------------------- 1 | Helper programs for grgsm_decode: 2 | 3 | -grgsm_capture (old name: airprobe_rtlsdr_capture.py) - program for capturing GSM signal to a file that can be later processed by grgsm_decode, 4 | 5 | -grgsm_channelize (old name: gsm_channelize.py) - splits wideband capture file into multiple files - each contain single GSM channel, 6 | -------------------------------------------------------------------------------- /cmake/Modules/FindCppUnit.cmake: -------------------------------------------------------------------------------- 1 | # http://www.cmake.org/pipermail/cmake/2006-October/011446.html 2 | # Modified to use pkg config and use standard var names 3 | 4 | # 5 | # Find the CppUnit includes and library 6 | # 7 | # This module defines 8 | # CPPUNIT_INCLUDE_DIR, where to find tiff.h, etc. 9 | # CPPUNIT_LIBRARIES, the libraries to link against to use CppUnit. 10 | # CPPUNIT_FOUND, If false, do not try to use CppUnit. 11 | 12 | INCLUDE(FindPkgConfig) 13 | PKG_CHECK_MODULES(PC_CPPUNIT "cppunit") 14 | 15 | FIND_PATH(CPPUNIT_INCLUDE_DIRS 16 | NAMES cppunit/TestCase.h 17 | HINTS ${PC_CPPUNIT_INCLUDE_DIR} 18 | PATHS 19 | /usr/local/include 20 | /usr/include 21 | ) 22 | 23 | FIND_LIBRARY(CPPUNIT_LIBRARIES 24 | NAMES cppunit 25 | HINTS ${PC_CPPUNIT_LIBDIR} 26 | PATHS 27 | ${CPPUNIT_INCLUDE_DIRS}/../lib 28 | /usr/local/lib 29 | /usr/lib 30 | ) 31 | 32 | LIST(APPEND CPPUNIT_LIBRARIES ${CMAKE_DL_LIBS}) 33 | 34 | INCLUDE(FindPackageHandleStandardArgs) 35 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS) 36 | MARK_AS_ADVANCED(CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS) 37 | -------------------------------------------------------------------------------- /cmake/Modules/FindLibosmocodec.cmake: -------------------------------------------------------------------------------- 1 | INCLUDE(FindPkgConfig) 2 | pkg_check_modules(PC_libosmocodec libosmocodec) 3 | set(LIBOSMOCODEC_DEFINITIONS ${PC_LIBOSMOCODEC_CFLAGS_OTHER}) 4 | 5 | find_path( 6 | LIBOSMOCODEC_INCLUDE_DIR 7 | NAMES osmocom/codec/codec.h 8 | HINTS ${PC_libosmocodec_INCLUDEDIR} 9 | ${PC_libosmocodec_INCLUDE_DIRS} 10 | ${CMAKE_INSTALL_PREFIX}/include 11 | PATHS /usr/local/include 12 | /usr/include 13 | ) 14 | 15 | find_library( 16 | LIBOSMOCODEC_LIBRARY 17 | NAMES libosmocodec osmocodec 18 | HINTS ${PC_libosmocodec_LIBDIR} 19 | ${PC_libosmocodec_LIBRARY_DIRS} 20 | ${CMAKE_INSTALL_PREFIX}/lib/ 21 | ${CMAKE_INSTALL_PREFIX}/lib64/ 22 | PATHS /usr/local/lib 23 | /usr/lib 24 | ) 25 | 26 | 27 | set(LIBOSMOCODEC_LIBRARIES ${LIBOSMOCODEC_LIBRARY}) 28 | set(LIBOSMOCODEC_INCLUDE_DIRS ${LIBOSMOCODEC_INCLUDE_DIR}) 29 | 30 | include(FindPackageHandleStandardArgs) 31 | find_package_handle_standard_args(libosmocodec DEFAULT_MSG LIBOSMOCODEC_LIBRARY LIBOSMOCODEC_INCLUDE_DIR) 32 | mark_as_advanced(LIBOSMOCODEC_INCLUDE_DIR LIBOSMOCODEC_LIBRARY ) 33 | -------------------------------------------------------------------------------- /cmake/Modules/FindLibosmocoding.cmake: -------------------------------------------------------------------------------- 1 | find_package(PkgConfig) 2 | pkg_check_modules(PC_libosmocoding libosmocoding) 3 | set(LIBOSMOCODING_DEFINITIONS ${PC_LIBOSMOCODING_CFLAGS_OTHER}) 4 | 5 | find_path( 6 | LIBOSMOCODING_INCLUDE_DIR 7 | NAMES osmocom/coding/gsm0503_coding.h 8 | HINTS ${PC_libosmocoding_INCLUDEDIR} 9 | ${PC_libosmocoding_INCLUDE_DIRS} 10 | ${CMAKE_INSTALL_PREFIX}/include 11 | PATHS /usr/local/include 12 | /usr/include 13 | ) 14 | 15 | find_library( 16 | LIBOSMOCODING_LIBRARY 17 | NAMES libosmocoding osmocoding 18 | HINTS ${PC_libosmocoding_LIBDIR} 19 | ${PC_libosmocoding_LIBRARY_DIRS} 20 | ${CMAKE_INSTALL_PREFIX}/lib/ 21 | ${CMAKE_INSTALL_PREFIX}/lib64/ 22 | PATHS /usr/local/lib 23 | /usr/lib 24 | ) 25 | 26 | 27 | set(LIBOSMOCODING_LIBRARIES ${LIBOSMOCODING_LIBRARY}) 28 | set(LIBOSMOCODING_INCLUDE_DIRS ${LIBOSMOCODING_INCLUDE_DIR}) 29 | 30 | include(FindPackageHandleStandardArgs) 31 | find_package_handle_standard_args(libosmocoding DEFAULT_MSG LIBOSMOCODING_LIBRARY LIBOSMOCODING_INCLUDE_DIR) 32 | mark_as_advanced(LIBOSMOCODING_INCLUDE_DIR LIBOSMOCODING_LIBRARY ) -------------------------------------------------------------------------------- /cmake/Modules/FindLibosmocore.cmake: -------------------------------------------------------------------------------- 1 | #find_package(PkgConfig) 2 | INCLUDE(FindPkgConfig) 3 | pkg_check_modules(PC_libosmocore libosmocore) 4 | set(LIBOSMOCORE_DEFINITIONS ${PC_LIBOSMOCORE_CFLAGS_OTHER}) 5 | 6 | find_path( 7 | LIBOSMOCORE_INCLUDE_DIR 8 | NAMES osmocom/core/application.h 9 | HINTS ${PC_libosmocore_INCLUDEDIR} 10 | ${PC_libosmocore_INCLUDE_DIRS} 11 | ${CMAKE_INSTALL_PREFIX}/include 12 | PATHS /usr/local/include 13 | /usr/include 14 | ) 15 | 16 | find_library( 17 | LIBOSMOCORE_LIBRARY 18 | NAMES libosmocore osmocore 19 | HINTS ${PC_libosmocore_LIBDIR} 20 | ${PC_libosmocore_LIBRARY_DIRS} 21 | ${CMAKE_INSTALL_PREFIX}/lib/ 22 | ${CMAKE_INSTALL_PREFIX}/lib64/ 23 | PATHS /usr/local/lib 24 | /usr/lib 25 | ) 26 | 27 | 28 | set(LIBOSMOCORE_LIBRARIES ${LIBOSMOCORE_LIBRARY}) 29 | set(LIBOSMOCORE_INCLUDE_DIRS ${LIBOSMOCORE_INCLUDE_DIR}) 30 | 31 | include(FindPackageHandleStandardArgs) 32 | find_package_handle_standard_args(libosmocore DEFAULT_MSG LIBOSMOCORE_LIBRARY LIBOSMOCORE_INCLUDE_DIR) 33 | mark_as_advanced(LIBOSMOCORE_INCLUDE_DIR LIBOSMOCORE_LIBRARY ) 34 | -------------------------------------------------------------------------------- /cmake/Modules/FindLibosmogsm.cmake: -------------------------------------------------------------------------------- 1 | INCLUDE(FindPkgConfig) 2 | pkg_check_modules(PC_libosmogsm libosmogsm) 3 | set(LIBOSMOGSM_DEFINITIONS ${PC_LIBOSMOGSM_CFLAGS_OTHER}) 4 | 5 | find_path( 6 | LIBOSMOGSM_INCLUDE_DIR 7 | NAMES osmocom/gsm/gsm_utils.h 8 | HINTS ${PC_libosmogsm_INCLUDEDIR} 9 | ${PC_libosmogsm_INCLUDE_DIRS} 10 | ${CMAKE_INSTALL_PREFIX}/include 11 | PATHS /usr/local/include 12 | /usr/include 13 | ) 14 | 15 | find_library( 16 | LIBOSMOGSM_LIBRARY 17 | NAMES libosmogsm osmogsm 18 | HINTS ${PC_libosmogsm_LIBDIR} 19 | ${PC_libosmogsm_LIBRARY_DIRS} 20 | ${CMAKE_INSTALL_PREFIX}/lib/ 21 | ${CMAKE_INSTALL_PREFIX}/lib64/ 22 | PATHS /usr/local/lib 23 | /usr/lib 24 | ) 25 | 26 | 27 | set(LIBOSMOGSM_LIBRARIES ${LIBOSMOGSM_LIBRARY}) 28 | set(LIBOSMOGSM_INCLUDE_DIRS ${LIBOSMOGSM_INCLUDE_DIR}) 29 | 30 | include(FindPackageHandleStandardArgs) 31 | find_package_handle_standard_args(libosmogsm DEFAULT_MSG LIBOSMOGSM_LIBRARY LIBOSMOGSM_INCLUDE_DIR) 32 | mark_as_advanced(LIBOSMOGSM_INCLUDE_DIR LIBOSMOGSM_LIBRARY ) 33 | -------------------------------------------------------------------------------- /cmake/Modules/gr-gsmConfig.cmake: -------------------------------------------------------------------------------- 1 | INCLUDE(FindPkgConfig) 2 | PKG_CHECK_MODULES(PC_GR_GSM grgsm) 3 | 4 | FIND_PATH( 5 | GR_GSM_INCLUDE_DIRS 6 | NAMES grgsm/api.h 7 | HINTS $ENV{GR_GSM_DIR}/include 8 | ${PC_GR_GSM_INCLUDEDIR} 9 | PATHS ${CMAKE_INSTALL_PREFIX}/include 10 | /usr/local/include 11 | /usr/include 12 | ) 13 | 14 | FIND_LIBRARY( 15 | GR_GSM_LIBRARIES 16 | NAMES grgsm 17 | HINTS $ENV{GR_GSM_DIR}/lib 18 | ${PC_GR_GSM_LIBDIR} 19 | PATHS ${CMAKE_INSTALL_PREFIX}/lib 20 | ${CMAKE_INSTALL_PREFIX}/lib64 21 | /usr/local/lib 22 | /usr/local/lib64 23 | /usr/lib 24 | /usr/lib64 25 | ) 26 | 27 | INCLUDE(FindPackageHandleStandardArgs) 28 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(GR_GSM DEFAULT_MSG GR_GSM_LIBRARIES GR_GSM_INCLUDE_DIRS) 29 | MARK_AS_ADVANCED(GR_GSM_LIBRARIES GR_GSM_INCLUDE_DIRS) 30 | 31 | -------------------------------------------------------------------------------- /cmake/Modules/targetConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | include(CMakeFindDependencyMacro) 21 | 22 | set(target_deps "@TARGET_DEPENDENCIES@") 23 | foreach(dep IN LISTS target_deps) 24 | find_dependency(${dep}) 25 | endforeach() 26 | include("${CMAKE_CURRENT_LIST_DIR}/@TARGET@Targets.cmake") 27 | -------------------------------------------------------------------------------- /cmake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | # http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F 2 | 3 | IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 5 | ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 6 | 7 | FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 8 | STRING(REGEX REPLACE "\n" ";" files "${files}") 9 | FOREACH(file ${files}) 10 | MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | IF(EXISTS "$ENV{DESTDIR}${file}") 12 | EXEC_PROGRAM( 13 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 14 | OUTPUT_VARIABLE rm_out 15 | RETURN_VALUE rm_retval 16 | ) 17 | IF(NOT "${rm_retval}" STREQUAL 0) 18 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 19 | ENDIF(NOT "${rm_retval}" STREQUAL 0) 20 | ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}") 21 | EXEC_PROGRAM( 22 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 23 | OUTPUT_VARIABLE rm_out 24 | RETURN_VALUE rm_retval 25 | ) 26 | IF(NOT "${rm_retval}" STREQUAL 0) 27 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 28 | ENDIF(NOT "${rm_retval}" STREQUAL 0) 29 | ELSE(EXISTS "$ENV{DESTDIR}${file}") 30 | MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 31 | ENDIF(EXISTS "$ENV{DESTDIR}${file}") 32 | ENDFOREACH(file) 33 | -------------------------------------------------------------------------------- /dists/arch/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Vadim Yanitskiy 2 | 3 | pkgname=gr-gsm 4 | pkgver=v1165.13e42c4 5 | pkgrel=1 6 | pkgdesc="GNU Radio blocks and tools for receiving GSM transmissions" 7 | arch=('any') 8 | url="https://github.com/ptrkrysik/gr-gsm" 9 | license=('GPL2') 10 | # TODO: libosmocore? 11 | depends=('gnuradio' 'gnuradio-osmosdr' 'boost' 'swig') 12 | makedepends=('cmake') 13 | provides=('gr-gsm') 14 | source=(git://git.osmocom.org/${pkgname}) 15 | sha1sums=('SKIP') 16 | 17 | pkgver() { 18 | cd "$srcdir/$pkgname" 19 | printf "v%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 20 | } 21 | 22 | build() { 23 | cd "$srcdir/$pkgname" 24 | mkdir build && cd build 25 | cmake \ 26 | -DCMAKE_INSTALL_PREFIX=/usr \ 27 | -DENABLE_DOXYGEN=OFF \ 28 | -Wno-dev \ 29 | .. 30 | make 31 | } 32 | 33 | package() { 34 | cd "$srcdir/$pkgname/build" 35 | make DESTDIR=${pkgdir} install 36 | } 37 | 38 | # vim:set ts=2 sw=2 et: 39 | -------------------------------------------------------------------------------- /dists/debian/build-package: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -e debian ] ; then 4 | ln -s dists/debian . 5 | fi 6 | 7 | BASEVERSION=$(dpkg-parsechangelog --show-field Version | cut -d- -f1) 8 | DEBVERSION=$(dpkg-parsechangelog --show-field Version) 9 | 10 | debdir=$(cd $(dirname $0); pwd) 11 | pkgdir=$(cd $debdir/..; pwd) 12 | pkgbasedir=$(cd $debdir/..; basename $(pwd)) 13 | cd $pkgdir/.. 14 | 15 | tar -acf gr-gsm_${BASEVERSION}.orig.tar.gz $pkgbasedir 16 | cd $pkgdir 17 | debuild -S -sa 18 | #pdebuild 19 | cd .. 20 | dput ppa:ptrkrysik/gr-gsm gr-gsm_${DEBVERSION}_source.changes 21 | 22 | if [ -h debian ] ; then 23 | rm debian 24 | fi 25 | -------------------------------------------------------------------------------- /dists/debian/changelog: -------------------------------------------------------------------------------- 1 | gr-gsm (0.41.1-0ppa0) xenial; urgency=low 2 | 3 | * First packaged release of gr-gsm (for Debian). 4 | 5 | -- Piotr Krysik Sun, 2 Sep 2017 21:00:00 +0100 6 | 7 | 8 | gr-gsm (0.40-0ppa0) xenial; urgency=low 9 | 10 | * Initial upload (Closes: #871055). 11 | 12 | -- Piotr Krysik Sun, 24 Apr 2016 16:00:00 +0100 13 | -------------------------------------------------------------------------------- /dists/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /dists/debian/control: -------------------------------------------------------------------------------- 1 | Source: gr-gsm 2 | Section: libdevel 3 | Priority: optional 4 | Maintainer: Piotr Krysik 5 | Build-Depends: cmake, 6 | debhelper (>= 9~), 7 | gnuradio-dev, 8 | libosmocore-dev, 9 | pkg-config, 10 | python-dev, 11 | python-scipy, 12 | swig 13 | X-Python-Version: >= 2.7, << 2.8 14 | Standards-Version: 4.0.1 15 | Homepage: http://github.com/ptrkrysik/gr-gsm/ 16 | Vcs-Git: git://github.com/ptrkrysik/gr-gsm.git 17 | Vcs-Browser: https://github.com/ptrkrysik/gr-gsm/ 18 | 19 | Package: gr-gsm 20 | Architecture: any 21 | Pre-Depends: ${misc:Pre-Depends} 22 | Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, 23 | libjs-jquery, 24 | gnuradio, 25 | gr-osmosdr 26 | Description: Gnuradio blocks and tools for receiving GSM transmissions 27 | Implementation of the Global System for Mobile Communications 28 | protocol and provide tools for scanning for GSM base stations and for 29 | decoding GSM radio trafic. 30 | -------------------------------------------------------------------------------- /dists/debian/gr-gsm.links: -------------------------------------------------------------------------------- 1 | /usr/share/javascript/jquery/jquery.min.js /usr/share/doc/gr-gsm/html/jquery.js 2 | -------------------------------------------------------------------------------- /dists/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) 4 | export DEB_HOST_MULTIARCH 5 | 6 | %: 7 | dh $@ --with python2 --parallel 8 | 9 | override_dh_auto_configure: 10 | dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPythonLibs_FIND_VERSION:STRING="2.7" -DPYTHON_EXECUTABLE:STRING="/usr/bin/python" 11 | 12 | override_dh_auto_install: 13 | dh_auto_install 14 | 15 | # Remove compiled python files 16 | rm -f debian/gr-gsm/usr/lib/python2.7/dist-packages/grgsm/*py[co] 17 | 18 | # Use jquery.js file from libjs-jquery instead, see gr-gsm.links 19 | rm -f debian/gr-gsm/usr/share/doc/gr-gsm/html/jquery.js 20 | 21 | debian/copyright: 22 | cme update dpkg-copyright 23 | -------------------------------------------------------------------------------- /dists/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /docs/doxygen/doxyxml/generated/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Contains generated files produced by generateDS.py. 3 | 4 | These do the real work of parsing the doxygen xml files but the 5 | resultant classes are not very friendly to navigate so the rest of the 6 | doxyxml module processes them further. 7 | """ 8 | from __future__ import unicode_literals 9 | -------------------------------------------------------------------------------- /docs/doxygen/other/group_defs.dox: -------------------------------------------------------------------------------- 1 | /*! 2 | * \defgroup block GNU Radio GSM C++ Signal Processing Blocks 3 | * \brief All C++ blocks that can be used from the GSM GNU Radio 4 | * module are listed here or in the subcategories below. 5 | * 6 | */ 7 | 8 | -------------------------------------------------------------------------------- /docs/doxygen/other/main_page.dox: -------------------------------------------------------------------------------- 1 | /*! \mainpage 2 | 3 | Welcome to the GNU Radio GSM Block 4 | 5 | This is the intro page for the Doxygen manual generated for the GSM 6 | block (docs/doxygen/other/main_page.dox). Edit it to add more detailed 7 | documentation about the new GNU Radio modules contained in this 8 | project. 9 | 10 | */ 11 | -------------------------------------------------------------------------------- /docs/grgsm_livemon.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | grgsm_livemon 3 | ============= 4 | 5 | ------------------------------------------------------- 6 | GSM C0 monitor forwarding packages to network interface 7 | ------------------------------------------------------- 8 | 9 | :Author: Piotr Krysik - ptrkrysik@gmail.com 10 | :Date: 2017-08-21 11 | :Copyright: public domain 12 | :Version: 0.0 13 | :Manual section: 1 14 | :Manual group: User Commands 15 | 16 | SYNOPSIS 17 | ======== 18 | 19 | grgsm_livemon [options] 20 | 21 | DESCRIPTION 22 | =========== 23 | 24 | Interactive monitor of a single C0 channel with analysis performed by 25 | Wireshark. Example command to run wireshark: 26 | 27 | sudo wireshark -k -f udp -Y gsmtap -i lo 28 | 29 | 30 | OPTIONS 31 | ======= 32 | 33 | -h, --help 34 | show this help message and exit 35 | 36 | --args=ARGS 37 | Set Device Arguments [default=] 38 | 39 | -g GAIN, --gain=GAIN 40 | Set gain [default=30] 41 | 42 | --osr=OSR 43 | Set OverSampling Ratio [default=4] 44 | 45 | -p PPM, --ppm=PPM 46 | Set ppm [default=0] 47 | 48 | -s SAMP_RATE, --samp-rate=SAMP_RATE 49 | Set samp_rate [default=2M] 50 | 51 | -o SHIFTOFF, --shiftoff=SHIFTOFF 52 | Set Frequency Shiftoff [default=400k] 53 | 54 | -f FC, --fc=FC 55 | Set GSM channel's central frequency [default=941.8M] 56 | 57 | SEE ALSO 58 | ======== 59 | 60 | * ``__ 61 | * ``grgsm_scanner(1)`` 62 | -------------------------------------------------------------------------------- /grc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_subdirectory(decoding) 21 | add_subdirectory(decryption) 22 | add_subdirectory(demapping) 23 | add_subdirectory(receiver) 24 | add_subdirectory(flow_control) 25 | add_subdirectory(misc_utils) 26 | add_subdirectory(transmitter) 27 | add_subdirectory(trx) 28 | install( 29 | FILES 30 | gsm.tree.yml 31 | DESTINATION share/gnuradio/grc/blocks 32 | ) 33 | -------------------------------------------------------------------------------- /grc/decoding/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | install( 21 | FILES 22 | gsm_control_channels_decoder.block.yml 23 | gsm_tch_f_decoder.block.yml 24 | gsm_tch_h_decoder.block.yml 25 | DESTINATION share/gnuradio/grc/blocks 26 | ) 27 | -------------------------------------------------------------------------------- /grc/decoding/gsm_control_channels_decoder.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_control_channels_decoder 4 | label: Control channels decoder 5 | 6 | inputs: 7 | - domain: message 8 | id: bursts 9 | 10 | outputs: 11 | - domain: message 12 | id: msgs 13 | optional: true 14 | 15 | templates: 16 | imports: import grgsm 17 | make: grgsm.control_channels_decoder() 18 | 19 | file_format: 1 20 | -------------------------------------------------------------------------------- /grc/decoding/gsm_tch_f_decoder.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_tch_f_decoder 4 | label: TCH/F decoder 5 | 6 | parameters: 7 | - id: mode 8 | label: TCH coding mode 9 | dtype: enum 10 | options: [grgsm.TCH_FS, grgsm.TCH_EFR, grgsm.TCH_AFS12_2, grgsm.TCH_AFS10_2, grgsm.TCH_AFS7_95, 11 | grgsm.TCH_AFS7_4, grgsm.TCH_AFS6_7, grgsm.TCH_AFS5_9, grgsm.TCH_AFS5_15, grgsm.TCH_AFS4_75] 12 | option_labels: [GSM-FR, GSM-EFR, GSM-AMR 12.2, GSM-AMR 10.2, GSM-AMR 7.95, GSM-AMR 13 | 7.4, GSM-AMR 6.7, GSM-AMR 5.9, GSM-AMR 5.15, GSM-AMR 4.75] 14 | - id: boundary_check 15 | label: Voice boundary detection 16 | dtype: bool 17 | default: 'False' 18 | options: ['False', 'True'] 19 | 20 | inputs: 21 | - domain: message 22 | id: bursts 23 | 24 | outputs: 25 | - domain: message 26 | id: msgs 27 | optional: true 28 | - domain: message 29 | id: voice 30 | optional: true 31 | 32 | templates: 33 | imports: import grgsm 34 | make: grgsm.tch_f_decoder(${mode}, ${boundary_check}) 35 | 36 | documentation: "If \"Voice boundary detection\" is enabled, then only bursts are decoded\ 37 | \ as voice where\n\n- the framenumber is greater then the framenumber of a received\ 38 | \ \"Connect\" or \"Connect Acknowlegde\" message, and \n- the framenumber is less\ 39 | \ then the framenumber of a \"Release\" message" 40 | 41 | file_format: 1 42 | -------------------------------------------------------------------------------- /grc/decoding/gsm_tch_h_decoder.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_tch_h_decoder 4 | label: TCH/H decoder 5 | 6 | parameters: 7 | - id: sub_channel 8 | label: Sub-channel number 9 | dtype: int 10 | default: '0' 11 | options: ['0', '1'] 12 | hide: none 13 | - id: multi_rate 14 | label: MultiRate configuration 15 | dtype: string 16 | - id: boundary_check 17 | label: Voice boundary detection 18 | dtype: bool 19 | default: 'False' 20 | options: ['False', 'True'] 21 | 22 | inputs: 23 | - domain: message 24 | id: bursts 25 | 26 | outputs: 27 | - domain: message 28 | id: msgs 29 | optional: true 30 | - domain: message 31 | id: voice 32 | optional: true 33 | asserts: 34 | - ${ sub_channel > -1 and sub_channel < 2 } 35 | 36 | templates: 37 | imports: import grgsm 38 | make: grgsm.tch_h_decoder(${sub_channel}, ${multi_rate}, ${boundary_check}) 39 | 40 | documentation: |- 41 | The MultiRate configuration string should contains the hex string from the 42 | MultiRate configuration element from the Assignment Command message. 43 | Example: 28111a40. 44 | See 3GPP TS 44.018 - 10.5.2.21aa MultiRate configuratio 45 | 46 | If "Voice boundary detection" is enabled, then only bursts are decoded as voice where 47 | 48 | - the framenumber is greater then the framenumber of a received "Connect" or "Connect Acknowlegde" message, and 49 | - the framenumber is less then the framenumber of a "Release" message 50 | 51 | file_format: 1 52 | -------------------------------------------------------------------------------- /grc/decryption/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | install( 21 | FILES 22 | gsm_decryption.block.yml 23 | DESTINATION share/gnuradio/grc/blocks 24 | ) 25 | -------------------------------------------------------------------------------- /grc/decryption/gsm_decryption.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_decryption 4 | label: Decryption 5 | 6 | parameters: 7 | - id: k_c 8 | label: Kc session key 9 | dtype: int_vector 10 | default: '[0,0,0,0,0,0,0,0]' 11 | - id: a5_version 12 | label: A5 version 13 | dtype: int 14 | default: '1' 15 | 16 | inputs: 17 | - domain: message 18 | id: bursts 19 | 20 | outputs: 21 | - domain: message 22 | id: bursts 23 | asserts: 24 | - ${ a5_version > 0 } 25 | - ${ a5_version < 5 } 26 | 27 | templates: 28 | imports: import grgsm 29 | make: grgsm.decryption(${k_c}, ${a5_version}) 30 | 31 | file_format: 1 32 | -------------------------------------------------------------------------------- /grc/demapping/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | install( 21 | FILES 22 | gsm_universal_ctrl_chans_demapper.block.yml 23 | gsm_bcch_ccch_demapper.block.yml 24 | gsm_bcch_ccch_sdcch4_demapper.block.yml 25 | gsm_sdcch8_demapper.block.yml 26 | gsm_tch_f_chans_demapper.block.yml 27 | gsm_tch_h_chans_demapper.block.yml 28 | DESTINATION share/gnuradio/grc/blocks 29 | ) 30 | -------------------------------------------------------------------------------- /grc/demapping/gsm_bcch_ccch_demapper.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_bcch_ccch_demapper 4 | label: BCCH + CCCH Demapper 5 | 6 | parameters: 7 | - id: timeslot_nr 8 | label: timeslot_nr 9 | dtype: raw 10 | default: '0' 11 | 12 | inputs: 13 | - domain: message 14 | id: bursts 15 | optional: true 16 | 17 | outputs: 18 | - domain: message 19 | id: bursts 20 | optional: true 21 | 22 | templates: 23 | imports: import grgsm 24 | make: |- 25 | grgsm.gsm_bcch_ccch_demapper( 26 | timeslot_nr=${timeslot_nr}, 27 | ) 28 | callbacks: 29 | - set_timeslot_nr(${timeslot_nr}) 30 | 31 | documentation: |- 32 | Piotr Krysik 33 | Demapper for BCCH + CCCH control channels. This corresponds to channel combination iv specified in GSM 05.02, section 6.4 34 | 35 | file_format: 1 36 | -------------------------------------------------------------------------------- /grc/demapping/gsm_bcch_ccch_sdcch4_demapper.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_bcch_ccch_sdcch4_demapper 4 | label: BCCH + CCCH + SDCCH/4 Demapper 5 | 6 | parameters: 7 | - id: timeslot_nr 8 | label: timeslot_nr 9 | dtype: raw 10 | default: '0' 11 | 12 | inputs: 13 | - domain: message 14 | id: bursts 15 | optional: true 16 | 17 | outputs: 18 | - domain: message 19 | id: bursts 20 | optional: true 21 | 22 | templates: 23 | imports: import grgsm 24 | make: |- 25 | grgsm.gsm_bcch_ccch_sdcch4_demapper( 26 | timeslot_nr=${timeslot_nr}, 27 | ) 28 | callbacks: 29 | - set_timeslot_nr(${timeslot_nr}) 30 | 31 | documentation: |- 32 | Piotr Krysik 33 | Demapper for BCCH + CCCH + SDCCH/4 + SACCH/C4 control channels. This corresponds to channel combination v specified in GSM 05.02, section 6.4 34 | 35 | file_format: 1 36 | -------------------------------------------------------------------------------- /grc/demapping/gsm_sdcch8_demapper.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_sdcch8_demapper 4 | label: SDCCH/8 Demapper 5 | 6 | parameters: 7 | - id: timeslot_nr 8 | label: timeslot_nr 9 | dtype: raw 10 | default: '1' 11 | 12 | inputs: 13 | - domain: message 14 | id: bursts 15 | optional: true 16 | 17 | outputs: 18 | - domain: message 19 | id: bursts 20 | optional: true 21 | 22 | templates: 23 | imports: import grgsm 24 | make: |- 25 | grgsm.gsm_sdcch8_demapper( 26 | timeslot_nr=${timeslot_nr}, 27 | ) 28 | callbacks: 29 | - set_timeslot_nr(${timeslot_nr}) 30 | 31 | documentation: |- 32 | Piotr Krysik 33 | Demapper for SDCCH/8 + SACCH/C8 control channels. This corresponds to channel combination vii specified in GSM 05.02, section 6.4 34 | 35 | file_format: 1 36 | -------------------------------------------------------------------------------- /grc/demapping/gsm_tch_f_chans_demapper.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_tch_f_chans_demapper 4 | label: TCH/F Demapper 5 | 6 | parameters: 7 | - id: timeslot_nr 8 | label: Timeslot 9 | dtype: int 10 | default: '2' 11 | hide: part 12 | 13 | inputs: 14 | - domain: message 15 | id: bursts 16 | optional: true 17 | 18 | outputs: 19 | - domain: message 20 | id: tch_bursts 21 | optional: true 22 | - domain: message 23 | id: acch_bursts 24 | optional: true 25 | 26 | templates: 27 | imports: import grgsm 28 | make: grgsm.tch_f_chans_demapper(${timeslot_nr}) 29 | 30 | file_format: 1 31 | -------------------------------------------------------------------------------- /grc/demapping/gsm_tch_h_chans_demapper.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_tch_h_chans_demapper 4 | label: TCH/H Demapper 5 | 6 | parameters: 7 | - id: timeslot_nr 8 | label: Timeslot 9 | dtype: int 10 | default: '2' 11 | hide: none 12 | - id: tch_h_channel 13 | label: Sub-channel number 14 | dtype: int 15 | default: '0' 16 | options: ['0', '1'] 17 | hide: none 18 | 19 | inputs: 20 | - domain: message 21 | id: bursts 22 | 23 | outputs: 24 | - domain: message 25 | id: tch_bursts 26 | optional: true 27 | - domain: message 28 | id: acch_bursts 29 | optional: true 30 | asserts: 31 | - ${ tch_h_channel > -1 and tch_h_channel < 2 } 32 | 33 | templates: 34 | imports: import grgsm 35 | make: grgsm.tch_h_chans_demapper(${timeslot_nr}, ${tch_h_channel}) 36 | 37 | file_format: 1 38 | -------------------------------------------------------------------------------- /grc/flow_control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | install( 21 | FILES 22 | gsm_burst_timeslot_splitter.block.yml 23 | gsm_burst_fnr_filter.block.yml 24 | gsm_burst_timeslot_filter.block.yml 25 | gsm_burst_type_filter.block.yml 26 | gsm_dummy_burst_filter.block.yml 27 | gsm_burst_sdcch_subslot_splitter.block.yml 28 | gsm_burst_sdcch_subslot_filter.block.yml 29 | gsm_uplink_downlink_splitter.block.yml 30 | DESTINATION share/gnuradio/grc/blocks 31 | ) 32 | -------------------------------------------------------------------------------- /grc/flow_control/gsm_burst_fnr_filter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_fnr_filter 4 | label: Burst Framenumber Filter 5 | 6 | parameters: 7 | - id: mode 8 | label: Mode 9 | dtype: enum 10 | options: [grgsm.FILTER_LESS_OR_EQUAL, grgsm.FILTER_GREATER_OR_EQUAL] 11 | option_labels: [Less or equal, Greater or equal] 12 | - id: fnr 13 | label: Framenumber 14 | dtype: int 15 | default: '1500123' 16 | 17 | inputs: 18 | - domain: message 19 | id: in 20 | 21 | outputs: 22 | - domain: message 23 | id: out 24 | optional: true 25 | 26 | templates: 27 | imports: import grgsm 28 | make: grgsm.burst_fnr_filter(${mode}, ${fnr}) 29 | 30 | documentation: |- 31 | Burst framenumber filter forwards only blocks with a framenumber satisfying the configured mode, i.e. if mode is "Less or equal", then only bursts with a smaller or equal framenumber are forwarded. 32 | 33 | file_format: 1 34 | -------------------------------------------------------------------------------- /grc/flow_control/gsm_burst_sdcch_subslot_filter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_sdcch_subslot_filter 4 | label: Burst SDCCH Subslot Filter 5 | 6 | parameters: 7 | - id: mode 8 | label: Mode 9 | dtype: enum 10 | options: [grgsm.SS_FILTER_SDCCH8, grgsm.SS_FILTER_SDCCH4] 11 | option_labels: [SDCCH/8, SDCCH/4] 12 | - id: subslot 13 | label: Subslot 14 | dtype: int 15 | default: '0' 16 | hide: none 17 | 18 | inputs: 19 | - domain: message 20 | id: in 21 | 22 | outputs: 23 | - domain: message 24 | id: out 25 | optional: true 26 | 27 | templates: 28 | imports: import grgsm 29 | make: grgsm.burst_sdcch_subslot_filter(${mode}, ${subslot}) 30 | 31 | documentation: |- 32 | This block forwards only bursts in the subslot given by the parameter 33 | 34 | file_format: 1 35 | -------------------------------------------------------------------------------- /grc/flow_control/gsm_burst_sdcch_subslot_splitter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_sdcch_subslot_splitter 4 | label: Burst SDCCH Subslot Splitter 5 | 6 | parameters: 7 | - id: ports 8 | label: Mode 9 | dtype: enum 10 | options: ['8', '4'] 11 | option_labels: [SDCCH/8, SDCCH/4] 12 | hide: part 13 | 14 | inputs: 15 | - domain: message 16 | id: in 17 | 18 | outputs: 19 | - domain: message 20 | id: out 21 | multiplicity: ${ ports } 22 | optional: true 23 | 24 | templates: 25 | imports: import grgsm 26 | make: |- 27 | grgsm.burst_sdcch_subslot_splitter( 28 | % if int(ports)==4: 29 | grgsm.SPLITTER_SDCCH4 30 | % else: 31 | grgsm.SPLITTER_SDCCH8 32 | % endif 33 | ) 34 | 35 | documentation: |- 36 | Burst SDCCH subslot splitter distributes bursts to eight different output ports depending on the subslots to which the bursts belong. 37 | This means subslot 0 bursts are sent to port out0, subslot 1 bursts on port out1, and so on. 38 | 39 | file_format: 1 40 | -------------------------------------------------------------------------------- /grc/flow_control/gsm_burst_timeslot_filter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_timeslot_filter 4 | label: Burst Timeslot Filter 5 | 6 | parameters: 7 | - id: timeslot 8 | label: Timeslot 9 | dtype: int 10 | default: '0' 11 | hide: none 12 | 13 | inputs: 14 | - domain: message 15 | id: in 16 | 17 | outputs: 18 | - domain: message 19 | id: out 20 | optional: true 21 | 22 | templates: 23 | imports: import grgsm 24 | make: grgsm.burst_timeslot_filter(${timeslot}) 25 | 26 | documentation: |- 27 | This block forwards only bursts in the timeslot given by the parameter 28 | 29 | file_format: 1 30 | -------------------------------------------------------------------------------- /grc/flow_control/gsm_burst_timeslot_splitter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_timeslot_splitter 4 | label: Burst Timeslot Splitter 5 | 6 | inputs: 7 | - domain: message 8 | id: in 9 | 10 | outputs: 11 | - domain: message 12 | id: out 13 | multiplicity: '8' 14 | optional: true 15 | 16 | templates: 17 | imports: import grgsm 18 | make: grgsm.burst_timeslot_splitter() 19 | 20 | documentation: "Burst timeslot splitter distributes bursts to eight different output\ 21 | \ ports depending on the timeslots of the bursts. \nThis means timeslot 0 bursts\ 22 | \ are sent to port out0, timeslot 1 bursts on port out1, and so on." 23 | 24 | file_format: 1 25 | -------------------------------------------------------------------------------- /grc/flow_control/gsm_burst_type_filter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_type_filter 4 | label: Burst Type Filter 5 | 6 | parameters: 7 | - id: selected_burst_types 8 | label: Selected burst types 9 | dtype: int_vector 10 | default: '[0,1,2,3,4,5,6,7]' 11 | 12 | inputs: 13 | - domain: message 14 | id: bursts_in 15 | optional: true 16 | 17 | outputs: 18 | - domain: message 19 | id: bursts_out 20 | optional: true 21 | 22 | templates: 23 | imports: import grgsm 24 | make: grgsm.burst_type_filter(${selected_burst_types}) 25 | 26 | documentation: |- 27 | This block filters bursts based on their type. 28 | 29 | For more information on burst types, see GSM 05.02. 30 | 31 | file_format: 1 32 | -------------------------------------------------------------------------------- /grc/flow_control/gsm_dummy_burst_filter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_dummy_burst_filter 4 | label: Dummy Burst Filter 5 | 6 | inputs: 7 | - domain: message 8 | id: in 9 | 10 | outputs: 11 | - domain: message 12 | id: out 13 | optional: true 14 | 15 | templates: 16 | imports: import grgsm 17 | make: grgsm.dummy_burst_filter() 18 | 19 | documentation: "This block filters dummy bursts. \n\nFor more information on dummy\ 20 | \ bursts, see GSM 05.02." 21 | 22 | file_format: 1 23 | -------------------------------------------------------------------------------- /grc/flow_control/gsm_uplink_downlink_splitter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_uplink_downlink_splitter 4 | label: Up/Down-link splitter 5 | 6 | inputs: 7 | - domain: message 8 | id: in 9 | optional: true 10 | 11 | outputs: 12 | - domain: message 13 | id: downlink 14 | optional: true 15 | - domain: message 16 | id: uplink 17 | optional: true 18 | 19 | templates: 20 | imports: import grgsm 21 | make: grgsm.uplink_downlink_splitter() 22 | 23 | file_format: 1 24 | -------------------------------------------------------------------------------- /grc/gsm.tree.yml: -------------------------------------------------------------------------------- 1 | '[GSM]': 2 | - Receiver: 3 | - gsm_receiver 4 | - gsm_receiver_with_uplink 5 | - gsm_cx_channel_hopper 6 | - gsm_fcch_burst_tagger 7 | - gsm_sch_detector 8 | - gsm_fcch_detector 9 | - gsm_clock_offset_control 10 | - gsm_input 11 | - Transmitter: 12 | - gsm_txtime_bursts_tagger 13 | - gsm_txtime_setter 14 | - gsm_gmsk_mod 15 | - gsm_preprocess_tx_burst 16 | - gsm_gen_test_ab 17 | - Transceiver: 18 | - gsm_trx_burst_if 19 | - Logical channels demapping: 20 | - gsm_universal_ctrl_chans_demapper 21 | - gsm_bcch_ccch_demapper 22 | - gsm_bcch_ccch_sdcch4_demapper 23 | - gsm_sdcch8_demapper 24 | - gsm_tch_f_chans_demapper 25 | - gsm_tch_h_chans_demapper 26 | - Decryption: 27 | - gsm_decryption 28 | - Decoding: 29 | - gsm_control_channels_decoder 30 | - gsm_tch_f_decoder 31 | - gsm_tch_h_decoder 32 | - Flow control: 33 | - gsm_burst_timeslot_splitter 34 | - gsm_burst_sdcch_subslot_splitter 35 | - gsm_burst_timeslot_filter 36 | - gsm_burst_sdcch_subslot_filter 37 | - gsm_burst_fnr_filter 38 | - gsm_burst_type_filter 39 | - gsm_dummy_burst_filter 40 | - gsm_uplink_downlink_splitter 41 | - Utilities: 42 | - gsm_bursts_printer 43 | - gsm_burst_file_sink 44 | - gsm_burst_file_source 45 | - gsm_collect_system_info 46 | - gsm_message_file_sink 47 | - gsm_message_file_source 48 | - gsm_extract_system_info 49 | - gsm_extract_immediate_assignment 50 | - gsm_extract_cmc 51 | - gsm_extract_assignment_cmd 52 | - gsm_controlled_rotator_cc 53 | - gsm_controlled_fractional_resampler_cc 54 | - gsm_message_printer 55 | - gsm_clock_offset_corrector_tagged 56 | - gsm_msg_to_tag 57 | - gsm_tmsi_dumper 58 | - gsm_burst_to_fn_time 59 | -------------------------------------------------------------------------------- /grc/misc_utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | install( 21 | FILES 22 | gsm_extract_system_info.block.yml 23 | gsm_extract_immediate_assignment.block.yml 24 | gsm_collect_system_info.block.yml 25 | gsm_extract_cmc.block.yml 26 | gsm_extract_assignment_cmd.block.yml 27 | gsm_controlled_rotator_cc.block.yml 28 | gsm_message_printer.block.yml 29 | gsm_bursts_printer.block.yml 30 | gsm_clock_offset_corrector_tagged.block.yml 31 | gsm_tmsi_dumper.block.yml 32 | gsm_burst_file_sink.block.yml 33 | gsm_burst_file_source.block.yml 34 | gsm_message_file_sink.block.yml 35 | gsm_message_file_source.block.yml 36 | gsm_msg_to_tag.block.yml 37 | gsm_controlled_fractional_resampler_cc.block.yml 38 | gsm_burst_to_fn_time.block.yml 39 | DESTINATION share/gnuradio/grc/blocks 40 | ) 41 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_burst_file_sink.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_file_sink 4 | label: Burst File Sink 5 | 6 | parameters: 7 | - id: filename 8 | label: Destination file 9 | dtype: file_open 10 | default: /tmp/bursts 11 | 12 | inputs: 13 | - domain: message 14 | id: in 15 | 16 | templates: 17 | imports: import grgsm 18 | make: grgsm.burst_file_sink(${filename}) 19 | 20 | file_format: 1 21 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_burst_file_source.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_file_source 4 | label: Burst File Source 5 | 6 | parameters: 7 | - id: filename 8 | label: Source file 9 | dtype: file_open 10 | default: /tmp/bursts 11 | 12 | outputs: 13 | - domain: message 14 | id: out 15 | 16 | templates: 17 | imports: import grgsm 18 | make: grgsm.burst_file_source(${filename}) 19 | 20 | file_format: 1 21 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_burst_to_fn_time.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_to_fn_time 4 | label: Burst to FN time 5 | 6 | inputs: 7 | - domain: message 8 | id: bursts_in 9 | optional: true 10 | 11 | outputs: 12 | - domain: message 13 | id: fn_time_out 14 | optional: true 15 | 16 | templates: 17 | imports: import grgsm 18 | make: grgsm.burst_to_fn_time() 19 | 20 | file_format: 1 21 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_clock_offset_corrector_tagged.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_clock_offset_corrector_tagged 4 | label: Clock Offset Corrector Tagged 5 | 6 | parameters: 7 | - id: fc 8 | label: fc 9 | dtype: raw 10 | default: 936.6e6 11 | - id: ppm 12 | label: ppm 13 | dtype: raw 14 | default: '0' 15 | - id: samp_rate_in 16 | label: samp_rate_in 17 | dtype: raw 18 | default: 1625000.0/6.0*4.0 19 | - id: osr 20 | label: OSR 21 | dtype: raw 22 | default: osr 23 | 24 | inputs: 25 | - domain: message 26 | id: ctrl 27 | optional: true 28 | - domain: stream 29 | dtype: complex 30 | vlen: 1 31 | 32 | outputs: 33 | - domain: stream 34 | dtype: complex 35 | vlen: 1 36 | 37 | templates: 38 | imports: import grgsm 39 | make: |- 40 | grgsm.clock_offset_corrector_tagged( 41 | fc=${fc}, 42 | samp_rate_in=${samp_rate_in}, 43 | ppm=${ppm}, 44 | osr=${osr} 45 | ) 46 | callbacks: 47 | - set_fc(${fc}) 48 | - set_ppm(${ppm}) 49 | - set_samp_rate_in(${samp_rate_in}) 50 | - set_osr(${osr}) 51 | 52 | documentation: |- 53 | Piotr Krysik 54 | Clock offset corrector with blocks that use tags to switch offsets 55 | 56 | file_format: 1 57 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_collect_system_info.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_collect_system_info 4 | label: Collect System Info 5 | 6 | inputs: 7 | - domain: message 8 | id: msgs 9 | 10 | templates: 11 | imports: import grgsm 12 | make: grgsm.collect_system_info() 13 | 14 | documentation: |- 15 | This blocks collect System Information Messages, which can be retrieved using the following methods: 16 | 17 | get_framenumbers(): Get the list with the framenumbers of the System Information Messages 18 | 19 | get_system_information_type(): Get the types of the System Information Messages 20 | 21 | get_data(): Get the whole System Information Messages in Hex representation 22 | 23 | file_format: 1 24 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_controlled_fractional_resampler_cc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_controlled_fractional_resampler_cc 4 | label: Controlled Fractional Resampler 5 | 6 | parameters: 7 | - id: phase_shift 8 | label: Phase Shift 9 | dtype: real 10 | - id: resamp_ratio 11 | label: Resampling Ratio 12 | dtype: real 13 | 14 | inputs: 15 | - domain: stream 16 | dtype: complex 17 | 18 | outputs: 19 | - domain: stream 20 | dtype: complex 21 | 22 | templates: 23 | imports: import grgsm 24 | make: grgsm.controlled_fractional_resampler_cc(${phase_shift}, ${resamp_ratio}) 25 | callbacks: 26 | - set_resamp_ratio(${resamp_ratio}) 27 | 28 | file_format: 1 29 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_controlled_rotator_cc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_controlled_rotator_cc 4 | label: Controlled Rotator 5 | 6 | parameters: 7 | - id: phase_inc 8 | label: phase_inc 9 | dtype: real 10 | default: '0' 11 | 12 | inputs: 13 | - domain: stream 14 | dtype: complex 15 | 16 | outputs: 17 | - domain: stream 18 | dtype: complex 19 | 20 | templates: 21 | imports: import grgsm 22 | make: grgsm.controlled_rotator_cc(${phase_inc}) 23 | callbacks: 24 | - set_phase_inc(${phase_inc}) 25 | 26 | file_format: 1 27 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_extract_assignment_cmd.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_extract_assignment_cmd 4 | label: Extract Assignment Command 5 | 6 | inputs: 7 | - domain: message 8 | id: msgs 9 | 10 | templates: 11 | imports: import grgsm 12 | make: grgsm.extract_assignment_cmd() 13 | 14 | documentation: |- 15 | Extracts Assignemnt Commands. 16 | 17 | Input: decoded control channel messages 18 | 19 | The information can be retrieved using following function: 20 | get_assignment_commands() 21 | 22 | file_format: 1 23 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_extract_cmc.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_extract_cmc 4 | label: Extract Cipher Mode Command 5 | 6 | inputs: 7 | - domain: message 8 | id: msgs 9 | 10 | templates: 11 | imports: import grgsm 12 | make: grgsm.extract_cmc() 13 | 14 | documentation: |- 15 | Extracts the framenumber and the assigned encryption algorithm from Cipher Mode Commands. 16 | 17 | Input: decoded control channel messages 18 | 19 | The information can be retrieved using following functions: 20 | get_frame_numbers(), get_a5_versions() 21 | 22 | file_format: 1 23 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_extract_immediate_assignment.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_extract_immediate_assignment 4 | label: Extract Immediate Assignment 5 | 6 | parameters: 7 | - id: print_immediate_assignments 8 | label: Print 9 | dtype: bool 10 | default: 'False' 11 | options: ['False', 'True'] 12 | - id: ignore_gprs 13 | label: Ignore GPRS 14 | dtype: bool 15 | default: 'False' 16 | options: ['False', 'True'] 17 | - id: unique_references 18 | label: Unique per request ref 19 | dtype: bool 20 | default: 'False' 21 | options: ['False', 'True'] 22 | 23 | inputs: 24 | - domain: message 25 | id: msgs 26 | 27 | templates: 28 | imports: import grgsm 29 | make: grgsm.extract_immediate_assignment(${print_immediate_assignments}, ${ignore_gprs}, 30 | ${unique_references}) 31 | 32 | documentation: |- 33 | Extracts the assignment information from immediate assignments, i.e. timeslot, channel type, etc. 34 | 35 | Input: decoded control channel messages 36 | 37 | If "Print" is enabled, the information will be printed to output also, 38 | else the data can be retrieved using functions: 39 | 40 | get_frame_numbers(), get_channel_types(), get_timeslots(), get_subchannels(), get_hopping(), get_maios(), get_hsns(), get_arfcns(), get_timing_advances(), get_mobile_allocations() 41 | 42 | If "Ignore GPRS" is enabled, the extractor will ignore Immediate Assignments that assign GPRS channels. 43 | 44 | If "Unique per request ref" is enabled, the extractor will capture the first Immediate Assignment for every unique request reference, and ignore further duplicate assignments 45 | 46 | file_format: 1 47 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_extract_system_info.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_extract_system_info 4 | label: Extract System Info 5 | 6 | inputs: 7 | - domain: message 8 | id: msgs 9 | - domain: message 10 | id: bursts 11 | 12 | templates: 13 | imports: import grgsm 14 | make: grgsm.extract_system_info() 15 | 16 | file_format: 1 17 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_message_file_sink.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_message_file_sink 4 | label: Message File Sink 5 | 6 | parameters: 7 | - id: filename 8 | label: Destination file 9 | dtype: file_open 10 | default: /tmp/output.msg 11 | 12 | inputs: 13 | - domain: message 14 | id: in 15 | 16 | templates: 17 | imports: import grgsm 18 | make: grgsm.message_file_sink(${filename}) 19 | 20 | documentation: |- 21 | This block stores incoming gsm messages to a file. 22 | 23 | file_format: 1 24 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_message_file_source.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_message_file_source 4 | label: Message File Source 5 | 6 | parameters: 7 | - id: filename 8 | label: Source file 9 | dtype: file_open 10 | default: /tmp/output.msg 11 | 12 | outputs: 13 | - domain: message 14 | id: out 15 | 16 | templates: 17 | imports: import grgsm 18 | make: grgsm.message_file_source(${filename}) 19 | 20 | documentation: |- 21 | This block outputs gsm messages stored in a file. 22 | 23 | file_format: 1 24 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_message_printer.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_message_printer 4 | label: Message Printer 5 | 6 | parameters: 7 | - id: prepend_string 8 | label: Prepend String 9 | dtype: string 10 | hide: part 11 | - id: prepend_fnr 12 | label: Prepend Frame Number 13 | dtype: bool 14 | default: 'False' 15 | options: ['False', 'True'] 16 | - id: prepend_frame_count 17 | label: Prepend Frame Count 18 | dtype: bool 19 | default: 'False' 20 | options: ['False', 'True'] 21 | - id: print_gsmtap_header 22 | label: Print GSMTap header 23 | dtype: bool 24 | default: 'False' 25 | options: ['False', 'True'] 26 | 27 | inputs: 28 | - domain: message 29 | id: msgs 30 | 31 | templates: 32 | imports: |- 33 | import grgsm 34 | import pmt 35 | make: |- 36 | grgsm.message_printer(pmt.intern(${prepend_string}), ${prepend_fnr}, 37 | ${prepend_frame_count}, ${print_gsmtap_header}) 38 | 39 | file_format: 1 40 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_msg_to_tag.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_msg_to_tag 4 | label: Message To Tag 5 | 6 | inputs: 7 | - domain: stream 8 | dtype: complex 9 | - domain: message 10 | id: msg 11 | optional: true 12 | 13 | outputs: 14 | - domain: stream 15 | dtype: complex 16 | 17 | templates: 18 | imports: import grgsm 19 | make: grgsm.msg_to_tag() 20 | 21 | file_format: 1 22 | -------------------------------------------------------------------------------- /grc/misc_utils/gsm_tmsi_dumper.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_tmsi_dumper 4 | label: TMSI Dumper 5 | 6 | inputs: 7 | - domain: message 8 | id: msgs 9 | 10 | templates: 11 | imports: |- 12 | import grgsm 13 | import pmt 14 | make: grgsm.tmsi_dumper() 15 | 16 | file_format: 1 17 | -------------------------------------------------------------------------------- /grc/qa_utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | install( 21 | FILES 22 | gsm_burst_source.block.xml 23 | gsm_burst_sink.block.xml 24 | gsm_message_source.block.xml 25 | gsm_message_sink.block.xml 26 | DESTINATION share/gnuradio/grc/blocks 27 | ) 28 | -------------------------------------------------------------------------------- /grc/qa_utils/gsm_burst_sink.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_sink 4 | label: Burst Sink 5 | 6 | inputs: 7 | - domain: message 8 | id: in 9 | 10 | templates: 11 | imports: import grgsm 12 | make: grgsm.burst_sink() 13 | 14 | file_format: 1 15 | -------------------------------------------------------------------------------- /grc/qa_utils/gsm_burst_source.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_burst_source 4 | label: Burst Source 5 | 6 | parameters: 7 | - id: framenumbers 8 | label: Frame numbers 9 | dtype: int_vector 10 | default: '[]' 11 | hide: part 12 | - id: timeslots 13 | label: Timeslots 14 | dtype: int_vector 15 | default: '[]' 16 | hide: part 17 | - id: bursts 18 | label: Bursts 19 | dtype: raw 20 | default: '[[],]' 21 | 22 | outputs: 23 | - domain: message 24 | id: out 25 | 26 | templates: 27 | imports: import grgsm 28 | make: grgsm.burst_source(${framenumbers}, ${timeslots}, ${bursts}) 29 | 30 | file_format: 1 31 | -------------------------------------------------------------------------------- /grc/qa_utils/gsm_message_sink.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_message_sink 4 | label: Message Sink 5 | 6 | inputs: 7 | - domain: message 8 | id: in 9 | 10 | templates: 11 | imports: import grgsm 12 | make: grgsm.message_sink() 13 | 14 | documentation: |- 15 | This block is a message sink for testing purposes. 16 | 17 | The data can be retrieved using function get_messages() 18 | 19 | file_format: 1 20 | -------------------------------------------------------------------------------- /grc/qa_utils/gsm_message_source.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_message_source 4 | label: Message Source 5 | 6 | parameters: 7 | - id: messages 8 | label: Messages 9 | dtype: raw 10 | default: '["02 04 01 00 00 00 c9 00 00 1d 3c e5 02 00 01 00 15 06 21 00 01 f0 11 | 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b", 12 | 13 | "02 04 01 00 00 00 ca 00 00 1d 3c e9 02 00 02 00 15 06 21 00 01 f0 2b 2b 2b 14 | 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b", 15 | 16 | "02 04 01 00 00 00 cb 00 00 1d 3d 0e 01 00 00 00 59 06 1a 00 00 00 00 00 00 17 | 00 00 00 00 00 00 00 00 00 00 ff e5 04 00", 18 | 19 | "02 04 01 00 00 00 cb 00 00 1d 3d 12 02 00 00 00 15 06 21 00 01 f0 2b 2b 2b 20 | 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b"]' 21 | hide: 'true' 22 | 23 | outputs: 24 | - domain: message 25 | id: msgs 26 | 27 | templates: 28 | imports: import grgsm 29 | make: grgsm.message_source(${messages}) 30 | 31 | documentation: |- 32 | This block is a basic message source for testing purposes. 33 | 34 | It takes a list of strings as input, where each string 35 | is a whitespace-separated list of hexadecimal values representing the data bytes of a message including the gsmtap header. 36 | 37 | Such strings can be obtained using the message printer with option "Print GSMTap header" 38 | 39 | file_format: 1 40 | -------------------------------------------------------------------------------- /grc/receiver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | install( 21 | FILES 22 | gsm_input.block.yml 23 | gsm_receiver.block.yml 24 | gsm_receiver_with_uplink.block.yml 25 | gsm_fcch_burst_tagger.block.yml 26 | gsm_sch_detector.block.yml 27 | gsm_fcch_detector.block.yml 28 | gsm_cx_channel_hopper.block.yml 29 | gsm_clock_offset_control.block.yml 30 | DESTINATION share/gnuradio/grc/blocks 31 | ) 32 | -------------------------------------------------------------------------------- /grc/receiver/gsm_clock_offset_control.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_clock_offset_control 4 | label: GSM Clock Offset Control 5 | 6 | parameters: 7 | - id: fc 8 | label: fc 9 | dtype: float 10 | default: fc 11 | - id: osr 12 | label: OSR 13 | dtype: int 14 | default: osr 15 | - id: samp_rate 16 | label: samp_rate 17 | dtype: float 18 | default: samp_rate 19 | 20 | inputs: 21 | - domain: message 22 | id: measurements 23 | 24 | outputs: 25 | - domain: message 26 | id: ctrl 27 | optional: true 28 | 29 | templates: 30 | imports: import grgsm 31 | make: grgsm.clock_offset_control(${fc}, ${samp_rate}, ${osr}) 32 | callbacks: 33 | - set_fc(${fc}) 34 | 35 | file_format: 1 36 | -------------------------------------------------------------------------------- /grc/receiver/gsm_cx_channel_hopper.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_cx_channel_hopper 4 | label: CX Channel Hopper 5 | 6 | parameters: 7 | - id: ma 8 | label: MA 9 | dtype: int_vector 10 | default: '[]' 11 | - id: maio 12 | label: MAIO 13 | dtype: int 14 | - id: hsn 15 | label: HSN 16 | dtype: int 17 | 18 | inputs: 19 | - domain: message 20 | id: CX 21 | 22 | outputs: 23 | - domain: message 24 | id: bursts 25 | 26 | templates: 27 | imports: import grgsm 28 | make: grgsm.cx_channel_hopper(${ma}, ${maio}, ${hsn}) 29 | 30 | file_format: 1 31 | -------------------------------------------------------------------------------- /grc/receiver/gsm_fcch_burst_tagger.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_fcch_burst_tagger 4 | label: FCCH Burst Tagger 5 | 6 | parameters: 7 | - id: OSR 8 | label: OSR 9 | dtype: int 10 | 11 | inputs: 12 | - domain: stream 13 | dtype: complex 14 | - label: threshold 15 | domain: stream 16 | dtype: float 17 | 18 | outputs: 19 | - domain: stream 20 | dtype: complex 21 | 22 | templates: 23 | imports: import grgsm 24 | make: grgsm.fcch_burst_tagger(${OSR}) 25 | 26 | file_format: 1 27 | -------------------------------------------------------------------------------- /grc/receiver/gsm_fcch_detector.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_fcch_detector 4 | label: FCCH Bursts Detector 5 | 6 | parameters: 7 | - id: OSR 8 | label: OverSamplingRatio 9 | dtype: int 10 | default: '4' 11 | 12 | inputs: 13 | - domain: stream 14 | dtype: complex 15 | vlen: 1 16 | 17 | outputs: 18 | - domain: stream 19 | dtype: complex 20 | vlen: 1 21 | 22 | templates: 23 | imports: import grgsm 24 | make: grgsm.fcch_detector(${OSR}) 25 | callbacks: 26 | - set_OSR(${OSR}) 27 | 28 | documentation: |- 29 | Piotr Krysik 30 | Detects positions of FCCH bursts. At the end of each detected FCCH burst adds to the stream a tag with key "fcch" and value which is a frequency offset estimate. The input sampling frequency should be integer multiply of GSM GMKS symbol rate - 1625000/6 Hz. 31 | 32 | file_format: 1 33 | -------------------------------------------------------------------------------- /grc/receiver/gsm_input.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_input 4 | label: GSM Input Adaptor 5 | 6 | parameters: 7 | - id: ppm 8 | label: ppm 9 | dtype: float 10 | default: ppm 11 | hide: part 12 | - id: osr 13 | label: OSR 14 | dtype: int 15 | default: osr 16 | hide: part 17 | - id: fc 18 | label: fc 19 | dtype: float 20 | default: fc 21 | hide: part 22 | - id: samp_rate_in 23 | label: samp_rate_in 24 | dtype: float 25 | default: samp_rate_in 26 | hide: part 27 | 28 | inputs: 29 | - domain: stream 30 | dtype: complex 31 | vlen: 1 32 | - domain: message 33 | id: ctrl_in 34 | optional: true 35 | 36 | outputs: 37 | - domain: stream 38 | dtype: complex 39 | vlen: 1 40 | 41 | templates: 42 | imports: import grgsm 43 | make: |- 44 | grgsm.gsm_input( 45 | ppm=${ppm}, 46 | osr=${osr}, 47 | fc=${fc}, 48 | samp_rate_in=${samp_rate_in}, 49 | ) 50 | callbacks: 51 | - set_ppm(${ppm}) 52 | - set_osr(${osr}) 53 | - set_fc(${fc}) 54 | - set_samp_rate_in(${samp_rate_in}) 55 | 56 | documentation: |- 57 | Piotr Krysik 58 | Adaptor of input stream for the GSM receiver. Contains frequency offset corrector and resampler to correct carrier frequency and sampling frequency offsets. At the end it has LP filter for filtering of a GSM channel. 59 | 60 | file_format: 1 61 | -------------------------------------------------------------------------------- /grc/receiver/gsm_receiver.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_receiver 4 | label: GSM Receiver 5 | 6 | parameters: 7 | - id: osr 8 | label: Oversampling ratio 9 | dtype: int 10 | default: '4' 11 | - id: cell_allocation 12 | label: Cell allocation 13 | dtype: float_vector 14 | default: '[0]' 15 | hide: part 16 | - id: tseq_nums 17 | label: TSEQ numbers 18 | dtype: int_vector 19 | default: '[]' 20 | hide: part 21 | - id: num_streams 22 | label: Num Streams 23 | dtype: int 24 | default: '1' 25 | hide: part 26 | 27 | inputs: 28 | - domain: stream 29 | dtype: complex 30 | multiplicity: ${ num_streams } 31 | 32 | outputs: 33 | - domain: message 34 | id: C0 35 | optional: true 36 | - domain: message 37 | id: CX 38 | optional: true 39 | - domain: message 40 | id: measurements 41 | optional: true 42 | asserts: 43 | - ${ num_streams >= 0 } 44 | 45 | templates: 46 | imports: import grgsm 47 | make: grgsm.receiver(${osr}, ${cell_allocation}, ${tseq_nums}, False) 48 | 49 | file_format: 1 50 | -------------------------------------------------------------------------------- /grc/receiver/gsm_receiver_with_uplink.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_receiver_with_uplink 4 | label: GSM Receiver (with uplink) 5 | 6 | parameters: 7 | - id: osr 8 | label: Oversampling ratio 9 | dtype: int 10 | default: '4' 11 | - id: cell_allocation 12 | label: Cell allocation 13 | dtype: float_vector 14 | default: '[0]' 15 | hide: part 16 | - id: tseq_nums 17 | label: TSEQ numbers 18 | dtype: int_vector 19 | default: '[]' 20 | hide: part 21 | - id: num_streams 22 | label: Num Streams 23 | dtype: int 24 | default: '1' 25 | hide: part 26 | 27 | inputs: 28 | - label: C 29 | domain: stream 30 | dtype: complex 31 | multiplicity: ${ num_streams } 32 | - label: C_up 33 | domain: stream 34 | dtype: complex 35 | multiplicity: ${ num_streams } 36 | 37 | outputs: 38 | - domain: message 39 | id: C0 40 | optional: true 41 | - domain: message 42 | id: CX 43 | optional: true 44 | - domain: message 45 | id: measurements 46 | optional: true 47 | asserts: 48 | - ${ num_streams >= 0 } 49 | 50 | templates: 51 | imports: import grgsm 52 | make: grgsm.receiver(${osr}, ${cell_allocation}, ${tseq_nums}, True) 53 | 54 | file_format: 1 55 | -------------------------------------------------------------------------------- /grc/receiver/gsm_sch_detector.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_sch_detector 4 | label: SCH Bursts Detector 5 | 6 | parameters: 7 | - id: OSR 8 | label: OSR 9 | dtype: int 10 | default: '4' 11 | 12 | inputs: 13 | - domain: stream 14 | dtype: complex 15 | 16 | outputs: 17 | - domain: stream 18 | dtype: complex 19 | 20 | templates: 21 | imports: import grgsm 22 | make: grgsm.sch_detector(${OSR}) 23 | callbacks: 24 | - set_OSR(${OSR}) 25 | 26 | file_format: 1 27 | -------------------------------------------------------------------------------- /grc/transmitter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | install( 21 | FILES 22 | gsm_gmsk_mod.block.yml 23 | gsm_txtime_bursts_tagger.block.yml 24 | gsm_txtime_setter.block.yml 25 | gsm_preprocess_tx_burst.block.yml 26 | gsm_gen_test_ab.block.yml 27 | DESTINATION share/gnuradio/grc/blocks 28 | ) 29 | -------------------------------------------------------------------------------- /grc/transmitter/gsm_gen_test_ab.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_gen_test_ab 4 | label: Gen Test AB 5 | 6 | inputs: 7 | - domain: message 8 | id: bursts_in 9 | optional: true 10 | 11 | outputs: 12 | - domain: message 13 | id: bursts_out 14 | optional: true 15 | 16 | templates: 17 | imports: import grgsm 18 | make: grgsm.gen_test_ab() 19 | 20 | file_format: 1 21 | -------------------------------------------------------------------------------- /grc/transmitter/gsm_gmsk_mod.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_gmsk_mod 4 | label: GMSK Modulator for GSM 5 | 6 | parameters: 7 | - id: BT 8 | label: 3 dB Time-Bandwidth Product 9 | dtype: raw 10 | default: '4' 11 | - id: pulse_duration 12 | label: Pulse Duration 13 | dtype: raw 14 | default: '4' 15 | - id: sps 16 | label: Samples/Symbol 17 | dtype: raw 18 | default: '4' 19 | 20 | inputs: 21 | - domain: stream 22 | dtype: byte 23 | vlen: 1 24 | optional: true 25 | 26 | outputs: 27 | - domain: stream 28 | dtype: complex 29 | vlen: 1 30 | optional: true 31 | 32 | templates: 33 | imports: from grgsm import gsm_gmsk_mod 34 | make: |- 35 | gsm_gmsk_mod( 36 | BT=${BT}, 37 | pulse_duration=${pulse_duration}, 38 | sps=${sps}, 39 | ) 40 | callbacks: 41 | - set_BT(${BT}) 42 | - set_pulse_duration(${pulse_duration}) 43 | - set_sps(${sps}) 44 | 45 | documentation: |- 46 | Piotr Krysik 47 | GMSK Modulator for GSM 48 | 49 | file_format: 1 50 | -------------------------------------------------------------------------------- /grc/transmitter/gsm_preprocess_tx_burst.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_preprocess_tx_burst 4 | label: Preprocess Tx burst 5 | 6 | inputs: 7 | - domain: message 8 | id: bursts_in 9 | optional: true 10 | 11 | outputs: 12 | - domain: message 13 | id: bursts_out 14 | optional: true 15 | 16 | templates: 17 | imports: import grgsm 18 | make: grgsm.preprocess_tx_burst() 19 | 20 | file_format: 1 21 | -------------------------------------------------------------------------------- /grc/transmitter/gsm_txtime_bursts_tagger.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_txtime_bursts_tagger 4 | label: txtime_bursts_tagger 5 | 6 | parameters: 7 | - id: init_fn 8 | label: init_fn 9 | dtype: raw 10 | default: None 11 | hide: part 12 | - id: init_time 13 | label: init_time 14 | dtype: float 15 | default: '0' 16 | hide: part 17 | - id: time_hint 18 | label: time_hint 19 | dtype: float 20 | default: '0' 21 | hide: part 22 | - id: timing_advance 23 | label: timing_advance 24 | dtype: float 25 | default: '0' 26 | hide: part 27 | - id: delay_correction 28 | label: delay_correction 29 | dtype: float 30 | default: '0' 31 | hide: part 32 | 33 | inputs: 34 | - domain: message 35 | id: fn_time 36 | optional: true 37 | - domain: message 38 | id: bursts 39 | optional: true 40 | 41 | outputs: 42 | - domain: message 43 | id: bursts 44 | optional: true 45 | 46 | templates: 47 | imports: import grgsm 48 | make: grgsm.txtime_bursts_tagger(${init_fn}, ${init_time}, ${time_hint}, ${timing_advance}, 49 | ${delay_correction}) 50 | callbacks: 51 | - set_fn_time_reference(${init_fn}, ${init_time}) 52 | - set_time_hint(${time_hint}) 53 | - set_timing_advance(${timing_advance}) 54 | - set_delay_correction(${delay_correction}) 55 | 56 | file_format: 1 57 | -------------------------------------------------------------------------------- /grc/transmitter/gsm_txtime_setter.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_txtime_setter 4 | label: txtime_setter 5 | 6 | parameters: 7 | - id: init_fn 8 | label: init_fn 9 | dtype: raw 10 | default: None 11 | hide: part 12 | - id: init_time_secs 13 | label: init_time_secs 14 | dtype: int 15 | default: '0' 16 | hide: part 17 | - id: init_time_fracs 18 | label: init_time_fracs 19 | dtype: float 20 | default: '0' 21 | hide: part 22 | - id: time_hint_secs 23 | label: time_hint_secs 24 | dtype: int 25 | default: '0' 26 | hide: part 27 | - id: time_hint_fracs 28 | label: time_hint_fracs 29 | dtype: float 30 | default: '0' 31 | hide: part 32 | - id: timing_advance 33 | label: timing_advance 34 | dtype: float 35 | default: '0' 36 | hide: part 37 | - id: delay_correction 38 | label: delay_correction 39 | dtype: float 40 | default: '0' 41 | hide: part 42 | 43 | inputs: 44 | - domain: message 45 | id: fn_time 46 | optional: true 47 | - domain: message 48 | id: bursts_in 49 | optional: true 50 | 51 | outputs: 52 | - domain: message 53 | id: bursts_out 54 | optional: true 55 | 56 | templates: 57 | imports: import grgsm 58 | make: grgsm.txtime_setter(${init_fn} if (${init_fn} is not None) else 0xffffffff, 59 | ${init_time_secs}, ${init_time_fracs}, ${time_hint_secs}, ${time_hint_fracs}, 60 | ${timing_advance}, ${delay_correction}) 61 | callbacks: 62 | - set_fn_time_reference(${init_fn}, ${init_time_secs}, ${init_time_fracs}) 63 | - set_time_hint(${time_hint_secs}, ${time_hint_secs}) 64 | - set_timing_advance(${timing_advance}) 65 | - set_delay_correction(${delay_correction}) 66 | 67 | file_format: 1 68 | -------------------------------------------------------------------------------- /grc/trx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | install( 21 | FILES 22 | gsm_trx_burst_if.block.yml 23 | DESTINATION share/gnuradio/grc/blocks 24 | ) 25 | -------------------------------------------------------------------------------- /grc/trx/gsm_trx_burst_if.block.yml: -------------------------------------------------------------------------------- 1 | # auto-generated by grc.converter 2 | 3 | id: gsm_trx_burst_if 4 | label: TRX Burst Interface 5 | 6 | parameters: 7 | - id: base_port 8 | label: base_port 9 | dtype: string 10 | default: '5700' 11 | - id: bind_addr 12 | label: bind_addr 13 | dtype: string 14 | default: 0.0.0.0 15 | - id: remote_addr 16 | label: remote_addr 17 | dtype: string 18 | default: 127.0.0.1 19 | 20 | inputs: 21 | - domain: message 22 | id: bursts 23 | optional: true 24 | 25 | outputs: 26 | - domain: message 27 | id: bursts 28 | optional: true 29 | 30 | templates: 31 | imports: import grgsm 32 | make: grgsm.trx_burst_if(${bind_addr}, ${remote_addr}, ${base_port}) 33 | 34 | documentation: |- 35 | OsmoTRX like UDP burst interface for external applications. 36 | 37 | There are two UDP connections, where each message carries 38 | one radio burst with header. Give a base port B (5700 by default). 39 | One connection at port P=B+100+2 is used for sending received bursts 40 | to an external application. Another one at port P=B+2 is used to 41 | obtain to be transmitted bursts. 42 | 43 | Received burst format: 44 | 1 byte timeslot index 45 | 4 bytes GSM frame number, big endian 46 | 1 byte RSSI in -dBm 47 | 2 bytes correlator timing offset in 1/256 symbol steps, 48 | 2's-comp, big endian 49 | 148 bytes soft symbol estimates, 0 -> definite "0", 50 | 255 -> definite "1" 51 | 52 | To be transmitted burst format: 53 | 1 byte timeslot index 54 | 4 bytes GSM frame number, big endian 55 | 1 byte transmit level wrt ARFCN max, -dB (attenuation) 56 | 148 bytes output symbol values, 0 & 1 57 | 58 | file_format: 1 59 | -------------------------------------------------------------------------------- /hier_blocks/compile_demappers: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #This is just helper script for manual compilation of hierarhical blocks 4 | #by gr-gsm developers 5 | #Author: Piotr Krysik 6 | 7 | cd demapping 8 | for p in *.grc 9 | do 10 | echo $p 11 | grcc $p -o `pwd` 12 | done 13 | cd .. 14 | 15 | mv ~/.grc_gnuradio/gsm_* . 16 | 17 | for file in *.py.block.yml 18 | do 19 | echo $file 20 | cat $file | sed "s/ imports: .*\(#.*\)/ imports: \\'import grgsm\\' \1/" \ 21 | | sed 's/make: "/make: "grgsm./' \ 22 | | sed "s/.*.py//" \ 23 | | sed 's/grc_source:.*hier_blocks/grc_source: gr-gsm\/hier_blocks/' \ 24 | > ${file}2 25 | 26 | 27 | mv ${file}2 $file 28 | 29 | mv "$file" "`basename $file .py.block.yml`.block.yml" 30 | done 31 | 32 | for py in *.py 33 | do 34 | cat $py |sed 's/gr.hier_block2/grgsm.hier_block/' > ${py}2 35 | mv ${py}2 $py 36 | done 37 | 38 | mv *.py ../python/demapping 39 | mv *.yml ../grc/demapping 40 | -------------------------------------------------------------------------------- /include/grgsm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | plotting.hpp 26 | api.h 27 | gsmtap.h 28 | constants.h 29 | gsm_constants.h 30 | DESTINATION include/grgsm 31 | ) 32 | 33 | add_subdirectory(decoding) 34 | add_subdirectory(decryption) 35 | add_subdirectory(demapping) 36 | add_subdirectory(receiver) 37 | add_subdirectory(misc_utils) 38 | add_subdirectory(qa_utils) 39 | add_subdirectory(flow_control) 40 | add_subdirectory(transmitter) 41 | add_subdirectory(trx) 42 | -------------------------------------------------------------------------------- /include/grgsm/api.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2014 by Piotr Krysik 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GRGSM_API_H 24 | #define INCLUDED_GRGSM_API_H 25 | 26 | #include 27 | 28 | #ifdef grgsm_EXPORTS 29 | # define GRGSM_API __GR_ATTR_EXPORT 30 | #else 31 | # define GRGSM_API __GR_ATTR_IMPORT 32 | #endif 33 | 34 | #endif /* INCLUDED_GRGSM_API_H */ 35 | -------------------------------------------------------------------------------- /include/grgsm/decoding/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | control_channels_decoder.h 26 | tch_f_decoder.h 27 | tch_h_decoder.h 28 | DESTINATION include/grgsm/decoding 29 | ) 30 | -------------------------------------------------------------------------------- /include/grgsm/decoding/tch_h_decoder.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2018 by Vasil Velichkov 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | 24 | #ifndef INCLUDED_GSM_TCH_H_DECODER_H 25 | #define INCLUDED_GSM_TCH_H_DECODER_H 26 | 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | /*! 34 | * \brief <+description of block+> 35 | * \ingroup gsm 36 | * 37 | */ 38 | class GRGSM_API tch_h_decoder : virtual public gr::block 39 | { 40 | public: 41 | typedef boost::shared_ptr sptr; 42 | 43 | /*! 44 | * \brief Return a shared_ptr to a new instance of gsm::tch_h_decoder. 45 | * 46 | * To avoid accidental use of raw pointers, gsm::tch_h_decoder's 47 | * constructor is in a private implementation 48 | * class. gsm::tch_h_decoder::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(unsigned int sub_channel, std::string multi_rate, bool boundary_check=false); 52 | 53 | }; 54 | 55 | } // namespace gsm 56 | } // namespace gr 57 | 58 | #endif /* INCLUDED_GSM_TCH_H_DECODER_H */ 59 | 60 | -------------------------------------------------------------------------------- /include/grgsm/decryption/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | decryption.h 26 | DESTINATION include/grgsm/decoding 27 | ) 28 | -------------------------------------------------------------------------------- /include/grgsm/demapping/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | universal_ctrl_chans_demapper.h 26 | tch_f_chans_demapper.h 27 | tch_h_chans_demapper.h 28 | DESTINATION include/grgsm/demapping 29 | ) 30 | -------------------------------------------------------------------------------- /include/grgsm/demapping/tch_f_chans_demapper.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2015 by Roman Khassraf 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | 24 | #ifndef INCLUDED_GSM_TCH_F_CHANS_DEMAPPER_H 25 | #define INCLUDED_GSM_TCH_F_CHANS_DEMAPPER_H 26 | 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | /*! 34 | * \brief <+description of block+> 35 | * \ingroup gsm 36 | * 37 | */ 38 | class GRGSM_API tch_f_chans_demapper : virtual public gr::block 39 | { 40 | public: 41 | typedef boost::shared_ptr sptr; 42 | 43 | /*! 44 | * \brief Return a shared_ptr to a new instance of gsm::tch_f_chans_demapper. 45 | * 46 | * To avoid accidental use of raw pointers, gsm::tch_f_chans_demapper's 47 | * constructor is in a private implementation 48 | * class. gsm::tch_f_chans_demapper::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(unsigned int timeslot_nr); 52 | }; 53 | 54 | } // namespace gsm 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_GSM_TCH_F_CHANS_DEMAPPER_H */ 58 | 59 | -------------------------------------------------------------------------------- /include/grgsm/flow_control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | common.h 26 | burst_timeslot_splitter.h 27 | burst_sdcch_subslot_splitter.h 28 | burst_timeslot_filter.h 29 | burst_sdcch_subslot_filter.h 30 | burst_fnr_filter.h 31 | burst_type_filter.h 32 | dummy_burst_filter.h 33 | uplink_downlink_splitter.h 34 | DESTINATION include/grgsm/flow_control 35 | ) 36 | -------------------------------------------------------------------------------- /include/grgsm/flow_control/burst_timeslot_splitter.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURST_TIMESLOT_SPLITTER_H 24 | #define INCLUDED_GSM_BURST_TIMESLOT_SPLITTER_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup gsm 35 | * 36 | */ 37 | class GRGSM_API burst_timeslot_splitter : virtual public gr::block 38 | { 39 | public: 40 | typedef boost::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of grgsm::burst_timeslot_splitter. 44 | * 45 | * To avoid accidental use of raw pointers, grgsm::burst_timeslot_splitter's 46 | * constructor is in a private implementation 47 | * class. grgsm::burst_timeslot_splitter::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(); 51 | }; 52 | } // namespace gsm 53 | } // namespace gr 54 | 55 | #endif /* INCLUDED_GSM_BURST_TIMESLOT_SPLITTER_H */ 56 | -------------------------------------------------------------------------------- /include/grgsm/flow_control/common.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2017 by Vadim Yanitskiy 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_FLOW_CONTROL_COMMON_H 24 | #define INCLUDED_GSM_FLOW_CONTROL_COMMON_H 25 | 26 | namespace gr { 27 | namespace gsm { 28 | 29 | enum filter_policy { 30 | FILTER_POLICY_DEFAULT, 31 | FILTER_POLICY_PASS_ALL, 32 | FILTER_POLICY_DROP_ALL, 33 | }; 34 | 35 | } /* namespace gsm */ 36 | } /* namespace gr */ 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /include/grgsm/misc_utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | bursts_printer.h 26 | burst_file_source.h 27 | burst_file_sink.h 28 | collect_system_info.h 29 | message_file_sink.h 30 | message_file_source.h 31 | extract_system_info.h 32 | extract_immediate_assignment.h 33 | extract_cmc.h 34 | extract_assignment_cmd.h 35 | controlled_rotator_cc.h 36 | message_printer.h 37 | tmsi_dumper.h 38 | msg_to_tag.h 39 | burst_to_fn_time.h 40 | controlled_fractional_resampler_cc.h 41 | time_spec.h 42 | fn_time.h 43 | DESTINATION include/grgsm/misc_utils 44 | ) 45 | -------------------------------------------------------------------------------- /include/grgsm/misc_utils/burst_file_sink.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURST_FILE_SINK_H 24 | #define INCLUDED_GSM_BURST_FILE_SINK_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup gsm 35 | * 36 | */ 37 | class GRGSM_API burst_file_sink : virtual public gr::block 38 | { 39 | public: 40 | typedef boost::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of grgsm::burst_file_sink. 44 | * 45 | * To avoid accidental use of raw pointers, grgsm::burst_file_sink's 46 | * constructor is in a private implementation 47 | * class. grgsm::burst_file_sink::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(const std::string &filename); 51 | }; 52 | } // namespace gsm 53 | } // namespace gr 54 | 55 | #endif /* INCLUDED_GSM_BURST_FILE_SINK_H */ 56 | 57 | -------------------------------------------------------------------------------- /include/grgsm/misc_utils/burst_file_source.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURST_FILE_SOURCE_H 24 | #define INCLUDED_GSM_BURST_FILE_SOURCE_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup gsm 35 | * 36 | */ 37 | class GRGSM_API burst_file_source : virtual public gr::block 38 | { 39 | public: 40 | typedef boost::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of grgsm::burst_file_source. 44 | * 45 | * To avoid accidental use of raw pointers, grgsm::burst_file_source's 46 | * constructor is in a private implementation 47 | * class. grgsm::burst_file_source::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(const std::string &filename); 51 | }; 52 | 53 | } // namespace gsm 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_GSM_BURST_FILE_SOURCE_H */ 57 | 58 | -------------------------------------------------------------------------------- /include/grgsm/misc_utils/burst_to_fn_time.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author Piotr Krysik 4 | * @author Vadim Yanitskiy 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | * 22 | */ 23 | 24 | #ifndef INCLUDED_GRGSM_BURST_TO_FN_TIME_H 25 | #define INCLUDED_GRGSM_BURST_TO_FN_TIME_H 26 | 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | /*! 34 | * \brief <+description of block+> 35 | * \ingroup gsm 36 | * 37 | */ 38 | class GRGSM_API burst_to_fn_time : virtual public gr::block 39 | { 40 | public: 41 | typedef boost::shared_ptr sptr; 42 | 43 | /*! 44 | * \brief Return a shared_ptr to a new instance of grgsm::burst_to_fn_time. 45 | * 46 | * To avoid accidental use of raw pointers, grgsm::burst_to_fn_time's 47 | * constructor is in a private implementation 48 | * class. grgsm::burst_to_fn_time::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(); 52 | }; 53 | 54 | } // namespace gsm 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_GRGSM_BURST_TO_FN_TIME_H */ 58 | -------------------------------------------------------------------------------- /include/grgsm/misc_utils/message_file_sink.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_MESSAGE_FILE_SINK_H 24 | #define INCLUDED_GSM_MESSAGE_FILE_SINK_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup gsm 35 | * 36 | */ 37 | class GRGSM_API message_file_sink : virtual public gr::block 38 | { 39 | public: 40 | typedef boost::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of grgsm::message_file_sink. 44 | * 45 | * To avoid accidental use of raw pointers, grgsm::message_file_sink's 46 | * constructor is in a private implementation 47 | * class. grgsm::message_file_sink::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(const std::string &filename); 51 | }; 52 | } // namespace gsm 53 | } // namespace gr 54 | 55 | #endif /* INCLUDED_GSM_MESSAGE_FILE_SINK_H */ 56 | 57 | -------------------------------------------------------------------------------- /include/grgsm/misc_utils/message_file_source.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_MESSAGE_FILE_SOURCE_H 24 | #define INCLUDED_GSM_MESSAGE_FILE_SOURCE_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | /*! 33 | * \brief <+description of block+> 34 | * \ingroup gsm 35 | * 36 | */ 37 | class GRGSM_API message_file_source : virtual public gr::block 38 | { 39 | public: 40 | typedef boost::shared_ptr sptr; 41 | 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of grgsm::message_file_source. 44 | * 45 | * To avoid accidental use of raw pointers, grgsm::message_file_source's 46 | * constructor is in a private implementation 47 | * class. grgsm::message_file_source::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(const std::string &filename); 51 | }; 52 | 53 | } // namespace gsm 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_GSM_MESSAGE_FILE_SOURCE_H */ 57 | 58 | -------------------------------------------------------------------------------- /include/grgsm/misc_utils/msg_to_tag.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2016 by Piotr Krysik 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | 24 | #ifndef INCLUDED_GRGSM_MSG_TO_TAG_H 25 | #define INCLUDED_GRGSM_MSG_TO_TAG_H 26 | 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | /*! 34 | * \brief <+description of block+> 35 | * \ingroup grgsm 36 | * 37 | */ 38 | class GRGSM_API msg_to_tag : virtual public gr::sync_block 39 | { 40 | public: 41 | typedef boost::shared_ptr sptr; 42 | /*! 43 | * \brief Return a shared_ptr to a new instance of grgsm::msg_to_tag. 44 | * 45 | * To avoid accidental use of raw pointers, grgsm::msg_to_tag's 46 | * constructor is in a private implementation 47 | * class. grgsm::msg_to_tag::make is the public interface for 48 | * creating new instances. 49 | */ 50 | static sptr make(); 51 | }; 52 | 53 | } // namespace gsm 54 | } // namespace gr 55 | 56 | #endif /* INCLUDED_GRGSM_MSG_TO_TAG_H */ 57 | 58 | -------------------------------------------------------------------------------- /include/grgsm/misc_utils/tmsi_dumper.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Piotr Krysik 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | 24 | #ifndef INCLUDED_GSM_TMSI_DUMPER_H 25 | #define INCLUDED_GSM_TMSI_DUMPER_H 26 | 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | /*! 34 | * \brief <+description of block+> 35 | * \ingroup gsm 36 | * 37 | */ 38 | class GRGSM_API tmsi_dumper : virtual public gr::block 39 | { 40 | public: 41 | typedef boost::shared_ptr sptr; 42 | 43 | /*! 44 | * \brief Return a shared_ptr to a new instance of gsm::tmsi_dumper. 45 | * 46 | * To avoid accidental use of raw pointers, gsm::tmsi_dumper's 47 | * constructor is in a private implementation 48 | * class. gsm::tmsi_dumper::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(); 52 | }; 53 | 54 | } // namespace gsm 55 | } // namespace gr 56 | 57 | #endif /* INCLUDED_GSM_TMSI_DUMPER_H */ 58 | 59 | -------------------------------------------------------------------------------- /include/grgsm/qa_utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | burst_sink.h 26 | burst_source.h 27 | message_source.h 28 | message_sink.h 29 | DESTINATION include/grgsm/qa_utils 30 | ) 31 | -------------------------------------------------------------------------------- /include/grgsm/qa_utils/message_sink.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | 24 | #ifndef INCLUDED_GSM_MESSAGE_SINK_H 25 | #define INCLUDED_GSM_MESSAGE_SINK_H 26 | 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | /*! 34 | * \brief <+description of block+> 35 | * \ingroup gsm 36 | * 37 | */ 38 | class GRGSM_API message_sink : virtual public gr::block 39 | { 40 | public: 41 | typedef boost::shared_ptr sptr; 42 | 43 | /*! 44 | * \brief Return a shared_ptr to a new instance of grgsm::message_sink. 45 | * 46 | * To avoid accidental use of raw pointers, grgsm::message_sink's 47 | * constructor is in a private implementation 48 | * class. grgsm::message_sink::make is the public interface for 49 | * creating new instances. 50 | */ 51 | static sptr make(); 52 | 53 | virtual std::vector get_messages() = 0; 54 | }; 55 | 56 | } // namespace gsm 57 | } // namespace gr 58 | 59 | #endif /* INCLUDED_GSM_MESSAGE_SINK_H */ 60 | 61 | -------------------------------------------------------------------------------- /include/grgsm/receiver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | clock_offset_control.h 26 | cx_channel_hopper.h 27 | receiver.h 28 | DESTINATION include/grgsm/receiver 29 | ) 30 | -------------------------------------------------------------------------------- /include/grgsm/transmitter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | txtime_setter.h 26 | preprocess_tx_burst.h 27 | gen_test_ab.h 28 | DESTINATION include/grgsm/transmitter 29 | ) 30 | -------------------------------------------------------------------------------- /include/grgsm/trx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | ######################################################################## 21 | # Install public header files 22 | ######################################################################## 23 | install( 24 | FILES 25 | trx_burst_if.h 26 | DESTINATION include/grgsm/trx 27 | ) 28 | -------------------------------------------------------------------------------- /lib/constants.cc.in: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2006,2009,2013 Free Software Foundation, Inc. 4 | * 5 | * This file is part of GNU Radio 6 | * 7 | * GNU Radio is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * GNU Radio is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with GNU Radio; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #if HAVE_CONFIG_H 24 | #include 25 | #endif 26 | 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm{ 32 | const std::string 33 | build_date() 34 | { 35 | return "@BUILD_DATE@"; 36 | } 37 | 38 | const std::string 39 | version() 40 | { 41 | return "@VERSION@"; 42 | } 43 | 44 | // Return individual parts of the version 45 | const std::string 46 | major_version() 47 | { 48 | return "@MAJOR_VERSION@"; 49 | } 50 | 51 | const std::string 52 | api_version() 53 | { 54 | return "@API_COMPAT@"; 55 | } 56 | 57 | const std::string 58 | minor_version() 59 | { 60 | return "@MINOR_VERSION@"; 61 | } 62 | 63 | const std::string 64 | maint_version() 65 | { 66 | return "@MAINT_VERSION@"; 67 | } 68 | } /* namespace gsm */ 69 | } /* namespace gr */ 70 | -------------------------------------------------------------------------------- /lib/decoding/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_subdirectory(openbts) 21 | 22 | add_sources( 23 | control_channels_decoder_impl.cc 24 | tch_f_decoder_impl.cc 25 | tch_h_decoder_impl.cc 26 | sch.c 27 | ) 28 | -------------------------------------------------------------------------------- /lib/decoding/control_channels_decoder_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2014 by Piotr Krysik 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_CONTROL_CHANNELS_DECODER_IMPL_H 24 | #define INCLUDED_GSM_CONTROL_CHANNELS_DECODER_IMPL_H 25 | 26 | #include 27 | extern "C" { 28 | #include "osmocom/coding/gsm0503_coding.h" 29 | } 30 | 31 | namespace gr { 32 | namespace gsm { 33 | 34 | class control_channels_decoder_impl : public control_channels_decoder 35 | { 36 | private: 37 | unsigned int d_collected_bursts_num; 38 | pmt::pmt_t d_bursts[4]; 39 | 40 | void decode(pmt::pmt_t msg); 41 | public: 42 | control_channels_decoder_impl(); 43 | ~control_channels_decoder_impl(); 44 | }; 45 | 46 | } // namespace gsm 47 | } // namespace gr 48 | 49 | #endif /* INCLUDED_GSM_CONTROL_CHANNELS_DECODER_IMPL_H */ 50 | 51 | -------------------------------------------------------------------------------- /lib/decoding/openbts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_sources( 21 | AmrCoder.cpp 22 | BitVector.cpp 23 | GSM610Tables.cpp 24 | GSM660Tables.cpp 25 | GSM503Tables.cpp 26 | ViterbiR204.cpp 27 | ) 28 | -------------------------------------------------------------------------------- /lib/decoding/openbts/GSM610Tables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Free Software Foundation, Inc. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Affero General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Affero General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Affero General Public License 15 | * along with this program. If not, see . 16 | * 17 | * This use of this software may be subject to additional restrictions. 18 | * See the LEGAL file in the main directory for details. 19 | */ 20 | 21 | #ifndef GSM610TABLES_H 22 | #define GSM610TABLES_H 23 | 24 | 25 | 26 | namespace GSM { 27 | 28 | /** Table #2 from GSM 05.03 */ 29 | extern unsigned int g610BitOrder[260]; 30 | 31 | } 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /lib/decoding/openbts/GSM660Tables.h: -------------------------------------------------------------------------------- 1 | /* EFR (GSM 06.60) importance bit ordering */ 2 | 3 | /* 4 | * Copyright 2010 Sylvain Munaut 5 | * All Rights Reserved 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * 20 | * This use of this software may be subject to additional restrictions. 21 | * See the LEGAL file in the main directory for details. 22 | */ 23 | 24 | #ifndef GSM660TABLES_H 25 | #define GSM660TABLES_H 26 | 27 | namespace GSM { 28 | 29 | /** Table #6 from GSM 05.03 */ 30 | extern unsigned int g660BitOrder[260]; 31 | 32 | } 33 | 34 | #endif /* GSM660TABLES_H */ 35 | -------------------------------------------------------------------------------- /lib/decoding/openbts/Viterbi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 2014 Range Networks, Inc. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Affero General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Affero General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Affero General Public License 15 | * along with this program. If not, see . 16 | * 17 | * This use of this software may be subject to additional restrictions. 18 | * See the LEGAL file in the main directory for details. 19 | */ 20 | 21 | 22 | #ifndef _VITERBI_H_ 23 | #define _VITERBI_H_ 1 24 | 25 | // (pat) Virtual base class for Viterbi and Turbo coder/decoders. 26 | class ViterbiBase { 27 | public: 28 | virtual void encode(const BitVector &in, BitVector& target) const = 0; 29 | virtual void decode(const SoftVector &in, BitVector& target) = 0; 30 | // (pat) Return error count from most recent decoder run. 31 | // If you get -1 from this, the method is not defined in the Viterbi class. 32 | virtual int getBEC() { return -1; } 33 | //virtual ~ViterbiBase(); Currently None of these have destructors. 34 | 35 | // These functions are logically part of the Viterbi functionality, even though they do not use any class variables. 36 | unsigned applyPoly(uint64_t val, uint64_t poly); 37 | unsigned applyPoly(uint64_t val, uint64_t poly, unsigned order); 38 | }; 39 | #endif 40 | -------------------------------------------------------------------------------- /lib/decryption/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_sources( 21 | decryption_impl.cc 22 | ) 23 | -------------------------------------------------------------------------------- /lib/decryption/decryption_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2014 by Piotr Krysik 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_DECRYPTION_IMPL_H 24 | #define INCLUDED_GSM_DECRYPTION_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | class decryption_impl : public decryption 33 | { 34 | private: 35 | std::vector d_k_c; 36 | bool d_k_c_valid; 37 | uint8_t d_a5_version; 38 | void decrypt(pmt::pmt_t msg); 39 | void validate_k_c(); 40 | public: 41 | decryption_impl(const std::vector & k_c, unsigned int a5_version); 42 | ~decryption_impl(); 43 | virtual void set_k_c(const std::vector & k_c); 44 | virtual void set_a5_version(unsigned int a5_version); 45 | }; 46 | } // namespace gsm 47 | } // namespace gr 48 | 49 | #endif /* INCLUDED_GSM_DECRYPTION_IMPL_H */ 50 | 51 | -------------------------------------------------------------------------------- /lib/demapping/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_sources( 21 | tch_f_chans_demapper_impl.cc 22 | tch_h_chans_demapper_impl.cc 23 | universal_ctrl_chans_demapper_impl.cc 24 | ) 25 | 26 | -------------------------------------------------------------------------------- /lib/flow_control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_sources( 21 | burst_fnr_filter_impl.cc 22 | burst_sdcch_subslot_filter_impl.cc 23 | burst_sdcch_subslot_splitter_impl.cc 24 | burst_timeslot_filter_impl.cc 25 | burst_timeslot_splitter_impl.cc 26 | burst_type_filter_impl.cc 27 | dummy_burst_filter_impl.cc 28 | uplink_downlink_splitter_impl.cc 29 | ) 30 | 31 | -------------------------------------------------------------------------------- /lib/flow_control/burst_sdcch_subslot_splitter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURST_SDCCH_SUBSLOT_SPLITTER_IMPL_H 24 | #define INCLUDED_GSM_BURST_SDCCH_SUBSLOT_SPLITTER_IMPL_H 25 | 26 | #include 27 | 28 | namespace gr { 29 | namespace gsm { 30 | 31 | class burst_sdcch_subslot_splitter_impl : public burst_sdcch_subslot_splitter 32 | { 33 | private: 34 | splitter_mode d_mode; 35 | public: 36 | burst_sdcch_subslot_splitter_impl(splitter_mode mode); 37 | ~burst_sdcch_subslot_splitter_impl(); 38 | void process_burst(pmt::pmt_t msg); 39 | 40 | /* External API */ 41 | splitter_mode get_mode(void); 42 | splitter_mode set_mode(splitter_mode mode); 43 | }; 44 | 45 | } // namespace gsm 46 | } // namespace gr 47 | 48 | #endif /* INCLUDED_GSM_BURST_SDCCH_SUBSLOT_SPLITTER_IMPL_H */ 49 | -------------------------------------------------------------------------------- /lib/flow_control/burst_timeslot_filter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURST_TIMESLOT_FILTER_IMPL_H 24 | #define INCLUDED_GSM_BURST_TIMESLOT_FILTER_IMPL_H 25 | 26 | #include 27 | 28 | namespace gr { 29 | namespace gsm { 30 | 31 | class burst_timeslot_filter_impl : public burst_timeslot_filter 32 | { 33 | private: 34 | filter_policy d_filter_policy; 35 | unsigned int d_timeslot; 36 | public: 37 | burst_timeslot_filter_impl(unsigned int timeslot); 38 | ~burst_timeslot_filter_impl(); 39 | void process_burst(pmt::pmt_t msg); 40 | 41 | /* External API */ 42 | unsigned int get_tn(void); 43 | unsigned int set_tn(unsigned int tn); 44 | 45 | /* Filtering policy */ 46 | filter_policy get_policy(void); 47 | filter_policy set_policy(filter_policy policy); 48 | }; 49 | 50 | } // namespace gsm 51 | } // namespace gr 52 | 53 | #endif /* INCLUDED_GSM_BURST_TIMESLOT_FILTER_IMPL_H */ 54 | 55 | -------------------------------------------------------------------------------- /lib/flow_control/burst_timeslot_splitter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURST_TIMESLOT_SPLITTER_IMPL_H 24 | #define INCLUDED_GSM_BURST_TIMESLOT_SPLITTER_IMPL_H 25 | 26 | #include 27 | 28 | namespace gr { 29 | namespace gsm { 30 | 31 | class burst_timeslot_splitter_impl : public burst_timeslot_splitter 32 | { 33 | public: 34 | burst_timeslot_splitter_impl(); 35 | ~burst_timeslot_splitter_impl(); 36 | void process_burst(pmt::pmt_t msg); 37 | }; 38 | 39 | } // namespace gsm 40 | } // namespace gr 41 | 42 | #endif /* INCLUDED_GSM_BURST_TIMESLOT_SPLITTER_IMPL_H */ 43 | 44 | -------------------------------------------------------------------------------- /lib/flow_control/burst_type_filter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2017 by Piotr Krysik 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURST_TYPE_FILTER_IMPL_H 24 | #define INCLUDED_GSM_BURST_TYPE_FILTER_IMPL_H 25 | 26 | #define BURST_TYPE_LEN 148 27 | 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | class burst_type_filter_impl : public burst_type_filter 34 | { 35 | private: 36 | filter_policy d_filter_policy; 37 | std::vector d_selected_burst_types; 38 | public: 39 | burst_type_filter_impl(const std::vector & selected_burst_types); 40 | ~burst_type_filter_impl(); 41 | void process_burst(pmt::pmt_t msg); 42 | 43 | /* External API */ 44 | /* Filtering policy */ 45 | filter_policy get_policy(void); 46 | filter_policy set_policy(filter_policy policy); 47 | 48 | void set_selected_burst_types(const std::vector & selected_burst_types); 49 | }; 50 | 51 | } // namespace gsm 52 | } // namespace gr 53 | 54 | #endif /* INCLUDED_GSM_BURST_TYPE_FILTER_IMPL_H */ 55 | 56 | -------------------------------------------------------------------------------- /lib/flow_control/dummy_burst_filter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_DUMMY_BURST_FILTER_IMPL_H 24 | #define INCLUDED_GSM_DUMMY_BURST_FILTER_IMPL_H 25 | 26 | #define DUMMY_BURST_LEN 148 27 | 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | class dummy_burst_filter_impl : public dummy_burst_filter 34 | { 35 | private: 36 | bool is_dummy_burst(int8_t *burst, size_t burst_len); 37 | static const int8_t d_dummy_burst[]; 38 | filter_policy d_filter_policy; 39 | public: 40 | dummy_burst_filter_impl(); 41 | ~dummy_burst_filter_impl(); 42 | void process_burst(pmt::pmt_t msg); 43 | 44 | /* External API */ 45 | /* Filtering policy */ 46 | filter_policy get_policy(void); 47 | filter_policy set_policy(filter_policy policy); 48 | }; 49 | 50 | } // namespace gsm 51 | } // namespace gr 52 | 53 | #endif /* INCLUDED_GSM_DUMMY_BURST_FILTER_IMPL_H */ 54 | 55 | -------------------------------------------------------------------------------- /lib/flow_control/uplink_downlink_splitter_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2016 by Piotr Krysik 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GRGSM_UPLINK_DOWNLINK_SPLITTER_IMPL_H 24 | #define INCLUDED_GRGSM_UPLINK_DOWNLINK_SPLITTER_IMPL_H 25 | 26 | #include 27 | 28 | namespace gr { 29 | namespace gsm { 30 | 31 | class uplink_downlink_splitter_impl : public uplink_downlink_splitter 32 | { 33 | public: 34 | uplink_downlink_splitter_impl(); 35 | ~uplink_downlink_splitter_impl(); 36 | 37 | void process_msg(pmt::pmt_t msg); 38 | }; 39 | } // namespace gsm 40 | } // namespace gr 41 | 42 | #endif /* INCLUDED_GRGSM_UPLINK_DOWNLINK_SPLITTER_IMPL_H */ 43 | 44 | -------------------------------------------------------------------------------- /lib/misc_utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_sources( 21 | burst_file_sink_impl.cc 22 | burst_file_source_impl.cc 23 | bursts_printer_impl.cc 24 | collect_system_info_impl.cc 25 | controlled_fractional_resampler_cc_impl.cc 26 | controlled_rotator_cc_impl.cc 27 | extract_cmc_impl.cc 28 | extract_assignment_cmd_impl.cc 29 | extract_immediate_assignment_impl.cc 30 | extract_system_info_impl.cc 31 | message_file_sink_impl.cc 32 | message_file_source_impl.cc 33 | message_printer_impl.cc 34 | msg_to_tag_impl.cc 35 | tmsi_dumper_impl.cc 36 | time_spec.cc 37 | fn_time.cc 38 | udp_socket.cc 39 | burst_to_fn_time_impl.cc 40 | ) 41 | 42 | -------------------------------------------------------------------------------- /lib/misc_utils/burst_file_sink_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURST_FILE_SINK_IMPL_H 24 | #define INCLUDED_GSM_BURST_FILE_SINK_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | class burst_file_sink_impl : public burst_file_sink 33 | { 34 | private: 35 | std::ofstream d_output_file; 36 | public: 37 | burst_file_sink_impl(const std::string &filename); 38 | ~burst_file_sink_impl(); 39 | void process_burst(pmt::pmt_t msg); 40 | }; 41 | 42 | } // namespace gsm 43 | } // namespace gr 44 | 45 | #endif /* INCLUDED_GSM_BURST_FILE_SINK_IMPL_H */ 46 | 47 | -------------------------------------------------------------------------------- /lib/misc_utils/burst_file_source_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURST_FILE_SOURCE_IMPL_H 24 | #define INCLUDED_GSM_BURST_FILE_SOURCE_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | class burst_file_source_impl : public burst_file_source 33 | { 34 | private: 35 | boost::shared_ptr d_thread; 36 | std::ifstream d_input_file; 37 | bool d_finished; 38 | void run(); 39 | public: 40 | burst_file_source_impl(const std::string &filename); 41 | ~burst_file_source_impl(); 42 | bool start(); 43 | bool stop(); 44 | bool finished(); 45 | }; 46 | } // namespace gsm 47 | } // namespace gr 48 | 49 | #endif /* INCLUDED_GSM_BURST_FILE_SOURCE_IMPL_H */ 50 | 51 | -------------------------------------------------------------------------------- /lib/misc_utils/burst_to_fn_time_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author Piotr Krysik 4 | * @author Vadim Yanitskiy 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | * 22 | */ 23 | 24 | #ifndef INCLUDED_GRGSM_BURST_TO_FN_TIME_IMPL_H 25 | #define INCLUDED_GRGSM_BURST_TO_FN_TIME_IMPL_H 26 | 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | class burst_to_fn_time_impl : public burst_to_fn_time 33 | { 34 | private: 35 | void handle_burst(pmt::pmt_t msg_in); 36 | 37 | public: 38 | burst_to_fn_time_impl(void); 39 | ~burst_to_fn_time_impl(void); 40 | }; 41 | 42 | } // namespace gsm 43 | } // namespace gr 44 | 45 | #endif /* INCLUDED_GRGSM_BURST_TO_FN_TIME_IMPL_H */ 46 | -------------------------------------------------------------------------------- /lib/misc_utils/bursts_printer_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2014 by Piotr Krysik 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_BURSTS_PRINTER_IMPL_H 24 | #define INCLUDED_GSM_BURSTS_PRINTER_IMPL_H 25 | 26 | #define DUMMY_BURST_LEN 148 27 | 28 | #include 29 | #include 30 | 31 | namespace gr { 32 | namespace gsm { 33 | 34 | class bursts_printer_impl : public bursts_printer 35 | { 36 | private: 37 | void bursts_print(pmt::pmt_t burst); 38 | pmt::pmt_t d_prepend_string; 39 | bool d_prepend_fnr; 40 | bool d_prepend_frame_count; 41 | bool d_print_payload_only; 42 | bool d_ignore_dummy_bursts; 43 | bool is_dummy_burst(int8_t *burst, size_t burst_len); 44 | static const int8_t d_dummy_burst[]; 45 | public: 46 | bursts_printer_impl(pmt::pmt_t prepend_string, bool prepend_fnr=false, 47 | bool prepend_frame_count=false, bool print_payload_only=false, 48 | bool ignore_dummy_bursts=false); 49 | ~bursts_printer_impl(); 50 | }; 51 | 52 | } // namespace gsm 53 | } // namespace gr 54 | 55 | #endif /* INCLUDED_GSM_BURSTS_PRINTER_IMPL_H */ 56 | 57 | -------------------------------------------------------------------------------- /lib/misc_utils/collect_system_info_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2017 by Roman Khassraf 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_COLLECT_SYSTEM_INFO_IMPL_H 24 | #define INCLUDED_GSM_COLLECT_SYSTEM_INFO_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | class collect_system_info_impl : public collect_system_info 32 | { 33 | private: 34 | void process_messages(pmt::pmt_t msg); 35 | std::vector d_framenumbers; 36 | std::vector d_sit_types; 37 | std::vector d_sit_data; 38 | std::string get_hex_string(uint8_t * msg_elements); 39 | public: 40 | virtual std::vector get_framenumbers(); 41 | virtual std::vector get_system_information_type(); 42 | virtual std::vector get_data(); 43 | collect_system_info_impl(); 44 | ~collect_system_info_impl(); 45 | }; 46 | } // namespace gsm 47 | } // namespace gr 48 | 49 | #endif /* INCLUDED_GSM_COLLECT_SYSTEM_INFO_IMPL_H */ 50 | -------------------------------------------------------------------------------- /lib/misc_utils/controlled_rotator_cc_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2014 by Piotr Krysik 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_CONTROLLED_ROTATOR_CC_IMPL_H 24 | #define INCLUDED_GSM_CONTROLLED_ROTATOR_CC_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | class controlled_rotator_cc_impl : public controlled_rotator_cc 33 | { 34 | private: 35 | gr_complex d_phase_inc; 36 | // double d_samp_rate; 37 | blocks::rotator d_r; 38 | 39 | public: 40 | controlled_rotator_cc_impl(double phase_inc); 41 | ~controlled_rotator_cc_impl(); 42 | 43 | virtual void set_phase_inc(double phase_inc); 44 | // virtual void set_samp_rate(double samp_rate); 45 | 46 | // Where all the action really happens 47 | int work(int noutput_items, 48 | gr_vector_const_void_star &input_items, 49 | gr_vector_void_star &output_items); 50 | }; 51 | 52 | } // namespace gsm 53 | } // namespace gr 54 | 55 | #endif /* INCLUDED_GSM_CONTROLLED_ROTATOR_CC_IMPL_H */ 56 | 57 | -------------------------------------------------------------------------------- /lib/misc_utils/extract_assignment_cmd_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2018 by Piotr Krysik 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_EXTRACT_ASSIGNMENT_CMD_IMPL_H 24 | #define INCLUDED_GSM_EXTRACT_ASSIGNMENT_CMD_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | class extract_assignment_cmd_impl : public extract_assignment_cmd 32 | { 33 | private: 34 | void process_messages(pmt::pmt_t msg); 35 | std::vector d_assignment_commands; 36 | public: 37 | virtual std::vector get_assignment_commands(); 38 | extract_assignment_cmd_impl(); 39 | ~extract_assignment_cmd_impl(); 40 | }; 41 | } // namespace gsm 42 | } // namespace gr 43 | #endif /* INCLUDED_GSM_EXTRACT_ASSIGNMENT_CMD_IMPL_H */ 44 | -------------------------------------------------------------------------------- /lib/misc_utils/extract_cmc_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2016 by Roman Khassraf 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_EXTRACT_CMC_IMPL_H 24 | #define INCLUDED_GSM_EXTRACT_CMC_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | class extract_cmc_impl : public extract_cmc 32 | { 33 | private: 34 | void process_messages(pmt::pmt_t msg); 35 | std::vector d_framenumbers; 36 | std::vector d_a5_versions; 37 | std::vector d_start_ciphering; 38 | public: 39 | virtual std::vector get_framenumbers(); 40 | virtual std::vector get_a5_versions(); 41 | virtual std::vector get_start_ciphering(); 42 | extract_cmc_impl(); 43 | ~extract_cmc_impl(); 44 | }; 45 | } // namespace gsm 46 | } // namespace gr 47 | #endif /* INCLUDED_GSM_EXTRACT_CMC_IMPL_H */ 48 | -------------------------------------------------------------------------------- /lib/misc_utils/message_file_sink_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_MESSAGE_FILE_SINK_IMPL_H 24 | #define INCLUDED_GSM_MESSAGE_FILE_SINK_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | class message_file_sink_impl : public message_file_sink 33 | { 34 | private: 35 | std::ofstream d_output_file; 36 | public: 37 | message_file_sink_impl(const std::string &filename); 38 | ~message_file_sink_impl(); 39 | void process_message(pmt::pmt_t msg); 40 | }; 41 | 42 | } // namespace gsm 43 | } // namespace gr 44 | 45 | #endif /* INCLUDED_GSM_MESSAGE_FILE_SINK_IMPL_H */ 46 | 47 | -------------------------------------------------------------------------------- /lib/misc_utils/message_file_source_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_MESSAGE_FILE_SOURCE_IMPL_H 24 | #define INCLUDED_GSM_MESSAGE_FILE_SOURCE_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | class message_file_source_impl : public message_file_source 33 | { 34 | private: 35 | boost::shared_ptr d_thread; 36 | std::ifstream d_input_file; 37 | bool d_finished; 38 | void run(); 39 | public: 40 | message_file_source_impl(const std::string &filename); 41 | ~message_file_source_impl(); 42 | bool start(); 43 | bool stop(); 44 | bool finished(); 45 | }; 46 | } // namespace gsm 47 | } // namespace gr 48 | 49 | #endif /* INCLUDED_GSM_MESSAGE_FILE_SOURCE_IMPL_H */ 50 | 51 | -------------------------------------------------------------------------------- /lib/misc_utils/message_printer_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2014 by Piotr Krysik 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_MESSAGE_PRINTER_IMPL_H 24 | #define INCLUDED_GSM_MESSAGE_PRINTER_IMPL_H 25 | 26 | #include 27 | 28 | namespace gr { 29 | namespace gsm { 30 | 31 | class message_printer_impl : public message_printer 32 | { 33 | private: 34 | void message_print(pmt::pmt_t msg); 35 | pmt::pmt_t d_prepend_string; 36 | bool d_prepend_fnr; 37 | bool d_prepend_frame_count; 38 | bool d_print_gsmtap_header; 39 | public: 40 | message_printer_impl(pmt::pmt_t prepend_string, bool prepend_fnr=false, 41 | bool prepend_frame_count=false, bool print_gsmtap_header=false); 42 | ~message_printer_impl(); 43 | }; 44 | 45 | } // namespace gsm 46 | } // namespace gr 47 | 48 | #endif /* INCLUDED_GSM_MESSAGE_PRINTER_IMPL_H */ 49 | 50 | -------------------------------------------------------------------------------- /lib/misc_utils/msg_to_tag_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2016 by Piotr Krysik 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GRGSM_MSG_TO_TAG_IMPL_H 24 | #define INCLUDED_GRGSM_MSG_TO_TAG_IMPL_H 25 | 26 | #include 27 | 28 | namespace gr { 29 | namespace gsm { 30 | 31 | class msg_to_tag_impl : public msg_to_tag 32 | { 33 | private: 34 | std::deque d_msg_queue; 35 | 36 | public: 37 | msg_to_tag_impl(); 38 | ~msg_to_tag_impl(); 39 | void queue_msg(pmt::pmt_t msg); 40 | 41 | // Where all the action really happens 42 | int work(int noutput_items, 43 | gr_vector_const_void_star &input_items, 44 | gr_vector_void_star &output_items); 45 | }; 46 | 47 | } // namespace gsm 48 | } // namespace gr 49 | 50 | #endif /* INCLUDED_GRGSM_MSG_TO_TAG_IMPL_H */ 51 | 52 | -------------------------------------------------------------------------------- /lib/misc_utils/tmsi_dumper_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Piotr Krysik 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_TMSI_DUMPER_IMPL_H 24 | #define INCLUDED_GSM_TMSI_DUMPER_IMPL_H 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | class tmsi_dumper_impl : public tmsi_dumper 34 | { 35 | private: 36 | std::ofstream dump_file; 37 | void dump_tmsi(pmt::pmt_t msg); 38 | void write_timestamp(tm * now); 39 | void write_imsi(uint8_t * imsi); 40 | void write_tmsi(uint8_t * tmsi); 41 | public: 42 | tmsi_dumper_impl(); 43 | ~tmsi_dumper_impl(); 44 | }; 45 | } // namespace gsm 46 | } // namespace gr 47 | 48 | #endif /* INCLUDED_GSM_TMSI_DUMPER_IMPL_H */ 49 | 50 | -------------------------------------------------------------------------------- /lib/qa_utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_sources( 21 | burst_sink_impl.cc 22 | burst_source_impl.cc 23 | message_sink_impl.cc 24 | message_source_impl.cc 25 | ) 26 | -------------------------------------------------------------------------------- /lib/qa_utils/message_sink_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_MESSAGE_SINK_IMPL_H 24 | #define INCLUDED_GSM_MESSAGE_SINK_IMPL_H 25 | 26 | #include 27 | 28 | namespace gr { 29 | namespace gsm { 30 | 31 | class message_sink_impl : public message_sink 32 | { 33 | private: 34 | std::vector d_messages; 35 | 36 | public: 37 | message_sink_impl(); 38 | ~message_sink_impl(); 39 | void process_message(pmt::pmt_t msg); 40 | virtual std::vector get_messages(); 41 | }; 42 | 43 | } // namespace gsm 44 | } // namespace gr 45 | 46 | #endif /* INCLUDED_GSM_MESSAGE_SINK_IMPL_H */ 47 | 48 | -------------------------------------------------------------------------------- /lib/qa_utils/message_source_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Roman Khassraf 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_MESSAGE_SOURCE_IMPL_H 24 | #define INCLUDED_GSM_MESSAGE_SOURCE_IMPL_H 25 | 26 | #include 27 | 28 | namespace gr { 29 | namespace gsm { 30 | 31 | class message_source_impl : public message_source 32 | { 33 | private: 34 | boost::shared_ptr d_thread; 35 | std::vector > d_msgs; 36 | bool d_finished; 37 | void run(); 38 | public: 39 | message_source_impl(const std::vector &msg_data); 40 | ~message_source_impl(); 41 | virtual void set_msg_data(const std::vector &msg_data); 42 | bool start(); 43 | bool stop(); 44 | bool finished(); 45 | }; 46 | 47 | } // namespace grgsm 48 | } // namespace gr 49 | 50 | #endif /* INCLUDED_GSM_MESSAGE_SOURCE_IMPL_H */ 51 | 52 | -------------------------------------------------------------------------------- /lib/receiver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_sources( 21 | clock_offset_control_impl.cc 22 | cx_channel_hopper_impl.cc 23 | receiver_config.cc 24 | receiver_impl.cc 25 | viterbi_detector.cc 26 | time_sample_ref.cc 27 | ) 28 | -------------------------------------------------------------------------------- /lib/receiver/cx_channel_hopper_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author (C) 2015 by Pieter Robyns 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_CX_CHANNEL_HOPPER_IMPL_H 24 | #define INCLUDED_GSM_CX_CHANNEL_HOPPER_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | 32 | class cx_channel_hopper_impl : public cx_channel_hopper 33 | { 34 | private: 35 | std::vector d_ma; // Mobile Allocation list. Contains all channels that are used while channel hopping 36 | int d_maio; // Mobile Allocation Index Offset 37 | int d_hsn; // Hopping Sequence Number 38 | int d_narfcn; // Length of d_ma 39 | 40 | int calculate_ma_sfh(int maio, int hsn, int n, int fn); 41 | void assemble_bursts(pmt::pmt_t msg); 42 | 43 | public: 44 | cx_channel_hopper_impl(const std::vector &ma, int maio, int hsn); 45 | ~cx_channel_hopper_impl(); 46 | }; 47 | 48 | } // namespace gsm 49 | } // namespace gr 50 | 51 | #endif /* INCLUDED_GSM_CX_CHANNEL_HOPPER_IMPL_H */ 52 | 53 | -------------------------------------------------------------------------------- /lib/receiver/sch.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2014 by Piotr Krysik 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef __SCH_H__ 24 | #define __SCH_H__ 1 25 | 26 | #include 27 | 28 | #ifdef __cplusplus 29 | extern "C" 30 | { 31 | #endif 32 | 33 | GRGSM_API int decode_sch(const unsigned char *buf, int * t1_o, int * t2_o, int * t3_o, int * ncc, int * bcc); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /lib/receiver/time_sample_ref.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * @file 4 | * @author (C) 2017 by Piotr Krysik 5 | * @section LICENSE 6 | * 7 | * Gr-gsm is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * Gr-gsm is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with gr-gsm; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef INCLUDED_TIME_SAMPLE_REF_IMPL_H 24 | #define INCLUDED_TIME_SAMPLE_REF_IMPL_H 25 | 26 | #include 27 | #include 28 | 29 | namespace gr { 30 | namespace gsm { 31 | /* 32 | Class for storing time reference and for conversions time<->sample number 33 | */ 34 | class time_sample_ref 35 | { 36 | private: 37 | double d_samp_rate; 38 | time_spec_t d_last_rx_time; 39 | uint64_t d_current_start_offset; 40 | public: 41 | time_sample_ref(double samp_rate); 42 | ~time_sample_ref(); 43 | void update(time_spec_t last_rx_time, uint64_t current_start_offset); 44 | time_spec_t offset_to_time(uint64_t offset); 45 | uint64_t time_to_offset(time_spec_t time); 46 | }; 47 | } // namespace gsm 48 | } // namespace gr 49 | #endif// INCLUDED_TIME_SAMPLE_REF_IMPL_H 50 | -------------------------------------------------------------------------------- /lib/transmitter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_sources( 21 | txtime_setter_impl.cc 22 | preprocess_tx_burst_impl.cc 23 | gen_test_ab_impl 24 | ) 25 | -------------------------------------------------------------------------------- /lib/transmitter/gen_test_ab_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author Piotr Krysik 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_GEN_TEST_AB_IMPL_H 24 | #define INCLUDED_GSM_GEN_TEST_AB_IMPL_H 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | class gen_test_ab_impl : public gen_test_ab 34 | { 35 | private: 36 | void generate_ab(pmt::pmt_t burst); 37 | 38 | public: 39 | gen_test_ab_impl(); 40 | ~gen_test_ab_impl(); 41 | }; 42 | 43 | } // namespace gsm 44 | } // namespace gr 45 | 46 | #endif /* INCLUDED_GSM_GEN_TEST_AB_IMPL_H */ 47 | 48 | -------------------------------------------------------------------------------- /lib/transmitter/preprocess_tx_burst_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author Piotr Krysik 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GSM_PREPROCESS_TX_BURST_IMPL_H 24 | #define INCLUDED_GSM_PREPROCESS_TX_BURST_IMPL_H 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | namespace gr { 31 | namespace gsm { 32 | 33 | class preprocess_tx_burst_impl : public preprocess_tx_burst 34 | { 35 | private: 36 | void process_burst(pmt::pmt_t burst); 37 | 38 | public: 39 | preprocess_tx_burst_impl(); 40 | ~preprocess_tx_burst_impl(); 41 | }; 42 | 43 | } // namespace gsm 44 | } // namespace gr 45 | 46 | #endif /* INCLUDED_GSM_PREPROCESS_TX_BURST_IMPL_H */ 47 | 48 | -------------------------------------------------------------------------------- /lib/trx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | add_sources( 21 | trx_burst_if_impl.cc 22 | ) 23 | 24 | -------------------------------------------------------------------------------- /lib/trx/trx_burst_if_impl.h: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* @file 3 | * @author Vadim Yanitskiy 4 | * @section LICENSE 5 | * 6 | * Gr-gsm is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * Gr-gsm is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with gr-gsm; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef INCLUDED_GRGSM_TRX_BURST_IF_IMPL_H 24 | #define INCLUDED_GRGSM_TRX_BURST_IF_IMPL_H 25 | 26 | #include 27 | 28 | #include 29 | #include 30 | 31 | namespace gr { 32 | namespace gsm { 33 | 34 | class trx_burst_if_impl : public trx_burst_if 35 | { 36 | private: 37 | udp_socket *d_data_sock; 38 | 39 | bool detect_rach(uint8_t *burst); 40 | void burst_pack(pmt::pmt_t msg, uint8_t *buf); 41 | 42 | public: 43 | trx_burst_if_impl(const std::string &bind_addr, 44 | const std::string &remote_addr, int base_port); 45 | ~trx_burst_if_impl(); 46 | 47 | void handle_dl_burst(pmt::pmt_t msg); 48 | void handle_ul_burst(uint8_t *payload, size_t len); 49 | }; 50 | 51 | } // namespace gsm 52 | } // namespace gr 53 | 54 | #endif /* INCLUDED_GRGSM_TRX_BURST_IF_IMPL_H */ 55 | 56 | -------------------------------------------------------------------------------- /python/demapping/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | GR_PYTHON_INSTALL( 21 | FILES 22 | gsm_bcch_ccch_demapper.py 23 | gsm_bcch_ccch_sdcch4_demapper.py 24 | gsm_sdcch8_demapper.py 25 | DESTINATION ${GR_PYTHON_DIR}/grgsm 26 | ) 27 | -------------------------------------------------------------------------------- /python/grgsm: -------------------------------------------------------------------------------- 1 | . -------------------------------------------------------------------------------- /python/misc_utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | GR_PYTHON_INSTALL( 21 | FILES 22 | arfcn.py 23 | clock_offset_corrector_tagged.py 24 | fn_time.py 25 | device.py 26 | DESTINATION ${GR_PYTHON_DIR}/grgsm 27 | ) 28 | -------------------------------------------------------------------------------- /python/qa_controlled_fractional_resampler_cc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # @file 4 | # @author (C) 2016 by Piotr Krysik 5 | # @section LICENSE 6 | # 7 | # Gr-gsm is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 3, or (at your option) 10 | # any later version. 11 | # 12 | # Gr-gsm is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with gr-gsm; see the file COPYING. If not, write to 19 | # the Free Software Foundation, Inc., 51 Franklin Street, 20 | # Boston, MA 02110-1301, USA. 21 | # 22 | # 23 | 24 | from gnuradio import gr, gr_unittest 25 | from gnuradio import blocks 26 | import grgsm_swig as grgsm 27 | 28 | class qa_controlled_fractional_resampler_cc (gr_unittest.TestCase): 29 | 30 | def setUp (self): 31 | self.tb = gr.top_block () 32 | 33 | def tearDown (self): 34 | self.tb = None 35 | 36 | def test_001_t (self): 37 | # set up fg 38 | self.tb.run () 39 | # check data 40 | 41 | 42 | if __name__ == '__main__': 43 | gr_unittest.run(qa_controlled_fractional_resampler_cc) 44 | -------------------------------------------------------------------------------- /python/qa_gsm_demapper_data.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # @file 4 | # @author (C) 2019 by Vasil Velichkov 5 | # @section LICENSE 6 | # 7 | # Gr-gsm is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 3, or (at your option) 10 | # any later version. 11 | # 12 | # Gr-gsm is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with gr-gsm; see the file COPYING. If not, write to 19 | # the Free Software Foundation, Inc., 51 Franklin Street, 20 | # Boston, MA 02110-1301, USA. 21 | # 22 | # 23 | 24 | bursts = [format((2**(i+1))-1, '0<148b') for i in range(0,108)] 25 | frames = range(0, 108) 26 | timeslots = [0] * len(frames) 27 | -------------------------------------------------------------------------------- /python/qa_msg_to_tag.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # @file 4 | # @author (C) 2016 by Piotr Krysik 5 | # @section LICENSE 6 | # 7 | # Gr-gsm is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 3, or (at your option) 10 | # any later version. 11 | # 12 | # Gr-gsm is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with gr-gsm; see the file COPYING. If not, write to 19 | # the Free Software Foundation, Inc., 51 Franklin Street, 20 | # Boston, MA 02110-1301, USA. 21 | # 22 | # 23 | 24 | from gnuradio import gr, gr_unittest 25 | from gnuradio import blocks 26 | import grgsm_swig as grgsm 27 | 28 | class qa_msg_to_tag (gr_unittest.TestCase): 29 | 30 | def setUp (self): 31 | self.tb = gr.top_block () 32 | 33 | def tearDown (self): 34 | self.tb = None 35 | 36 | def test_001_t (self): 37 | # set up fg 38 | self.tb.run () 39 | # check data 40 | 41 | 42 | if __name__ == '__main__': 43 | gr_unittest.run(qa_msg_to_tag) 44 | -------------------------------------------------------------------------------- /python/qa_txtime_setter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # @file 4 | # @author Piotr Krysik 5 | # @section LICENSE 6 | # 7 | # Gr-gsm is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 3, or (at your option) 10 | # any later version. 11 | # 12 | # Gr-gsm is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with gr-gsm; see the file COPYING. If not, write to 19 | # the Free Software Foundation, Inc., 51 Franklin Street, 20 | # Boston, MA 02110-1301, USA. 21 | # 22 | # 23 | 24 | from gnuradio import gr, gr_unittest 25 | from gnuradio import blocks 26 | import grgsm_swig as grgsm 27 | 28 | class qa_txtime_setter (gr_unittest.TestCase): 29 | 30 | def setUp (self): 31 | self.tb = gr.top_block () 32 | 33 | def tearDown (self): 34 | self.tb = None 35 | 36 | def test_001_t (self): 37 | # set up fg 38 | self.tb.run () 39 | # check data 40 | 41 | 42 | if __name__ == '__main__': 43 | gr_unittest.run(qa_txtime_setter) 44 | -------------------------------------------------------------------------------- /python/qa_uplink_downlink_splitter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # @file 4 | # @author (C) 2016 by Piotr Krysik 5 | # @section LICENSE 6 | # 7 | # Gr-gsm is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 3, or (at your option) 10 | # any later version. 11 | # 12 | # Gr-gsm is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with gr-gsm; see the file COPYING. If not, write to 19 | # the Free Software Foundation, Inc., 51 Franklin Street, 20 | # Boston, MA 02110-1301, USA. 21 | # 22 | # 23 | 24 | from gnuradio import gr, gr_unittest 25 | from gnuradio import blocks 26 | import grgsm_swig as grgsm 27 | 28 | class qa_uplink_downlink_splitter (gr_unittest.TestCase): 29 | 30 | def setUp (self): 31 | self.tb = gr.top_block () 32 | 33 | def tearDown (self): 34 | self.tb = None 35 | 36 | def test_001_t (self): 37 | # set up fg 38 | self.tb.run () 39 | # check data 40 | 41 | 42 | if __name__ == '__main__': 43 | gr_unittest.run(qa_uplink_downlink_splitter) 44 | -------------------------------------------------------------------------------- /python/receiver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | GR_PYTHON_INSTALL( 21 | FILES 22 | gsm_input.py 23 | fcch_burst_tagger.py 24 | sch_detector.py 25 | fcch_detector.py 26 | chirpz.py 27 | DESTINATION ${GR_PYTHON_DIR}/grgsm 28 | ) 29 | -------------------------------------------------------------------------------- /python/receiver/README: -------------------------------------------------------------------------------- 1 | chirpz.py - implementation of chirpz transform 2 | gsm_input.py - adapts signal to the input of the gsm receiver, executes clock offset correction 3 | fcch_detector.py - (experimental componen for a new gsm receiver) detects fcch bursts 4 | fcch_burst_tagger.py - (experimental componen for a new gsm receiver) part of fcch_detector - add fcch tag when FCCH burst is found 5 | sch_detector.py - (experimental componen for a new gsm receiver) unfinished block that detects exact position of a SCH burst based on fcch tags, should probably also read content of SCH bursts -------------------------------------------------------------------------------- /python/transmitter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | GR_PYTHON_INSTALL( 21 | FILES 22 | txtime_bursts_tagger.py 23 | gsm_gmsk_mod.py 24 | DESTINATION ${GR_PYTHON_DIR}/grgsm 25 | ) 26 | -------------------------------------------------------------------------------- /python/trx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2011,2012 Free Software Foundation, Inc. 2 | # 3 | # This file is part of GNU Radio 4 | # 5 | # GNU Radio is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 3, or (at your option) 8 | # any later version. 9 | # 10 | # GNU Radio is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNU Radio; see the file COPYING. If not, write to 17 | # the Free Software Foundation, Inc., 51 Franklin Street, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | GR_PYTHON_INSTALL( 21 | FILES 22 | __init__.py 23 | udp_link.py 24 | ctrl_if.py 25 | ctrl_if_bb.py 26 | radio_if.py 27 | radio_if_uhd.py 28 | radio_if_lms.py 29 | transceiver.py 30 | dict_toggle_sign.py 31 | DESTINATION ${GR_PYTHON_DIR}/grgsm/trx 32 | ) 33 | -------------------------------------------------------------------------------- /python/trx/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2008,2009 Free Software Foundation, Inc. 3 | # 4 | # This application is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; either version 3, or (at your option) 7 | # any later version. 8 | # 9 | # This application is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | # 18 | 19 | ''' 20 | This is a set of helper classes for the grgsm_trx application. 21 | ''' 22 | 23 | from .udp_link import UDPLink 24 | from .ctrl_if import CTRLInterface 25 | from .ctrl_if_bb import CTRLInterfaceBB 26 | from .radio_if import RadioInterface 27 | from .transceiver import Transceiver 28 | 29 | from .dict_toggle_sign import dict_toggle_sign 30 | -------------------------------------------------------------------------------- /python/trx/dict_toggle_sign.py: -------------------------------------------------------------------------------- 1 | """ 2 | Embedded Python Blocks: 3 | 4 | Each this file is saved, GRC will instantiate the first class it finds to get 5 | ports and parameters of your block. The arguments to __init__ will be the 6 | parameters. All of them are required to have default values! 7 | """ 8 | 9 | from gnuradio import gr 10 | from pmt import * 11 | 12 | class dict_toggle_sign(gr.basic_block): 13 | def __init__(self): # only default arguments here 14 | gr.basic_block.__init__( 15 | self, 16 | name='Change sign of elts in dict', 17 | in_sig=[], 18 | out_sig=[] 19 | ) 20 | self.message_port_register_in(intern("dict_in")) 21 | self.message_port_register_out(intern("dict_out")) 22 | self.set_msg_handler(intern("dict_in"), self.change_sign) 23 | 24 | def change_sign(self, msg): 25 | if is_dict(msg): 26 | d = to_python(msg) 27 | #print d 28 | for key, value in d.items(): 29 | d[key] *= -1 30 | self.message_port_pub(intern("dict_out"), to_pmt(d)) 31 | -------------------------------------------------------------------------------- /swig/constants.i: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | /* 3 | * Copyright 2006,2009,2013 Free Software Foundation, Inc. 4 | * 5 | * This file is part of GNU Radio 6 | * 7 | * GNU Radio is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3, or (at your option) 10 | * any later version. 11 | * 12 | * GNU Radio is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with GNU Radio; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | 24 | namespace gr { 25 | namespace gsm{ 26 | %rename(build_date) build_date; 27 | %rename(version) version; 28 | %rename(version_info) version_info; 29 | 30 | const std::string build_date(); 31 | const std::string version(); 32 | const std::string major_version(); 33 | const std::string api_version(); 34 | const std::string minor_version(); 35 | const std::string maint_version(); 36 | } /* namespace gsm */ 37 | } /* namespace gr */ 38 | -------------------------------------------------------------------------------- /tests/dockerfiles/Debian_testing.docker: -------------------------------------------------------------------------------- 1 | FROM debian:testing 2 | MAINTAINER Piotr Krysik 3 | 4 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ 5 | cmake \ 6 | autoconf \ 7 | libtool \ 8 | pkg-config \ 9 | build-essential \ 10 | libcppunit-dev \ 11 | swig \ 12 | doxygen \ 13 | liblog4cpp5-dev \ 14 | python3-docutils \ 15 | python3-scipy \ 16 | gnuradio-dev \ 17 | liborc-dev \ 18 | libosmocore-dev \ 19 | gr-osmosdr 20 | 21 | COPY ./ /src/ 22 | RUN mkdir /src/build 23 | WORKDIR /src/build 24 | 25 | RUN cmake .. && \ 26 | # The parallel build sometimes fails when the .grc_gnuradio 27 | # and .gnuradio directories do not exist 28 | mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/ && \ 29 | make -j $(nproc) && \ 30 | make install && \ 31 | ldconfig && \ 32 | make CTEST_OUTPUT_ON_FAILURE=1 test 33 | -------------------------------------------------------------------------------- /tests/dockerfiles/Ubuntu_20_04.docker: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | MAINTAINER Piotr Krysik 3 | 4 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ 5 | cmake \ 6 | autoconf \ 7 | libtool \ 8 | pkg-config \ 9 | build-essential \ 10 | libcppunit-dev \ 11 | swig \ 12 | doxygen \ 13 | liblog4cpp5-dev \ 14 | python3-docutils \ 15 | python3-scipy \ 16 | gnuradio-dev \ 17 | liborc-dev \ 18 | libosmocore-dev \ 19 | gr-osmosdr 20 | 21 | COPY ./ /src/ 22 | RUN mkdir /src/build 23 | WORKDIR /src/build 24 | 25 | RUN cmake .. && \ 26 | # The parallel build sometimes fails when the .grc_gnuradio 27 | # and .gnuradio directories do not exist 28 | mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/ && \ 29 | make -j $(nproc) && \ 30 | make install && \ 31 | ldconfig && \ 32 | make CTEST_OUTPUT_ON_FAILURE=1 test 33 | -------------------------------------------------------------------------------- /tests/fixtures/grgsm_decode_decrypt1_expected: -------------------------------------------------------------------------------- 1 | 862210 1331352: 03 03 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2 | 862242 1332356: 00 01 03 03 49 06 1d 9f 6d 18 10 80 00 00 00 00 00 00 00 00 00 00 00 3 | 862261 1331351: 01 73 35 06 27 00 03 50 18 a0 05 f4 01 5c 57 03 2b 2b 2b 2b 2b 2b 2b 4 | 862312 1331350: 03 20 0d 06 35 11 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 5 | 862344 1332354: 00 00 03 03 2d 06 1e 2b d9 62 f2 20 01 3e 95 78 7b 2b 2b 2b 2b 2b 2b 6 | 862363 1331349: 03 42 45 13 05 1e 02 ea 81 5c 08 11 83 94 03 98 93 92 49 81 2b 2b 2b 7 | 862414 1331348: 01 61 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 8 | 862446 1332352: 00 00 03 03 49 06 1d 9f 6d 18 10 80 00 00 00 00 00 00 00 00 00 00 00 9 | 862465 1331347: 01 81 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 10 | 862516 1331346: 03 84 21 06 2e 0d 02 d5 00 63 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 11 | 862548 1332376: 00 00 03 03 49 06 06 70 00 00 00 00 00 04 15 50 10 00 00 00 00 0a a8 12 | 862567 1331345: 03 03 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 13 | -------------------------------------------------------------------------------- /tests/scripts/decode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TEST_DIR=$(dirname "$0") 4 | 5 | # PYTHONPATH and LD_LIBRARY_PATH are needed on Fedora 26 6 | # 7 | # /usr/local/lib/python3/dist-packages/ is currently needed on Debian Testing and Kali Rolling 8 | # https://salsa.debian.org/bottoms/pkg-gnuradio/blob/unstable/debian/patches/debian-python-install#L8 9 | # 10 | export PYTHONPATH=/usr/local/lib/python3/dist-packages/:/usr/local/lib64/python2.7/site-packages/:/usr/local/lib64/python2.7/site-packages/grgsm/:$PYTHONPATH 11 | export LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH 12 | 13 | export AP_DECODE="grgsm_decode" 14 | export CAPFILE="../../test_data/vf_call6_a725_d174_g5_Kc1EF00BAB3BAC7002.cfile" 15 | export SHORTENED_CAPFILE="tmp.cfile" 16 | export RESULT_EXPECTED="../fixtures/grgsm_decode_test1_expected" 17 | export RESULT_OBTAINED="grgsm_decode_test1_result" 18 | export RUNLINE="$AP_DECODE -c $SHORTENED_CAPFILE -s $((100000000/174)) -m BCCH -t 0 -v --ppm -10" 19 | echo "Testing with:" 20 | echo " $RUNLINE" 21 | gnuradio-config-info --version 22 | cat /proc/cpuinfo 23 | ulimit -a 24 | 25 | cd "$TEST_DIR" || exit 1 26 | head -c 6000000 $CAPFILE > $SHORTENED_CAPFILE 27 | 28 | # VOLK_GENERIC=1 is a temporary workaround for the following VOLK's bug 29 | # https://github.com/gnuradio/volk/pull/278 30 | # https://github.com/gnuradio/gnuradio/issues/2748 31 | export VOLK_GENERIC=1 32 | 33 | $RUNLINE | grep -A 999999 "860933 1329237: 59 06 1a 8f 6d 18 10 80 00 00 00 00 00 00 00 00 00 00 00 78 b9 00 00" | tee $RESULT_OBTAINED 34 | 35 | diff $RESULT_EXPECTED $RESULT_OBTAINED 36 | TEST_RESULT=$? 37 | 38 | rm $RESULT_OBTAINED 39 | rm $SHORTENED_CAPFILE 40 | 41 | if [ $TEST_RESULT == 0 ] 42 | then 43 | echo " Result: PASSED" 44 | exit 0 45 | else 46 | echo " Result: FAILED" 47 | exit 1 48 | fi 49 | 50 | -------------------------------------------------------------------------------- /tests/scripts/decrypt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TEST_DIR=$(dirname "$0") 4 | 5 | # PYTHONPATH and LD_LIBRARY_PATH are needed on Fedora 26 6 | # 7 | # /usr/local/lib/python3/dist-packages/ is currently needed on Debian Testing and Kali Rolling 8 | # https://salsa.debian.org/bottoms/pkg-gnuradio/blob/unstable/debian/patches/debian-python-install#L8 9 | # 10 | export PYTHONPATH=/usr/local/lib/python3/dist-packages/:/usr/local/lib64/python2.7/site-packages/:/usr/local/lib64/python2.7/site-packages/grgsm/:$PYTHONPATH 11 | export LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH 12 | 13 | export AP_DECODE="grgsm_decode" 14 | export CAPFILE="../../test_data/vf_call6_a725_d174_g5_Kc1EF00BAB3BAC7002.cfile" 15 | export SHORTENED_CAPFILE="tmp.cfile" 16 | export RESULT_EXPECTED="../fixtures/grgsm_decode_decrypt1_expected" 17 | export RESULT_OBTAINED="grgsm_decode_test1_result" 18 | export RUNLINE="$AP_DECODE -c $SHORTENED_CAPFILE -s $((100000000/174)) -m SDCCH8 -t 1 -k 0x1E,0xF0,0x0B,0xAB,0x3B,0xAC,0x70,0x02 -v --ppm -10" 19 | echo "Testing with:" 20 | echo " $RUNLINE" 21 | gnuradio-config-info --version 22 | cat /proc/cpuinfo 23 | ulimit -a 24 | 25 | cd "$TEST_DIR" || exit 1 26 | head -c -37000000 $CAPFILE | head -c 35800000 > $SHORTENED_CAPFILE 27 | 28 | # VOLK_GENERIC=1 is a temporary workaround for the following VOLK's bug 29 | # https://github.com/gnuradio/volk/pull/278 30 | # https://github.com/gnuradio/gnuradio/issues/2748 31 | export VOLK_GENERIC=1 32 | 33 | $RUNLINE | grep -A 999999 "862210 1331352: 03 03 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b" | tee $RESULT_OBTAINED 34 | diff -u $RESULT_EXPECTED $RESULT_OBTAINED 35 | TEST_RESULT=$? 36 | 37 | rm $RESULT_OBTAINED 38 | rm $SHORTENED_CAPFILE 39 | 40 | if [ $TEST_RESULT == 0 ] 41 | then 42 | echo " Result: PASSED" 43 | exit 0 44 | else 45 | echo " Result: FAILED" 46 | exit 1 47 | fi 48 | 49 | -------------------------------------------------------------------------------- /tests/scripts/scanner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script runs integration tests for grgsm_scanner. 3 | # Run it fron the enclosing directory. 4 | export TEST_IMAGE_NAMES=() 5 | export TEST_SCAN_BANDS=(P-GSM DCS1800 PCS1900 E-GSM R-GSM GSM450 GSM480 GSM850) 6 | export TEMP_DIR=`mktemp -d` 7 | cd ../../ 8 | export GR_SRC_DIR=`echo $PWD` 9 | 10 | echo "Using source dir: $GR_SRC_DIR" 11 | echo "Using destination dir: $TEMP_DIR" 12 | cp -R $GR_SRC_DIR $TEMP_DIR 13 | 14 | cd $TEMP_DIR/gr-gsm 15 | 16 | export DOCKERFILE_LIST=($TEMP_DIR/gr-gsm/tests/dockerfiles/*.docker) 17 | 18 | for DOCKERFILE in ${DOCKERFILE_LIST[*]} 19 | do 20 | cat $DOCKERFILE > Dockerfile 21 | export IMAGE_BASE=`echo $DOCKERFILE | \ 22 | sed -e "s|$TEMP_DIR/gr-gsm/dockerfiles/||g" | \ 23 | sed -e 's/\.docker//g'` 24 | export IMAGE_NAME=`echo $IMAGE_BASE | tr '[:upper:]' '[:lower:]'` 25 | echo "Attempt to build $IMAGE_NAME" 26 | docker build -t $IMAGE_NAME ./ && TEST_IMAGE_NAMES+=($IMAGE_NAME) 27 | done 28 | 29 | 30 | for BAND in ${TEST_SCAN_BANDS[*]} 31 | do 32 | export SCAN_COMMAND="/usr/bin/python /usr/local/bin/grgsm_scanner -b `echo $BAND` -v" 33 | for IMG in ${TEST_IMAGE_NAMES[*]} 34 | do 35 | echo "Now we test: $SCAN_COMMAND on $IMG" 36 | docker run -it --rm --privileged $IMG `echo $SCAN_COMMAND` 37 | done 38 | done 39 | 40 | cd $GR_SRC_DIR/build_test/scripts && rm -rf $TEMP_DIR 41 | --------------------------------------------------------------------------------