Scanning op25 multi_rx.py difficulties

n1moy

Member
Joined
Oct 19, 2022
Messages
67
Location
Plymouth Co, Massachusetts
2024.Sep.02

Endeavor to scan two P25 Phase-1/conventional frequencies using op25. Have used the following command successfully with a single channel and default system audio.

$ ./rx.py --nocrypt --args "rtl" --gains 'lna:40' -S 250000 -f 484.412500e6 -D fsk4 -x 12.0 -q 0 -d 0 -v 2 -V -U 2>~/scanner.log

Attempted to advance into scanning mode using multi_rx.py and a JSON configuration file. Unsure exactly what I should be expecting to see or next steps. The terminal screen remains void of details and the Gnuplot displays only one frequency. Probable configuration error.
[images & log attached]

$ ./multi_rx.py -v 12 -c scan.json 2>~/scan.log

Uncertain how to proceed.

Thanks in advance,

--- scan.json ---

{
"channels": [
{
"name": "A_PD",
"frequency": 482987500,
"device": "sdr0",
"trunking_sysname": "",
"meta_stream_name": "",
"demod_type": "fsk4",
"cqpsk_tracking": false,
"destination": "udp://127.0.0.1:23454",
"excess_bw": 0.2,
"filter_type": "rc",
"if_rate": 24000,
"plot": "",
"symbol_rate": 4800,
"enable_analog": "off",
"blacklist": "",
"whitelist": ""
},
{
"name": "B_PD",
"frequency": 484412500,
"device": "sdr0",
"trunking_sysname": "",
"meta_stream_name": "",
"demod_type": "fsk4",
"cqpsk_tracking": false,
"destination": "udp://127.0.0.1:23455",
"excess_bw": 0.2,
"filter_type": "rc",
"if_rate": 24000,
"plot": "",
"symbol_rate": 4800,
"enable_analog": "off",
"blacklist": "",
"whitelist": ""
}
],

"devices": [
{
"args": "rtl=0",
"frequency": 482987500,
"gains": "LNA:39",
"gain_mode": false,
"name": "sdr0",
"offset": 0,
"ppm": 0.0,
"rate": 1000000,
"usable_bw_pct": 0.85,
"tunable": false
}
],
"trunking": {
"module": "",
"chans": [
]
},
"metadata": {
"module": "",
"streams": [
]
},
"audio": {
"module": "sockaudio.py",
"instances": [
{
"instance_name": "audio0",
"device_name": "default",
"udp_port": 23454,
"audio_gain": 10.0,
"number_channels": 1
},
{
"instance_name": "audio1",
"device_name": "default",
"udp_port": 23455,
"audio_gain": 10.0,
"number_channels": 1
}
]
},
"terminal": {
"module": "terminal.py",
"terminal_type": "curses",
"curses_plot_interval": 0.1,
"http_plot_interval": 1.0,
"http_plot_directory": "../www/images",
"tuning_step_large": 1200,
"tuning_step_small": 100
}
}op25.terminal.pngop25.gnuplot.png
 

n1moy

Member
Joined
Oct 19, 2022
Messages
67
Location
Plymouth Co, Massachusetts
scan.log
---

