OP25 OP 25 multi_rx.py help

Status
Not open for further replies.

boatbod

Member
Joined
Mar 3, 2007
Messages
3,542
Location
Talbot Co, MD
If I can revive an old thread I have a few questions as I try to convert my streams from boatbod's rx.py to multi_rx.py...
If all this stuff is defined in a readme somewhere just point me there, but so far I haven't found a list of every available json settings option for multi_rx.
  • Is there an auto-tune enable setting like was added to rx.py with the -X?
  • Is there a fine tune setting(s) like -d or -q? Is it just the PPM setting? If so how does -d -100 equate to a PPM value?
  • I had -V before, is that needed/what is the json?
  • In channels, if I am using filter_typ: rc do I need "excess_bw"?
Thanks!

i. No, there's no autotune -X equivalent. I've never really been happy with it's performance and chose not to carry it forward for now.
ii. Persistent fine tune correction in multi_rx is implemented via floating-point ppm values: e.g. "0.5". When you fine tune on the terminal screen it'll show you the equivalent ppm correct in parentheses after the tuned frequency. Use this value in the cfg.json file devices section.
iii. No need for -V as it is assumed any time you enter the 'destination' for a channel. (wireshark is not supported)
iv. The "excess_bw" parameter is expected to exist in every channel definition. Frankly it should probably be defaulted, but I think if you don't have it present the code will barf upon execution.
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
144
OK thanks. Looks like I'm pretty much set up then.

I have had twice in the last 12 hours where the system was stuck on a single TGID but there was no audio on the stream, and that TG was not actually active any more. There was no Source Addr listed on the web page like there normally is but the Group Addr showed the TGID and the Active Talkgroup ID table below showed the ID assigned to a frequency. It sits there for hours with no audio. If I hit SKIP it then resumes "scanning" and works again for a while. There were two lines in the console that were suspicious around the time it happened but unfortunately a misclick and I lost it. If it happens again I'll let you know. I never had this behavior with rx.py on the same system though.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,542
Location
Talbot Co, MD
OK thanks. Looks like I'm pretty much set up then.

I have had twice in the last 12 hours where the system was stuck on a single TGID but there was no audio on the stream, and that TG was not actually active any more. There was no Source Addr listed on the web page like there normally is but the Group Addr showed the TGID and the Active Talkgroup ID table below showed the ID assigned to a frequency. It sits there for hours with no audio. If I hit SKIP it then resumes "scanning" and works again for a while. There were two lines in the console that were suspicious around the time it happened but unfortunately a misclick and I lost it. If it happens again I'll let you know. I never had this behavior with rx.py on the same system though.
If the terminal gets stuck I would recommend checking the log for "traceback" messages to see if Python crashed. Were the TSBKs incrementing or stalled? Could the tgid have been Held?
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
144
TSBKS were still increasing, thats the first thing I looked for.

When a TGID is held but not active the web display Talkgroup goes back to Control Channel, right? The TGID was showing as if it was active, both in the Talkgroup top bar and as an active talkgroup in the frequency table.

It happened last night overnight, I hit 'skip' this morning to see if that would make it continue and it did, then a few hours later it happened again.
I saw two of these on the actual text console:

r82xx_read: i2c rd failed=-7 reg=00 len=3
r82xx_set_freq: failed=-7

I pulled the latest this morning from git and built it again, I was only a few weeks behind so I think there were only 6 or 7 files updated. So far haven't seen the problem happen again but I have seen one more of those r82xx failed messages like above, so that might be a red herring. Will work on more logs/details if I see it again.
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
144
I amend my previous, it happened again and TSBKS were not incrementing, the active TGID was the only item showing active in the bottom table even though the system should have a lot of TGIDs active.

What log should I be looking at? Nothing stuck out, but its possible I wasn't capturing the right log data.

If I look at a plot it shows it is not tuned to the CC but instead on the frequency that it got stuck on with the TGID.
If I use the fine tune arrows it does nothing.
If I hit "skip" it all comes back to life, active TGIDs fill up the bottom table and TSBKS starts counting up again.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,542
Location
Talbot Co, MD
I amend my previous, it happened again and TSBKS were not incrementing, the active TGID was the only item showing active in the bottom table even though the system should have a lot of TGIDs active.

What log should I be looking at? Nothing stuck out, but its possible I wasn't capturing the right log data.

