Trunk-recorder config help with multiple Airspy SDRs

IcomIcR20

Member
Premium Subscriber
Joined
Jun 16, 2014
Messages
974
Reaction score
512
Hello all,

I have successfully gotten Trunk-recorder on a Raspberry Pi 4 to work with a single Airspy mini SDR. Now, I am attempting to run two at the same time to monitor a site with frequencies that exceed the bandwidth of a single SDR. Everything works well with a single SDR (apart from some traffic getting missed), but when I add a second SDR to the mix, it seems that no traffic is being received while monitoring the exact same site.

Here is my basic config.json file for testing:
JSON:
{
    "ver": 2,
    "sources": [{
        "center": 853000000.0,
        "rate": 6000000,
        "error": -167,
        "lnaGain": 15,
                "mixGain": 7,
                "ifGain": 7,
        "digitalLevels": 4,
        "digitalRecorders": 5,
        "driver": "osmosdr",
        "device": "airspy=0x10A862DC351E2463"
    }, {
        "center": 858000000.0,
        "rate": 6000000,
        "error": -300,
        "lnaGain": 15,
                "mixGain": 7,
                "ifGain": 7,
        "digitalLevels": 4,
        "digitalRecorders": 5,
        "driver": "osmosdr",
        "device": "airspy=0x10A862DC346A2263"
    }],
    "systems": [{
        "control_channels": [859787500],
        "type": "p25",
        "shortName": "VIPER CLEM",
        "modulation": "qpsk"
    }]
}

It seems that both SDRs are opened correctly, and I do not get any initial error messages, as can be seen in the following excerpt from the log file. However, after the software attempts to start recording traffic, it acts as though it is not receiving control channel data. Does anyone have any suggestions? I am new to Trunk-recorder, so it is highly likely I am overlooking something simple. Any help would be much appreciated!

-------------------------------------
SOURCES
-------------------------------------

[2024-12-25 12:49:35.196965] (info) Driver: osmosdr
[2024-12-25 12:49:35.197004] (info) Center: 8.530000e+08
[2024-12-25 12:49:35.197062] (info) Rate: 6000000
[2024-12-25 12:49:35.197118] (info) Error: -167
[2024-12-25 12:49:35.197168] (info) PPM Error: 0
[2024-12-25 12:49:35.197211] (info) Auto gain control: false
[2024-12-25 12:49:35.197251] (info) Gain: 0
[2024-12-25 12:49:35.197293] (info) IF Gain: 7
[2024-12-25 12:49:35.197341] (info) BB Gain: 0
[2024-12-25 12:49:35.197384] (info) LNA Gain: 15
[2024-12-25 12:49:35.197432] (info) PGA Gain: 0
[2024-12-25 12:49:35.197475] (info) TIA Gain: 0
[2024-12-25 12:49:35.197516] (info) MIX Gain: 7
[2024-12-25 12:49:35.197563] (info) VGA1 Gain: 0
[2024-12-25 12:49:35.197606] (info) VGA2 Gain: 0
[2024-12-25 12:49:35.197648] (info) Idle Silence: false
[2024-12-25 12:49:35.197688] (info) Digital Recorders: 5
[2024-12-25 12:49:35.197732] (info) Debug Recorder: false
[2024-12-25 12:49:35.197773] (info) SigMF Recorders: 0
[2024-12-25 12:49:35.197812] (info) Analog Recorders: 0
[2024-12-25 12:49:35.197891] (info) Source Device: airspy=0x10A862DC351E2463
gr-osmosdr 0.1.5 (0.1.5) gnuradio 3.7.13.4
built-in source types: file fcd rtl rtl_tcp uhd hackrf rfspace airspy soapy redpitaya
Attempting to open airspy by s/n= 0x10A862DC351E2463
Opened Device Serial Number= 0x10A862DC351E2463
Using AirSpy MINI v1.0.0-rc10-6-g4008185 2020-05-08, samplerates: 3M 6M
[2024-12-25 12:49:35.214692] (info) SOURCE TYPE OSMOSDR (osmosdr)
[2024-12-25 12:49:35.214775] (info) Setting sample rate to: 6000000
[2024-12-25 12:49:35.215448] (info) Actual sample rate: 6000000
[2024-12-25 12:49:35.215506] (info) Tuning to 8.529998e+08
[2024-12-25 12:49:35.215783] (info) Gain Stage: LNA supported values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[2024-12-25 12:49:35.215910] (info) Gain Stage: MIX supported values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[2024-12-25 12:49:35.216002] (info) Gain Stage: IF supported values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[2024-12-25 12:49:35.216044] (info) Max Frequency: 8.559500e+08
[2024-12-25 12:49:35.216096] (info) Min Frequency: 8.500500e+08
[2024-12-25 12:49:35.216267] (info) IF Gain set to: 7
[2024-12-25 12:49:35.216424] (info) MIX Gain set to: 7
[2024-12-25 12:49:35.216579] (info) LNA Gain set to: 15
[2024-12-25 12:49:35.216637] (info) Auto gain control is OFF
[2024-12-25 12:49:35.216686] (info) Setting antenna to [RX]
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.217603] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.242263] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.254029] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.278245] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.289147] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.314930] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.326970] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.347312] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.358606] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.390782] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
[2024-12-25 12:49:35.408020] (info)
-------------------------------------


