No Audio OP25 (boatbod) Raspberry Pi

KF7RNS

Newbie
Joined
Oct 19, 2023
Messages
4
Hi everyone,

I've been using the boatbod version of OP25's rx.py to listen to Seattle's PSERN with no major issues for some time but wanted to see if I could improve the performance by adding a second SDR and moving up to multi_rx.py. However, I am not hearing any audio and the decode rate has decreased from ~18 tsbks a second to ~5 tsbks a second. Ideally, I think I'd like to use one dongle to monitor the control channel and the other to handle the audio, but I'd appreciate and help or feedback from the forum. Please let me know if I need to provide any additional logs or information not included below. Thank you in advance!

My Setup:
  • Raspberry Pi 4 (8GB)
  • Debian 11
  • (2) RTL-SDR.com V3 dongles
Screenshot:
op25.png

My JSON file:
{
"channels": [
{
"name": "PSERN",
"device": "SDR1",
"demod_type": "cqpsk",
"cqpsk_tracking": true,
"tracking_threshold": 20,
"trunking_sysname": "PSERN",
"tracking_limit": 1800,
"tracking_feedback": 0.85,
"destination": "udp://0.0.0.0:56120",
"excess_bw": 0.2,
"filter_type": "rc",
"frequency": 854287500,
"if_rate": 24000,
"plot": "",
"symbol_rate": 4800,
"enable_analog": "off",
"whitelist": "",
"blacklist": ""

}
],
"devices": [
{
"args": "rtl=001",
"frequency": 854287500,
"gains": "lna:48",
"gain_mode": true,
"name": "SDR1",
"offset": 0,
"ppm": 0.0,
"rate": 1000000,
"usable_bw_pct": 0.85,
"tunable": false
},
{
"args": "rtl=002",
"frequency": 854287500,
"gains": "lna:48",
"gain_mode": true,
"name": "SDR2",
"offset": 0,
"ppm": 0.0,
"rate": 1000000,
"usable_bw_pct": 0.85,
"tunable": false
}
],
"trunking": {
"module": "tk_p25.py",
"chans": [
{
"nac": "0x3a5",
"sysname": "PSERN",
"control_channel_list": "854.2875",
"whitelist": "",
"tgid_tags_file": "psern_full.tsv",
"rid_tags_file": "psern_full.tsv",
"tdma_cc": false,
"crypt_behavior": 2
}
]
},
"metadata": {
"module": "icemeta.py",
"streams": [
{
"stream_name": "stream_0",
"meta_format_idle": "[idle]",
"meta_format_tgid": "[%TGID%]",
"meta_format_tag": "[%TGID%] %TAG%",
"meta_format_rid": "@ [%RID%]",
"meta_format_rtag": "@ [%RID%] %RTAG%",
"icecastServerAddress": "your_stream_host_and_port",
"icecastMountpoint": "your_mountpoint_name",
"icecastPass": "your_password",
"icecastMountExt": ".xspf",
"delay": 0.0
},
{
"stream_name": "stream_1",
"meta_format_idle": "[idle]",
"meta_format_tgid": "[%TGID%]",
"meta_format_tag": "[%TGID%] %TAG%",
"meta_format_rid": " @ [%RID%]",
"meta_format_rtag": " @ [%RID%] %RTAG%",
"icecastServerAddress": "your_second stream_host_and_port",
"icecastMountpoint": "your_second_mountpoint_name",
"icecastPass": "your_second_password",
"icecastMountExt": ".xspf",
"delay": 0.0
}
]
},
"audio": {
"module": "sockaudio.py",
"instances": [
{
"instance_name": "audio0",
"device_name": "default",
"udp_port": 56120,
"audio_gain": 1.0,
"number_channels": 1
}
]
},
"terminal": {
"module": "terminal.py",
"terminal_type": "http:0.0.0.0:56120",
"terminal_timeout": 5.0,
"default_channel": "PSERN",
"curses_plot_interval": 0.1,
"http_plot_interval": 1.0,
"http_plot_directory": "../www/images",
"tuning_step_large": 1200,
"tuning_step_small": 100
}
}
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
922
Location
NE Wisconsin
I've been using the boatbod version of OP25's rx.py to listen to Seattle's PSERN with no major issues for some time but wanted to see if I could improve the performance by adding a second SDR and moving up to multi_rx.py. H

Can you be more specific what you mean by "improve the performance"? If you're having basic receiving performance issues,
then adding a second SDR at this point will only complicate matters. It sounds like you might be experiencing signal quality
issues.

I'd strongly suggest sticking with rx.py for the present time and making an effort to capture your FFT, Constellation, and Mixer plots
to post to the forum for further analysis.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
922
Location
NE Wisconsin
To address the "No Audio" problem with mulit_rx.py... Looking at your JSON file, the destination IP address under channels section
is set incorrectly in that sockaudio.py is expecting the UDP audio packets on Port: 56120 of the lo (Loopback) network adapter.

You'll need to set your destination IP to that of the loopback adapter. It should read "destination": "udp://127.0.0.1:56120", instead.
 
Last edited:

KF7RNS

