OP25 Issues with ADP decoding

Reconrider

Inside the Galaxy
Joined
Sep 26, 2017
Messages
1,856
Location
Radio Galaxy
KeyID: 0070
Key: 3409B4357A

Maybe they need to be entered as:
KeyID: 112
Key: 223501104506
I wonder if it is simply because you don’t have the equal sign in there

—crypt-behavior=0
Alright guys, no clue why it's working, but seems like the missing '=' sign was what made it work.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
997
Location
NE Wisconsin
Alright guys, no clue why it's working, but seems like the missing '=' sign was what made it work.

Glad you got it working... The parameter syntax is documented in the README.md file.

--crypt-behavior=CRYPT_BEHAVIOR
encrypted traffic behavior: 0=allow, 1=silence, 2=skip
 

Reconrider

Inside the Galaxy
Joined
Sep 26, 2017
Messages
1,856
Location
Radio Galaxy
Glad you got it working... The parameter syntax is documented in the README.md file.

--crypt-behavior=CRYPT_BEHAVIOR
encrypted traffic behavior: 0=allow, 1=silence, 2=skip
I had it there before and it didn't work. So not sure why all of a sudden adding it a second time make it work - either way, glad it works finally
 

Reconrider

Inside the Galaxy
Joined
Sep 26, 2017
Messages
1,856
Location
Radio Galaxy
Glad you got it working... The parameter syntax is documented in the README.md file.

--crypt-behavior=CRYPT_BEHAVIOR
encrypted traffic behavior: 0=allow, 1=silence, 2=skip
maybe you can help with curses. I'm not sure what it's suppose to do, but mine does nothing. can you screenshot or explain what it actually is?
 

BinaryMode

Active Member
Joined
Jul 3, 2023
Messages
663
Location
USA
I'm wondering if your issue was perhaps a whitespace? That gets me all the time. Either in Linux or Notepad++. In fact, I think if you paste the commands in Notepad++ it should show there's a whitespace. See attachment.
 

Attachments

  • whitespace.jpg
    whitespace.jpg
    82.1 KB · Views: 9

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
997
Location
NE Wisconsin
Curses is terminal control library used in Linux to provide a Text User Interface (TUI). Basically, you're using the curses TUI whenever you
execute (run) op25 from the command prompt. IE: ./rx.py --args "rtl" --gains 'lna:36' -S 960000 ... Optionally, op25 can be run using the
HTTP Console interface. IE: /rx.py --args "rtl" --gains 'lna:36' -S 960000 -l http:0.0.0.0:8080 ...

Execution via the curses interface requires that you maintain an open terminal while in operation to provide a destination or termination
for the standard output (stdout) stream. If you desire to run op25 as a system service (automatically upon startup) then you'd make use of
the http console option such that program output would be directed to the python waitress (web interface).

When running multi_rx.py, you configure the terminal type from within the json file whereby you comment "#" out one or the other of the
two terminal types as desired for your use application.

