OP25 Two different P25 P2 systems on one RPI?

ewh01

Member
Premium Subscriber
Joined
Jul 9, 2006
Messages
59
Location
vineland, nj
I have checked past posts, but none answered my question. Quite possibly, I used the wrong search terms.

I hope to listen to two different county systems, both P25 phase 2, unique NACs, frequency groups, TGIDs, etc., on one RPi (Pi 5) running OP25. Is this possible in multipy? Or would I have to run separate instances of multipy or rcpy?

If this can be done in a single multi-instance, does anyone have a sample file I could use as a reference?

Thanks
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,430
Location
Talbot Co, MD
I have checked past posts, but none answered my question. Quite possibly, I used the wrong search terms.

I hope to listen to two different county systems, both P25 phase 2, unique NACs, frequency groups, TGIDs, etc., on one RPi (Pi 5) running OP25. Is this possible in multipy? Or would I have to run separate instances of multipy or rcpy?

If this can be done in a single multi-instance, does anyone have a sample file I could use as a reference?

Thanks
Yes it can be done, but a RPi isn't necessarily the best choice of hardware due to low cpu horsepower.

For two completely separate P25 systems you will need 2 RTL dongles. The op25 software configuration will either be multi_rx.py with two Channels and two Trunking entries in the cfg.json file, or two separate instances of rx.py with the various trunk.tsv files etc. In either case, make sure you utilize different port ranges for the UDP audio.

Here is an example of a two-system, three stream configuration. In the example below I'm using two physical sdr devices (one RTL, one Airspy Mini). Audio goes via liquidsoap, but you could easily have more entries in the 'audio' section instead.

