RPi 3 & RTL-SDR/OP25?

Status
Not open for further replies.

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
You need to install gnuplot-x11, it's a dependency for the graphs from the -P flag.

Yes, that is correct. op25 will run happily without it, right up until you try to enable one and it cannot find the gnuplot command.

Code:
sudo apt-get install gnuplot-x11
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
The datascope plot looks good and seems to confirm c4fm/fsk4 modulation at least on the control channel. If yours is a phase 1 system you can stick with -D fsk4 on the command line (the modulation settings in trunk.tsv are ignored and do nothing). The mixer plot looks nicely centered, so it doesn't look like a mistune problem.

A knowledgeable source corrected a misinterpretation on my part. The datascope is showing a CQPSK signal so you should remove the "-D fsk4" option from the command line.
 

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
Yes, that is correct. op25 will run happily without it, right up until you try to enable one and it cannot find the gnuplot command.

Code:
sudo apt-get install gnuplot-x11

Thanks, guys. I should've known that.

[edit]
Meh, it's always something. I now am getting some really odd behavior. When I run my startup script (with a plot argument or not), my terminal starts to look like op25 is running, but then it goes wonky and I get a terminal prompt floating in the middle of the terminal window. The prompt "works", in that I can type in commands and they will execute, but my typing isn't echo'd onto the terminal window, and anything that is displayed (such as running "top") looks like garbage. Exiting from the terminal window and starting a new terminal window fixes the display problem.

stderr.2:
Code:
gr-osmosdr 0.1.3 (0.1.3) gnuradio 3.7.5
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
Invalid sample rate: 350000 Hz
p25_demodulator::connect_chain() demod_type=cqpsk
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::open_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

Thats it. Only difference from yesterday is I installed gnuplot as directed, AND installed GQRX yesterday when I first encountered the gnuplot issue. I suspect this install screwed something up? I used these install instructions:

http://gqrx.dk/download/gqrx-sdr-for-the-raspberry-pi
 
Last edited:

briandef

Member
Joined
Nov 7, 2017
Messages
6
Reaction score
0
A knowledgeable source corrected a misinterpretation on my part. The datascope is showing a CQPSK signal so you should remove the "-D fsk4" option from the command line.

Thanks, I'm not sure why I thought I had results with fsk4. I probably lost track after trying so many different options so many times.

I downloaded sdrtrunk and managed to get it working (on my macbook, not rpi) on this P25 system by selecting the Simulcast (LSM) demodulation config. That would appear to confirm everyone's suspicions that it's CQPSK.

I can get neither your build nor the osmocom source to process the stream consistently. Both seem to grok the control channel fine and track talkgroups and frequencies as they update, but timeout most of the time when switching over to the voice channel. It almost seems like my radio can't switch frequencies back and forth fast enough. (It's a few years old, I've got a new rtl-sdr dongle on order so I can give that a try soon.) That might also explain the few bits of success I've had with op25 so far.

I'll spend some time with sdrtrunk seeing what I can learn about the system. The software does most of what I want in the short term, including audio recordings, but I still want to get things set up on a smaller profile with a raspberry pi eventually. Thanks for the help thus far.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
Thanks, I'm not sure why I thought I had results with fsk4. I probably lost track after trying so many different options so many times.

I downloaded sdrtrunk and managed to get it working (on my macbook, not rpi) on this P25 system by selecting the Simulcast (LSM) demodulation config. That would appear to confirm everyone's suspicions that it's CQPSK.

I can get neither your build nor the osmocom source to process the stream consistently. Both seem to grok the control channel fine and track talkgroups and frequencies as they update, but timeout most of the time when switching over to the voice channel. It almost seems like my radio can't switch frequencies back and forth fast enough. (It's a few years old, I've got a new rtl-sdr dongle on order so I can give that a try soon.) That might also explain the few bits of success I've had with op25 so far.

I'll spend some time with sdrtrunk seeing what I can learn about the system. The software does most of what I want in the short term, including audio recordings, but I still want to get things set up on a smaller profile with a raspberry pi eventually. Thanks for the help thus far.
P25 supports late entry onto a TG so it theoretically shouldn't matter how long it takes to change frequencies.

Something else is wrong, we just haven't figured out what it is yet. The new dongle should have lower ppm correction needs and may well fix the issue.
 