"terminal": {
"module": "terminal.py",
"#terminal_type": "curses",
"terminal_type": "http:0.0.0.0:8080",

"terminal_timeout": 5.0,
...
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,397
Location
Talbot Co, MD
This is the keys file format:
Code:
keys.json 
{
    "0x0001": {"algid": "0xaa", "key": [ "0x70", "0x70", "0x70", "0x70", "0x70" ]},
    "0x0003": {"algid": "0xaa", "key": [ "0x70", "0x70", "0x70", "0x70", "0x70" ]},
    "0x1b50": {"algid": "0xaa", "key": [ "0x12", "0x34", "0x56", "0x78", "0x90" ]},
    "0x1850": {"algid": "0xaa", "key": [ "0x62", "0x23", "0x96", "0x31", "0x04" ]},
    "0x3131": {"algid": "0xaa", "key": [ "0x31", "0x31", "0x31", "0x31", "0x31" ]}
}
 

Reconrider

Inside the Galaxy
Joined
Sep 26, 2017
Messages
1,856
Location
Radio Galaxy
Curses is terminal control library used in Linux to provide a Text User Interface (TUI). Basically, you're using the curses TUI whenever you
execute (run) op25 from the command prompt. IE: ./rx.py --args "rtl" --gains 'lna:36' -S 960000 ... Optionally, op25 can be run using the
HTTP Console interface. IE: /rx.py --args "rtl" --gains 'lna:36' -S 960000 -l http:0.0.0.0:8080 ...

Execution via the curses interface requires that you maintain an open terminal while in operation to provide a destination or termination
for the standard output (stdout) stream. If you desire to run op25 as a system service (automatically upon startup) then you'd make use of
the http console option such that program output would be directed to the python waitress (web interface).

When running multi_rx.py, you configure the terminal type from within the json file whereby you comment "#" out one or the other of the
two terminal types as desired for your use application.

"terminal": {
"module": "terminal.py",
"#terminal_type": "curses",
"terminal_type": "http:0.0.0.0:8080",

"terminal_timeout": 5.0,
...
I enable 'curses' on rx.py and it didn't do anything on a p25 conventional system. That's what threw me off. On a trunked system it works great, thank you


This is the keys file format:
Code:
keys.json
{
    "0x0001": {"algid": "0xaa", "key": [ "0x70", "0x70", "0x70", "0x70", "0x70" ]},
    "0x0003": {"algid": "0xaa", "key": [ "0x70", "0x70", "0x70", "0x70", "0x70" ]},
    "0x1b50": {"algid": "0xaa", "key": [ "0x12", "0x34", "0x56", "0x78", "0x90" ]},
    "0x1850": {"algid": "0xaa", "key": [ "0x62", "0x23", "0x96", "0x31", "0x04" ]},
    "0x3131": {"algid": "0xaa", "key": [ "0x31", "0x31", "0x31", "0x31", "0x31" ]}
}
I had everything correct except the missing equal sign in the crypt-behaviour argument. Appreciate the reply


Do either of you or anybody have a different UI layout for the local site? I'm dog poop at html/css
 

Reconrider

Inside the Galaxy
Joined
Sep 26, 2017
Messages
1,856
Location
Radio Galaxy
There's limited curses/http I/O when configured to receive a conventional system in that op25 was primarily written to receive P25 TRS.
Here's a recent thread in reference to this aspect of op25 internal data sources.
Make's a lot of sense with lack of information. I don't typically look at it anyway - I like to set it and forget it until some audio pops up but looking to make sure it's still going correctly.

As for the website gui, I see in boatbod's wiki submission from a long time ago(I think 2022) one of the 2 versions had a great looking ui and I'd like to get that one. Screenshot
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,397
Location
Talbot Co, MD
P25 Conventional does not show any activity in the UI because the UI relies on data fed from the trunking module, which of course isn't active when you're in a non-trunked environment.
 

Reconrider

Inside the Galaxy
Joined
Sep 26, 2017
Messages
1,856
Location
Radio Galaxy
P25 Conventional does not show any activity in the UI because the UI relies on data fed from the trunking module, which of course isn't active when you're in a non-trunked environment.
Appreciate the reply.

is it possible to output the audio into files? I've googled a bit but nothing concrete has came up about making it work
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
997
Location
NE Wisconsin
is it possible to output the audio into files? ...
Yes. My approach uses Liquidsoap with op25 to process the audio where I derive local speaker audio, private Icecast streaming, and recording of mp3 files (archives) that are accessible via a collocated apache2 webserver.

Here's a screen capture of the current day hourly mp3 audio archive files.

Audio Archives.png
 
Last edited:

Reconrider

Inside the Galaxy
Joined
Sep 26, 2017
Messages
1,856
Location
Radio Galaxy
Yes. My approach uses Liquidsoap with op25 to process the audio where I derive local speaker audio, private Icecast streaming, and recording of mp3 files (archives) that are accessible via a collocated apache2 webserver.

Here's a screen capture of the current day hourly mp3 audio archive files.

View attachment 169706
If you don't mind, can you explain how you did it? I've looked yesterday quiet a bit and found nothing when trying to setup the liq file
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
997
Location
NE Wisconsin
If you don't mind, can you explain how you did it? I've looked yesterday quiet a bit and found nothing when trying to setup the liq file

There are a several components to get this all set up. To begin, what hardware platform and Linux OS is it that you have op25 installed
on? This info is needed to determine specific configurations.

Regardless, you'll need to install Liquidsoap. Beware if your OS is Raspbian Bookworm that you'll have to jump through some hoops to
downgrade FFMPEG for reasons of compatibility with later Liquidsoap version installed on Bookworm.

As an overview, you specify the -w (WIRESHARK_HOST) parameter on the rx.py command line instead of the OS's default (-U) sound device.
This directs audio to the systems loopback network (127.0.0.1) adapter that the input operator in Liquidsoap can listen for the PCM packets
coming from op25 for processing and distribution.

Liquidsoap is driven by the example op25.liq script included with op25 that will serve as the base configuration. Liquidsoap is then configured to feed the local speaker, to feed and audio streams going to Icecast server(s) and is where you direct audio to be recorded
for archival. Finally, you can serve the audio archives (files) by making them available via a webserver such as Apache or NGINX.

The following is a copy of my op25.liq written to run on Liquidsoap Version 1.4.3 as an example template.

op25.liq

#!/usr/bin/liquidsoap # Example liquidsoap streaming from op25 to icecast # (c) 2019-2021 gnorbury@bondcar.com, wllmbecks@gmail.com # set("log.stdout", true) set("log.file", false) set("log.level", 3) # Make the native sample rate compatible with op25 set("frame.audio.samplerate", 8000) input = input.external.rawaudio(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -u 23450 -x 1.35 -s") # Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25 # Longer buffer results in less choppy audio but at the expense of increased latency. # OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS # Uncomment to enable # # High pass filter #input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input) # Low pass filter #input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input) # Compression input = compress(input, attack = 15.0, gain = 2.0, knee = 1.0, ratio = 3.0, release = 60.0, threshold = -24.0) # Normalization input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -40.0) # Optimize mp3 audio recording level mp3_audio = amplify(0.65,input) # Create infallible local speaker and streaming audio input_safe = mksafe(input) # LOCAL AUDIO OUTPUT # Uncomment the appropriate line below to enable local sound # # Default audio subsystem #out (input) # # PulseAudio #output.pulseaudio(input) # # ALSA output.alsa(input_safe) # Dump mp3 audio files to Apache web server output.file(%mp3(stereo=true), "/var/www/html/op25/MPSCS-%Y-%m-%d/hour-%H.mp3", mp3_audio, fallible=true, append=true, reopen_when={0m}) # ICECAST STREAMING # Uncomment to enable output to an icecast server # Change the "host", "password", and "mount" strings appropriately first! # For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file # output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="op25", password="hackme", mean(input_safe))
 
Top