OP25 OP25 on RaspBerry Pi 4

Status
Not open for further replies.

Mikesuper26

Member
Premium Subscriber
Joined
Oct 31, 2010
Messages
111
Location
Stamford, CT
Hello all,

I am considering purchasing a Raspberry Pi 4 along with an RTL-SDR dongle in order to monitor two P25 Phase II systems with OP25 in my area. I am also going to attempt to broadcastify both instances of OP25 so that they can be monitored remotely.

Has anyone tried to use a Raspberry Pi 4 to run multiple instances of OP25? I am concerned that multiple instances combined with broadcasting them may be too much for the Pi 4 to handle. I have a six year old desktop that I could install Linux on which might perform better but it is quite large and it isn't ideal.

Thanks in advance
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
138
I have my Pi 4 doing 2 streams no problem, and I have used a third dongle at the same time for other OP25 or whatever experiments.

I did get an external powered USB 3 hub for the dongles instead of trying to fit them on and power them all with the Pi.
 

Mikesuper26

Member
Premium Subscriber
Joined
Oct 31, 2010
Messages
111
Location
Stamford, CT
Thanks for the quick reply, just so I understand each instance of OP25 requires a separate dongle? And are you broadcasting the audio?
 

ww7ch

Member
Feed Provider
Joined
Oct 27, 2015
Messages
58
Location
Pierce County, WA
Yes it's possible and getting popular. Each op25 instance requires a separate dongle. I'm feeding several op25 streams plus an audio-only stream via liquidsoap all on a rpi4 2gb and it's rock solid with low to moderate cpu usage and room to spare.

In my case I'm using Startech 12vdc usb hubs, just be aware that the rtl2832 sticks get hot (at least the nooelec sticks I have) so you'll probably want to cool the ones that are active or at least space them out.
 

Mikesuper26

Member
Premium Subscriber
Joined
Oct 31, 2010
Messages
111
Location
Stamford, CT
Yes it's possible and getting popular. Each op25 instance requires a separate dongle. I'm feeding several op25 streams plus an audio-only stream via liquidsoap all on a rpi4 2gb and it's rock solid with low to moderate cpu usage and room to spare.

In my case I'm using Startech 12vdc usb hubs, just be aware that the rtl2832 sticks get hot (at least the nooelec sticks I have) so you'll probably want to cool the ones that are active or at least space them out.

Got it, thanks. Is it necessary to get a USB hub if I only will be using two dongles? I'm trying to keep this set up as compact as possible. Also, any recommendations for an antenna for 700mhz P25 Simulcast systems?
 

ww7ch

Member
Feed Provider
Joined
Oct 27, 2015
Messages
58
Location
Pierce County, WA
A hub isn't necessary but you'll need to use usb extension cords then. Get some that are long enough to go between the pi and wherever is a good place to keep the rtl sticks cool. I use 3-inch cords between the hub and the sticks.

For an antenna, if you are in an area where the signal of the system is strong indoors, you can use the antenna that came with the rtl stick and it should work, just leave the length short for 700 MHz. If you need something installed outside then the easiest thing to do is buy a consumer-grade cell booster yagi antenna (the smaller white log-periodic style that goes from 700-2100 MHz) and the proper coax and adapters to go from the connector on the antenna to the rf connector on the stick.

If you want to use multiple sticks on one antenna, get a Stridsberg multicoupler.
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
138
This dongle you can fit side-by-side on a Pi, but not one over the other, so you can get a max of 2 of these on one Pi without anything else (extended cables or hubs):

Just be careful you have a good power supply to power the Pi and the dongles all at the same time.
 

mikewren

Member
Feed Provider
Joined
Jul 12, 2007
Messages
30
Location
Albany, NY
Thanks for this - will be taking a stab at setting up a Pi for P25 phase I duty soon.

Any config guides or tutorials you recommend or found particularly helpful?
 

Mikesuper26

