op25 audio problem

Status
Not open for further replies.

yerez

Member
Joined
Oct 6, 2017
Messages
21
So installed op25 and having an audio problem - can't hear any voice. Monitoring p2 tdma voice channels system.
After verifying that my antenna works well ,my rx.py running commands are correct and the system is being monitored properly as seen in terminal's window, I have noticed in the sound settings that the ALSA plug-in [python 2.7] is not installed or configured correctly (picture of application tab in sound settings is posted below) and a message saying "no application is currently playing or recording audio" appears and disappears very fast.

I have reinstalled the pulse-audio and ALSA audio driver, verified that the system is not muted and the speakers output is set to "analog stereo output", still no sound.
Also entered settings of the alsamixer from terminal and changed settings, still no change.

Ideas / Thoughts ?

Thanks in advance.
 

Attachments

  • Screenshot from 2017-10-20 18-10-39.png
    Screenshot from 2017-10-20 18-10-39.png
    22.4 KB · Views: 754

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
So installed op25 and having an audio problem - can't hear any voice. Monitoring p2 tdma voice channels system.
After verifying that my antenna works well ,my rx.py running commands are correct and the system is being monitored properly as seen in terminal's window, I have noticed in the sound settings that the ALSA plug-in [python 2.7] is not installed or configured correctly (picture of application tab in sound settings is posted below) and a message saying "no application is currently playing or recording audio" appears and disappears very fast.

I have reinstalled the pulse-audio and ALSA audio driver, verified that the system is not muted and the speakers output is set to "analog stereo output", still no sound.
Also entered settings of the alsamixer from terminal and changed settings, still no change.

Ideas / Thoughts ?

Thanks in advance.