[2024-12-25 12:49:35.408163] (info) Driver: osmosdr
[2024-12-25 12:49:35.408206] (info) Center: 8.580000e+08
[2024-12-25 12:49:35.408281] (info) Rate: 6000000
[2024-12-25 12:49:35.408339] (info) Error: -300
[2024-12-25 12:49:35.408390] (info) PPM Error: 0
[2024-12-25 12:49:35.408433] (info) Auto gain control: false
[2024-12-25 12:49:35.408475] (info) Gain: 0
[2024-12-25 12:49:35.408518] (info) IF Gain: 7
[2024-12-25 12:49:35.408566] (info) BB Gain: 0
[2024-12-25 12:49:35.408609] (info) LNA Gain: 15
[2024-12-25 12:49:35.408658] (info) PGA Gain: 0
[2024-12-25 12:49:35.408702] (info) TIA Gain: 0
[2024-12-25 12:49:35.408744] (info) MIX Gain: 7
[2024-12-25 12:49:35.408792] (info) VGA1 Gain: 0
[2024-12-25 12:49:35.408835] (info) VGA2 Gain: 0
[2024-12-25 12:49:35.408878] (info) Idle Silence: false
[2024-12-25 12:49:35.408919] (info) Digital Recorders: 5
[2024-12-25 12:49:35.408965] (info) Debug Recorder: false
[2024-12-25 12:49:35.409006] (info) SigMF Recorders: 0
[2024-12-25 12:49:35.409046] (info) Analog Recorders: 0
[2024-12-25 12:49:35.409092] (info) Source Device: airspy=0x10A862DC346A2263
gr-osmosdr 0.1.5 (0.1.5) gnuradio 3.7.13.4
built-in source types: file fcd rtl rtl_tcp uhd hackrf rfspace airspy soapy redpitaya
Attempting to open airspy by s/n= 0x10A862DC346A2263
Opened Device Serial Number= 0x10A862DC346A2263
Using AirSpy MINI v1.0.0-rc10-6-g4008185 2020-05-08, samplerates: 3M 6M
[2024-12-25 12:49:35.424702] (info) SOURCE TYPE OSMOSDR (osmosdr)
[2024-12-25 12:49:35.424780] (info) Setting sample rate to: 6000000
[2024-12-25 12:49:35.425503] (info) Actual sample rate: 6000000
[2024-12-25 12:49:35.425560] (info) Tuning to 8.579997e+08
[2024-12-25 12:49:35.425830] (info) Gain Stage: LNA supported values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[2024-12-25 12:49:35.425925] (info) Gain Stage: MIX supported values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[2024-12-25 12:49:35.426016] (info) Gain Stage: IF supported values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[2024-12-25 12:49:35.426058] (info) Max Frequency: 8.609500e+08
[2024-12-25 12:49:35.426110] (info) Min Frequency: 8.550500e+08
[2024-12-25 12:49:35.426306] (info) IF Gain set to: 7
[2024-12-25 12:49:35.426469] (info) MIX Gain set to: 7
[2024-12-25 12:49:35.426655] (info) LNA Gain set to: 15
[2024-12-25 12:49:35.426705] (info) Auto gain control is OFF
[2024-12-25 12:49:35.426748] (info) Setting antenna to [RX]
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.427299] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.450233] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.460784] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.480996] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.491894] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.520233] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.536853] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.555674] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.567855] (info) P25 Recorder two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.590596] (info) P25 Recorder ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
[2024-12-25 12:49:35.601473] (info)
-------------------------------------


