OP25 OP25 + Rdio-Scanner for a Raspberry Pi 5 build to monitor P25 PII?

fxllencode

Newbie
Premium Subscriber
Joined
Dec 8, 2023
Messages
4
Hi all, first post here so apologies if this is done incorrectly here.

I'm currently working on a project to create my own little scanner with Raspberry Pi 5, 2 RTL-SDR v3 dongles, and (currently, at least), SDR-Trunk and Rdio-scanner.

The pi is running Raspian Lite, so I have gotten it working decently by running SDR-Trunk in headless mode and starting x w/ chromium to launch rdio-scanner as a clean interface. It works pretty well, however there are two problems with the current setup:
1. SDR-Trunk is very resource heavy, even in headless mode. It takes up a lot of CPU usage, and it seems to just be an overall resource hog.
2. I am getting lots of distortion (probably due to being less than 2 miles away from 3 simulcast towers...), and I have heard OP25 can be better at reducing distorion. I am not changing the antenna setup as the idea is that it is portable, though I may get some more small tuned antennas as I am just using a generic antenna that covers a large range.

I am looking at boatbod's OP25, but there is not a lot of documentation. In SDR-Trunk, I can just easily feed all of the data to Rdio-scanner, with the API. I know Rdio-scanner has dirwatch features, but I am unsure of how to output files I would get from OP25 into a directory to be read like that. I am a bit lost with it, but it looks very promising to solve both of my issues.

Let me know if there any questions. Thank you!
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,367
Location
Talbot Co, MD
I am unsure of how to output files I would get from OP25 into a directory to be read like that. I am a bit lost with it, but it looks very promising to solve both of my issues.
OP25 outputs either audio (via pulseaudio or alsa) or a udp stream of S16LE audio samples. The latter can be picked up and processed by liquidsoap if you want to stream to an online service (e.g. broadcastify) or write to a file.
 

fxllencode

Newbie
Premium Subscriber
Joined
Dec 8, 2023
Messages
4
OP25 outputs either audio (via pulseaudio or alsa) or a udp stream of S16LE audio samples. The latter can be picked up and processed by liquidsoap if you want to stream to an online service (e.g. broadcastify) or write to a file.
Thank you, I am trying to understand the setup process for OP25. It's a bit overwhelming. I have 2 dongles, so I assume I need to use `multi_rx.py`. However, I do not understand the `.json` file, or really how this works compared to what I am currently using, SDR-Trunk. I want to eventually setup with rdio-scanner as mentioned. I am struggling to figure out which options I want in my JSON file so hopefully you can provide assistance. I am trying to setup NFRRSA. North Fulton Regional Radio System Authority (NFRRSA) Trunking System, Various, Georgia

My main confusion is about what the "channels" option is/means for my usecase. Even though I have 2 RTL-SDR dongles, I still only want to listen to one system. I assume I needed more than one dongle due to the spread being more than 2.4mhz apart. I want to be able to listen to as many calls as I can with each call being output to an audio file to be ingested through rdio-scanner's dirwatch. I honestly do not know where to start with configuration since there are so many options. I hope this isn't too much of an ask! I'm messing with it more as we speak so hopefully I can figure out what I want.
 

fxllencode

Newbie
Premium Subscriber
Joined
Dec 8, 2023
Messages
4
Thank you, I am trying to understand the setup process for OP25. It's a bit overwhelming. I have 2 dongles, so I assume I need to use `multi_rx.py`. However, I do not understand the `.json` file, or really how this works compared to what I am currently using, SDR-Trunk. I want to eventually setup with rdio-scanner as mentioned. I am struggling to figure out which options I want in my JSON file so hopefully you can provide assistance. I am trying to setup NFRRSA. North Fulton Regional Radio System Authority (NFRRSA) Trunking System, Various, Georgia

My main confusion is about what the "channels" option is/means for my usecase. Even though I have 2 RTL-SDR dongles, I still only want to listen to one system. I assume I needed more than one dongle due to the spread being more than 2.4mhz apart. I want to be able to listen to as many calls as I can with each call being output to an audio file to be ingested through rdio-scanner's dirwatch. I honestly do not know where to start with configuration since there are so many options. I hope this isn't too much of an ask! I'm messing with it more as we speak so hopefully I can figure out what I want.
Update: I think I've gotten it working (kind of, still struggling to understand). For now, I basically followed the default config. I've attached it below. However, this does not do what I want. What I want it to do is instead of giving an audio output, save each call as a file into a directory automatically. I am a bit lost as to where to start with that. Good news is that I got the audio working at least, and I don't believe I am missing calls.

