Skip to content

Commit

Permalink
Merge pull request #356 from robotastic/gr3.8
Browse files Browse the repository at this point in the history
Merge in PR #349
  • Loading branch information
robotastic authored May 19, 2020
2 parents 7020b20 + 38087d3 commit 676d60e
Show file tree
Hide file tree
Showing 14 changed files with 173 additions and 54 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Trunk Recorder ChangeLog
========================
### Version 3.2
* Added support for GnuRadio 3.8

### Version 3.1.3
* Add support for uploading to Broadcastify
* Switch to using LibCurl for networking

### Version 3.1.2
* Added support for Motorola TPS Signaling
* Made Debug Recorder work over a nextwork connection
Expand Down
29 changes: 18 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@ find_package(CppUnit)
# find_package(Gnuradio)
#endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")

set(GR_REQUIRED_COMPONENTS ANALOG DIGITAL RUNTIME BLOCKS FILTER PMT)
find_package(Gnuradio)
set(GR_REQUIRED_COMPONENTS ANALOG DIGITAL RUNTIME BLOCKS FILTER PMT FFT)
find_package(Gnuradio REQUIRED COMPONENTS analog blocks digital filter fft)
find_package(GnuradioRuntime)
find_package(CppUnit)

math(EXPR GNURADIO_VERSION "(${Gnuradio_VERSION_MAJOR} / 10) << 20 | (${Gnuradio_VERSION_MAJOR} % 10) << 16 | (${Gnuradio_VERSION_MINOR} / 10) << 12 | (${Gnuradio_VERSION_MINOR} % 10) << 8 | (${Gnuradio_VERSION_PATCH} / 10) << 4 | (${Gnuradio_VERSION_PATCH} % 10) << 0 ")
message(STATUS "GnuRadio Version: " ${GNURADIO_VERSION})

if(NOT GNURADIO_RUNTIME_FOUND)
message(FATAL_ERROR "GnuRadio Runtime required to compile Trunk Recorder")
endif()
Expand All @@ -105,9 +108,7 @@ find_package(UHD)
find_package(OpenSSL REQUIRED)
find_package(CURL REQUIRED)

if(NOT GNURADIO_RUNTIME_FOUND)
message(FATAL_ERROR "GnuRadio Runtime required to build " ${CMAKE_PROJECT_NAME})
endif()


########################################################################
# Setup boost
Expand Down Expand Up @@ -141,14 +142,14 @@ set(Boost_ADDITIONAL_VERSIONS
"1.70.0" "1.70" "1.71.0" "1.71" "1.72.0" "1.72" "1.73.0" "1.73" "1.74.0" "1.74"
)

find_package(Boost COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
find_package(Boost COMPONENTS ${BOOST_REQUIRED_COMPONENTS} REQUIRED)

if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost required to build " ${CMAKE_PROJECT_NAME})
endif()

ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK)

add_definitions(-DGNURADIO_VERSION=${GNURADIO_VERSION})

########################################################################
# Setup the include and linker paths
Expand All @@ -175,17 +176,14 @@ link_directories(
${OPENSSL_ROOT_DIR}/lib
)


set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wno-unused-local-typedef -Wno-deprecated-declarations -Wno-error=deprecated-declarations -g")

SET(CMAKE_CXX_STANDARD 11)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wno-narrowing")


add_subdirectory(lib/op25_repeater)