Using Python /usr/bin/python3
Starting OP25 (pid = 3416)
Configuring audio instance #0 [audio0]
using ALSA sound system
audio device: default
Listening on 127.0.0.1:23454
Configuring audio instance #1 [audio1]
using ALSA sound system
audio device: default
Listening on 127.0.0.1:23455
Error: unable to import metadata module:
Empty module name
device: {'args': 'rtl=0', 'frequency': 482987500, 'gains': 'LNA:39', 'gain_mode': False, 'name': 'sdr0', 'offset': 0, 'ppm': 0.0, 'rate': 1000000, 'usable_bw_pct': 0.85, 'tunable': False}
Device name: "sdr0", osmosdr args: "rtl=0"
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.5.1
built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp xtrx
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
gr-osmosdr driver gain_mode: False
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!
channel (dev sdr0): {'name': 'A_PD', 'frequency': 482987500, 'device': 'sdr0', 'trunking_sysname': '', 'meta_stream_name': '', 'demod_type': 'fsk4', 'cqpsk_tracking': False, 'destination': 'udp://127.0.0.1:23454', 'excess_bw': 0.2, 'filter_type': 'rc', 'if_rate': 24000, 'plot': '', 'symbol_rate': 4800, 'enable_analog': 'off', 'blacklist': '', 'whitelist': ''}
demodulator: xlator if_rate=24000, input_rate=1000000, decim=41, taps=297, resampled_rate=24390, sps=5
op25_audio::eek:pen_socket(): enabled udp host(127.0.0.1), wireshark(23454), audio(23454)
09/02/24 15:33:48.031967 [-1] rx_sync::sync_reset:
09/02/24 15:33:48.032077 [-1] mute channel(0)
09/02/24 15:33:48.032106 [-1] mute channel(1)
channel (dev sdr0): {'name': 'B_PD', 'frequency': 484412500, 'device': 'sdr0', 'trunking_sysname': '', 'meta_stream_name': '', 'demod_type': 'fsk4', 'cqpsk_tracking': False, 'destination': 'udp://127.0.0.1:23455', 'excess_bw': 0.2, 'filter_type': 'rc', 'if_rate': 24000, 'plot': '', 'symbol_rate': 4800, 'enable_analog': 'off', 'blacklist': '', 'whitelist': ''}
demodulator: xlator if_rate=24000, input_rate=1000000, decim=41, taps=297, resampled_rate=24390, sps=5
op25_audio::eek:pen_socket(): enabled udp host(127.0.0.1), wireshark(23455), audio(23455)
09/02/24 15:33:48.051778 [-2] rx_sync::sync_reset:
09/02/24 15:33:48.051902 [-2] mute channel(0)
09/02/24 15:33:48.051936 [-2] mute channel(1)
09/02/24 15:33:48.052055 [-2] Unable to initialize demod to freq: 484412500, using device freq: 482987500
python version detected: 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0]
Allocating 15 zero-copy buffers
09/02/24 15:33:49.061222 [-1] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:49.061884 [-2] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:50.110415 [-1] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:50.110885 [-2] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:51.158203 [-1] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:51.158246 [-2] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:52.208700 [-2] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:52.209397 [-1] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:53.257229 [-2] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:53.257296 [-1] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:54.305923 [-1] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:54.305941 [-2] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:55.354435 [-1] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:55.355002 [-2] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:56.401857 [-1] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:56.402632 [-2] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:57.451103 [-2] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:57.454191 [-1] rx_sync::sync_timeout: protocol NONE
09/02/24 15:33:58.033129 rx_block::stop() flowgraph stop called
Flowgraph complete. Exiting
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
982
Location
NE Wisconsin
Endeavor to scan two P25 Phase-1/conventional frequencies using op25. Have used the following command successfully with a single channel and default system audio.

$ ./rx.py --nocrypt --args "rtl" --gains 'lna:40' -S 250000 -f 484.412500e6 -D fsk4 -x 12.0 -q 0 -d 0 -v 2 -V -U 2>~/scanner.log
With op25 it's not necessary to utilize a high bandwidth SDR and no reason to attempt to operate a relatively low bandwidth device
at a sample rate in excess or its capabilities. The trunking logic tunes the frequency of the SDR back and forth between the control
channel and the traffic channel when following a trunk call.

Use sample rate to "-S 1000000" on your rx.py command line and craft a proper trunk.tsv file to use with it. The -x 12.0 will most certainly
cause a lot of audio distortion. Values up to -x 2.0 may be appropriate to obtain adequate gain on certain systems. If you're experiencing
low volume, then increase the volume using ALSA mixer or GUI volume control adjustment.

