Home SDR Update on Update on P25 Scanner

Update on Update on P25 Scanner

by n8ur

Since my updated post on building a P25 trunking scanner with a Raspberry Pi and an RTL-SDR dongle, I’ve created a copy-and-play image file that gets you up and running in minutes.

I’ve put it (along with a couple of other RPi image files) at http://febo.com/pages/os_images/. The filenames are somewhat long, but modestly descriptive so you should be able to figure out which to download.

Once you have the file, unzip it and copy to an 8GB SD card. Put that in an RPi 3, attach an RTL-SDR.com v3, and adjust the configuration files to your liking, and you’re on the air.

You may also like

31 comments

Dustin Bening February 25, 2018 - 6:51 am

Just wanted to send a thank you email for the raspberry pi image and related walk throughs, seems like a few things have changed since the writing of them but it helped greatly and made for a clean install. Much appreciated Thank You

Reply
Skyler February 27, 2018 - 7:11 am

I got the image installed and set up audio, wifi, preferences, etc. I updated the config files to match my needs, however, when starting the program it flashes onto the screen and then disappears. I’m not seeing any errors just a flash of commands and then just disappears. Any ideas?

Reply
n8ur February 27, 2018 - 3:13 pm

Hi Skyler — it sounds like the program didn’t launch from the startup script (rx_cmd.sh). First thing I’d do is manually enter the command line that’s contained in rx_cmd.sh to see if you get an error that stays visible long enough to see (the problem with the shell script is that it exits and closes the window as soon as the command returns, so you lose whatever error message might show up). I’d also look at the log file (should be stderr.2) to see if there are any errors shown there.

I’d lay odds that you got a typo in the trunking.tsv script — all fields need to be tab separated, not spaces. And you need to check for matching pairs of quote marks where used. It’s really easy to mess those up.

Good luck!

Reply
Dustin Bening March 3, 2018 - 4:29 am

I’m having problems similar to Skylers, the only way i can get trunking up and running is if i only change the NAC and frequency in your trunk.tsv file if i erase any unnecessary lines in your file it starts then disappears. Also i’ve tried for a few days to get a talkgroup .tsv file to actually work and have not had any luck.

Reply
Skyler March 11, 2018 - 4:56 pm

So i got it working the next day after posting. I did have something going on with the trunk.tsv. It was working good enough but when I raised the sample rate it got so much better. Honestly, I can’t believe how well this works considering $500 scanners have so much trouble with simulcast around here.

Dustin, when you erase his info try making 100 percent sure that there are no spaces following the last bit of text. I kept having errors and couldn’t figure out why until I went to the last letter of text and held the delete key down until I was sure there wasn’t anything after that and it worked right after that.

To the OP thanks, I would have had a lot harder time getting this working on the PI and my desktop if it weren’t for the image you provided. Now to get darkice or some other streaming g software working as well..

Reply
JG March 22, 2018 - 2:42 pm

I was going to do this on a PC but I like the idea of it running on a Pi. I’m a noob so forgive my naiveness.
What does the UI look like for this setup running on the Pi?
Does anyone have a photo?
What does the configuration look like?
Does the single SDR dongle monitor the control frequency and do the jumping around to decode the channels?

Reply
JG March 25, 2018 - 3:26 am

I’ve been messing around with this all weekend… I think I am very close to having it working.
I think I need to change the WACN and SYSID that the scanner has set when I run the desktop shortcut to rx_cmd.sh. I’ve been digging through the files and see references to wacn but it is not clear how to set it as a parameter? Has anyone done this?

Reply
n8ur March 25, 2018 - 7:37 pm

Hi JG — the two critical bits of info you need about the monitored system are control frequency and Site Network Access Code (NAC). The WACN and SYSID are not required for configuration. If you’re using the Radio Reference info, the main page for, e.g., the Ohio MARCS-IP system, shows “SYSID”, “RFSS”, and “Site” info for each site, but not the NAC. You need to click on the link for the specific site, and that page shows the “Site NAC” which is what you need to put in the trunk.tsv file. When the scanner runs, it will show the WACN and SYSID info, but it gets that from the control channel data and you don’t need to provide it.

Again — the critical info for trunk.tsv is the Site NAC and at least the primary control channel. You don’t need to list the data channels, either.

Hope this helps.

John

Reply
JG March 26, 2018 - 1:57 am

Thanks John, that helps me chasing my tail on the WACN. I have the NAC in the trunk file along with the control frequency that is broadcast from a tower across the road from me. I can see constant the signal in the spectrum gnuplot window. I have a specific xxxx.tsv and a xxxx_wl.tx for my county here.
I’ve verified the audio settings and I am still not hearing anything. If I don’t specify the later 2 talk group and whitelist files, will it just tune to anything it hears?
Thank you for the help and this great image… I am very optimistic on getting this working. – Jeremy, W0JRG