list(APPEND trunk_recorder_sources
trunk-recorder/main.cc
trunk-recorder/formatter.cc
Expand Down Expand Up @@ -240,4 +238,13 @@ target_compile_options(

add_executable(recorder ${trunk_recorder_sources})

target_link_libraries(recorder ssl crypto ${CURL_LIBRARIES} ${GNURADIO_PMT_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES} ${GNURADIO_DIGITAL_LIBRARIES} ${GNURADIO_ANALOG_LIBRARIES} ${GNURADIO_AUDIO_LIBRARIES} ${GNURADIO_UHD_LIBRARIES} ${UHD_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GROSMOSDR_LIBRARIES} ${Boost_LIBRARIES} ${LIBOP25_REPEATER_LIBRARIES} gnuradio-op25_repeater imbe_vocoder)
target_link_libraries(recorder ssl crypto ${CURL_LIBRARIES} ${Boost_LIBRARIES} ${GNURADIO_PMT_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES} ${GNURADIO_DIGITAL_LIBRARIES} ${GNURADIO_ANALOG_LIBRARIES} ${GNURADIO_AUDIO_LIBRARIES} ${GNURADIO_UHD_LIBRARIES} ${UHD_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GROSMOSDR_LIBRARIES} ${LIBOP25_REPEATER_LIBRARIES} gnuradio-op25_repeater imbe_vocoder)
message(STATUS "All libraries:" ${GNURADIO_ALL_LIBRARIES})
if(NOT Gnuradio_VERSION VERSION_LESS "3.8")
target_link_libraries(recorder
gnuradio::gnuradio-analog
gnuradio::gnuradio-blocks
gnuradio::gnuradio-digital
gnuradio::gnuradio-filter
)
endif()
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Trunk Recorder - v3.1.2
Trunk Recorder - v3.2
=======================
*Note: v3.1.1 changes from using `ffmpeg` to `fdkaac` and `sox` for compressing audio for OpenMHz. Both utilities can be easily installed using apt-get*

*Note: v3.1.3 adds a dependency for `libcurl`, you can install it thru `apt-get` with `sudo apt-get install libcurl4-openssl-dev`.*


## Sponsors
**Do you find Trunk Recorder and OpenMHz useful? Become a [Sponsor](https://github.com/sponsors/robotastic) to help support continued development and operation.**
Thank you: Vabrio, Blantonl, Olesza and others!
Expand All @@ -23,7 +22,7 @@ Trunk Recorder currently supports the following:
- Ettus USRPs
- P25 Phase 1, **P25 Phase 2** & Analog voice channels

Trunk Recorder has been tested on Ubuntu (14.04, 16.04, 16.10, 17.04, 17.10 & 18.04), Arch Linux (2017.03.01), Debian 9.x and macOS (10.10, 10.11, 10.12, 10.13, 10.14). It has been successfully used with several SDRs including the Ettus USRP B200, B210, B205, a bank of 3 RTL-SDR dongles, and the HackRF Jawbreaker.
Trunk Recorder has been tested on Ubuntu (14.04, 16.04, 16.10, 17.04, 17.10, 18.04 & 20.04), Arch Linux (2017.03.01), Debian 9.x and macOS (10.10, 10.11, 10.12, 10.13, 10.14). It has been successfully used with several SDRs including the Ettus USRP B200, B210, B205, a bank of 3 RTL-SDR dongles, and the HackRF Jawbreaker.

# Wiki Pages

Expand Down
4 changes: 4 additions & 0 deletions blacklist-rtl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
blacklist rtl2838
32 changes: 32 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#! /bin/sh

set -e

# trunk-recorder install script for debian based systems
# including ubuntu 18.04/20.04 and raspbian

if [ ! -d trunk-recorder/recorders ]; then
echo ====== ERROR: trunk-recorder top level directories not found.
echo ====== You must change to the trunk-recorder top level directory
echo ====== before running this script.
exit
fi

sudo apt-get update
sudo apt-get install gnuradio gnuradio-dev gr-osmosdr libhackrf-dev libuhd-dev libgmp-dev
sudo apt-get install fdkaac sox
sudo apt-get install git cmake build-essential libboost-all-dev libusb-1.0-0.dev libssl-dev libcurl4-openssl-dev liborc-0.4-dev

mkdir build
cd build
cmake ../
make
sudo cp -i recorder /usr/local/bin/trunk-recorder

cd ..

if [ ! -f /etc/modprobe.d/blacklist-rtl.conf ]; then
echo ====== Installing blacklist-rtl.conf for selecting the correct RTL-SDR drivers
echo ====== Please reboot before running trunk-recorder.
sudo install -m 0644 ./blacklist-rtl.conf /etc/modprobe.d/
fi
9 changes: 9 additions & 0 deletions rebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e
git pull
mkdir -p build
cd build
rm -rf *
cmake ../
make
sudo cp -i recorder /usr/local/bin/trunk-recorder
9 changes: 7 additions & 2 deletions trunk-recorder/recorders/analog_recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@

#include <gnuradio/block.h>
#include <gnuradio/blocks/copy.h>
#include <gnuradio/blocks/multiply_const_ff.h>
#if GNURADIO_VERSION < 0x030800
#include <gnuradio/filter/fir_filter_fff.h>

#include <gnuradio/blocks/multiply_const_ff.h>
#else
#include <gnuradio/filter/fir_filter_blk.h>
#include <gnuradio/blocks/multiply_const.h>
#endif
#include <gnuradio/filter/firdes.h>
#include <gnuradio/filter/iir_filter_ffd.h>
#include <gnuradio/filter/fir_filter_fff.h>
#include <gnuradio/filter/fft_filter_ccf.h>

#include <gnuradio/analog/quadrature_demod_cf.h>
Expand Down
23 changes: 14 additions & 9 deletions trunk-recorder/recorders/debug_recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,29 @@
#include <gnuradio/hier_block2.h>

#include <gnuradio/filter/firdes.h>
#include <gnuradio/filter/fir_filter_ccc.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#include <gnuradio/filter/fir_filter_fff.h>
#include <gnuradio/filter/pfb_arb_resampler_ccf.h>
#include <gnuradio/filter/fft_filter_fff.h>

#include <gnuradio/analog/sig_source_c.h>
#include <gnuradio/analog/pwr_squelch_cc.h>
#include <gnuradio/analog/feedforward_agc_cc.h>
#include <gnuradio/analog/pll_freqdet_cf.h>
#include <gnuradio/digital/diff_phasor_cc.h>

#if GNURADIO_VERSION < 0x030800
#include <gnuradio/analog/sig_source_c.h>
#include <gnuradio/blocks/multiply_cc.h>
#include <gnuradio/blocks/multiply_const_ff.h>
#include <gnuradio/blocks/multiply_const_ss.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#include <gnuradio/filter/fir_filter_fff.h>
#else
#include <gnuradio/analog/sig_source.h>
#include <gnuradio/filter/fir_filter_blk.h>
#include <gnuradio/blocks/multiply.h>
#include <gnuradio/blocks/multiply_const.h>
#endif

#include <gnuradio/block.h>
#include <gnuradio/blocks/copy.h>
#include <gnuradio/blocks/short_to_float.h>
#include <gnuradio/blocks/multiply_const_ff.h>
#include <gnuradio/blocks/multiply_cc.h>
#include <gnuradio/blocks/multiply_const_ss.h>
#include <gnuradio/blocks/complex_to_arg.h>

#include <op25_repeater/include/op25_repeater/fsk4_demod_ff.h>
Expand Down
21 changes: 15 additions & 6 deletions trunk-recorder/recorders/p25_recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@

#include <gnuradio/io_signature.h>
#include <gnuradio/hier_block2.h>

#include <gnuradio/filter/firdes.h>
#include <gnuradio/filter/fir_filter_ccc.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#include <gnuradio/filter/fir_filter_fff.h>

#include <gnuradio/filter/pfb_arb_resampler_ccf.h>
#include <gnuradio/filter/fft_filter_fff.h>

#include <gnuradio/analog/sig_source_c.h>
#include <gnuradio/analog/pwr_squelch_cc.h>
#include <gnuradio/analog/feedforward_agc_cc.h>
#include <gnuradio/analog/pll_freqdet_cf.h>
Expand All @@ -34,9 +30,22 @@
#include <gnuradio/block.h>
#include <gnuradio/blocks/copy.h>
#include <gnuradio/blocks/short_to_float.h>
#include <gnuradio/blocks/multiply_const_ff.h>

#if GNURADIO_VERSION < 0x030800
#include <gnuradio/analog/sig_source_c.h>
#include <gnuradio/blocks/multiply_cc.h>
#include <gnuradio/blocks/multiply_const_ff.h>
#include <gnuradio/blocks/multiply_const_ss.h>
#include <gnuradio/filter/fir_filter_ccc.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#include <gnuradio/filter/fir_filter_fff.h>
#else
#include <gnuradio/analog/sig_source.h>
#include <gnuradio/blocks/multiply.h>
#include <gnuradio/blocks/multiply_const.h>
#include <gnuradio/filter/fir_filter_blk.h>
#endif

#include <gnuradio/blocks/complex_to_arg.h>

#include <op25_repeater/include/op25_repeater/fsk4_demod_ff.h>
Expand Down
3 changes: 3 additions & 0 deletions trunk-recorder/recorders/p25conventional_recorder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ void p25conventional_recorder::start(Call *call) {

if (!qpsk_mod) {
reset();
} else {
costas_clock->reset();
}

if (d_delayopen) {
BOOST_LOG_TRIVIAL(info) << "\t- Listening P25 Recorder Num [" << rec_num << "]\tTG: " << this->call->get_talkgroup_display() << "\tFreq: " << FormatFreq(chan_freq) << " \tTDMA: " << call->get_phase2_tdma() << "\tSlot: " << call->get_tdma_slot();
} else {
Expand Down
27 changes: 19 additions & 8 deletions trunk-recorder/recorders/recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,32 @@

#include <gnuradio/io_signature.h>
#include <gnuradio/hier_block2.h>
#include <gnuradio/blocks/multiply_const_ff.h>
#include <gnuradio/filter/firdes.h>

#if GNURADIO_VERSION < 0x030800
#include <gnuradio/analog/sig_source_f.h>
#include <gnuradio/analog/sig_source_c.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#include <gnuradio/filter/fir_filter_fff.h>
#include <gnuradio/blocks/multiply_const_ff.h>
#include <gnuradio/blocks/multiply_cc.h>
#include <gnuradio/filter/freq_xlating_fir_filter_ccf.h>
#include <gnuradio/filter/firdes.h>
#include <gnuradio/filter/rational_resampler_base_ccc.h>
#include <gnuradio/analog/quadrature_demod_cf.h>
#include <gnuradio/analog/quadrature_demod_cf.h>
#include <gnuradio/analog/sig_source_f.h>
#include <gnuradio/analog/sig_source_c.h>
#include <gnuradio/blocks/multiply_cc.h>
#include <gnuradio/blocks/file_sink.h>
#include <gnuradio/filter/rational_resampler_base_ccf.h>
#include <gnuradio/filter/rational_resampler_base_fff.h>
#else
#include <gnuradio/analog/sig_source.h>
#include <gnuradio/filter/fir_filter_blk.h>
#include <gnuradio/blocks/multiply_const.h>
#include <gnuradio/blocks/multiply.h>
#include <gnuradio/filter/freq_xlating_fir_filter.h>
#include <gnuradio/filter/rational_resampler_base.h>
#endif

#include <gnuradio/analog/quadrature_demod_cf.h>

#include <gnuradio/blocks/file_sink.h>

#include <gnuradio/block.h>
#include <gnuradio/blocks/null_sink.h>
#include <gnuradio/blocks/copy.h>
Expand Down
28 changes: 20 additions & 8 deletions trunk-recorder/recorders/sigmf_recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@

#include <gnuradio/io_signature.h>
#include <gnuradio/hier_block2.h>
#include <gnuradio/blocks/multiply_const_ff.h>
#include <gnuradio/filter/firdes.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#include <gnuradio/filter/fir_filter_fff.h>
#include <gnuradio/filter/freq_xlating_fir_filter_ccf.h>
#include <gnuradio/filter/firdes.h>
#include <gnuradio/filter/rational_resampler_base_ccc.h>


#include <gnuradio/analog/quadrature_demod_cf.h>

#include <gnuradio/analog/sig_source_c.h>

#include <gnuradio/analog/feedforward_agc_cc.h>
#include <gnuradio/analog/agc2_ff.h>
#include <gnuradio/analog/agc2_cc.h>
Expand All @@ -36,14 +32,30 @@
#include <gnuradio/blocks/complex_to_arg.h>


#if GNURADIO_VERSION < 0x030800
#include <gnuradio/analog/sig_source_c.h>
#include <gnuradio/blocks/multiply_cc.h>
#include <gnuradio/blocks/multiply_const_ff.h>
#include <gnuradio/blocks/multiply_const_cc.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#include <gnuradio/filter/fir_filter_fff.h>
#include <gnuradio/filter/freq_xlating_fir_filter_ccf.h>
#include <gnuradio/filter/rational_resampler_base_ccf.h>
#include <gnuradio/filter/rational_resampler_base_fff.h>
#include <gnuradio/filter/rational_resampler_base_ccc.h>
#else
#include <gnuradio/analog/sig_source.h>
#include <gnuradio/filter/fir_filter_blk.h>
#include <gnuradio/blocks/multiply.h>
#include <gnuradio/blocks/multiply_const.h>
#include <gnuradio/filter/freq_xlating_fir_filter.h>
#include <gnuradio/filter/rational_resampler_base.h>
#endif


#include <gnuradio/blocks/file_sink.h>
#include <gnuradio/filter/pfb_arb_resampler_ccf.h>
#include <gnuradio/filter/rational_resampler_base_ccf.h>
#include <gnuradio/filter/rational_resampler_base_fff.h>


#include <gnuradio/block.h>
#include <gnuradio/blocks/null_sink.h>
Expand Down
15 changes: 12 additions & 3 deletions trunk-recorder/systems/p25_trunking.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,28 @@
#include <gnuradio/hier_block2.h>

#include <gnuradio/block.h>

#if GNURADIO_VERSION < 0x030800
#include <gnuradio/blocks/multiply_const_ff.h>
#include <gnuradio/blocks/multiply_cc.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#include <gnuradio/filter/fir_filter_fff.h>
#include <gnuradio/analog/sig_source_c.h>
#else
#include <gnuradio/blocks/multiply_const.h>
#include <gnuradio/blocks/multiply.h>
#include <gnuradio/filter/fir_filter_blk.h>
#include <gnuradio/analog/sig_source.h>
#endif

#include <gnuradio/blocks/complex_to_arg.h>
#include <gnuradio/blocks/short_to_float.h>

#include <gnuradio/filter/firdes.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#include <gnuradio/filter/fft_filter_ccf.h>
#include <gnuradio/filter/fir_filter_fff.h>
#include <gnuradio/filter/pfb_arb_resampler_ccf.h>
#include <gnuradio/filter/fft_filter_fff.h>

#include <gnuradio/analog/sig_source_c.h>
#include <gnuradio/analog/quadrature_demod_cf.h>
#include <gnuradio/analog/feedforward_agc_cc.h>
#include <gnuradio/analog/pll_freqdet_cf.h>
Expand Down
Loading

0 comments on commit 676d60e

Please sign in to comment.