Code:
{
    "channels": [
        {
            "name": "TB Fire", 
            "device": "sdr1",
            "trunking_sysname": "FiRST Talbot",
            "demod_type": "cqpsk", 
            "cqpsk_tracking": true,
            "tracking_threshold": 5000,
            "tracking_feedback": 0.85,
            "destination": "udp://127.0.0.1:23456", 
            "meta_stream_name": "stream0",
            "excess_bw": 0.2, 
            "filter_type": "rc", 
            "if_rate": 24000, 
            "plot": "",
            "symbol_rate": 4800,
            "enable_analog": "off",
            "blacklist": "",
            "whitelist": "talbot-fire.wlist"
        },
        {
            "name": "TB LEO",
            "device": "sdr0",
            "trunking_sysname": "FiRST Talbot",
            "demod_type": "cqpsk", 
            "cqpsk_tracking": true,
            "tracking_threshold": 5000,
            "tracking_feedback": 0.85,
            "destination": "udp://127.0.0.1:23466",
            "meta_stream_name": "stream1",
            "excess_bw": 0.2, 
            "filter_type": "rc", 
            "if_rate": 24000,
            "plot": "",
            "symbol_rate": 4800,
            "enable_analog": "off",
            "blacklist": "",
            "whitelist": "talbot-leo.wlist"
        },
        {
            "name": "DR Fire", 
            "device": "sdr0",
            "trunking_sysname": "FiRST Dorchester",
            "demod_type": "cqpsk", 
            "cqpsk_tracking": true,
            "tracking_threshold": 5000,
            "tracking_feedback": 0.85,
            "destination": "udp://127.0.0.1:23476", 
            "meta_stream_name": "stream2",
            "excess_bw": 0.2, 
            "filter_type": "rc", 
            "if_rate": 24000, 
            "plot": "",
            "symbol_rate": 4800,
            "enable_analog": "off",
            "blacklist": "",
            "whitelist": "dorc-fire.wlist"
        }
    ], 
    "devices": [
        {
            "args": "airspy=0", 
            "frequency": 772025000, 
            "gains": "LNA:15,MIX:15,IF:10", 
            "name": "sdr0", 
            "offset": 0, 
            "ppm": 1.15, 
            "rate": 6000000, 
            "tunable": false
        },
    {
            "args": "rtl=0", 
            "frequency": 773000000, 
            "gains": "LNA:39", 
            "name": "sdr1", 
            "offset": 0, 
            "ppm": 0.00, 
            "rate": 1000000, 
            "tunable": true
    }
    ],
    "trunking": {
        "module": "tk_p25.py",
        "chans": [
            {
                "nac": "0x4a6",
                "sysname": "FiRST Talbot",
                "control_channel_list": "773.84375",
                "whitelist": "",
                "tgid_tags_file": "first.tsv",
                "rid_tags_file": "first-rids.tsv",
                "tdma_cc": false,
                "crypt_behavior": 2
            },
            {
                "nac": "0x4a5",
                "sysname": "FiRST Dorchester",
                "control_channel_list": "774.19375",
                "whitelist": "",
                "tgid_tags_file": "first.tsv",
                "rid_tags_file": "first-rids.tsv",
                "crypt_behavior": 2
            }
        ]
    },
    "metadata": {
        "module": "icemeta.py",
        "streams": [
            {
                "stream_name": "stream0",
                "meta_format_idle": "[idle]",
                "meta_format_tgid": "[%TGID%]",
                "meta_format_tag":  "[%TGID%] %TAG%",
                "meta_format_rid":  "@ [%RID%]",
                "meta_format_rtag": "@ [%RID%] %RTAG%",
                "icecastServerAddress": "audio3.broadcastify.com:80",
                "icecastMountpoint": "555555",
                "icecastMountExt": ".xspf",
                "icecastPass": "zzzzzzzz",
                "delay": 0.0
            },
            {
                "stream_name": "stream1",
                "meta_format_idle": "[idle]",
                "meta_format_tgid": "[%TGID%]",
                "meta_format_tag":  "[%TGID%] %TAG%",
                "meta_format_rid":  "@ [%RID%]",
                "meta_format_rtag": "@ [%RID%] %RTAG%",
                "icecastServerAddress": "audio9.broadcastify.com:80",
                "icecastMountpoint": "654321",
                "icecastMountExt": ".xspf",
                "icecastPass": "yyyyyyyy",
                "delay": 0.0
            },
            {
                "stream_name": "stream2",
                "meta_format_idle": "[idle]",
                "meta_format_tgid": "[%TGID%]",
                "meta_format_tag":  "[%TGID%] %TAG%",
                "meta_format_rid":  "@ [%RID%]",
                "meta_format_rtag": "@ [%RID%] %RTAG%",
                "icecastServerAddress": "audio1.broadcastify.com:80",
                "icecastMountpoint": "123456",
                "icecastMountExt": ".xspf",
                "icecastPass": "xxxxxxx",
                "delay": 0.0
            }
        ]
    },
    "audio": {
        "module": "sockaudio.py",
        "instances": [
            {
                "instance_name": "",
                "device_name": "pulse",
                "udp_port": 23456,
                "audio_gain": 1.0,
                "number_channels": 1
            }
        ]
    },
    "terminal": {
        "module": "terminal.py",
        "terminal_type": "http:192.168.3.7:8081",
        "curses_plot_interval": 0.1,
        "http_plot_interval": 1.0,
        "http_plot_directory": "../www/images"
    }
}
 

ewh01

Member
Premium Subscriber
Joined
Jul 9, 2006
Messages
59
Location
vineland, nj
Excellent, thanks for the quick reply. So even a 4Gig RPi 5 might not have enough HP?

Also, I don't need to stream it; I'm just looking for headphone port output. Would not using Icecast reduce the CPU load?
 
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,430
Location
Talbot Co, MD
Excellent, thanks for the quick reply. So even a 4Gig RPi 5 might not have enough HP?

Also, I don't need to stream it; I'm just looking for headphone port output. Would not using Icecast reduce the CPU load?
Icecast won't reduce the load, it would probably increase it slightly.
2 streams on a Pi are do-able, with 2 RTL devices running at 1Mhz each.
 
Top