Something is driving me nuts. I am trying to get multi_rx.py to run as a service. It runs if I start it in a terminal window. I cannot get it to run as a service. It just stops.
My shell script I call multi.sh which looks like this:
./multi_rx.py -c rtlsdr.json -T kutrunk.tsv -l http:0.0.0.0:8080 -X -v 11 > multierr.2 2>&1
The service looks like this (the only thing different from the rx.py service is the what get's started)
[Unit]
Description=op25-multi_rx
After=syslog.target network.target nss-lookup.target network-online.target
Requires=network-online.target
[Service]
User=1000
Group=1000
WorkingDirectory=/home/pi/op25/op25/gr-op25_repeater/apps
ExecStart=/bin/bash -- multi.sh
RestartSec=5
Restart=on-failure
[Install]
WantedBy=multi-user.target
The only thing in the output file is the following lines:
added talkgroup 3403 from ku-tgid-blacklist.tsv
added talkgroup 3601 from ku-tgid-blacklist.tsv
1673665886.425344 find_channel_cc: selected channel 1 (P25 Control Channel) for tuning request type cc frequency 853.237500
python version detected: 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110]
Allocating 15 zero-copy buffers
Allocating 15 zero-copy buffers
Running. press ENTER to quit
Quitting - now stopping top block
Program ending
Like it starts and just ends. No rhyme or reason I can find. Just to be thorough here is my rtlsdr.json:
{
"channels": [
{
"demod_type": "cqpsk",
"destination": "udp://127.0.0.1:56124",
"excess_bw": 0.2,
"filter_type": "rc",
"frequency": 0,
"if_rate": 24000,
"name": "P25 Control Channel",
"plot": "constellation",
"decode": "p25_decoder:cc",
"symbol_rate": 4800,
"decode": "p25_decoder:role=cc:dev=rtlsdrcc"
},
{
"demod_type": "cqpsk",
"destination": "udp://127.0.0.1:23456",
"excess_bw": 0.2,
"filter_type": "rc",
"frequency": 0,
"if_rate": 24000,
"name": "P25 Voice Channel",
"plot": "constellation",
"decode": "p25_decoder:vc",
"symbol_rate": 4800,
"decode": "p25_decoder:role=vc:dev=rtlsdrvc"
}
],
"devices": [
{
"args": "rtl=00000002",
"frequency": 0,
"gains": "lna:30",
"name": "rtlsdrcc",
"offset": 0,
"ppm": 0,
"rate": 1000000,
"tunable": true
},
{
"args": "rtl=00000001",
"frequency": 0,
"gains": "lna:30",
"name": "rtlsdrvc",
"offset": 0,
"ppm": 0,
"rate": 1000000,
"tunable": true
}
]
}
Any ideas why this might not be running?
Thank you. Kevin
My shell script I call multi.sh which looks like this:
./multi_rx.py -c rtlsdr.json -T kutrunk.tsv -l http:0.0.0.0:8080 -X -v 11 > multierr.2 2>&1
The service looks like this (the only thing different from the rx.py service is the what get's started)
[Unit]
Description=op25-multi_rx
After=syslog.target network.target nss-lookup.target network-online.target
Requires=network-online.target
[Service]
User=1000
Group=1000
WorkingDirectory=/home/pi/op25/op25/gr-op25_repeater/apps
ExecStart=/bin/bash -- multi.sh
RestartSec=5
Restart=on-failure
[Install]
WantedBy=multi-user.target
The only thing in the output file is the following lines:
added talkgroup 3403 from ku-tgid-blacklist.tsv
added talkgroup 3601 from ku-tgid-blacklist.tsv
1673665886.425344 find_channel_cc: selected channel 1 (P25 Control Channel) for tuning request type cc frequency 853.237500
python version detected: 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110]
Allocating 15 zero-copy buffers
Allocating 15 zero-copy buffers
Running. press ENTER to quit
Quitting - now stopping top block
Program ending
Like it starts and just ends. No rhyme or reason I can find. Just to be thorough here is my rtlsdr.json:
{
"channels": [
{
"demod_type": "cqpsk",
"destination": "udp://127.0.0.1:56124",
"excess_bw": 0.2,
"filter_type": "rc",
"frequency": 0,
"if_rate": 24000,
"name": "P25 Control Channel",
"plot": "constellation",
"decode": "p25_decoder:cc",
"symbol_rate": 4800,
"decode": "p25_decoder:role=cc:dev=rtlsdrcc"
},
{
"demod_type": "cqpsk",
"destination": "udp://127.0.0.1:23456",
"excess_bw": 0.2,
"filter_type": "rc",
"frequency": 0,
"if_rate": 24000,
"name": "P25 Voice Channel",
"plot": "constellation",
"decode": "p25_decoder:vc",
"symbol_rate": 4800,
"decode": "p25_decoder:role=vc:dev=rtlsdrvc"
}
],
"devices": [
{
"args": "rtl=00000002",
"frequency": 0,
"gains": "lna:30",
"name": "rtlsdrcc",
"offset": 0,
"ppm": 0,
"rate": 1000000,
"tunable": true
},
{
"args": "rtl=00000001",
"frequency": 0,
"gains": "lna:30",
"name": "rtlsdrvc",
"offset": 0,
"ppm": 0,
"rate": 1000000,
"tunable": true
}
]
}
Any ideas why this might not be running?
Thank you. Kevin