Skip to content

Configuring a System

rwcts edited this page Nov 28, 2020 · 6 revisions

Research

The first step of recording a radio system is learning about a system. Radio Reference is a great place to do that. Search for your location and then select the system you are trying to record. Take note of the control channels that the system uses. With any digital trunked system, you will need to write down any control channels, and alternate control channels.

Tuning the source

Frequency

The next step is to try and receive the control channel for the trunked system, using http://gqrx.dk/. GQRX visualizes what your SDR is receiving and makes it easy to fine-tune the system and associated spectrum. While the system you are trying to tune in may have a lot of control channels, it is generally only transmitting on one. Type in the different frequencies to look for the active control channel. Control channels are always broadcasting, and show up as a persistent line on the waterfall graph.

There is a good chance that when you tune to the active control channel, it will actually be a few thousand Hz above or below the frequency you tuned to. This is because the tuners on most SDRs are not super accurate and have frequency drifting. Click on the transmission to get the frequency that your SDR thinks it is at.

Trunk Recorder needs to know the amount of tuning error for your SDR in order to successfully tune-in to transmissions. To calculate this, take frequency that the SDR was tuned to... for example 854.548MHz, and subtract the actual frequency for the channel, 854.5625MHz.

854.548 - 854.5625 = -0.0145 MHz

You then have to convert that from MHz to Hz, so multiply your answer by 1,000,000:

-0.0145 * 1000000 = -14500 Hz

The amount of tuning error is -14500Hz, so that would go under error: for this source in the config.json file.

NOTE: In some instances, an alternative is to use ppm correction rather than the error configuration option.

Alternatively, you can use this tool here: http://garvas.org/trunk-recorder/ to obtain RTL-SDR dongle/array configurations.

Gain

After you have figured out the amount of tuning error, you now need to find the optimal amount of receiver gain to use.

Gain is a measure of how much amplification is required for the received signal, and on some SDRs, there are multiple places along the receive path where a signal can be amplified.

If there is not enough gain, the signal will not be strong enough to decode, and Trunk-Recorder will fail to lock to the control channel. If there is too much gain, it can distort the signal, there is also the chance you might be causing harm to your SDR reception device. Setting the gain too high will result in amplification of the background RF and create noise.

Generally, you can mess around with the gain slider in GQRX until the signal looks well defined and there isn't too much noise. If it is impossible to get a well-defined signal, it could be a sign that you have one or more issues: a better antenna that is tuned to the needed frequency range, moving the antenna to a new location, or using a different SDR device. There could also be some strong interference nearby, which can introduce a lot of background noise making it tough to distinguish the signal. Various computer hardware, poorly grounded hardware, and cheaply made USB hubs can be notorious for producing RF noise across the entire spectrum.

Once you find the correct gain settings, use them for this source in the config.json file.

Center Frequency

When you set the center frequency for a source, you are picking the frequency that will be in the middle of the block of spectrum that you are recording. Half of the bandwidth for the device will be above that frequency and the other half below.

For example, if you are using a HackRF, with 8MHz of bandwidth, and you tune the center frequency to 854MHz, it would cover from 850.0MHz to 858.0MHz.

To find your ideal center frequency, look at what the lowest frequency you want to cover is and what the highest is. The sample rate should be higher than the difference between the low and high frequency. Just about any SDR does not record the best near the edge/fringe of the block of the spectrum that they are configured to monitor and ultimately record from. So set a slightly higher sample rate than needed! Also, some SDRs mess up the center frequency or begin to slightly drift with time, ensure the center frequency doesn't land on a channel you are trying to record.

Multiple Sources

If the low frequency and high frequency of the system you are trying to capture is greater than the amount of bandwidth your SDR can capture, you need to use multiple SDRs.

In addition to being able to use a cheaper SDR, it also helps with general performance of the devices. When a single SDR is used, each of the Recorders gets fed all of the sampled signals. Each Recorder needs to cut down the multi-mega samples per second into a small 12.5Khz or even 6.25Khz(!) slivers.

When you use multiple SDRs, each SDR is capturing only a partial slice of the system so the recorders have to cut down a much smaller amount of sample to get to the sliver they are interested in. This ultimately denotes that you can have a lot more recorders running!

To use multiple SDRs, simply define additional Sources in the Source array. The config-multi-rtl.json.sample has an example of how to do this. In order to tell the different SDRs apart and make sure they get the right error correction value, give them a serial number using the rtl_eeprom -s command and then specifying that number in the device setting for that Source, rtl=2.

Here is an example of source section for the HackRF I was tuning:

"sources": [
{           "center": 854000000.0,
            "rate": 8000000.0,
            "error": -14500,
            "gain": 14,
            "ifGain": 24,
            "bbGain": 32,
            "digitalRecorders": 4,
            "analogRecorders": 4,
            "fskGain": 0.70,
            "modulation": "fsk4",
            "driver": "osmosdr"
    }
]

Here is an example of config file for the RTL_SDR system conventionalP25 (11/28/2020):

{
    "ver": 2,
    "sources": [{
        "center": 155130000.0,
        "rate": 1024000.0,
        "gain": 15,
	"mixGain": 10,
        "lnaGain": 15,
        "antenna": "RX2",
	"digitalLevels": 3,
        "digitalRecorders": 4,
        "driver": "osmosdr",
        "device": "rtl=00000200,buflen=65536"
    }],
    "systems": [{
	"shortName": "piercecty",
        "modulation": "fsk4",
        "squelch": -45.0,
	"broadcastifyApiKey": "KEY HERE",
	"broadcastifySystemId": "ID HERE",
	"audioArchive": "false",
        "channels": [155130000],
	"delayCreateOutput": true,
        "type": "conventionalP25"
	}],
	"broadcastifyCallsServer": "https://api.broadcastify.com/call-upload",
	"controlWarnRate": "10",
	"callTimeout": "1"
}

Here is an example of config file for the RTL_SDR system P25 (11/28/2020):

{
    	"ver": 2,
	"sources": [{
		"center": 139900000.0,
		"rate": 2048000,
		"ppm": 0.0,
		"gain": 30.0,
		"digitalLevels": 5,
		"digitalRecorders": 5,
		"driver": "osmosdr",
		"device": "rtl=00000300,buflen=65536"
	}],
	"systems": [{
		"control_channels": [139012500, 139737500, 139612500, 138052500, 141512500],
		"type": "p25",
		"shortName": "PCTY",
		"broadcastifyApiKey": "KEY HERE",
		"broadcastifySystemId": "ID HERE",
		"audioArchive": "false",
		"modulation": "fsk4"
	}],
	"broadcastifyCallsServer": "https://api.broadcastify.com/call-upload",
	"controlWarnRate": "10",
	"callTimeout": "3"
}