fredva

Member
Feed Provider
Joined
Mar 19, 2007
Messages
2,300
Reaction score
721
Location
Virginia/West Virginia
Thanks for all the work the developers have put into this. I'm having some success experimenting with OP25 on a Raspberry Pi. I was wondering: Is there any provision to monitor Phase 1 and Phase 2 talkgroups on a trunking system at the same time? There are a number of mixed-mode systems out there.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
Thanks for all the work the developers have put into this. I'm having some success experimenting with OP25 on a Raspberry Pi. I was wondering: Is there any provision to monitor Phase 1 and Phase 2 talkgroups on a trunking system at the same time? There are a number of mixed-mode systems out there.
Op25 handles mixed system seamlessly. Just make sure you specify -2 on the command line to enable phase 2.
 

fredva

Member
Feed Provider
Joined
Mar 19, 2007
Messages
2,300
Reaction score
721
Location
Virginia/West Virginia
Op25 handles mixed system seamlessly. Just make sure you specify -2 on the command line to enable phase 2.

Oh, thank you. I had misunderstood - I thought the "-2" would only decode Phase 2 talkgroups and exclude Phase 1 talkgroups.

What I'm seeing is that the decoding starts out pretty well, but then seems to degrade over time. I'm wondering if that is because I have cheap dongles and they get a little off as time goes by, or if it might be a resource issue on the Pi. I have two dongles. The only one I've used on OP25 and the Pi requires a PPM adjustment of around 22. The other one requires a PPM of about 75 when I use it with other SDR programs on a PC. When I see that others have specified a PPM of 1 or 2, it makes me wonder about the quality of the dongles I have.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
Oh, thank you. I had misunderstood - I thought the "-2" would only decode Phase 2 talkgroups and exclude Phase 1 talkgroups.

What I'm seeing is that the decoding starts out pretty well, but then seems to degrade over time. I'm wondering if that is because I have cheap dongles and they get a little off as time goes by, or if it might be a resource issue on the Pi. I have two dongles. The only one I've used on OP25 and the Pi requires a PPM adjustment of around 22. The other one requires a PPM of about 75 when I use it with other SDR programs on a PC. When I see that others have specified a PPM of 1 or 2, it makes me wonder about the quality of the dongles I have.

Definitely sounds like you don't have temperature controlled crystal oscillators ("TCXO") and frequency drift is affecting things as they warm up. You might try keeping the dongle plugged in and then it should be warm before you use it.

Generally the $25 dongles are temp compensated and exhibit low drift as well as being pretty accurate as far as initial compensation is required. I have 3 of them and one requires 1ppm and the other two require 0ppm.
 

royldean

Member
Joined
Jan 30, 2016
Messages
471
Reaction score
103
Location
Schwenksville, PA
Anybody have any suggestions for this one? Cliffs notes is I installed GQRX on my pi to sniff out control channel issues, and that ended up totally messing up OP25 . Details below.

[edit]
Meh, it's always something. I now am getting some really odd behavior. When I run my startup script (with a plot argument or not), my terminal starts to look like op25 is running, but then it goes wonky and I get a terminal prompt floating in the middle of the terminal window. The prompt "works", in that I can type in commands and they will execute, but my typing isn't echo'd onto the terminal window, and anything that is displayed (such as running "top") looks like garbage. Exiting from the terminal window and starting a new terminal window fixes the display problem.

stderr.2:
Code:
gr-osmosdr 0.1.3 (0.1.3) gnuradio 3.7.5
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
Invalid sample rate: 350000 Hz
p25_demodulator::connect_chain() demod_type=cqpsk
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::open_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

Thats it. Only difference from yesterday is I installed gnuplot as directed, AND installed GQRX yesterday when I first encountered the gnuplot issue. I suspect this install screwed something up? I used these install instructions:

Gqrx SDR for the Raspberry Pi – Gqrx SDR
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
Anybody have any suggestions for this one? Cliffs notes is I installed GQRX on my pi to sniff out control channel issues, and that ended up totally messing up OP25 . Details below.

I'm going to take a stab that it's something to do with the "invalid sample rate" error message. Try changing your sample rate to "-S 274000" and re-run.
 

wildbillx