Reply
JG March 27, 2018 - 1:21 am

I started looking at the scanner.log file… DUH.
After it loads up the talkgroups it shows 2 lines on the log of:

CONTROL CHANNEL TIMEOUT
CONTROL CHANNEL TIMEOUT
NAC 405 NOT CONFIGURED…. and that repeats the rest of the log.

I have the NAC set as “0x293” in the trunk file. It is not listed for my counties system, but is what I got from some local hams and what I found in some public documentation for the system online. It is the default apparently.
I have a solid control freq signal.

Any ideas?

Reply
n8ur March 27, 2018 - 2:16 pm

Not sure about the “NAC405” message vs. your set 0x293. But I know getting the correct NAC for my system took some doing as there was erroneous info floating around. Two thoughts at the moment:

1. Are you using the right modulation (fsk4 or cqpsk) for the system?

2. Maybe you’re way off frequency — the plot keys can help figure that out.

3. Try removing trunk.tsv and setting the control freq on the command line. That should automatically latch on to the system, and the console will show the NAC and other info.

Hope this helps…

Reply
JG March 28, 2018 - 1:44 am

I had the wrong NAC… Bad info like you said. The NAC is 0x405. Ran it manually without the trunk file and BAM! It came alive. Almost fell our of my chair.
THANK YOU SO MUCH!
Now to weed out all the chaff talk groups like nearby college security (i.e. radio check central)
Thank you! – jeremy

Reply
n8ur March 29, 2018 - 6:02 pm

Excellent! Congrats on getting it running.

73,
John

Reply
J JoeOJO Joe March 31, 2018 - 3:26 am

hi my name is joe and im very new at this rtl thing, i did installed this image but i cant make nothing work, i dont know how to start the op25 software and make it run. can someone please help me pretty please. thanks in advance.
so i did install the image on sd card the image did resizing, i logged in and after that im looking every where for a run file to start op25 and i cant find nothing, again im very noooooobie at this. thanks again

Reply
n8ur March 31, 2018 - 8:39 pm

Hi Joe — if you’re using the RPi GUI, click the “rxcmd” icon. If you’re logged into acconsole session, CD to ./scanner and run ./rx_cmd.sh.

Hope this helps!

Reply
joe April 15, 2018 - 3:38 pm

hi john thanks for ur reply and sorry for my delay in thanking you.
so i was able to start op25 and set up all the files, but on the system that im monitoring i cant seem to decode any of the talkgroups in DE mode just the ones in T mode and the info about it seem to be very slim online.
heres the system :https://www.radioreference.com/apps/db/?sid=8000
my run line :./rx.py -P fft –args “rtl=0” –gains ‘lna:36’ -O ‘default’ -D cqpsk -f 770.13125e6 -S 24000000 -q 0 -T trunk.tsv -V -2 -U -w 2> stderr.2

the mode DE the voice is there but very crackly
mode T superclean voice
using nooelec nesdr smart

thanks

Reply
n8ur April 19, 2018 - 2:27 pm

Hi Joe —

I’m not sure what “DE” means — digital encryption? If so, I don’t think op25 can actually decode encrypted voice, and the option is there (I think) to mute encrypted transmissions so you don’t hear the digital crud.

Reply
JP April 5, 2018 - 8:37 pm

Just wanted to thank John for providing this image of the OP25 for the PI.
The instruction are great and spot on, made this easy to get working.
I would never have been able to do this from scratch.
This sounds and scans my local P25 system better than my retail scanner.
Using a PI3 B+ with a 16GB EVO card and a RTL-SDR dongle

Reply
JP April 5, 2018 - 10:42 pm

My P25 system is a mixed p1 p2.
The p2 is rarely used but some radios does have it enabled.
I am not exactly sure if your image has the p2 enabled by default?
I have seen post that indicate -2 has to entered in the command line and that should enable both p1 and p2

I see an entry in rx_cmd.sh:

./rx.py –args ‘rtl’ –gains ‘lna:35’ -S 350000 \
-f 800e6 -g 100 -q -1 -o 50000 -T ./trunk.tsv \
–udp-player -v 2 2> ~/scanner.log

Is it the -1 I have to replace with -2 to enable both p1 as well as p2?

And are there any other adjustment that has to be made?

Reply
n8ur April 6, 2018 - 6:07 pm

Hi JP — I’ve never played with phase 2 as we’re not using it here. But I think you’re correct that changing the -1 to -2 is what you need to do. I don’t think any other changes are required.

Reply
JP April 6, 2018 - 7:56 pm

