boatbod / op25

Fork of osmocom OP25 by boatbod
319 stars 100 forks source link

multi_rx.py Leap 15.2 key error #107

Closed mike021361 closed 3 years ago

mike021361 commented 3 years ago

The command line: ./multi_rx.py -v 1 -c ers-oci.rtl.cfg.json 2>stderr.ers-oci The json file:

{
  "channels": [
    {
      "device": "rtl0",
      "demod_type": "fsk4",
      "destination": "",
      "excess_bw": 0.2,
      "filter_type": "rrc",
      "if_rate": 24000,
      "name": "ERS-OCI-Control",
      "plot": "",
      "symbol_rate": 4800
    },
    {
      "device": "rtl1",
      "demod_type": "fsk4",
      "destination": "udp://127.0.0.1:23456",
      "excess_bw": 0.2,
      "filter_type": "rrc",
      "if_rate": 24000,
      "name": "ERS-OCI-Voice",
      "plot": "",
      "symbol_rate": 4800
    }
  ],
  "devices": [
    {
      "args": "rtl=00000000",
      "frequency": 452462500,
      "gains": "LNA:42",
      "name": "rtl1",
      "offset": 0,
      "ppm": 21,
      "rate": 960000,
      "tunable": true
    },
    {
      "args": "rtl=00000012",
      "frequency": 452462500,
      "gains": "LNA:39",
      "name": "rtl0",
      "offset": 0,
      "ppm": 0,
      "rate": 960000,
      "tunable": true
    }
  ],
    "trunking": {
        "module": "tk_trbo.py",
        "chans": [
            {
                "lcn": 1,
                "frequency": 452462500,
                "cc": 3
            },
            {
                "lcn": 2,
                "frequency": 451787500,
                "cc": 3
            },
            {
                "lcn": 3,
                "frequency": 451912500,
                "cc": 3
            },
            {
                "lcn": 4,
                "frequency": 451987500,
                "cc": 3
            },
            {
                "lcn": 5,
                "frequency": 463537500,
                "cc": 3
            },
            {
                "lcn": 6,
                "frequency": 452337500,
                "cc": 3
            },
            {
                "lcn": 7,
                "frequency": 461462500,
                "cc": 3
            },
            {
                "lcn": 8,
                "frequency": 461787500,
                "cc": 3
            },
            {
                "lcn": 9,
                "frequency": 462112500,
                "cc": 3
            },
            {
                "lcn": 10,
                "frequency": 463537500,
                "cc": 3
            },

            {
                "sysname": "ERS-OCI",
                "control_channel_list": "452.4625",
                "tgid_tags_file": "ers-oci.tsv",
                "tgid_hold_time": 2.0,
                "blacklist": "",
                "whitelist": "",
                "bandplan": "400"
            }
                 ],
    "audio": {
        "module": "sockaudio.py",
        "instances": [
            {
                "instance_name": "audio0",
                "device_name": "default",
                "udp_port": 23456,
                "audio_gain": 1.0,
                "number_channels": 1
            }
        ]
    },
    "terminal": {
        "module": "terminal.py",
        "terminal_type": "curses",
        "#terminal_type": "http:127.0.0.1:8080",
        "curses_plot_interval": 0.2,
        "http_plot_interval": 1.0,
        "http_plot_directory": "../www/images"
    }
    }
}

rpm -q gnuradio gnuradio-3.8.1.0-lp152.1.14.x86_64

python3 -V Python 3.6.12

stderr.ers-oci: Using Python /usr/bin/python3 1615591214.521078 Configuring channel lcn(1), freq(452.462500), cc(3) 1615591214.521404 Configuring channel lcn(2), freq(451.787500), cc(3) 1615591214.521551 Configuring channel lcn(3), freq(451.912500), cc(3) 1615591214.521678 Configuring channel lcn(4), freq(451.987500), cc(3) 1615591214.521773 Configuring channel lcn(5), freq(463.537500), cc(3) 1615591214.521852 Configuring channel lcn(6), freq(452.337500), cc(3) 1615591214.521928 Configuring channel lcn(7), freq(461.462500), cc(3) 1615591214.522004 Configuring channel lcn(8), freq(461.787500), cc(3) 1615591214.522087 Configuring channel lcn(9), freq(462.112500), cc(3) 1615591214.522166 Configuring channel lcn(10), freq(463.537500), cc(3) Traceback (most recent call last): File "./multi_rx.py", line 928, in rx = rx_main() File "./multi_rx.py", line 893, in init self.tb = rx_block(options.verbosity, config = byteify(config)) File "./multi_rx.py", line 478, in init self.configure_trunking(config['trunking']) File "./multi_rx.py", line 571, in configure_trunking self.trunk_rx = self.trunking.rx_ctl(frequency_set = self.change_freq, nac_set = self.set_nac, slot_set = self.set_slot, nbfm_ctrl = self.nbfm_control, debug = self.verbosity, chans = config['chans']) File "/home/mike/op25/op25/gr-op25_repeater/apps/tk_trbo.py", line 355, in init self.chans[_chan['lcn']] = dmr_chan(debug, _chan['lcn'], _chan['frequency']) KeyError: 'lcn'

System: https://www.radioreference.com/apps/db/?sid=7319

boatbod commented 3 years ago

This section of the cfg.json is incorrectly formed.

            {
                "lcn": 10,
                "frequency": 463537500,
                "cc": 3
            },

            {
                "sysname": "ERS-OCI",
                "control_channel_list": "452.4625",
                "tgid_tags_file": "ers-oci.tsv",
                "tgid_hold_time": 2.0,
                "blacklist": "",
                "whitelist": "",
                "bandplan": "400"
            }

It should read as follows:

            {
                "lcn": 10,
                "frequency": 463537500,
                "cc": 3
            }

DMR trunking does not presently support blacklist, whitelist or trunk-tags parameters.