FD Dispatch Alerts with OP25 + TTD + IAR

Bubbarx

Member
Joined
Oct 30, 2017
Messages
23
Reaction score
5
Below is a guide I decided to put together just to assist anyone interested in a cheap and relatively robust solution for their fire department or other emergency service dispatching using IAmResponding's TwoToneDetect. Unfortunately their guides only cover tapping into existing audio either via a radio, or other audio input, and not from using the Pi itself as a standalone receiver. There is already a guide for monitoring analog dispatch frequencies, so I figured I'd put one together for those who receive traditional two tone dispatches over P25 digital systems. This may not be the perfect implementation of this, and this is my first time writing a guide like this so feedback and discussion is appreciated!

For those interested in another solution:

Basic Requirements
  1. Pi 3B+ (I originally implemented this on a regular 3B. It gets the job done but working with it is very slow, so I recommend slightly better hardware.)
  2. Pi approved power supply
  3. 16gb micro sd (and a computer which will accept it or an appropriate dongle)
  4. Some type of enclosure
  5. A monitor to interface with the device, as well as your desired form of input device. Ex: Mouse & keyboard
  6. RTL-SDR dongle with suitable antenna (I used a Nooelec v4, I've had issues with the Nooelec minis failing to track after a while on Op25)
  7. A stable internet connection, preferably with an ethernet cable for reliability.
Initial Setup
  1. Connect all your hardware!
  2. Set up the Pi's micro SD card (With IAR's TTD image using Pi Imager. Note: Don't set an account password for the Pi user account)
    1. IAR TTD Image
  3. Plug the micro SD card in
  4. Start her up.
Software Setup
  1. Open up terminal and install git
    1. sudo apt-get install git
    2. sudo apt-get install xterm
  2. *If required* Set up IAR dashboard to auto display
    1. Open up new terminal and run the following:
    2. cd ~
    3. git clone GitHub - MichaelMeikle/iar-launcher: Automatically launches IAR with provided credentials
    4. cd iar-launcher
    5. mv iar-launcher.desktop ~/.config/autostart/
    6. mv sample-credentials.json credentials.json
    7. nano credentials.json
    8. Enter your credentials into this file: credentials.json, Agency, Username, Password.
    9. ctrl+x and y to save the file
    10. Every reboot your IAR will now automatically launch and sign in to your dashboard for station viewing
  3. Install and configure Op25
    1. In your terminal from before or a new terminal
    2. git clone GitHub - boatbod/op25: Fork of osmocom OP25 by boatbod
    3. cd op25
    4. ./install.sh
    5. With file explorer, navigate to ~/op25/op25/gr-op25_repeater/apps
    6. Copy the op25 .json config example and set up your system (Information can be found in Radio Reference database)
    7. Create (your_system_name).wlist and just input the talkgroup id number for your dispatch channel, ensure this is specified in your config file made above.
    8. Copy the multi-rx launch .sh example and rename to your_sys_launch.sh, and edit it with text editor to target your new config file.
  4. Set up Op25 to autolaunch
    1. Same or new terminal window
    2. cd ~/.config/autostart
    3. cp iar-launcher.desktop op25-launcher.desktop
    4. nano op25-launcher.desktop (or located it in the file browser and edit with text editor)
    5. Edit the name field from iar-launcher to op25-launcher
    6. Edit the Exec field, remove everything in quotes and replace with "cd ~/op25/op25/gr-op25_repeater/apps/ & ./your_sys_launch.sh"
    7. ctrl+x and y to save the file
    8. Op25 is now configured and ready to autolaunch
  5. Ensure TTD is launching automatically (We had an issue with this and had to create a custom file to autostart it)
    1. Same or new terminal window
    2. cd ~/.config/autostart
    3. cp iar-launcher.desktop ttd-launcher.desktop
    4. nano ttd-launcher.desktop (or located it in the file browser and edit with text editor)
    5. Edit the name field from iar-launcher to ttd-launcher
    6. Edit the Exec field, remove everything in quotes and replace with "cd ~/TTD && ./TwoToneDetect"
    7. ctrl+x and y to save the file
    8. TTD is now ready to autolaunch if you were having issues with its built in auto launching.
  6. Set up the audio piping
    1. We have to configure the audio out from Op25 to loop back to the audio in for Two Tone Detect to receive
    2. Same or new terminal
    3. sudo nano ~/etc/pulse/default.pa
    4. Scroll all the way down
    5. Add the following:
      1. #Audio loopback initialization
      2. load-module module-loopback
    6. crtl+x and y to save the file
    7. The audio should now loopback properly
    8. Enter reboot into terminal
  7. Everything should now autostart upon relaunch, and run appropriately
  8. Configure TTD
    1. Once you're back in the desktop, after a minute the script startups should be finished and you should now be looking at your IAR dashboard
    2. Alt+F4 out of the kiosk browser window
    3. Open a new browser, navigate to the TTD config window
    4. Set up TTD standalone
      1. You have to add your own tones and configuration settings as desired
    5. Set up TTD with IAR
      1. On another device, log into an admin account on your agency's IAR
      2. Generate your TTD api key
      3. On your pi, in the TTD browser window, navigate to settings, enter your API key, and save.
      4. All of your tone information will be input through your other device via the admin account, you will not need to input any tones on the Pi itself
      5. Your new tone groups created in IAR should autoload to the Pi as long as you have an established internet connection
    6. Ensure your adjust green squelch bar on TTD config's main page in accordance with their guide
  9. Configure restarts
    1. sudo crontab -e
    2. Navigate to open space in the file
    3. Enter:
      1. # Restart the Raspberry Pi every Friday at midnight
        0 0 * * 5 /sbin/reboot
    4. Pi will now reboot once a week (IAR/TTD recommends reboots every few days)
  10. Additional considerations:
    1. May have to adjust audio levels to acceptable levels for TTD
      1. New terminal window
      2. pavucontrol
      3. Look in "Playback Devices" for Op25's Alsa output and adjust as required
  11. Additional resources:
    1. Boatbod's Op25 Repo
      1. I encourage people to read the various readme's enclosed within if they aren't sure about config/setup
    2. IAR's TTD Guide
      1. Pi Specific Guide
 
Last edited:

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,321
Reaction score
109
This is great. The next version of TTD (available for testing now - see here) will support UDP audio input, which should make this a bit easier for you in the future.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,631
Reaction score
177
Location
Massachusetts
This is great. The next version of TTD (available for testing now - see here) will support UDP audio input, which should make this a bit easier for you in the future.
I can report that I have had the Beta of v75 running for several days now (on both a pi5 and a pi3) decoding from a P25 system without any significant issues. If one starts with the 64 bit RPi image provided by IaR, https://download.iamresponding.com/autolauncher/ttd-autolauncher-raspberry.zip with instructions here: https://support.iamresponding.com/h...TwoToneDetect-Raspberry-Pi-Image-Installation
you will get an image with trunk-recorder installed and most of the configuration done. Install the v75beta from andy’s post, set up TTD to receive from the UDP port, and you are on your way. Most interestingly, you can also use an analog system as a source via a SDR stick with rtlsdr-airband, Home ,again eliminating the need for a separate radio receiver.
 
Top