Hi John
I tried the change to -2 in the rx_cmd.sh command line.
The phase 1 radios in the system still work fine.
Unfortunately they rarely use phase 2 so I can’t know if it works.

However I checked the radio log file and it indicates this:

p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[0], do_nocrypt[0]

So the “do_phase2_tdma[0]” does that indicate it is not using it?

Reply
JP April 6, 2018 - 9:06 pm

So I looked around a lot more and found the -2 has to be added to the command line.
I left the original -1 and now has this

./rx.py –args ‘rtl’ –gains ‘lna:35′ -S 350000 \
-f 800e6 -g 100 -q -1 -o 50000 -2 -T ./trunk.tsv \
–udp-player -v 2 2> ~/scanner.log

My scanner log now says

p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[1], do_nocrypt[0]

Hopefully it is now decoding both phase 1 and phase 2

Reply
JP April 6, 2018 - 11:00 pm

Just to finish it up,

The -1 following the -q is actually a offset measurement used for dongle frequency correction.

I set this to -q -0 and my dongle is now zero on frequency as set for cc in trunk.tsv

Reply
Mark Hoageson April 19, 2018 - 2:00 am

John, thanks so much for putting this image together. I do have a hardware question
I’m running your image on a pi3B+ and a RTL-SDR RTL2832U & R820T2 Tuner (non version 3) purchased a year ago. Is the configuration that you have only functional with v3 dongles?
I can launch the shortcuts and not receive any data back on the screen but this:

NAC 0x340 WACN 0x-1 SYSID 0x-1 0.000000/0.000000 tsbks 0

Frequency 774.781250(0)

The Constellation map does show four clean segments and the optimal offset seems to be 400. I have a pair of these dongles and they both act the same.

I am monitoring the Ohio MARCS system for Cuyahoga County. I’ve validated my NAC and CC frequency from Unitracker and the trunks.tsv file. Ony minor changes were required since you are already monitoring MARCS 😉
Below is the line what I am using for my trunks.tsv file
“Cuyahoga” “774.78125” “-1” “0x340” “CQPSK” “cuyahoga.tsv” “” $

Below is a portion of my Session log:

op25_audio::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[0], do_nocrypt[0]
audio device: default
1524101897.230067 control channel timeout
1524101898.267514 control channel 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
p25_framer::rx_sym() tuning error -1200

Any ideas?
Thanks, Mark

Reply
n8ur April 19, 2018 - 2:36 pm

Hi Mark —

The system should work with pretty much any dongle; I think the earlier RTL-SDR.com unit still has the TCXO, which is really the important thing for this application.

The tuning error message could be that you’re off frequency, or I think it could also mean that you’re monitoring the wrong modulation type — sites on MARC-IP seem to use both C4FM and CQPSK.

rx.py supports a fine-tune mode and I’d play with that to see if you can get rid of the tuning error messages that way. Depending on the dongle, you might need an adjustment of less than 1 PPM to zero it in. I’ve been told that reliable P25 decoding requires frequency to be within a few hundred Hz.

Hope this helps.

John

Reply
Mark Hoageson April 19, 2018 - 9:13 pm

Thanks John for the advice. That’s exactly what it ended up being.
The adjustment was so sensitive that I was just missing it. Then I get some drift over time. I just ordered the version 3 dongle, so that should work out a lot better.
Once again, thanks so much for basically putting together a plug-n-play appliance.
Ironically, I did try it on my PiZero W and although a little stressed, it did function.
This sure beats having to but another BCD536HP just to setup for streaming on Broadcastify. The best thing is no LSM distortion!!!
Have you known or tried to use two dongles, one being dedicated to the control channel? Just curious.

Reply
Charlie Rubenstein February 20, 2020 - 3:33 am

I must be trying to burn the wrong image to the SD card. I tried the latest OP25_pi.zip, but it won’t boot on my Pi. Is that the wrong one?

Reply
n8ur February 20, 2020 - 3:53 pm

Hi Charlie — Not sure what’s going on. The image was built for an RPi 3 or 3b; I don’t know if it would work on an RPi 4 if that’s what you’re running (though I’m hoping to update to use an RPi 4 in my system one of these days).

Reply
Charles Rubenstein February 24, 2020 - 8:00 pm

I got it to boot, but the password isn’t ‘raspberry’. When I try to ssh into it, it says “permission denied”. What is the password? I used 2018-02-18_op25_pi.zip

Reply
Charles Rubenstein February 24, 2020 - 8:18 pm

BTW, I’m booting it on a Pi3B+…..I just can’t ssh into it without the correct password

Reply
Charlie February 21, 2020 - 11:24 pm

I tried booting it on a Pi3+ but it did nothing.

Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

WordPress Appliance - Powered by TurnKey Linux