OP25
OP25 is an open-source implementation of the APCO Project 25 digital radio standard.
There have been a number of changes in its dependencies that cause recent version not to work. The important ones are:
- Removal of Legacy USRP code from GNU Radio (replaced by UHD)
- IT++ BCH routine no longer behaves as expected, so the error checking on the frame header never succeeds
- GNU Radio (and GRUEL) have changed and certain files are no longer found by the build system (e.g. gruel_common.i)
Here are some notes on getting it working.
Note: if you already have OP25 installed, fear not! I have published detailed instructions on how you can easily have multiple side-by-side installations of the same GNU Radio module, such as OP25.
Latest
This section applies to version 306 of the SVN source.
Apply the patch in the root of your source directory:
patch -p0 < r307.diff
Then go through the build process from the top (i.e. you must start with bootstrap!).
From gr-baz, copy (or symlink) the Legacy USRP shim usrp.py into the GNU Radio Python directory. This will enable all applications that use the legacy USRP Source Python interface to talk to any device supported by UHD! For example:
sudo ln -s ~/src/gr-baz/python/usrp.py /usr/local/lib/python2.7/dist-packages/gnuradio/usrp.py
Once OP25 is installed, you can test the decoder in GNU Radio Companion by opening the OP25.grc file. Make sure you:
- download, compile and install gr-baz#OP25 for its OP25 extensions
- enable the appropriate source block for your setup (e.g. USRP, RTL2382U dongle or file source), and disable the rest!
DES-OFB & More
A while ago I modified version 219of the SVN source to support DES-OFB decryption, among other things. This went unmaintained and was never merged. Therefore proceed at your own risk. Perhaps a kind soul will consider merging into the latest source?
This version has several features:
- DES-OFB decryption (entered as 64-bit hex key, uses Phil Karn's DES source)
- Dumps voice frames, encryption state and more to console
- Error correction on Low Speed Data Word
- Hamming error detection at frame level
- Decodes additional information from LDU1 and LDU2
- Uses Pavel's imbe_vocoder, which at the time produced better audio than the internal software_imbe_decoder
It should also be noted that the code is ugly (e.g. decryption done inside software_imbe_decoder.cc and decrypted frames are sent from there to imbe_vocoder).
Instructions:
- Check out version 219of the SVN source:
-
svn co http://op25.osmocom.org/svn/trunk@219 op25
-
- Apply the [patch] in the source directory
-
patch -p0 < r219.des-ofb.diff
-
- Configure
- Compile imbe_vocoder and install
- Modify your environment so the linker can find the imbe_vocoder:
-
LD_LIBRARY_PATH=<OP25 build directory>/imbe_vocoder/src/lib/.libs:/usr/local/lib:$LD_LIBRARY_PATH
-
- Compile decoder and install
- Copy <build directory>/imbe_vocoder/src/lib/_op25_imbe.so and <build directory>/imbe_vocoder/src/lib/_op25_imbe.la to GNU Radio's Python installation directory, for example:
-
/usr/local/lib/python2.7/dist-packages/gnuradio/
-
Then you can test the decoder in GNU Radio Companion (as above) with OP25.grc from gr-baz#OP25, or you can run audio_p25_rx.py as follows:
./audio_p25_rx.py -f <freq>M -R <side> -O -o <output WAV file>.wav -k <DES key, 16 hex chars>
|