Please can you post the beginning of your stderr.2 log file (including the entry saying "audio device: " and also the command arguments that you are using to start rx.py.

Do you see Trunk Tag and Slot info occasionally appearing on the bottom line of the terminal screen?

To test the audio subsystem you can use the "aplay" utility as follows:
cat test.wax | aplay
(assumes you have a wav file called test.wav)
 

yerez

Member
Joined
Oct 6, 2017
Messages
21
The "stderr.2" file:

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.9
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 2032000.011843 Hz
[R82XX] PLL not locked!
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
op25_udpen_socket(): enabled udp host(127.0.0.1), wireshark(23456), audio(23456)
p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[1]
audio device: default

The command to run rx.py:

./rx.py --args "rtl=0" --gains 'lna:36' -D fsk4 -P fft -f 867.47597e6 -S 1440000 -T trunk2.tsv -q 38 -V -2 -U 2> stderr.2

I indeed see Trunk Tag and Slot info occasionally appearing on the bottom line of the terminal screen.
 

yerez

Member
Joined
Oct 6, 2017
Messages
21
Please can you post the beginning of your stderr.2 log file (including the entry saying "audio device: " and also the command arguments that you are using to start rx.py.

Do you see Trunk Tag and Slot info occasionally appearing on the bottom line of the terminal screen?

To test the audio subsystem you can use the "aplay" utility as follows:
cat test.wax | aplay
(assumes you have a wav file called test.wav)

UPDATE:

I have managed to hear voice on that system with the command mentioned above.
The sound quality is very good without any static.
Unfortunately, this is not the end of it.
The voice is being heard once in a long while and very occasionally.
Before I heard any voice, op25 was running for 20 or so minutes with a total silence.
After 20 minutes, I heard some voice for 10 seconds or so (the voice has good quality) and then again silence for half an hour. Then again voice for a short period of time, then again silence for a long time and so on.
This is a very busy system with a lot of activity that I can see in the terminal's window.
Every 2-3 seconds voice is being transmitted in the system in several talk groups simultaneously.
So those very long periods of silence are not due to lack of activity on the system.
The system has (at least, by my dongle's antenna) 18 control channels.
Each of them has a very strong signal, so no problem with receiving the control channels.
Below is the terminal's window during op25 runtime.


What might be the reason for this strange situation?

Thanks.
 

Attachments

  • winsow.png
    winsow.png
    63.1 KB · Views: 661

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Curious, and I'm not sure what to make of it...
- We know that your sound hardware is working because it played audio at least once in a long while.
- We know that OP25 is seeing voice grants on the control channel and is attempting to tune them.
- What we don't know is whether OP25 is successfully decoding the voice stream, but we might assume not, since you hear nothing at all.

My guess is that somehow your tuning or ppm correction is off by just enough that although the control channel is locking in properly, your voice channels are not. Is it possible you might have the wrong modulation selected? qpsk vs c4fm/fsk4
 

yerez

Member
Joined
Oct 6, 2017
Messages
21
Curious, and I'm not sure what to make of it...
- We know that your sound hardware is working because it played audio at least once in a long while.
- We know that OP25 is seeing voice grants on the control channel and is attempting to tune them.
- What we don't know is whether OP25 is successfully decoding the voice stream, but we might assume not, since you hear nothing at all.

My guess is that somehow your tuning or ppm correction is off by just enough that although the control channel is locking in properly, your voice channels are not. Is it possible you might have the wrong modulation selected? qpsk vs c4fm/fsk4

It's a c4fm modulation.
How can I make small tuning corrections?
The "-q" argument makes gross tuning corrections in parts per million which is too big.
I need to move the demodulator just a bit to the left.
Furthermore, in the middle of the peak there is a DC spike I think needs to be avoided.
Is there anyway to do that?

Thanks.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
It's a c4fm modulation.
How can I make small tuning corrections?
The "-q" argument makes gross tuning corrections in parts per million which is too big.
I need to move the demodulator just a bit to the left.
Furthermore, in the middle of the peak there is a DC spike I think needs to be avoided.
Is there anyway to do that?

Thanks.

DC offset can be avoided with "-o 15000"
Small tuning corrections with "-d xxx" where xxx is either a positive or negative integer.

If you are using the version of op25 from my repo, you can also use the ",.<>" keys to decrement and increment the fine tuning. Its an experimental feature and has a bit of a tuning lag.
 

yerez

Member
Joined
Oct 6, 2017
Messages
21
DC offset can be avoided with "-o 15000"
Small tuning corrections with "-d xxx" where xxx is either a positive or negative integer.

If you are using the version of op25 from my repo, you can also use the ",.<>" keys to decrement and increment the fine tuning. Its an experimental feature and has a bit of a tuning lag.

The fft plot and terminal's window.
How does it look to you?
Played with the fine offset a little bit until heard voice.
Left it that way, hopefully found the right tuning.
Unfortunately, silence remains as before.
 

Attachments

  • Screenshot from 2017-10-21 17-22-07.jpg
    Screenshot from 2017-10-21 17-22-07.jpg
    36.5 KB · Views: 623
  • Screenshot from 2017-10-21 17-23-14.jpg
    Screenshot from 2017-10-21 17-23-14.jpg
    31.6 KB · Views: 619

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
That's a pretty big fine tune adjustment (3500) that you're running in the screenshot. You can tweak the ppm correction (-q xx) by 4 to achieve the same thing (4 x 867.95 = 3472).

If anything, you want to move the tune line just a hair to the left, but since you're using C4FM modulation, you might be better off switching to plot "4" (datascope) and tune so the lines converge at the 3,1,-1,-3 levels on the y axis.

Logging can be increased a little by adding "-v 1" or increased a lot by adding "-v 10". You might try increasing it to level 1 and copying the output here in case there is anything interesting popping up.

Could you post your trunk.tsv please.

Do you have any entries for whitelist and blacklist?
On the rare occasions when you do get audio, is it always the same tgid?
Is this a Phase II or mixed Phase I/II system?

Have you tried reconfiguring for cqpsk? It's possible the system is actually cqpsk modulated regardless of what it says in RRDB.
 
Last edited:

yerez

Member
Joined
Oct 6, 2017
Messages
21
That's a pretty big fine tune adjustment (3500) that you're running in the screenshot. You can tweak the ppm correction (-q xx) by 4 to achieve the same thing (4 x 867.95 = 3472).

If anything, you want to move the tune line just a hair to the left, but since you're using C4FM modulation, you might be better off switching to plot "4" (datascope) and tune so the lines converge at the 3,1,-1,-3 levels on the y axis.

Logging can be increased a little by adding "-v 1" or increased a lot by adding "-v 10". You might try increasing it to level 1 and copying the output here in case there is anything interesting popping up.

Could you post your trunk.tsv please.

Do you have any entries for whitelist and blacklist?
On the rare occasions when you do get audio, is it always the same tgid?
Is this a Phase II or mixed Phase I/II system?

Have you tried reconfiguring for cqpsk? It's possible the system is actually cqpsk modulated regardless of what it says in RRDB.

Below is the "datascope" mode picture when the offset is 0, the lines are converging exactly where you mentioned.
I think that if the line are converging at 3,1,-1,-3 where the offset is 0, it's a good indication that the tunning is very good, isn't it?
I have used the "-v 1" argument.

This is the beginning of the "stderr.2" file during OP25 run with "-v 1" argument.
It's indeed different compare to previous one without the "-v xxx" argument.

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.9
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 1444000.010137 Hz
[R82XX] PLL not locked!
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
op25_udp::eek:pen_socket(): enabled udp host(127.0.0.1), wireshark(23456), audio(23456)
p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[1]
audio device: default
1508703148.595917 voice update: tg(2433), freq(866137500), slot(1)
1508703150.319173 p25p1_fdma::rx_sym() timeout
1508703150.319718 voice timeout
1508703150.957777 voice update: tg(27005), freq(868312500), slot(1)
1508703152.679091 p25p1_fdma::rx_sym() timeout
1508703152.680305 voice timeout
1508703153.405679 voice update: tg(2433), freq(866137500), slot(1)
1508703155.041767 p25p1_fdma::rx_sym() timeout
1508703155.042334 voice timeout
1508703155.585321 voice update: tg(2433), freq(866137500), slot(1)
1508703157.219265 p25p1_fdma::rx_sym() timeout
1508703157.219533 voice timeout
1508703157.763066 voice update: tg(2433), freq(866137500), slot(1)
1508703159.486551 p25p1_fdma::rx_sym() timeout
1508703159.486985 voice timeout
1508703160.125662 voice update: tg(2469), freq(868312500), slot(0)
1508703161.846599 p25p1_fdma::rx_sym() timeout
1508703161.846730 voice timeout
1508703162.301936 voice update: tg(61239), freq(868312500), slot(1)
1508703164.025373 p25p1_fdma::rx_sym() timeout
1508703164.026376 voice timeout

Before using "-v 1", it just kept saying timeouts without any of these voice updates or voice timeouts messages.
Still no sound though.

Below is also the the "trunk.tsv" picture.
As you can see, no entries for whitelist and blacklist.
On the rare occasions where I do get audio, it's not the same tgid.
It's a mixed Phase I/II system - control channels phase I and voice channels phase 2.
The system uses "C4FM" for sure.
A friend of mine is successfully monitoring it, but uses the old version of op25 (the one with scope.py and not rx.py).
 

Attachments

  • Screenshot from 2017-10-22 23-12-37.png
    Screenshot from 2017-10-22 23-12-37.png
    46.2 KB · Views: 622
  • Screenshot from 2017-10-22 23-24-55.jpg
    Screenshot from 2017-10-22 23-24-55.jpg
    29.2 KB · Views: 610

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Tuning looks pretty close to dead-on as far as the datascope plot is concerned. The rx_sym() timeout tells the story though; please switch to cqpsk modulation and see what happens. Simplest way of doing this is to remove the "-D fsk4" and let it default to cqpsk. You can change the entry in trunk.sav but I don't think the code really cares about that setting right now.
 

yerez

Member
Joined
Oct 6, 2017
Messages
21
Tuning looks pretty close to dead-on as far as the datascope plot is concerned. The rx_sym() timeout tells the story though; please switch to cqpsk modulation and see what happens. Simplest way of doing this is to remove the "-D fsk4" and let it default to cqpsk. You can change the entry in trunk.sav but I don't think the code really cares about that setting right now.

Finaly that was it, sort of.
Both using cqpsk modulation and not fsk4 as an argument and adding the "-v 1" argument solved the problem.
The sound quality is indeed very good, much better than old version.

However, still don't get it.
Both UNITRUNKER and a friend of mine that uses the old version of op25 (no modulation argument is entered in the run command of scope.py) and monitoring the system successfully stated "c4fm" modulation.
By this new version, it seems the modulation is CQPSK.
So... can you explain it?

One more thing, is it possible that part of the system is encrypted?
Because sometimes I hear metal sound and i'm not sure what it is.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Glad it's working.

The million dollar question: "does the old scope.py op25 actually do c4fm demodulation when configured from trunk.tsv, or was it quietly handling things as cqpsk?" I'm pretty sure the answer is "No, it's cqpsk unless specifally set from the command line." From what I've seen in the code, modulation element of trunk.tsv is ignored except for one specific situation that I don't think is presently used.

Yes it is possible some TGIDs are encrypted on your system. OP25 presently does not attempt to decode or detect the presence of an encryption key so the simplest way to stop the random 'metallic' noise is to add these TGIDs to a blacklist file so they get skipped over. Most agencies that use encryption typically invoke it for specific tgids only, so you shouldn't miss much (if any) clear channel traffic with the blacklist approach.
 

yerez

Member
Joined
Oct 6, 2017
Messages
21
Glad it's working.

The million dollar question: "does the old scope.py op25 actually do c4fm demodulation when configured from trunk.tsv, or was it quietly handling things as cqpsk?" I'm pretty sure the answer is "No, it's cqpsk unless specifally set from the command line." From what I've seen in the code, modulation element of trunk.tsv is ignored except for one specific situation that I don't think is presently used.

Yes it is possible some TGIDs are encrypted on your system. OP25 presently does not attempt to decode or detect the presence of an encryption key so the simplest way to stop the random 'metallic' noise is to add these TGIDs to a blacklist file so they get skipped over. Most agencies that use encryption typically invoke it for specific tgids only, so you shouldn't miss much (if any) clear channel traffic with the blacklist approach.

Well, nice to know that demodulation method in trunk.tsv file is ignored unless fsk4 is specified in the command line.
So, scope.py default is CQPSK. That's why my friend had no problem with sound like me.
Still, rx.py is better due to superior sound qualiy.
Don't remeber demodulation method argument used in scope.py command line in any form.

One more million dollar question is why Unitrunker states a C4FM modulation while it's actually CQPSK.
I am using it to list talkgroups on this system for the talk groups file, so I can see their details in terminal's window.
Is there convenient way to do this talkgroups file than manually listing all talk groups?
I'm not sure this system is in RRDB.

Thanks for the blacklist tip.
I will use it to skip the encrypted talk groups and the metallic voice.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Well, nice to know that demodulation method in trunk.tsv file is ignored unless fsk4 is specified in the command line.
So, scope.py default is CQPSK. That's why my friend had no problem with sound like me.
Still, rx.py is better due to superior sound qualiy.
Don't remeber demodulation method argument used in scope.py command line in any form.

One more million dollar question is why Unitrunker states a C4FM modulation while it's actually CQPSK.
I am using it to list talkgroups on this system for the talk groups file, so I can see their details in terminal's window.
Is there convenient way to do this talkgroups file than manually listing all talk groups?
I'm not sure this system is in RRDB.

Thanks for the blacklist tip.
I will use it to skip the encrypted talk groups and the metallic voice.
rx.py also defaults to cqpsk unless explicitly set to c4fm using the command line parameter "-D fsk4".

The easiest way you can track TGID usage would be to enable log level 1 with "-v 1" and then look for the 'voice upset' messages in stderr.2. That message lists the frequency tuned, slot (if applicable) and tgid. Run the system for a while then grep the file and post-process with excel or whatever.
 

marcosZapta

Newbie
Joined
Aug 28, 2018
Messages
2
Hi, I have the same problem here are all the information that I have.

stderr.2 :

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.11
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
[R82XX] PLL not locked!
Using two-stage decimator for speed=2400000, decim=25/4 if1=96000 if2=24000
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
op25_audio::eek:pen_socket(): enabled udp host(127.0.0.1), wireshark(23456), audio(23456)
p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[1], do_nocrypt[0]
audio device: default
Allocating 15 zero-copy buffers
1535513513.508462 voice update: tg(7111), freq(409875000), slot(-), prio(3)
1535513516.184234 voice update: tg(6211), freq(409462500), slot(-), prio(3)
1535513518.531923 voice update: tg(7011), freq(408925000), slot(-), prio(3)
1535513520.933857 voice update: tg(7011), freq(408925000), slot(-), prio(3)

Command on the command line:

./rx.py --args 'rtl' -N 'LNA:47' -S 2400000 -f 410.458800e6 -o 48000 -v 1 -q -2 -T trunk.tsv -V -2 -U 2> stderr.2

Trunk.csv:

Sysname Control Channel List Offset NAC Modulation TGID Tags File Whitelist
0xbee00 410.458800 0 0x190 cqpsk dxxx.tsv


I did the test.wav test and It works perfectly good.

What could I be doing wrong?
 

Attachments

  • Screenshot_20180829_003036.jpg
    Screenshot_20180829_003036.jpg
    30.5 KB · Views: 268

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Everything looks correct; audio decoding is enabled, the sockaudio player is active and it looks like you've got some voice traffic on the system. Sound should be sent out on the "default" alsa device.
 

KA1RBI

Member
Joined
Aug 15, 2008
Messages
799
Location
Portage Escarpment
Sysname Control Channel List Offset NAC Modulation TGID Tags File Whitelist
0xbee00 410.458800 0 0x190 cqpsk dxxx.tsv

There's a significant discrepancy between the actual CC freq, as displayed (418.4875) versus the one in your conf file (410.4588). It isn't 100% that that's the entire trouble but should be resolved before proceeding...

Max
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
There's a significant discrepancy between the actual CC freq, as displayed (418.4875) versus the one in your conf file (410.4588). It isn't 100% that that's the entire trouble but should be resolved before proceeding...

Max

Curious observation indeed. Nice catch Max!
Since a control channel is being decoded I wonder what the radio is locking on to 8Mhz (give or take) lower than the "advertised" frequency?
 

KA1RBI

Member
Joined
Aug 15, 2008
Messages
799
Location
Portage Escarpment
Curious observation indeed. Nice catch Max!
Since a control channel is being decoded I wonder what the radio is locking on to 8Mhz (give or take) lower than the "advertised" frequency?

haha, looks like I might need glasses for sure, the displayed CC freq now looks more like 410.4875... Even with a magnifying glass it's tough to tell. That's still a significant difference...

Max
 
Status
Not open for further replies.
Top