Newbie
Joined
Oct 19, 2023
Messages
4
Thank you for the quick reply. Although I think I've tuned the SDR as best I can while using rx.py, the audio for certain channels can be extremely choppy at times. I am in downtown Seattle, so I'm sure there is a significant amount of interference. I took a look at the transmitter locations and I'm almost dead center between two of them, so I'm not sure if this could be a factor. I am attaching the screenshots of the plots below. I will also edit the JSON as you suggested. Thank you again for your help!


op25_7.pngop25_6.pngop25_5.pngop25_4.pngop25_3.pngop25_2.pngop25_1.png
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
922
Location
NE Wisconsin
I am a little concerned with the degree of fine-tuning offset but your raw mixer plot looks closely centered. The symbol plot suggests
a lot of multipath (reflections) taking place. Antenna type (selection) and placement can improve this markedly... You may want to
experiment with fine-tuning antenna placement in an attempt to reduce the multipath interference. Generally, the higher above ground
and away from other objects the better.

Going back to multi_rx.py, I would suggest changing the "usable_bw_pct": 0.85, to a lower value, say "usable_bw_pct": 0.65,
that serves to force SDR retuning in response to changes in operating frequency. This avoids operating at the edges of the devices
usable bandwidth where sensitivity rolls off. This is not a problem with rx.py in that the SDR gets tuned back and forth with changes
in frequency.

Overall, I would stay with rx.py and try to improve signal strength and reduce multipath with antenna selection and placement.
Doing so will reduce bit errors and clean up the choppy audio. Don't be afraid to try different SDR's but make sure you adjust
the compensation with each change of device to keep the control channel centered in the raw mixer.

You might find that some SDR's that are seemingly identical may have different properties. IE: lower noise floor or better sensitivity.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
922
Location
NE Wisconsin
I am posting some plots from one of my sites running op25 as reference.

The FFT Plot (below) depicts a Signal to Noise ratio in excess of 30 decibels.
Ideally, you should strive to obtain a balance between signal level and noise
that produces a signal (spike) 30-32 dB above the noise floor.

FFT.pngThe
Observe the tightly clustered dots in the four corners of the Constellation Plot.
The tighter together the better the signal quality and the fewer the bit errors.
Constellation.png
Finally, the Symbol Plot shown produces very consistent straight lines of dots
that are free of noise and multipath interference.
Symbol.png
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Unless you are planning on monitoring multiple P25 systems or supporting multiple voice streams at the same time there is no advantage to adding an sdr. The voice channels carry all the group voice grant signaling the same as the control channel does, so whether or not you're tuned to a control channel is somewhat moot.
 

KF7RNS

Newbie
Joined
Oct 19, 2023
Messages
4
Thank you both. I made a 1/4 wave ground plane antenna and that improved the audio using rx.py. The constellation plot is still nowhere near as tight as your examples, but I can live with it.

I'm still not getting any audio from multi_rx.py after making the adjustments. It's weird that I can get audio on one and not the other. I will keep playing around with it. Thank you again!
 

lwvmobile

DSD-FME
Joined
Apr 26, 2020
Messages
1,272
Location
Lafayette County, FL
"tunable": false
You might want to make one or both of those to true, if you don't, you would probably need to set the center frequency of both of those dongles so that the spread covers the entire spectrum of channels while one can remain constantly on the control channel. If the device can't tune, I don't suppose it can adjust its frequency error appropriately, or cover channels outside of its boundary. Also, noticed you have ppm set to zero on both devices as well, so may need to take a look at that if you are going to leave tunable set to false. The first image you posted shows a frequency error of -818 Hz with auto tracking.

Also, might be a good time to ask what is the full command you are using to start rx.py, it may help to determine if everything else is good with your multi_rx setup.
 

KF7RNS

Newbie
Joined
Oct 19, 2023
Messages
4
Currently, my rx.py command is:

./rx.py --args 'rtl=004' -N 'LNA:48' -S 2500000 -x 2 -d -100 -T trunk.tsv -V -2> stderr-streamam0.2 -l 'http:0.0.0.0:8080'
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
I assume by now both the "tunable" parameters have been set to true (a prerequisite for low bandwidth RTL devices).
With logging at -v 1, please post what you see logged when there are know active calls on the system.
It should look similar to this:
10/30/23 17:54:56.361722 [0] voice update: tg(7616), rid(2144494), freq(773.593750), slot(1), prio(2)
10/30/23 17:55:03.935838 [0] voice update: tg(7616), rid(2600460), freq(773.593750), slot(1), prio(2)
10/30/23 17:55:12.635452 [0] voice update: tg(7616), rid(2144494), freq(771.718750), slot(1), prio(2)
10/30/23 17:55:34.378447 [0] voice update: tg(11504), rid(2600152), freq(773.593750), slot(0), prio(3)
10/30/23 17:55:41.349981 [0] voice update: tg(11504), rid(2619001), freq(773.593750), slot(0), prio(3)
10/30/23 17:55:49.985961 [0] voice update: tg(11504), rid(2600152), freq(774.831250), slot(1), prio(3)

Then increase logging to -v 11 and run a bit longer and post both logs here.
 
Top