Trying to get op25 running was pretty much an exercise in frustration and annoyance. I've been doing computers for quite a few years, but I'm not a linux power user. After quite a bit of trial and error, wading through multiple forum posts, and doing more trial and error, I came up with a (hopefully) complete set of step by step instructions for getting op25 up and running. These instructions assume that you have just done a clean install of ubuntu 14.04 32bit linux. I ran into multiple problems with the 64 bit version. While I'm sure that they could be overcome, it seems the 32 bit version is easier.
There are also probably other easier and/or faster ways of doing some of this stuff. Some of the stuff may be redundant. The bottom line is this is what worked for me. Your mileage may vary. Batteries not included.
So, without further ado....
Make sure you have a working internet connection.
Click on the settings icon on the left. When the system settings window opens, click on "software and updates".
The first tab (ubuntu software) should have everything checked.
Click on the second tab (other software).
The first two options should be unchecked. Check them. You may be asked for your password to authenticate after checking the first one. Give it, then check on the second one.
Click close on the lower right.
You'll be told that the software needs to be updated. Let it.
x out of the system settings window.
Open a terminal window by typing <CTRL><ALT>t
type in the following sequence of commands, pressing the enter key after each line. Anything in parentheses is a comment.
sudo apt-get update
sudo apt-get update
sudo apt-get install aptitude
sudo apt-get install aptitude
sudo aptitude update
(Yes, some of the commands are issued twice. I found that it makes it work. )
sudo apt-get update
sudo apt-get build-dep gnuradio
(hum the theme from Final Jeopardy. Make a sandwich. Get some chips to go with the sandwich. Get a cold drink to go with the sandwich and chips. Eat the sandwich and chips, and drink the cold drink. Quietly hum In A Gadda Da Vida. The long version. You're going to be here a while.)
sudo apt-get install gnuradio gnuradio-dev gr-osmosdr librtlsdr-dev libuhd-dev libhackrf-dev libitpp-dev libpcap-dev git
(go refill the cold drink and get some cookies for dessert. Eat the cookies slowly, and drink your cold drink.)
cd ~
sudo git clone git://op25.osmocom.org/op25.git
cd op25
sudo mkdir build
cd build
sudo cmake ../
sudo make
sudo make install
sudo ldconfig
Now, we're going to blacklist the standard rtlsdr driver. To do this, use the following series of commands:
cd /etc
cd modprobe.d
sudo gedit blacklist.conf
Go to the end of the file, hit enter to add a blank line (for readability) and type in the following two lines:
# this line prevents the standard dvb driver from loading
blacklist dvb_usb_rtl28xxu
At this point, you should have gnuradio and op25 installed. The next thing to do is to edit the files invoking op25 so you can listen to your system of interest.
use the following sequence of commands to create a shell file to invoke op25 on your system of interest:
cd ~
sudo gedit op25
Now, type in the following lines. We're going to assume that you want to listen to a P25 Phase II system.
#!/bin/bash
cd ~/op25/op25/gr-op25_repeater/apps
python scope.py --args 'rtl' -g 65 -f 851.200e6 -N 'LNA:49' -2 -V -v 0 -S 1000000 -q 2 -T trunk.tsv
cd ~
Save the file, and x out of gedit.
An explanation of each of the command line arguments is available in the documentation. For now, we'll point out that the number following -f is the frequency of the control channel of interest, and the number following -q is the correction factor in ppm for the sdr stick that you're using.
Next, we have to edit the trunking control files. Do the following series of commands:
cd ~/op25/op25/gr-op25_repeater/apps
sudo gedit trunk.tsv
The default file that comes with the install lists a number of systems. Delete everything after the double quotes around "Center Frequency". Hit enter to get to the beginning of a new line. Type in the following line:
"Kokomo"<tab>"851.200"<tab>"0"<tab>"0x734"<tab>"CQPSK"<tab>"trunkk.tsv"
where <tab> is the tab key. Do not insert any spaces -- use tab only.
By way of explanation, the first is the name of the system. Then comes the frequency of the control channel. You could insert several control channel frequencies separated by commas between the quotes, but I've found that this gives less than optimal performance. The remaining fields are offset, then the system ID (which you can find on RadioReference.com), the modulation type, and a file listing talkgroups. Substitute the appropriate data for your system. There is also a provision for whitelisting and blacklisting particular talkgroups, which I won't cover here.
*** Make sure that there is absolutely nothing after the final quotes. Any spaces will make the program crash. ***
At this point, save the file, and x out of gedit.
Almost there.....
Finally, we need to create a listing of talkgroups and names. This is actually optional, but it's much better listening when you can see what talkgroup is active, rather than just a number.
While there are several ways of getting a talkgroup listing into a file, I'm only going to cover manually entering talkgroups. Talkgroups are in a tab delimited file, without quotes around the talkgroup numbers and tag names. For the example file, I'm only going to put in a couple of talkgroups -- just enough that the idea is obvious.
If you've been following, you should still be in the ~/op25/op25/gr-op25_repeater/apps directory.
Perform the following series of commands:
sudo gedit trunkk.tsv
Then, enter the following lines. Press the <tab> key between the talkgroup number and talkgroup name, and press enter after the talkgroup name.
10008 County All-Talk
10022 EMS Dispatch
After you've entered your desired talkgroups, save the file, and x out of gedit.
Go back to your home directory by typing:
cd ~
To start op25, type the following
bash op25
The operation of the program has been documented elsewhere, and it's mostly self-explanatory.
A couple of hints: If you're getting choppy audio, turn off the displays for the tabs from spectrum through symbols. A Celeron 530 at 1.73 GHz would barely handle the audio with the displays turned off.
If you get a NAC error when trying to start the program, check for trailing spaces in your trunk.tsv file. *Any* spaces at the end will crash the program.
Hopefully, this will make it easier for people to get op25 up and running. Enjoy!
I know that a while back there was a grc flowraph of op25 that handled DES. Any chance of a pybombs recipe for op25 that handles RC4 as implemented in Advanced Digital Privacy?
Below is a guide to the install process, please supply feedback so that it can be improved...
First, the testing has been done on the PI 3 "B" with the default install of Raspbian. You'll need to edit the /etc/apt/sources.list file; the file contains the needed "deb-src" line in it, but it's commented out. To fix, edit the file and remove the '#' so the 'deb-src' appears in column one of the file. Save the file, then proceed with the install as follows, first installing the OP25 prerequisites:
sudo apt-get update
sudo apt-get build-dep gnuradio
sudo apt-get install gnuradio gnuradio-dev gr-osmosdr librtlsdr-dev libuhd-dev libhackrf-dev libitpp-dev libpcap-dev git
then install OP25
cd ~
git clone https://git.osmocom.org/op25https://git.osmocom.org/op25
git checkout max
cd op25
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig
The previous generation OP25 application (scope.py) is being deprecated soon; instead we now use the new rx.py. This app is discussed in the README file that's in the OP25 repo that you checked out:
op25/gr_op25_repeater/apps/README
Max
While I still remembered the steps it took for me to get OP25 running, I
thought I would document them on my "John's Geekblog" blog. I broke it
into multiple parts; part 1 is at http://blog.febo.com/wp/?p=158.
I would welcome any additions/corrections!
I also recorded a few minutes of scanning last night -- it was Friday
evening and things were hopping so there are a number of missed
messages. That video is at https://www.youtube.com/watch?v=_1jO3yM0MIA
You may note that my GUI looks a bit different than yours. I spent some
time fiddling around to give more display space for the talkgroup tag.
I have no idea what I actually did (WX GUI is incomprehensible to me),
but I finally came up with a result that doesn't look too bad.
Thanks again for all the help!
John
Hi --
After looking at the archives, I think I may need to use a different software branch, but here's where I stand:
1. Downloaded OP25 from the oscomcom site.
2. Built without any problems on Mint 17.04 with Gnuradio 3.7.11. Computer is an i7 laptop with 8GB RAM. I'm using an RTL-SDR dongle for now; I can try a USRP but wanted to start with the simpler hardware.
3. Cobbled up .tsv files for local P25 system (Ohio MARCS-IP, Montgomery County site, C4FM). This site has 30 channels and the 2.4 msps rate of the dongle can't catch them all, but I am covering the control channel pllus several more channels.
4. Scope.py seems to run fine with all windows looking proper. Selecting some tabs causes timeout errors on the console, but those stop when I switch tabs..
5. I seem to be tuned to the control channel (853.600) and see a not-terrible constellation.
6. But I don't see any traffic decoding, much less get any audio (I know that the 30 channels at this site are spread over a bandwidth greater than the RTL-SDR dongle can provide; I can bring a USRP to the game but for now would be happy just to decode control data.
I'd appreciate any help, particularly on what the scope.py command line should look like. And should I be using a version other than what is on the Osmocom site?
Thanks much,
John Ackermann N8UR
jra(a)febo.com
Per my other note, I'm now hearing all sorts of stuff from the Ohio
MARCS-IP system. I have a few much more minor questions now:
1. What's the best way to capture the "traffic" output to a file? I
want to build a list of the frequencies and talkgroups actually used.
2. Can the whitelist and blacklist entries in trunk.tsv point to files,
or do I need to list each talkgroup separately on the system line in
trunk? (I'd like to build a list of the maybe 50 out of 350 local
talkgroups that I care to hear.)
3. What's needed to be able to put scope.py in /usr/local/bin to avoid
the need to go down into op25/op25/gr-op25_repeater?
4. I'm seeing occasional aU underruns on the console; I assume that's
normal. I also see one or two talkgroups with badly chopped up audio
that trigger a lot of aU. Is my guess correct that those are encrypted?
Thanks for the help; this is going to be fun to play with.
John
If anyone is experimenting with the latest Max branch and the new rx.py app, you may have noticed that phase 2 tdma audio isn't working yet. I have some quick and dirty code that implements the missing bits if anyone wishes to try it out. The three modified files can be found in my google drive:
https://drive.google.com/open?id=0B-...DFrTGx4Vkh3em8https://drive.google.com/open?id=0B-9lC78gYedOMDFrTGx4Vkh3em8
p25_frame_assembler_impl.cc
p25p2_tdma.h
p25p2_tdma.cc
Drop them into the op25/op25/gr-op25_repeater/lib directory, perform a 'make install' (from the build directory) and then add "-2" into the rx.py command line to enable tdma decode.