Member
Premium Subscriber
Joined
Feb 25, 2006
Messages
436
Reaction score
86
Location
Cape May, NJ
How do you make this into a clickable icon?
I have a touch screen on my rp3.
cd ~/op25/op25/gr-op25_repeater/apps
./rx.py --args "rtl=0" --gains 'lna:46' -D cqpsk -f 773.30625e6 -S 274000 -d 300 -T trunk.tsv -q 1 -2 -U 2> stderr.2

Thanks
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
Can't speak for Debian, but on Ubuntu you have a folder "~/Desktop" that you can create symlinks in pointing to applications; these items will then appear on your desktop.
 

briandef

Member
Joined
Nov 7, 2017
Messages
6
Reaction score
0
P25 supports late entry onto a TG so it theoretically shouldn't matter how long it takes to change frequencies.

Something else is wrong, we just haven't figured out what it is yet. The new dongle should have lower ppm correction needs and may well fix the issue.

I think I've managed to get everything working! Basically, I had the wrong frequency and ppm offset, and I think I was just coincidentally finding the p25 control frequency. Since the offset was off, it couldn't tune to any of the trunked audio frequencies properly, except, again, coincidentally.

I used sdrtrunk to visually observe how my sdr dongle behaved and used that to figure out the proper ppm. Once I plugged the correct frequency and ppm into op25 (boatbod build), everything just seemed to come together, and audio plays out the default audio device. And I've even confirmed things work with the new sdr receiver as well.

Just for reference, my final, working command line with the first/old radio is:
./rx.py --args 'rtl' -f 774.21875e6 -N 'lna:49' -S 274000 -D cqpsk -T trunk.tsv -q 76 -w -U -P fft 2>stderr.2

My final, working command line with the new radio is:
./rx.py --args 'rtl' -f 774.21875e6 -N 'lna:49' -S 274000 -D cqpsk -T trunk.tsv -q -1 -w -U -P fft 2>stderr.2

Thank you again for all the help.
 

wildbillx

Member
Premium Subscriber
Joined
Feb 25, 2006
Messages
436
Reaction score
86
Location
Cape May, NJ
Wondering if anyone is running Kali on their RP3 and running into no audio through 1/8th or hdmi. I have the OP25 running fine and showing sound but nothing coming through speakers. aplay -l shows no sound card and I do show alsa in the mixer when running op25. But output shows dummy output (which i feel). Tried a few things from google but nothing works. Any help would be great.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
Wondering if anyone is running Kali on their RP3 and running into no audio through 1/8th or hdmi. I have the OP25 running fine and showing sound but nothing coming through speakers. aplay -l shows no sound card and I do show alsa in the mixer when running op25. But output shows dummy output (which i feel). Tried a few things from google but nothing works. Any help would be great.
Looks like you might have to install additional packages to get alsa working.

https://www.google.com/url?sa=t&sou...AMAM&usg=AOvVaw2492q6w2BVyOI0Nsch466H&ampcf=1
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
Did that earlier and still no sound.

Is the kernel module loaded?
Code:
[b]lsmod | grep snd[/b]
snd_aloop              15672  3
snd_bcm2835            24427  1
snd_pcm                98501  5 snd_aloop,snd_bcm2835
snd_timer              23968  2 snd_pcm
snd                    70032  8 snd_timer,snd_aloop,snd_bcm2835,snd_pcm

Are the requisite libraries present?
Code:
[b]apt list --installed | grep alsa[/b]

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

alsa-base/stable,now 1.0.27+1 all [installed,automatic]
alsa-utils/stable,now 1.1.3-1 armhf [installed]
gstreamer0.10-alsa/stable,now 0.10.36-2 armhf [installed,automatic]
gstreamer1.0-alsa/stable,now 1.10.4-1 armhf [installed]

