OP25 OP25 on Raspberry pi3b Help

Status
Not open for further replies.

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
Ok got this running, seeing my TGs, no errors on stderr that I can tell. Read a few blogs and comments on getting audio. Which Im not. The Pi is setup right for outputting audio (youtube plays fine). Is there some arg I need to add? I saw above about a -U and -w, Ive -U already as below

./rx.py –args ‘rtl’ -N ‘LNA:47’ -S 2400000 -f 859.4000e6 -o 25000 -q 3 -T trunk.tsv -V -2 -U 2> stderr.2

Or am I suppose to be piping this to an external program or something to just listen locally to?
 

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
Got a new couple issues now. Ive got op25 working great and dialed in. I see TGs reporting and tracking.

However my op25.sh reports ./rx.py not found. Ive validated the path and it is correct. So Im having to run op25 manually for now. (lets just say I suck at scripting).

#! /bin/sh

cd /home/pi/op25/op25/gr-op25_repeater/apps

./rx.py --args 'rtl' -N 'LNA:47' -S 2400000 -f 859.3970e6 -o 25000 -q -3 -O loop0 -T trunk.tsv -V -2 -U 2> stderr-stream0.2

Further, I can not get any audio. Either local or streamed. Darkice connects to Broadcastify (least Broadcastify thinks its getting something) but its just dead air. Speakers work and output to them works (youtube), but op25 is not sending through. I did the loop method on the hagensieker tutorial. Ive looked at setting up liquidsoap, but reading the readme, it doesnt explain how to configure meta.json and "other files".
 

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy soapy redpitaya
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]
Reading blacklist file
metadata update not enabled
audio device: loop0

Lookin at other troubleshoots figured Id post this. constellations are pretty tight, and modulation is set right to cqpsk as Im seeing proper eyes on that output.
 

Attachments

  • Untitled.png
    Untitled.png
    25.2 KB · Views: 18

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
Should I be seeing something in the log after the audio device:loop0? I'm looking at other logs posted and seeing either control channel timeouts or voice updates; I get nothing
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Should I be seeing something in the log after the audio device:loop0? I'm looking at other logs posted and seeing either control channel timeouts or voice updates; I get nothing
Try adding "-v 1" to the log if you want to see voice updates.

At a guess I'd say your loopback driver isn't working. Have you tried playing to local audio (-O default)? It's always best to validate the audio before trying to stream it.
 

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
I do see voice updates now and nothing else. I also removed -2 as this is phase 1. Still hearing nothing with -O default enabled.

1550355044.016589 voice update: tg(300), freq(857987500), slot(-), prio(3)
 

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
./rx.py --args 'rtl' -N 'LNA:47' -S 250000 -f 859.3960e6 -o 25000 -q 2 -v 1 -w -O default -T trunk.tsv -U 2> stderr-stream0.2

my current setup, good lock, but still no audio. youtube on a browser works fine through speakers so its not the hardware.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Find yourself a .wav file for testing then use the aplay utility to see if it works.

aplay test.wav

This will use the default device to play the sound. You can then substitute different audio devices such as "loop0" using the -d parameter.

You can also use aplay to list the available alsa devices.

aplay -l
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Will look into this.

Also I dont mind trying liquid soap, but can you explain or provide a better writeup on the json file usage in it please?
meta.jaon is optional and not directly related to liquidsoap. Basically it allows you to send metadata info (tgid) to an icecast streaming host. You don't need to use it for liquidsoap to be able to stream your audio.
 

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
Will try to set liquidsoap up as I write this, but aplay worked fine. I got a test script wav and ran it through both local and loop0 and it was picked up remotely broadcasted. So loop0 I think is working, just its not getting fed by op25. So I guess what will cause op25 to look like its good but not feed audio?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Will try to set liquidsoap up as I write this, but aplay worked fine. I got a test script wav and ran it through both local and loop0 and it was picked up remotely broadcasted. So loop0 I think is working, just its not getting fed by op25. So I guess what will cause op25 to look like its good but not feed audio?

Hard to say. From your earlier stderr.2 log we can see that (i) audio decode is enabled, and (ii) sockaudio is going to output to device 'loop0'. On that basis, there are only two case I could see where you wouldn't get audio being played; either there is no trunking activity or the aloop kernel device isn't working.