[2024-12-25 12:49:35.601585] (info)

-------------------------------------
INSTANCE
-------------------------------------

[2024-12-25 12:49:35.601666] (info) Capture Directory: /home/pi/bcfy/trunk-recorder
[2024-12-25 12:49:35.601712] (info) Upload Server:
[2024-12-25 12:49:35.601753] (info) Broadcastify Calls Server:
[2024-12-25 12:49:35.601795] (info) Status Server:
[2024-12-25 12:49:35.601835] (info) Instance Key:
[2024-12-25 12:49:35.601875] (info) Instance Id:
[2024-12-25 12:49:35.601917] (info) Broadcast Signals: false
[2024-12-25 12:49:35.601959] (info) Default Mode: digital
[2024-12-25 12:49:35.602000] (info) Call Timeout (seconds): 3
[2024-12-25 12:49:35.602041] (info) Log to File: false
[2024-12-25 12:49:35.602081] (info) Control channel warning rate: 10
[2024-12-25 12:49:35.602122] (info) Control channel retune limit: 0
[2024-12-25 12:49:35.602161] (info) Frequency format: 0
[2024-12-25 12:49:35.602202] (info) Status as String: true
[2024-12-25 12:49:35.602242] (info) Log Level: info
[2024-12-25 12:49:35.602329] (info) [VIPER CLEM] Started with Control Channel: 8.597875e+08
Decim: 125 Decim2: 2
[2024-12-25 12:49:35.602840] (info) P25 Trunking two-stage decimator - Initial decimated rate: 48000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 6000000
[2024-12-25 12:49:35.621405] (info) P25 Trunking ARB - Initial Rate: 6000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
[2024-12-25 12:49:38.008950] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:49:38.010053] (error) [VIPER CLEM] Control Channel Message Decode Rate: 0.666667/sec, count: 2
[2024-12-25 12:49:41.000611] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:49:41.001449] (error) [VIPER CLEM] Control Channel Message Decode Rate: 1/sec, count: 3
[2024-12-25 12:49:44.004667] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:49:44.005187] (error) [VIPER CLEM] Control Channel Message Decode Rate: 1/sec, count: 3
[2024-12-25 12:49:47.007927] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:49:47.008101] (error) [VIPER CLEM] Control Channel Message Decode Rate: 0.666667/sec, count: 2
[2024-12-25 12:49:50.008716] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:49:50.008886] (error) [VIPER CLEM] Control Channel Message Decode Rate: 1/sec, count: 3
[2024-12-25 12:49:53.007952] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:49:53.008150] (error) [VIPER CLEM] Control Channel Message Decode Rate: 1/sec, count: 3
[2024-12-25 12:49:56.009409] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:49:56.009837] (error) [VIPER CLEM] Control Channel Message Decode Rate: 1/sec, count: 3
[2024-12-25 12:49:59.007307] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:49:59.048841] (error) [VIPER CLEM] Control Channel Message Decode Rate: 1/sec, count: 3
[2024-12-25 12:50:02.003208] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:50:02.003766] (error) [VIPER CLEM] Control Channel Message Decode Rate: 1/sec, count: 3
[2024-12-25 12:50:05.004783] (error) [VIPER CLEM] There is only one control channel defined
[2024-12-25 12:50:05.004980] (error) [VIPER CLEM] Control Channel Message Decode Rate: 1/sec, count: 3
[2024-12-25 12:50:08.007081] (error) [VIPER CLEM] There is only one control channel defined
 

IcomIcR20

Member
Premium Subscriber
Joined
Jun 16, 2014
Messages
974
Reaction score
512
Just to add a little additional information:

My first thought was that adding a second SDR meant that there were simply too many resources being used. So, to check this, I noted that when a single SDR is used at a 6 MHz bandwidth, the process uses about 150% CPU usage and behaves normally. I then modified the above JSON file so that each SDR was operating at only 3 MHz bandwidth since 6 MHz was a bit overkill. Given that configuration, the CPU usage was about 130% (slightly lower than when a single SDR was used at 6 MHz).

