multi_rx.py JSON files

k7dq

Member
Premium Subscriber
Joined
Dec 22, 2016
Messages
6
Location
Clinton, Ut
Is there any documentation out there which defines each of the parameters located in the json files for Boatbod version of the multi_rx.py program?
I have looked at the p25_rtl_example.json and some of the values make sense and others are undecipherable.
I am looking for a listing of all the parameters with an explanation and if there are only certain valid values, then what are those values (like demod_type is either cqpsk or fsk4 or fsk)
Thanks
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Is there any documentation out there which defines each of the parameters located in the json files for Boatbod version of the multi_rx.py program?
I have looked at the p25_rtl_example.json and some of the values make sense and others are undecipherable.
I am looking for a listing of all the parameters with an explanation and if there are only certain valid values, then what are those values (like demod_type is either cqpsk or fsk4 or fsk)
Thanks
No, there's no documentation other than the python code itself.
What in particular has got your interest?
 

k7dq

Member
Premium Subscriber
Joined
Dec 22, 2016
Messages
6
Location
Clinton, Ut
i have been reading that future development/support is on going for multi_rx.py instead of rx.py. therefore i thought i would try to migrate from rx.py to the multi version. i was able to hear some voice but the control channel did not seem to sync up. I assumed that a single system could be set up in multi.
First question - demod_type- in rx.py i used C4FM but that is not available in multi, so i changed it to cqpsk. Is this my problem?
Perhaps you may have a suggestion for json values based on my rx.py vaules.
my .sh file (the control channel keeps moving around but yesterday it was 410.1625

#! /bin/sh
cd /home/pi/op25/op25/gr-op25_repeater/apps
./rx.py --args 'rtl' -N 'LNA:47' -S 2400000 -f 410.1625e6 -l 'http:0.0.0:8080' -o 25000 -q -1 -T trunk_hill_field.tsv -V -2 -U 2> stderr.2

the trunk_hill_field.tsv contents:
Sysname Control Channel List Offset NAC Modulation TGID Tags File Whitelist Blacklist Center Frequency
Hill Field 410.1625,406.5625,406.9625,407.3625,407.7625,408.1625,408.5625,408.9625,409.3625,409.7625 0 0xa C4FM hill.tsv

based on these values i have been guessing on some of the json values. in rx.py what are the equivalents in the json ? -S -o -q -1 -V -2 -U

Thanks
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
922
Location
NE Wisconsin
Here's a JSON file that's based on your rx.py command line to help get you started.

JSON:
{
    "channels": [
        {
            "name": "Voice_ch1",
            "device": "sdr0",
            "trunking_sysname": "Hill AFB",
            "meta_stream_name": "stream_0",
            "demod_type": "cqpsk",
            "cqpsk_tracking": true,
            "tracking_threshold": 120,
            "tracking_feedback": 0.75,
            "destination": "udp://127.0.0.1:23450",
            "excess_bw": 0.2,
            "filter_type": "rc",
            "if_rate": 24000,
            "plot": "",
            "symbol_rate": 4800,
            "enable_analog": "off",
            "blacklist": "",
            "whitelist": "",
            "crypt_keys": ""
        }
            ],
    "devices": [
        {
            "args": "rtl=0",
            "gains": "LNA:47",
            "gain_mode": false,
            "name": "sdr0",
            "offset": 0,
            "ppm": -1.0,
            "rate": 1000000,
            "usable_bw_pct": 0.65,
            "tunable": true
        }
     ],
    "trunking": {
        "module": "tk_p25.py",
        "chans": [
            {
                "nac": "0xa",
                "sysname": "Hill AFB",
                "control_channel_list": "406.925,409.7625,410.1625",
                "whitelist": "",
                "blacklist": "",
                "tgid_tags_file": "hill.tsv",
                "rid_tags_file": "",
                "tdma_cc": false,
                "crypt_behavior": 2
            }
        ]
    },
    "metadata": {
        "module": "",
        "streams": [
            {
                "stream_name": "stream_0",
                "meta_format_idle": "[idle]",
                "meta_format_tgid": "[%TGID%]",
                "meta_format_tag":  "[%TGID%] %TAG%",
                "icecastServerAddress": "127.0.0.1:8000",
                "icecastMountpoint": "op25_stream_0",
                "icecastMountExt": ".xspf",
                "icecastPass": "",
                "delay": 0.0
            }
        ]
    },
    "audio": {
        "module": "sockaudio.py",
        "instances": [
            {
                "instance_name": "audio0",
                "device_name": "default",
                "udp_port": 23450,
                "audio_gain": 1.0,
                "number_channels": 1
            }
        ]
    },
    "terminal": {
        "module": "terminal.py",
        "terminal_type": "curses",
        "#terminal_type": "http:0.0.0.0:8080",
        "curses_plot_interval": 0.1,
        "http_plot_interval": 1.0,
        "http_plot_directory": "../www/images",
        "tuning_step_large": 1200,
        "tuning_step_small": 100,
        "default_channel": "Voice_ch1"
    }
}
 

k7dq

Member
Premium Subscriber
Joined
Dec 22, 2016
Messages
6
Location
Clinton, Ut
Thanks,
i am now able to sync up to the control channel.
secondary question
what does ppm= -1.0 do? my original test had ppm=0.0
Thanks again
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
922
Location
NE Wisconsin
Thanks,
i am now able to sync up to the control channel.
secondary question
what does ppm= -1.0 do? my original test had ppm=0.0
Thanks again

PPM is an acronym for "Parts Per Million" that is a value (setting) required to compensate for frequency errors in the SDR's internal time base
and is the same as the (-q -1) argument that you had set in your rx.py command line.

The correct PPM value usually has to be determined experimentally with the goal of being able to obtain Trunk Signaling Blocks (TSBK's),
but is generally faster and more accurate via observation of the mixer plot while the SDR is tuned to the control channel. The object is to
adjust the PPM such as to center the spectrum of the received signal as closely to the "0" centerline as possible.

Note" Having "cqpsk_tracking": true, enables the P25demodulator to track and compensate for frequency errors that reduces the need
to obtain more precise PPM compensation adjustments.

RAW Mixer Plot.png
 
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
First question - demod_type- in rx.py i used C4FM but that is not available in multi, so i changed it to cqpsk. Is this my problem?
"c4fm" was never a command line option for demod_type (-D). The valid values were "cqpsk" (Default) and "fsk4". In 90% of situations, you didn't need to specify the demod because the cqpsk demodulator works fine for both c4fm and d-cqpsk. On P25 Conventional (non-trunked) and some FDMA-only systems, you might need to specify fsk4 to get sync to stay locked.
 

k7dq

Member
Premium Subscriber
Joined
Dec 22, 2016
Messages
6
Location
Clinton, Ut
Thanks to both wgbecks and boatbod, i am able to use multi-rx.py for the system i am monitoring. And thanks for the additional info.
 
Top