Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin rdioscanner #557

Merged
merged 5 commits into from
Nov 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ add_subdirectory(plugins/broadcastify_uploader)

add_subdirectory(plugins/unit_script)

add_subdirectory(plugins/rdioscanner_uploader)

add_executable(trunk-recorder trunk-recorder/main.cc ${trunk_recorder_sources})

target_link_libraries(trunk-recorder trunk_recorder_library gnuradio-op25_repeater ${CMAKE_DL_LIBS} 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} ${GNURADIO_OSMOSDR_LIBRARIES} ) # gRPC::grpc++_reflection protobuf::libprotobuf)
Expand All @@ -312,4 +314,4 @@ if(NOT Gnuradio_VERSION VERSION_LESS "3.8")
endif()


install(TARGETS trunk-recorder RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS trunk-recorder RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44 changes: 42 additions & 2 deletions docs/CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Here is a map of the different sections of the *config.json* file:
| callTimeout | | 3 | number | A Call will stop recording and save if it has not received anything on the control channel, after this many seconds. |
| uploadServer | | | string | The URL for uploading to OpenMHz. The default is an empty string. See the Config tab for your system in OpenMHz to find what the value should be. |
| broadcastifyCallsServer | | | string | The URL for uploading to Broadcastify Calls. The default is an empty string. Refer to [Broadcastify's wiki](https://wiki.radioreference.com/index.php/Broadcastify-Calls-API) for the upload URL. |
| | | | | |
| logFile | | false | **true** / **false** | Save the console output to a file. |
| frequencyFormat | | "exp" | **"exp" "mhz"** or **"hz"** | the display format for frequencies to display in the console and log file. |
| controlWarnRate | | 10 | number | Log the control channel decode rate when it falls bellow this threshold. The value of *-1* will always log the decode rate. |
Expand All @@ -135,8 +136,8 @@ Here is a map of the different sections of the *config.json* file:
| rate | ✓ | | number | the sampling rate to set the SDR to, in samples / second |
| error | | 0 | number | the tuning error for the SDR, in Hz. This is the difference between the target value and the actual value. So if you wanted to recv 856MHz but you had to tune your SDR to 855MHz (when set to 0ppm) to actually receive it, you would set this to -1000000. You should also probably get a new SDR if it is off by this much. |
| gain | ✓ | | number | The RF gain setting for the SDR. Use a program like GQRX to find a good value. |
| digitalRecorders | | | number | The number of Digital Recorders to have attached to this source. This is essentially the number of simultaneous calls you can record at the same time in the frequency range that this Source will be tuned to. It is limited by the CPU power of the machine. Some experimentation might be needed to find the appropriate number. |
| analogRecorders | | | number | the number of Analog Recorder to have attached to this source. This is the same as Digital Recorders except for Analog Voice channels. |
| digitalRecorders | | | number | The number of Digital Recorders to have attached to this source. This is essentially the number of simultaneous calls you can record at the same time in the frequency range that this Source will be tuned to. It is limited by the CPU power of the machine. Some experimentation might be needed to find the appropriate number. *This is only required for Trunk systems. Channels in Conventional systems have dedicated recorders and do not need to be included here.* |
| analogRecorders | | | number | the number of Analog Recorder to have attached to this source. This is the same as Digital Recorders except for Analog Voice channels. *This is only required for Trunk systems. Channels in Conventional systems have dedicated recorders and do not need to be included here.* |
| driver | ✓ | | **"usrp"** or **"osmosdr"** | The GNURadio block you wish to use for the SDR. |
| device | | | **string**<br /> See the [osmosdr page](http://sdr.osmocom.org/trac/wiki/GrOsmoSDR) for supported devices and parameters. | Osmosdr device name and possibly serial number or index of the device. <br /> You only need to do add this key if there are more than one osmosdr devices being used.<br /> Example: `bladerf=00001` for BladeRF with serial 00001 or `rtl=00923838` for RTL-SDR with serial 00923838, just `airspy` for an airspy.<br />It seems that when you have 5 or more RTLSDRs on one system you need to decrease the buffer size. I think it has something to do with the driver. Try adding buflen: `"device": "rtl=serial_num,buflen=65536"`, there should be no space between buflen and the comma |
| ppm | | 0 | number | the tuning error for the SDR in ppm (parts per million), as an alternative to `error` above. Use a program like GQRX to find an accurate value. |
Expand Down Expand Up @@ -203,6 +204,45 @@ Here is a map of the different sections of the *config.json* file:
| name | ✓ | | string | the name of the plugin. This name is used to find the `<name>_plugin_new` method that creates a new instance of the plugin. |
| | | | | *Additional elements can be added, they will be passed into the `parse_config` method of the plugin.* |

##### Rdio Scanner Plugin

**Name:** rdioscanner_uploader
**Library:** librdioscanner_uploader.so

This plugin makes it easy to connect Trunk Recorder with [Rdio Scanner](https://github.com/chuot/rdio-scanner). It uploads recordings and the information about them. The following additional settings are required:

| Key | Required | Default Value | Type | Description |
| ------- | :------: | ------------- | ------ | ------------------------------------------------------------ |
| server | ✓ | | string | The URL for uploading to Rdio Scanner. The default is an empty string. It should be the same URL as the one you are using to access Rdio Scanner. |
| systems | ✓ | | array | This is an array of objects, where each is a system that should be passed to Rdio Scanner. More information about what should be in each object is in the following table. |

*Rdio Scanner System Object:*

| Key | Required | Default Value | Type | Description |
| --------- | :------: | ------------- | ------ | ------------------------------------------------------------ |
| systemId | ✓ | | number | System ID for Rdio Scanner. |
| apiKey | ✓ | | string | System-specific API key for uploading calls to Rdio Scanner. See the ApiKey section in the Rdio Scanner administrative dashboard for the value it should be. |
| shortName | ✓ | | string | This should match the shortName of a system that is defined in the main section of the config file. |



##### Example Plugin Object:

```yaml
{
"name": "rdioscanner_uploader",
"library": "librdioscanner_uploader.so",
"server": "http://127.0.0.1",
"systems": [{
"shortName": "test",
"apiKey": "fakekey",
"systemId": 411
}
```





## talkgroupsFile

Expand Down
20 changes: 20 additions & 0 deletions plugins/rdioscanner_uploader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
add_library(rdioscanner_uploader
MODULE
rdioscanner_uploader.cc
)

target_link_libraries(rdioscanner_uploader trunk_recorder_library 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} ${GNURADIO_OSMOSDR_LIBRARIES} ${LIBOP25_REPEATER_LIBRARIES} gnuradio-op25_repeater ) # gRPC::grpc++_reflection protobuf::libprotobuf)

if(NOT Gnuradio_VERSION VERSION_LESS "3.8")

target_link_libraries(rdioscanner_uploader
gnuradio::gnuradio-analog
gnuradio::gnuradio-blocks
gnuradio::gnuradio-digital
gnuradio::gnuradio-filter
gnuradio::gnuradio-pmt
)

endif()

install(TARGETS rdioscanner_uploader LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/trunk-recorder)
Loading