```json
{
"channels": [
{
"name": "Voice_ch1",
"device": "sdr0",
"trunking_sysname": "NFRRSA",
"meta_stream_name": "stream_0",
"demod_type": "cqpsk",
"cqpsk_tracking": true,
"tracking_threshold": 120,
"tracking_feedback": 0.75,
"destination": "udp://127.0.0.1:23456",
"excess_bw": 0.2,
"filter_type": "rc",
"if_rate": 24000,
"plot": "",
"symbol_rate": 4800,
"enable_analog": "off"
},
{
"name": "Voice_ch2",
"device": "sdr1",
"trunking_sysname": "NFRRSA",
"meta_stream_name": "stream_1",
"demod_type": "cqpsk",
"cqpsk_tracking": true,
"tracking_threshold": 120,
"tracking_feedback": 0.75,
"destination": "udp://127.0.0.1:23466",
"excess_bw": 0.2,
"filter_type": "rc",
"if_rate": 24000,
"plot": "",
"symbol_rate": 4800,
"enable_analog": "off"
}
],
"devices": [
{
"args": "rtl=00000001",
"gains": "LNA:28",
"gain_mode": false,
"name": "sdr0",
"offset": 0,
"ppm": 0.0,
"rate": 1000000,
"usable_bw_pct": 0.85,
"tunable": true
},
{
"args": "rtl=0000002",
"gains": "LNA:28",
"gain_mode": false,
"name": "sdr0",
"offset": 0,
"ppm": 0.0,
"rate": 1000000,
"usable_bw_pct": 0.85,
"tunable": true
}
],
"trunking": {
"module": "tk_p25.py",
"chans": [
{
"nac": "0x6D1",
"sysname": "NFRRSA",
"control_channel_list": "770.75625,771.15625,771.45625,771.98125",
"whitelist": "NFRRSA.wlist",
"blacklist": "",
"tgid_tags_file": "NFRRSA.tsv",
"rid_tags_file": "",
"tdma_cc": false,
"crypt_behavior": 2
}
]
},
"audio": {
"module": "sockaudio.py",
"instances": [
{
"instance_name": "audio0",
"device_name": "default",
"udp_port": 23456,
"audio_gain": 1.0,
"number_channels": 1
},
{
"instance_name": "audio1",
"device_name": "default",
"udp_port": 23466,
"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.1,
"http_plot_interval": 1.0,
"http_plot_directory": "../www/images",
"tuning_step_large": 1200,
"tuning_step_small": 100,
"default_channel": "Voice_ch2"
}
}
```
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,367
Location
Talbot Co, MD
If you only want to listen to one call at a time, a single dongle is all you need for op25 regardless of the bandwidth of the system you are monitoring. Such a configuration will work fine under multi_rx.py or the (older) rx.py variant of the app.

In post #2 above I mentioned that op25 only generates audio or udp streams. If you want to put the audio in a file, you'll need to use something like liquidsoap to capture the stream and write it to a file. Alternatively, there is the "trunk recorder" app (a distant derivative of op25) which natively writes to file rather than playing back.
 

fxllencode

Newbie
Premium Subscriber
Joined
Dec 8, 2023
Messages
4
If you only want to listen to one call at a time, a single dongle is all you need for op25 regardless of the bandwidth of the system you are monitoring. Such a configuration will work fine under multi_rx.py or the (older) rx.py variant of the app.
Thank you! This makes sense. Is there any benefit to having two dongles on one system if I don't want to output the audio and just record all calls using liquidsoap? My understanding from what I understand (please correct me if I am wrong) is that if there are multiple calls that occur at the same time on the system, it will drop the call it's not actively playing back or recording. I really appreciate your help!
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,367
Location
Talbot Co, MD
Thank you! This makes sense. Is there any benefit to having two dongles on one system if I don't want to output the audio and just record all calls using liquidsoap? My understanding from what I understand (please correct me if I am wrong) is that if there are multiple calls that occur at the same time on the system, it will drop the call it's not actively playing back or recording. I really appreciate your help!
OP25's methodology is "one logical channel per call". If you're using standard RTL dongles, that translates to one dongle per channel. If you have wideband SDR devices (e.g. Airspy) you can define more logical channels and feed them from a single sdr device parked on a suitable fixed frequency. In all cases, you can monitor a call in progress and have it pre-empted by a higher priority call based on how your configure tgid data.

In the trunked P25 world, signaling takes place both on the control channel and in the voice channels, so there is no need to continuously monitor the control channel to maintain a robust picture of other calls in progress parallel to the one you are monitoring. There is certainly some latency/loss of data when re-tuning between a voice channel and the control channel, but this is a 750mSec problem, so pretty short lived.
 
Top