Finally, what's going on in the /proc file system?
Code:
[b]ls /proc/asound[/b]
ALSA  card0  card1  cards  devices  Loopback  modules  oss  pcm  seq  timers  version
 

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
Not sure where this goes. Its not running on a RPi but it is the MAx/Boatbod version of op25 running in a VM. I've started noticing that even though the terminal window shows that it is still scanning (following the trunking system). The frequency displayed on the lower left of the window seems to be jumping from the main CC to the alternate. I hear no audio coming out. This seems to happen after running for about 24 hrs. I checked the log (stderr.2) and towards the end I see tuning errors (1200). It seems to run fine for hours and then it seems to lose the ability to tune the CC. If I bring up the Constellation plot I can see where it is decoding the signal. I see a good constellation with the clusters in the 4 corners. But no audio is heard. If I stop op25 and then restart it goes back to working correctly. I have a couple of log files captured. Unfortunately it is on a verbosity of 5. I have restarted op25 again with a level of 10 to capture more detail. Graham, if you'd like to see the log I can send it along. The RPi instance is running fine. Has been for over a week. It kinda makes me think that it may be an issue with the VM I'm using. I'm running Debian Stretch in VMWare Workstation Player 14 with 2 cores and 1GB of RAM configured for it. I have the Debian image set with indicators for the 2 cores and the RAM and it never seems to consume anywhere near all of it. I also have TOP running to see if I can see anything there.
Code:
1512075763.067403 set tgid: 711
1512075764.980267 duid3, tg(711)
1512075765.106947 duid15, tg(711)
1512075766.066288 set tgid: 711
1512075766.066474 voice update: tg(711), freq(852587500), slot(None)
1512075766.186348 set tgid: 711
1512075766.186690 set tgid: 711
1512075766.337288 set tgid: 563
1512075766.340833 set tgid: 563
1512075766.341041 set tgid: 711
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
1512075767.973887 voice timeout
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200

Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,638
Reaction score
1,032
Location
Talbot Co, MD
First up, I'm assuming you are configured for QPSK (the default) rather than FSK4? If not, remove any -D parameters from the command line and try running it again.

The log suggests you are loosing lock on the signal. Max could explain it better, but basically the qpsk tuning is a feedback loop that attempts to lock on and track the phase shifts even if the underlying base frequency drifts a bit. Once the lock gets out of whack, it's hard to get it to re-establish without human intervention.

If you are running my version of the code, try a +/- 100hz fine tuning adjustment and see if it will recapture the control channel. (Any time you dynamically adjust tuning, the demodulator is reset to the same condition it would be at startup.) Assuming that works, you should then sequentially adjust the fine tuning both up and down to find the mid-point of the tuning loop. i.e. same number of key presses up and down before you hit the +/- 1200 tuning error messages. Once you have that figured out, use the value in parentheses on the frequency line at the bottom of the terminal screen with the "-d" parameter to set fine tuning at startup.

Hope that explanation makes some sense :)


Not sure where this goes. Its not running on a RPi but it is the MAx/Boatbod version of op25 running in a VM. I've started noticing that even though the terminal window shows that it is still scanning (following the trunking system). The frequency displayed on the lower left of the window seems to be jumping from the main CC to the alternate. I hear no audio coming out. This seems to happen after running for about 24 hrs. I checked the log (stderr.2) and towards the end I see tuning errors (1200). It seems to run fine for hours and then it seems to lose the ability to tune the CC. If I bring up the Constellation plot I can see where it is decoding the signal. I see a good constellation with the clusters in the 4 corners. But no audio is heard. If I stop op25 and then restart it goes back to working correctly. I have a couple of log files captured. Unfortunately it is on a verbosity of 5. I have restarted op25 again with a level of 10 to capture more detail. Graham, if you'd like to see the log I can send it along. The RPi instance is running fine. Has been for over a week. It kinda makes me think that it may be an issue with the VM I'm using. I'm running Debian Stretch in VMWare Workstation Player 14 with 2 cores and 1GB of RAM configured for it. I have the Debian image set with indicators for the 2 cores and the RAM and it never seems to consume anywhere near all of it. I also have TOP running to see if I can see anything there.
Code:
1512075763.067403 set tgid: 711
1512075764.980267 duid3, tg(711)
1512075765.106947 duid15, tg(711)
1512075766.066288 set tgid: 711
1512075766.066474 voice update: tg(711), freq(852587500), slot(None)
1512075766.186348 set tgid: 711
1512075766.186690 set tgid: 711
1512075766.337288 set tgid: 563
1512075766.340833 set tgid: 563
1512075766.341041 set tgid: 711
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
1512075767.973887 voice timeout
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200
p25_framer::rx_sym() tuning error -1200

Mike
 
Status
Not open for further replies.
Top