Update on Update on P25 Scanner

SDR

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.


26 thoughts on “Update on Update on P25 Scanner”

  1. Dustin Bening says:

    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

  2. Skyler says:

    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?

    1. n8ur says:

      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!

  3. Dustin Bening says:

    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.

  4. Skyler says:

    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..

  5. JG says:

    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?

    1. JG says:

      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?

      1. n8ur says:

        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

  6. JG says:

    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

  7. JG says:

    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?

    1. n8ur says:

      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…

  8. JG says:

    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

    1. n8ur says:

      Excellent! Congrats on getting it running.

      73,
      John

  9. J JoeOJO Joe says:

    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

    1. n8ur says:

      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!

      1. joe says:

        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

        1. n8ur says:

          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.

  10. JP says:

    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

  11. JP says:

    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?

    1. n8ur says:

      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.

  12. JP says:

    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?

  13. JP says:

    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

  14. JP says:

    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

  15. Mark Hoageson says:

    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

    1. n8ur says:

      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

      1. Mark Hoageson says:

        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.

Leave a Reply to n8ur Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>