p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[1], do_nocrypt[0]
Reading blacklist file
metadata update not enabled
audio device: loop0


Are you seeing "voice update:" messages in the log?
Are there any other pertinent messages such as "voice timeout" in the log?
 

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
This is from earlier (not infront of it right now)
1550355044.016589 voice update: tg(300), freq(857987500), slot(-), prio(3)

Was seeing plenty of lines like that after I had enabled logging verbose as suggested. Did not see any voice timeouts.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
This is from earlier (not infront of it right now)
1550355044.016589 voice update: tg(300), freq(857987500), slot(-), prio(3)

Was seeing plenty of lines like that after I had enabled logging verbose as suggested. Did not see any voice timeouts.

So it should be producing audio...
As a final check, you could increase log level to "-v 10", let it run for a bit and then search the log for "IMBE" to see if the voice codewords are being dumped. With the log turned up you can see this in real-time by running the following from the ./apps directory:
Code:
tail -f stderr.2 | grep MBE
(Note: this will dump both IMBE and AMBE if it exists)
 

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
I HAVE AUDIO!!!!! :) Sorry this makes me really freakin happy.

Thankyou for all the help so far!

Its the tuning. I dont have it dialed in enough and I also replaced the RTL stick from a nooelec v1 (black stick) to a RTLSDR v3 silver stick. (not sure if it made a difference but ya).

That said, it sounds horrible. How can I work to get it cleaned up?
What I'm currently using:
'rtl' -N 'LNA:47' -S 960000 -o 25000 -q 2 -U

Im not 100% up on what all these do as I took it from the hagensieker tutorial. I saw you recommended 960k for S but dont understand it nor the LNA and o values. This is phase 1 only btw (so no -2 or -V). Also do I need -w? Ive tried it, doesnt seem to make a difference for local broadcasting (I removed my output to loop for time being)

Also, if it matters, I see lots of IMBE, no AMBE.
 
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
I HAVE AUDIO!!!!! :) Sorry this makes me really freakin happy.

Thankyou for all the help so far!

Its the tuning. I dont have it dialed in enough and I also replaced the RTL stick from a nooelec v1 (black stick) to a RTLSDR v3 silver stick. (not sure if it made a difference but ya).

That said, it sounds horrible. How can I work to get it cleaned up?
What I'm currently using:
'rtl' -N 'LNA:47' -S 960000 -o 25000 -q 2 -U

Im not 100% up on what all these do as I took it from the hagensieker tutorial. I saw you recommended 960k for S but dont understand it nor the LNA and o values. This is phase 1 only btw (so no -2 or -V). Also do I need -w? Ive tried it, doesnt seem to make a difference for local broadcasting (I removed my output to loop for time being)

Also, if it matters, I see lots of IMBE, no AMBE.
If it's a pi3 you probably want to reduce your sample size to "-S 57600". How's the signal strength? (plot#1) LNA:47 is pretty high and may be raising the noise floor unnecessarily. Suggest 39 or lower - just enough to get good solid lock.
 

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
Noise floor is about -65:-70db, CC is about -15db before doing any changes youve proposed. I will look at them tomorrow.

Im getting "PCM underrun" multiple times in the output log. Anything to be worried on?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Noise floor is about -65:-70db, CC is about -15db before doing any changes youve proposed. I will look at them tomorrow.

Im getting "PCM underrun" multiple times in the output log. Anything to be worried on?
An occasional PCM underrun is to be expected due to dropped frames/noise etc. If it's happening constantly and glitching your audio to the point of being hard to hear then there is something wrong. Sample size (-S) plays a huge part of cpu impact on RPi3 and the more you hit the cpu the more underruns you'll experience.
 

zapman987

Member
Premium Subscriber
Joined
Jan 16, 2014
Messages
292
Location
nc, recently moved to jax, FL
So I think the PCM was a red herring. CPU is fine on this device (<20%). It was just full after 2-3 days of running.

Plot1 is not tracking right since I changed the -S. Its tracking a different CC, about 4mhz over to one side. The program is tracking my CC properly and playing the audio, so its more a visual issue. Its got my center off to one side, and shows the sampling pass way off. Ended up going back to 960000

Thanks again for all the help on this!
 
Last edited:
Status
Not open for further replies.
Top