Not to be harsh, but your multi_rx.py JSON is not even close, you have no trunking module specified. I would suggest that you first carefully study p25_rtl_example.json found in the apps folder. You'll have to understand it's structure before you can expect to build a multiple site/system receiver.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
982
Location
NE Wisconsin
Ok, my mistake. Set the frequency of the RTL SDR (device) to 483.700 (483700000) or midway between the two P25 system frequencies.
The RTL SDR should be good to 2400000 samples per second but try setting it to 2000000 to begin with.

Make the Mixer plot active (initially) on one channel or the other as a means to determine if any ppm corrections will be necessary
to put the SDR on frequency.

"devices": [
{
"args": "rtl=0",
"frequency": 483700000,
"gains": "LNA:39",
"gain_mode": false,
"name": "sdr0",
"offset": 0,
"ppm": 0.0,
"rate": 2000000,
"usable_bw_pct": 0.85,
"tunable": false
}

Well compensated SDR that's on frequency
1725393868818.png
 

n1moy

Member
Joined
Oct 19, 2022
Messages
67
Location
Plymouth Co, Massachusetts
Thanks you for this help!

These two frequencies can be extremely closemouthed, small towns.

Enabled the mixer plot with '5'.
[image attached]

I am successfully hearing activity but unsure how to determine which of the two are active. How might this be possible ?

raw.mixer.plot.png
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
982
Location
NE Wisconsin
The mixer plot indicates no signal. I guess you'll have to try and capture the mixer when the channel is active. That stated, you
could temporarily set the frequency to a control channel of a local or nearby P25 TRS to facilitate frequency compensation adjustment
and then return your configuration back to your original P25 Conventional system(s).

As an alternative, one could use a NOAA weather radio signal, but frequency error and subsequent adjustment would not be as evident
or as well defined as it would be if you were tuned to a UHF or a 7/800 MHz signal.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
982
Location
NE Wisconsin
I am successfully hearing activity but unsure how to determine which of the two are active. How might this be possible ?

You could possibly enable "Mixer" plots temporarily on both P25 channels, but depending upon CPU resources, this may prove to be too
much of a load on resources and decoding could become problematic. It really depends on your specific hardware platform and available
system resources.

Another option would be to view your "scan.log" and filter (grep) for IMBE codewords. IE: tail -f ~/scan.log | grep IMBE where you'll
see output from the logfile similar to the text below whenever there are P25 voice frames on an active channel. In your case the log text
will contain the labels "A_PD" or "B_PD" depending upon the active channel(s).


09/04/24 06:54:27.086884 [0] IMBE 36 ed 82 1d 49 36 c0 56 ef 92 bd errs 0
09/04/24 06:54:27.088337 [0] IMBE 36 5a 07 3c 7f 91 f9 d6 8f 02 f2 errs 0
09/04/24 06:54:27.339494 [0] IMBE 36 70 8d 2e fd 76 f0 10 4a c1 c3 errs 0
09/04/24 06:54:27.340198 [0] IMBE 35 d2 2b b7 4b 45 f1 4e 96 47 14 errs 0
09/04/24 06:54:27.340864 [0] IMBE 35 f8 85 1c 9d 33 f1 64 9b fc af errs 0
09/04/24 06:54:27.342930 [0] IMBE 36 78 17 b2 7c 63 f0 14 9b 00 56 errs 0
09/04/24 06:54:27.344681 [0] IMBE 3a 4c 2e 75 6f a3 90 4e 94 fd d1 errs 0
09/04/24 06:54:27.346787 [0] IMBE aa 41 02 f2 c0 ab 00 07 30 bc 4c errs 0
 
Last edited:

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
982
Location
NE Wisconsin
Still no sign of any signal (Post #9). Start op25 with log verbose -v 11 and allow it to run until there's been a few transmissions, then post
that logfile here for analysis.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
982
Location
NE Wisconsin
$ ./multi_rx.py -v 11 -c scan.json 2>~/scan.log

At this point, I wouldn't worry about trying to compensate the SDR (ppm) to frequency. The logfile indicates that the second
Voice Channel (VC) was receiving and processing voice frames with no apparent errors decoding either the LDU's or IMBE codewords.

Looking good!!!


9/04/24 12:16:59.527000 [-2] NAC 0x749 LDU1: LCW: ec=0, pb=0, sf=0, lco=0 : 00 00 04 00 00 01 ff ff f6
09/04/24 12:16:59.527136 [-2] IMBE 33 4f a1 65 3c d7 fe d5 07 49 54 errs 0
09/04/24 12:16:59.527393 [-2] IMBE 33 4f a5 54 3c 90 fc 4f d2 8f dd errs 0
09/04/24 12:16:59.527628 [-2] IMBE 32 ee a5 44 2c 72 f9 f5 84 15 b2 errs 0
09/04/24 12:16:59.527952 [-2] IMBE 33 4f 81 5d 3e bc fc 5b 08 b0 21 errs 0
09/04/24 12:16:59.528149 [-2] IMBE 33 4f a5 24 3d 12 fe cf b2 08 80 errs 0
09/04/24 12:16:59.528273 [-2] IMBE 2f 4f 91 31 3b 37 fe ac 8d 97 bf errs 0
09/04/24 12:16:59.528406 [-2] IMBE 2f 4e 85 7c 39 dc fe a6 6e 53 ae errs 0
09/04/24 12:16:59.528533 [-2] IMBE 33 5e 21 55 3f 5c fe 46 ce 8c 11 errs 0
09/04/24 12:16:59.528664 [-2] IMBE 32 5d 72 65 fa 4d ff de 0a 74 22 errs 0
09/04/24 12:16:59.714397 [-1] rx_sync::sync_timeout: protocol NONE
09/04/24 12:16:59.722103 [-2] NAC 0x749 LDU2: ESS: algid=80, keyid=0, mi=00 00 00 00 00 00 00 00 00, rs_errs=0
09/04/24 12:16:59.722230 [-2] IMBE 32 7e 31 91 1c dc f8 99 93 01 d3 errs 0
09/04/24 12:16:59.722669 [-2] IMBE 32 de 20 05 7f ad f8 0a 4a a8 ba errs 0
09/04/24 12:16:59.723049 [-2] IMBE 32 cb bd 32 3b 28 fc 9f fe e5 6d errs 0
09/04/24 12:16:59.723426 [-2] IMBE 36 de d0 89 ed 64 fc 70 24 5e b0 errs 0
09/04/24 12:16:59.723847 [-2] IMBE 35 f0 ef 86 37 b9 f1 87 4c a4 d7 errs 0
09/04/24 12:16:59.724329 [-2] IMBE 3d 5d bd 18 8f 9c c8 e4 38 95 50 errs 0
09/04/24 12:16:59.724925 [-2] IMBE 3d c5 0d 36 3e ef c0 cb ed 47 81 errs 0

09/04/24 12:16:59.725594 [-2] IMBE 39 f7 70 62 b1 4f f1 da a1 f8 28 errs 0
09/04/24 12:16:59.726071 [-2] IMBE 36 e9 d1 49 ea 66 f2 f6 10 90 21 errs 0
 

n1moy

Member
Joined
Oct 19, 2022
Messages
67
Location
Plymouth Co, Massachusetts
Awesome! Thanks very much for your help.

Eventually plan to add a couple nearby P25 and/or NFM frequencies.

There is no visual output confirming the state of the scanner ?
Scanning, channel receive, etc

Was expecting the terminal would provide this status/info.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,392
Location
Talbot Co, MD
Awesome! Thanks very much for your help.

Eventually plan to add a couple nearby P25 and/or NFM frequencies.

There is no visual output confirming the state of the scanner ?
Scanning, channel receive, etc

Was expecting the terminal would provide this status/info.
The terminal is sparse because nothing goes back and forth to the trunking module when receiving P25 Conventional. (TSBKs are unique to trunking)
 
Top