8000 GitHub - xychelsea/op25: OP25
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

xychelsea/op25

 
 

Repository files navigation

OP25

Forked from boatbod/op25 "master" branch on June 19, 2020

Updated June 19, 2020

Installation

These high level instructions will lead you through installing op25 on any Debian or Ubuntu based Linux system. This software is geared towards the Raspberry Pi3B which is inexpensive but yet just powerful enough to receive, decode and stream P25 trunked radio system utilizing either the Phase 1 or Phase 2 audio codecs.

It is possible to configure and use OP25 with liquidsoap or other streaming software (such as Icecast or Darkice) but using liquidsoap setup has the advantage of completely avoiding use of the ALSA sound subsystem with has proven itself to be someway quirky and prone to problems particularly when using the loopback driver (aloop).

There are many refinements which should be made to these instructions, particularly how to configure liquidsoap and op25 to properly auto-start at boot time.

Build Prerequisites

sudo apt-get update
sudo apt-get build-dep gnuradio
sudo apt-get install \
	build-essential \
	cmake \
	doxygen \
	git \
	gnuplot-x11 \
	gnuradio \
	gnuradio-dev \
	gr-osmosdr \
	libhackrf-dev \
	libitpp-dev \
	libpcap-dev \
	librtlsdr-dev \
	libuhd-dev \
	pkg-config \
	python-numpy \
	python-requests \
	python-waitress \
	swig

OP25

git clone git://github.com/xychelsea/op25
cd op25
./install.sh 

GNUPlot-X11

This optional package enables you to view graphs within X11 windowing systems.

sudo apt-get install gnuplot-x11

GQRX

GQRX is an optional open source software defined radio receiver (SDR) powered by the GNU Radio and the Qt graphical toolkit. GQRX supports many of the SDR hardware available, including Airspy, Funcube Dongles, rtl-sdr, HackRF and USRP devices. See supported devices for a complete list.

sudo apt-get install gqrx-sdr

liquidsoap

This package enables the liquidsoap audio and video streaming language.

sudo apt-get install liquidsoap

PulseAudio

PulseAudio is optional, but preferred over default alsa.

sudo apt-get install pulseaudio pulseaudio-utils

Icecast

Optional server for streaming output from OP25.

sudo apt-get install icecast2

Follow prompts and set up appropriate passwords. Then, using your favorite text editor, you insert something like this XML snippet:

<!-- You may have multiple <listener> elements -->
 <listen-socket>
  <port>8000</port>
  <shoutcast-mount>/op25</shoutcast-mount>
</listen-socket>

Docker Container

Building the container

To build the docker container, clone the main (trunk) branch from the GitHub repository.

git clone git://github.com/xychelsea/op25.git && cd ./op25

Then, simply build the container for your system with the basic Dockerfile provided.

docker build -t xychelsea/op25:latest -f Dockerfile .

Configuration

Running OP25 and liquidsoap

Set up rx.py command line options, trunk.tsv, meta.json 8000 and other files necessary to make a working instance of op25. Edit op25.liq to configure local sound options and/or streaming to icecast server.

The screen tool can enable you to detach terminal screens.

Terminal #1:

cd ~/op25/op25/gr-op25_repeater/apps
./rx.py --nocrypt --args "rtl=0" --gains 'lna:36' -S 57600 -q 0 -d 0 -v 1 -2 -T trunk.tsv -V -w -M meta.json 2> stderr.2

(In particular note the new -w parameter, that allows liquid to connect)

Terminal #2:

cd ~/op25/op25/gr-op25_repeater/apps
./op25.liq

Terminal #3:

cd ~/op25/op25/gr-op25_repeater/apps
tail -f stderr.2

Making liquidsoap and op25 start automatically at boot

Automatically starting liquidsoap and op25 at boot time is best handled using the systemd services manager "systemctl". Two service scripts are required, and although examples are provided, these should best be edited/customized to match your exact environment. As written they assume /home/pi is the home directory which may or may not be the case...

You will also need to edit op25.sh (started by op25-rx.service) to have the command line parameters that you normally use to start rx.py

Another factor to consider is that op25 should only be auto-started at boot time when it has been configured for the http terminal type. Auto-starting the default curses terminal is not going to be successful. An example of this is to add -l http:127.0.0.1:12345

First copy the two service files into /etc/systemd/system:

sudo cp ~/op25/op25/gr-op25_repeater/apps/op25-liq.service /etc/systemd/system
sudo cp ~/op25/op25/gr-op25_repeater/apps/op25-rx.service /etc/systemd/system

Next enable and then start the two services:

sudo systemctl enable op25-liq op25-rx
sudo systemctl start op25-liq op25-rx

You can subsequently stop the services by issuing the following command:

sudo systemctl stop op25-rx
or
sudo systemctl stop op25-rx op25-liq

Icecast2 low-latency setups (optional)

Buffering may cause the stream to lag behind the metadata. To decrease latency for low-latency environments, such as highspeed networks, edit /etc/icecast2/icecast.xml to disable Icecast2 burst-on-connect and reduce burst-size.

sudo vi /etc/icecast2/icecast.xml
<!-- If enabled, this will provide a burst of data when a client
	 first connects, thereby significantly reducing the startup
	 time for listeners that do substantial buffering. However,
	 it also significantly increases latency between the source
	 client and listening client.  For low-latency setups, you
	 might want to disable this. -->
<burst-on-connect>0</burst-on-connect>
<!-- same as burst-on-connect, but this allows for being more
	 specific on how much to burst. Most people won't need to
	 change from the default 64k. Applies to all mountpoints  -->
<burst-size>0</burst-size>

Hardware Requirements

To run OP25 with software-defined radio, you will need an SDR "dongle" with antannae that plugs into your desktop, laptop, or Raspberry Pi USB port. You can usually purchase one of several SDR kits for under $30

Raspberry Pi

Raspberry Pi 3B+ or newer is recommended. Using a Raspberry Pi Zero, with a single processor core, can take a few hours to compile and install. OP25 does run on a Raspberry Pi Zero, but not very efficiently.

OP25 Software Stack

The SDR Linux Distro for Raspberry Pi

A modified Raspbian image with the latest SDR software pre-installed and ready to go. Compatible with every Raspberry Pi.(Pre-built Raspberry Pi Image with GNURadio and these software radio tools: SDR Angel, Soapy Remote, GQRX, GNURadio, LimeUtil, and LimeVNA)Note: When you use this, you still have to compile/install op25, but this can be completed successfully and easily on pi3 with install script. https://pisdr.luigifreitas.me

All Your SDR Software In A Handy Raspberry Pi Image, by Jenny List for Hackaday (goes with SDR Linux Distro for Raspberry Pi below) https://hackaday.com/2019/12/20/all-your-sdr-software-in-a-handy-raspberry-pi-image/

Docker install: https://github.com/lysol/op25-docker

Installation

Resources

Tutorials

Troubleshooting

Background on Software Defined Radio

Specific Articles

Standards

Association of Public-Safety Communications Officials International, Inc. ("APCO"), Project 25 ("P25").

OP25 dev list sample page https://osmocom.org/projects/op25/wiki/SamplesPage

Sigidwiki.com Signal Identification Guide https://www.sigidwiki.com/wiki/Project_25_(P25)#Audio_Samples

OP25 Wikis

OP25 Developer Mailing List Archives

Other Resources

Websites for looking up frequencies for a given geographical area

About

OP25

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 46.9%
  • C++ 39.6%
  • C 6.0%
  • CMake 3.1%
  • Objective-C 2.9%
  • HTML 0.6%
  • Other 0.9%
0