1735158245331.png
 

C_615

Member
Premium Subscriber
Joined
Jul 10, 2015
Messages
85
Reaction score
26
I ran into the same problem. If my memory is correct, Trunk-Recorder could not support multiple Airspy devices “out of the box”. It seems like there was a Docker Container version that included the code that would support it but I have never understood how to use Docker containers so I gave up on moved on to SDR-Trunk. All this was before Trunk-Recorder 5.0 was released. It would be interesting to know if version 5.0 includes the functionality that was in the Docker Container.
 

IcomIcR20

Member
Premium Subscriber
Joined
Jun 16, 2014
Messages
974
Reaction score
512
I ran into the same problem. If my memory is correct, Trunk-Recorder could not support multiple Airspy devices “out of the box”. It seems like there was a Docker Container version that included the code that would support it but I have never understood how to use Docker containers so I gave up on moved on to SDR-Trunk. All this was before Trunk-Recorder 5.0 was released. It would be interesting to know if version 5.0 includes the functionality that was in the Docker Container.
After doing some research, I believe that is likely the issue. I see now that the newly-released Broadcastify image includes this fix, so I am attempting to set up the new image. However, I am running into some issues which I am about to post about in this thread: Updating Broadcastify Pi Image
 

IcomIcR20

Member
Premium Subscriber
Joined
Jun 16, 2014
Messages
974
Reaction score
512
Well, I believe I found the issue:

The good news is that even the previous image version does actually support multiple Airspy SDRs. The bad news is that it seems that the Raspberry Pi 4B simply cannot handle 2 Airspys at 6 MHz. However, it does seem to work with 3 Airspys (two at 3 MHz and one at 6 MHz), interestingly enough.

I also discovered that when operating at 3 MHz, your actual usable bandwidth is only about 2.4 MHz, and it just so happened that my control channel fell just above this cutoff. After making some adjustments, I am now receiving traffic error-free.
 

mtindor

FMP24 PRO USER
Database Admin
Joined
Dec 5, 2006
Messages
11,564
Reaction score
2,798
Location
Carroll Co OH / EN90LN
Well, I believe I found the issue:

The good news is that even the previous image version does actually support multiple Airspy SDRs. The bad news is that it seems that the Raspberry Pi 4B simply cannot handle 2 Airspys at 6 MHz. However, it does seem to work with 3 Airspys (two at 3 MHz and one at 6 MHz), interestingly enough.

I also discovered that when operating at 3 MHz, your actual usable bandwidth is only about 2.4 MHz, and it just so happened that my control channel fell just above this cutoff. After making some adjustments, I am now receiving traffic error-free.

I'm pretty sure that for both Airspys and dongles (and maybe SDRPlay devices too), the usable bandwidth is about 80% of what you set it to. I always account for that. Performance on the 10% on either side is significantly down.

My experience with any PI (even up to the latest) is that they simply don't have the guts to run OP25 and monitor a lot of bandwidth without CPU starvation. I finally gave up on them. I've tried some various other ones too, like the Rock devices and they suffer a similar fate. They just don't have the juice for serious work.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,595
Reaction score
997
Location
Talbot Co, MD
I'm pretty sure that for both Airspys and dongles (and maybe SDRPlay devices too), the usable bandwidth is about 80% of what you set it to. I always account for that. Performance on the 10% on either side is significantly down.
Yes, there is noticeable roll-off at the edges of the sample space with both Airspy and RTL devices. Here you can see it with an Airspy running at 6Mhz with op25.

Screenshot from 2024-12-26 19-17-35.png
 

IcomIcR20

Member
Premium Subscriber
Joined
Jun 16, 2014
Messages
974
Reaction score
512
Yes, I noticed the roll-off once I checked out the spectrum in GQRX. Definitely something for me to be mindful of going forward. My RSP1a has some roll-off too, but I cannot recall at exactly what point it starts becoming noticeable.
 

blantonl

Founder and CEO
Staff member
Super Moderator
Joined
Dec 9, 2000
Messages
11,487
Reaction score
6,419
Location
Dallas, TX
Get a Pi5 with the latest Broadcastify image running trunk-recorder 5 with the multi-air spy patches and you’ll be in business
 
Top