Member
Premium Subscriber
Joined
Oct 31, 2010
Messages
111
Location
Stamford, CT
Thank you both.

When looking at the Raspberry I am considering: https://www.amazon.com/CanaKit-Raspberry-4GB-Starter-MAX/dp/B07XPHWPRB?ref_=ast_sto_dp&th=1 it appears that there are four USB ports, so it would appear that I would have enough room to plug in two dongles and a USB mouse and keyboard to set it up.

I was considering a different dongle, but the one that @nick0909 suggested comes with antennas included Amazon.com: NooElec NESDR Smart v4 Bundle - Premium RTL-SDR w/Aluminum Enclosure, 0.5PPM TCXO, SMA Input & 3 Antennas. RTL2832U & R820T2-Based Software Defined Radio.: Computers & Accessories

With these two items, I think I should be good to go. Thanks everyone for the replies!
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
I could never get the audio to sound normal. It's extremely slowed down and drawn out unless I use a USB audio dongle.
 

ww7ch

Member
Feed Provider
Joined
Oct 27, 2015
Messages
58
Location
Pierce County, WA
I've been using alsa /w liquidsoap (based on boatbod's recommendation in a prior post), there are occasional instances of choppy audio out the local speaker but it's very infrequent. I've never heard choppy audio on the actual feed itself but it could be that I just haven't heard it yet.

Mike I think you're on the right track with the metal rtl sticks, not knowing any better I stacked the plastic sticks and one of them got so hot it literally melted part of the plastic housing.
 

Mikesuper26

Member
Premium Subscriber
Joined
Oct 31, 2010
Messages
111
Location
Stamford, CT
I've been using alsa /w liquidsoap (based on boatbod's recommendation in a prior post), there are occasional instances of choppy audio out the local speaker but it's very infrequent. I've never heard choppy audio on the actual feed itself but it could be that I just haven't heard it yet.

Mike I think you're on the right track with the metal rtl sticks, not knowing any better I stacked the plastic sticks and one of them got so hot it literally melted part of the plastic housing.
Wow, I had no idea they got that hot. Good to know. I will proceed and hope that I can avoid any choppy audio. Infrequent chopiness wouldn't be a deal breaker for me. I have two Whistlers that perform terribly on P25 Simulcast and have constant choppy audio, only made better with a Yagi so anything that works well is good enough for me.
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
138
Trying to remember... but I think those slim RTL dongles I suggested don't leave enough room to plug in a keyboard and mouse, they basically take up the space of the USB plug above/below it. You can fit two side by side but that is it.

But, all I do is get the Pi running, enable SSH and then run it with nothing but the dongles plugged it, connect to it from another computer over the network and do any configuration on it. Otherwise get a USB hub if you need it all plugged in at once.

I haven't had any issues with choppy audio, but I only output audio to my stream feeds, I don't play anything locally. This one is coming from OP25 using liquidsoap: San Diego City Police Dispatch Live Audio Feed
 

Mikesuper26

Member
Premium Subscriber
Joined
Oct 31, 2010
Messages
111
Location
Stamford, CT
Trying to remember... but I think those slim RTL dongles I suggested don't leave enough room to plug in a keyboard and mouse, they basically take up the space of the USB plug above/below it. You can fit two side by side but that is it.

But, all I do is get the Pi running, enable SSH and then run it with nothing but the dongles plugged it, connect to it from another computer over the network and do any configuration on it. Otherwise get a USB hub if you need it all plugged in at once.

I haven't had any issues with choppy audio, but I only output audio to my stream feeds, I don't play anything locally. This one is coming from OP25 using liquidsoap: San Diego City Police Dispatch Live Audio Feed
Got it, my plan is to also remotely control it. I will not keep the USB keyboard and mouse plugged in. Thanks!
 

Mikesuper26

Member
Premium Subscriber
Joined
Oct 31, 2010
Messages
111
Location
Stamford, CT
Hey everyone,