If I look at a plot it shows it is not tuned to the CC but instead on the frequency that it got stuck on with the TGID.
If I use the fine tune arrows it does nothing.
If I hit "skip" it all comes back to life, active TGIDs fill up the bottom table and TSBKS starts counting up again.
The r82xx messages are some sort of problem communicating with the RTL device. They are usually fatal, so I'm actually surprised you got the system to come back to life just by skipping. It'd be interesting to run the system at log level 5 (or maybe even 11 if you don't mind a massive file) to see what happens right when it goes to sleep.

Not that it helps you much, but I run multiple instances of multi_rx and they go for days/weeks on end with no interruption, so this would appear to be some weird set of circumstances that conspire to cause a problem.
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
144
Is there a way to set log level 5 or 11 and redirect it to a specific unique location? I can mount a share from my NAS and let it go nuts...
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,542
Location
Talbot Co, MD
Is there a way to set log level 5 or 11 and redirect it to a specific unique location? I can mount a share from my NAS and let it go nuts...
Sure... verbosity level is controlled by the "-v" option on the multi_rx.py command line and redirection happens there too.
Code:
./multi_rx.py -c cfg.json -v 10 2> /mnt/nas/big_disk/log_file_name.log
(usually the convention is `... 2> stderr.2` resulting in a file named "stderr.2" ending up in the 'apps' directory)
 

hhca

Member
Joined
Aug 9, 2019
Messages
56
Location
Australia
id been using op25 rx.py with liq service, on a non trunked p25 system. switching to multi_rx.py

do i still need the liquid audio service ? as the last line of it that had my broadcastify settings is now in config.json
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,542
Location
Talbot Co, MD
id been using op25 rx.py with liq service, on a non trunked p25 system. switching to multi_rx.py

do i still need the liquid audio service ? as the last line of it that had my broadcastify settings is now in config.json
Yes you do. See my PM
 

SDBud

Member
Joined
Dec 17, 2008
Messages
215
Location
San Diego, Ca
I've been very happy with OP25 and have it setup and running on a couple pi4's and an on old thin client running ubuntu 18.04.
I have Nooelec NESDR SMArt v4 SDR devices but I've never used multi.

I just bought a Pi 4, and got it running tonight. I have an NESDR Mini, and I want to use it on the Pi for monitoring P2 systems locally. Is there ANYWHERE that has basic first timer instructions for someone like me?? Sounds like OP25 is would be a good software choice, but WHAT parts of it do I need, and HOW do I install it (I'm fine with Windows, but totally new to Linux).
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,542
Location
Talbot Co, MD
I just bought a Pi 4, and got it running tonight. I have an NESDR Mini, and I want to use it on the Pi for monitoring P2 systems locally. Is there ANYWHERE that has basic first timer instructions for someone like me?? Sounds like OP25 is would be a good software choice, but WHAT parts of it do I need, and HOW do I install it (I'm fine with Windows, but totally new to Linux).
The basic example configs are included in the 'apps' directory of the distro. For P25 look at p25_rtl_example.json and p25_airspy_example.json
 

marklt1

Member
Feed Provider
Joined
Mar 5, 2005
Messages
60
Location
Streetsboro, OH
multi_rx.py allows you to run an arbitrary number of receivers configured to an arbitrary number of streams. There's lots of ways to slice and dice depending what hardware you have available, but if you're using low-bandwidth RTL devices you generally need one per stream.

Three-RTL, two-system with three-stream example.
Code:
{
    "channels": [
        {
            "name": "TalbotFire",
            "device": "sdr0",
            "trunking_sysname": "FiRST Talbot",
            "demod_type": "cqpsk",
            "destination": "udp://127.0.0.1:23456",
            "meta_stream_name": "stream0",
            "excess_bw": 0.2,
            "filter_type": "rc",
            "frequency": 773843750,
            "if_rate": 24000,
            "plot": "",
            "symbol_rate": 4800,
            "enable_analog": "off",
            "blacklist": "",
            "whitelist": "talbot-fire.wlist"
        },
        {
            "name": "TalbotLEO",
            "device": "sdr1",
            "trunking_sysname": "FiRST Talbot",
            "demod_type": "cqpsk",
            "destination": "udp://127.0.0.1:23466",
            "meta_stream_name": "stream1",
            "excess_bw": 0.2,
            "filter_type": "rc",
            "frequency": 773843750,
            "if_rate": 24000,
            "plot": "",
            "symbol_rate": 4800,
            "enable_analog": "off",
            "blacklist": "",
            "whitelist": "talbot-leo.wlist"
        },
        {
            "name": "DorchFire",
            "device": "sdr2",
            "trunking_sysname": "FiRST Dorchester",
            "demod_type": "cqpsk",
            "destination": "udp://127.0.0.1:23476",
            "meta_stream_name": "stream2",
            "excess_bw": 0.2,
            "filter_type": "rc",
            "frequency": 774193750,
            "if_rate": 24000,
            "plot": "",
            "symbol_rate": 4800,
            "enable_analog": "off",
            "blacklist": "",
            "whitelist": "dorc-fire.wlist"
        }
    ],
    "devices": [
        {
            "args": "rtl=0",
            "frequency": 773843750,
            "gains": "LNA:36",
            "name": "sdr0",
            "offset": 0,
            "ppm": 0.0,
            "rate": 1000000,
            "tunable": true
        },
        {
            "args": "rtl=1",
            "frequency": 773843750,
            "gains": "LNA:36",
            "name": "sdr1",
            "offset": 0,
            "ppm": 0.0,
            "rate": 1000000,
            "tunable": true
        },
        {
            "args": "rtl=2",
            "frequency": 773843750,
            "gains": "LNA:47",
            "name": "sdr2",
            "offset": 0,
            "ppm": -1.75,
            "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",
                "crypt_behavior": 2
            },
            {
                "nac": "0x4a5",
                "sysname": "FiRST Dorchester",
                "control_channel_list": "774.19375",
                "whitelist": "",
                "tgid_tags_file": "first.tsv",
                "crypt_behavior": 2
            }
        ]
    },
    "metadata": {
        "module": "icemeta.py",
        "streams": [
            {
                "stream_name": "stream0",
                "icecastServerAddress": "audio3.broadcastify.com:80",
                "icecastMountpoint": "xxxxxxxx",
                "icecastMountExt": ".xspf",
                "icecastPass": "yyyyyyy",
                "delay": 0.0
            },
            {
                "stream_name": "stream1",
                "icecastServerAddress": "audio9.broadcastify.com:80",
                "icecastMountpoint": "aaaaaaaa",
                "icecastMountExt": ".xspf",
                "icecastPass": "bbbbbb",
                "delay": 0.0
            },
            {
                "stream_name": "stream2",
                "icecastServerAddress": "audio1.broadcastify.com:80",
                "icecastMountpoint": "cccccccccc",
                "icecastMountExt": ".xspf",
                "icecastPass": "dddddddd",
                "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.1.7:8081",
        "curses_plot_interval": 0.1,
        "http_plot_interval": 1.0,
        "http_plot_directory": "../www/images"
    }
}


Is there a way to place a second output stream to the same channel in the JSON configuration for multi_rx.py?

For example, I am sending an audio stream to Icecast through pulseaudio (port 23456)
I would like to send a second audio stream to my desktop PC where I could post-process for archival and other purposes.

Below doesn't work, but I just used it as an example of what I was thinking of.

"channels": [
{
"device": "channel0",
"meta_stream_name": "stream0",
"trunking_sysname": "trunking_0",
"demod_type": "cqpsk",
"destination": "udp://127.0.0.1:23476",
"destination": "udp://10.1.1.2:23194",

"excess_bw": 0.2,
"filter_type": "rc",
"frequency": 772000000,
"if_rate": 24000,
"name": "Cuyahoga Co Simul 2/1 - Ohio ",
"plot": "",
"symbol_rate": 4800,
"raw_output": "",
"raw_input": "",
"raw_seek": 0,
"enable_analog": "off",
"nbfm_deviation": 4000,
"nbfm_squelch": -60
}
],
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,542
Location
Talbot Co, MD
Can you output a separate stream from a moto I use for a fire stream along side liquidsoap /op25? or would I need a separate sound card to do it?
Liquidsoap doesn't care where the streams originate or are destined to go; you just have to write a more complex script that inputs multiple sources and then outputs them however you decide. You can read up on documentation here: Liquidsoap

Although I'm not entirely clear what you're trying to do, it sounds like you would define input1 to be op25 and input2 to be the sound card. You can then either mix the sources into a single output stream, or keep them separate and output to different destinations. If you feel like it you can take the same input and output it to multiple locations.
 
Joined
Sep 15, 2010
Messages
41
Hello again!

If I wanted to use multi_rx.py to test my configuration by sending audio from multiple rtls to the local speakers, would that be as simple as changing config.json "device_name" in "audio" "instances" from "pulse" to "ALSA" ?
 
Status
Not open for further replies.
Top