OP25 OP25 P25 Phase 1

kevind963

Member
Feed Provider
Joined
Jun 22, 2012
Messages
16
I have a setup running on Windows with FMP and DSD+ using an rtl-sdr. Now I'm trying to get a similar setup running on my Raspberry Pi4. I have op25 up and running but I have the sneaking suspicion that I don't have it setup properly.

This is the command I am using:
Code:
/rx.py --args 'rtl' -g 65 -f 154.1750e6 -N 'LNA:49' -v 0 -S 1000000 -q 2 -U -l http:0.0.0.0:8080 -w
This gets me up and running with the web interface where I see "Waiting for data..." on the home page and an FFT plot as well. I also see that it logged a "Group Addr: 1 "and "Source Addr: 1" which to me indicates that it is working. I have not been able to hear any audio going out over the Pi yet but given the group/source addr=1 (dispatch) it would appear that is working...

I did not see anything logged in the terminal. Is there log file where I can see the events and decode progress like DSD+? Is there any better documentation other that https://github.com/boatbod/op25/blob/master/op25/gr-op25_repeater/apps/README which seems to be missing some explanations of certain options?

Any help appreciated!
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
95
Do you see tsbks count going up? If not, you aren't decoding anything. I run a stream on a Pi4 without issue. I have my -S slightly different, and gain is much lower. You probably have to look at the plots and get the fine tuning just right. There are a number of posts on this board you can reference for the tuning steps reference to the plots you see.

Here is my startup line:
Code:
./rx.py --nocrypt --args 'rtl=1' --gains 'lna:12' -S 960000 -T sd7-pdnorthfire.tsv -q 0 -d -0 -u 23400 -V -X -w -l http:0.0.0.0:8180
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,409
Location
Talbot Co, MD
Are you trying to monitor a P25 Conventional single frequency or a trunked system? Right now you've not configured trunking so you will not see any TSBKs in the terminal unless 154.1750Mhz happens to be the control channel frequency.

You've turned logging off (-v 0) so I suggest changing that to at least "-v 1" and append "2> stderr.2" to the command line to see what's going on. Log info will end up in the stderr.2 file.

The option "-g 65" is not required unless you are running USRP hardware. RTL gain is controlled by the "-N LNA:xx" parameter, for which I think 47 is about the maximum for an rtl device.

Do you see anything in the FFT plot?
 

kevind963

Member
Feed Provider
Joined
Jun 22, 2012
Messages
16
Thanks for the help. It is a single frequency P25 system. I've got it working with the command below and output going to the Pi4 headphone jack. I see the transmission on the FFT and I see the Group Addr & Source Addr specified on the home page of the web interface.

Code:
./rx.py --nocrypt --args 'rtl' -f 154.1750e6 -N 'LNA:49' -v 2 -S 960000 -q 0 -d 0 -U -l http:0.0.0.0:8080 -w -u 23400 -O hw:1,0 -x2
However, the audio output is barely audible. If I turn the speakers up all the way and put my ear right up to them I can barely hear it. Good news is that it sounds like it is decoding well.
Code:
speaker-test
works fine with expected volume.

Thanks again!
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,409
Location
Talbot Co, MD
Thanks for the help. It is a single frequency P25 system. I've got it working with the command below and output going to the Pi4 headphone jack. I see the transmission on the FFT and I see the Group Addr & Source Addr specified on the home page of the web interface.

Code:
./rx.py --nocrypt --args 'rtl' -f 154.1750e6 -N 'LNA:49' -v 2 -S 960000 -q 0 -d 0 -U -l http:0.0.0.0:8080 -w -u 23400 -O hw:1,0 -x2
However, the audio output is barely audible. If I turn the speakers up all the way and put my ear right up to them I can barely hear it. Good news is that it sounds like it is decoding well.
Code:
speaker-test
works fine with expected volume.

Thanks again!
You can boost op25's audio output with "-x 2.0" but you might also need to go in to 'alsamixer' and tweak the pcm settings there too.
 

kevind963

Member
Feed Provider
Joined
Jun 22, 2012
Messages
16
Still very quiet with some popping sounds too. alsamixer is turned up to 100.
 

kevind963

Member
Feed Provider
Joined
Jun 22, 2012
Messages
16
The 4-pole jack I believe is only for video output? Plus I can confirm that stereo left/right via speaker test is working properly at a good level.
 

kevind963

Member
Feed Provider
Joined
Jun 22, 2012
Messages
16
My understanding (and experience) is the circuitry on the Pi4 is designed to allow a short caused by a TRS cable. I've confirmed the cable and connection are working using the following speaker-test with loud and clear output (Details copied below). I very clearly and crisply hear "Front Left", "Front Right" output over the speakers.

OP25 produces some popping and in is inaudibly quiet. I would consider it highly unlikely that somehow OP25 is accessing the ALSA driver in such a way to output audio in a fundamentally different stereo left/right configuration on the hardware.

Is there anyway I can use OP25 to record to a wav or PCM file? That way I can isolate the speaker issue entirely and playback on another device?

Code:
speaker-test -t wav -c 2 -D hw:1,0

speaker-test 1.1.8

Playback device is hw:1,0
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 480 to 32768
Period size range from 480 to 32768
Using max buffer size 32768
Periods = 4
was set period_size = 8192
was set buffer_size = 32768
0 - Front Left
1 - Front Right
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,409
Location
Talbot Co, MD
My understanding (and experience) is the circuitry on the Pi4 is designed to allow a short caused by a TRS cable. I've confirmed the cable and connection are working using the following speaker-test with loud and clear output (Details copied below). I very clearly and crisply hear "Front Left", "Front Right" output over the speakers.

OP25 produces some popping and in is inaudibly quiet. I would consider it highly unlikely that somehow OP25 is accessing the ALSA driver in such a way to output audio in a fundamentally different stereo left/right configuration on the hardware.

Is there anyway I can use OP25 to record to a wav or PCM file? That way I can isolate the speaker issue entirely and playback on another device?

Code:
speaker-test -t wav -c 2 -D hw:1,0

speaker-test 1.1.8

Playback device is hw:1,0
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 480 to 32768
Period size range from 480 to 32768
Using max buffer size 32768
Periods = 4
was set period_size = 8192
was set buffer_size = 32768
0 - Front Left
1 - Front Right
You can reconfigure op25 to use pulse audio if you want to avoid alsa. Note that this generally has other unintended consequences on a RPi4 so it may not work for you...

With rx.py you'd add "-O pulse" to the command line.
 

wgbecks

Member
Joined
Jan 17, 2005
Messages
256
Location
Porterfield, Wisconsin
Install and setup Liquidsoap and Icecast2 server on your Pi-4. Configure rx.py to send audio via UDP (-w ) to liquidsoap. Connect to Icecast
from any number of clients devices and listen to your audio.
 
Top