Just an update on this thread, I did end up purchasing a Raspberry Pi 4 along with two Metal RTL sticks I mentioned above. At this point I only intend to use one of the sticks to run a single stream - I will hold the other in reserve for a future project. I have managed to get my Pi to run in a headless configuration will using ssh to control it. I have been following an article from John's Tech Blog to get OP25 up and running. I have gotten to the point of modifying the trunk.tsv file along with the file I saved with all my talkgroups in them. When I attempt to run the following command:

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

All I get in return is a list of help options. No indication as to what failed. I did replace the frequency listed above with my control channel. Any help would be appreciated.
 

mtindor

OH/WV DB Admin
Database Admin
Joined
Dec 5, 2006
Messages
10,408
Location
Carroll Co OH / EN90LN
I think it's your -U 2 at the end. -U enables the UDP player, and I don't think there is any parameter to set with it "such as -U 2"

So just try:

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

Or, so you can get the error on stdout while testing:

./rx.py --args 'rtl' -N 'LNA:47' -S 2400000 -f 857.2625e6 -o 25000 -q -2 -T trunk.tsv -V -2 -U

Mike
 

Mikesuper26

Member
Premium Subscriber
Joined
Oct 31, 2010
Messages
111
Location
Stamford, CT
I think it's your -U 2 at the end. -U enables the UDP player, and I don't think there is any parameter to set with it "such as -U 2"

So just try:

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

Or, so you can get the error on stdout while testing:

./rx.py --args 'rtl' -N 'LNA:47' -S 2400000 -f 857.2625e6 -o 25000 -q -2 -T trunk.tsv -V -2 -U

Mike

Thanks Mike - I have tried both of the commands you listed. Now, instead of getting the help message, I get the following error both times:
gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.13.4
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!
gain: name: LNA range: start 0 stop 0 step 0
setting gain LNA to 47
supported sample rates 250000-2560000 step 24000
[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]
Traceback (most recent call last):
File "./rx.py", line 934, in <module>
rx = rx_main()
File "./rx.py", line 848, in __init__
self.tb = p25_rx_block(self.options)
File "./rx.py", line 198, in __init__
self.open_usrp()
File "./rx.py", line 775, in open_usrp
self.__set_rx_from_osmosdr()
File "./rx.py", line 703, in __set_rx_from_osmosdr
self.__build_graph(self.src, capture_rate)
File "./rx.py", line 325, in __build_graph
self.trunk_rx = trunking.rx_ctl(frequency_set = self.change_freq, debug = self.options.verbosity, conf_file = self.options.trunk_conf_file, logfile_workers=logfile_workers, meta_update = self.meta_update)
File "/home/pi/op25/gr-op25_repeater/apps/trunking.py", line 765, in __init__
self.build_config_tsv(conf_file)
File "/home/pi/op25/gr-op25_repeater/apps/trunking.py", line 826, in build_config_tsv
with open(tsv_filename, 'rb') as csvfile:
IOError: [Errno 13] Permission denied: 'trunk.tsv'

After running the command with sudo, I get the following error in OP25:
p25_framer::rx_sym() tuning error -12000.000000 tsbks 0h file or directory
p25_framer::rx_sym() tuning error -1200rcbuf_createfilemapping: createfilemapping is not available
p25_framer::rx_sym() tuning error -1200 gr::vmcircbuf_sysv_shm: shmat (3): Invalid argument
p25_framer::rx_sym() tuning error -1200 gr::vmcircbuf_sysv_shm: shmat (3): Invalid argument
p25_framer::rx_sym() tuning error -1200 gr::vmcircbuf_sysv_shm: shmat (3): Invalid argument
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
 

mtindor

OH/WV DB Admin
Database Admin
Joined
Dec 5, 2006
Messages
10,408
Location
Carroll Co OH / EN90LN
IT can't access your trunk.tsv file. Either it isn't in the directory where it expects it to be, or its owned by a user other than the one you are running OP25 under.

Mike
 
Status
Not open for further replies.
Top