Skip to content

xsystemgr/dmrlib

Repository files navigation

dmrlib

C library for Digital Mobile Radio

Build Status

About

dmrlib is a C library for building Digital Mobile Radio applications, included are a couple of utilities that build on dmrlib.

These applications are for educational purposes and should be used by licensed HAM radio operators, commercial use is strictly prohibited.

Compiling

The following software is required to compile dmrlib:

If you enable the mbelib proto (--with-mbelib):

To compile dmrlib, you run:

$ ./configure && make

To compile dmrlib for debugging:

$ ./configure --with-debug && make

This should result with libdmr built in the build directory.

Compiling on Linux

On Debian (compatible) systems, you need the following packages:

~$ sudo apt-get install gcc git python-jinja2 libtalloc-dev

For the mbe proto:

~$ sudo apt-get install portaudio-dev

Now clone the repository and build the software:

~$ git clone --recursive https://github.com/pd0mz/dmrlib
...
~$ cd dmrlib
dmrlib$ ./configure
...

Compiling on OS X

Using Homebrew, you need the following packages:

~$ brew install talloc python libpcap
...
~$ pip install Jinja2
...

For the mbe proto:

~$ brew install portaudio

See compiling on Linux on how to build dmrlib.

Compiling on Windows

Tested to work with the Minimalist GNU for Windows (MinGW) compiler. You also need to get these packages:

Make sure you install the Git Bash shell when prompted in the installer.

Start the Git Bash shell, then enter:

~$ git clone --recursive https://github.com/pd0mz/dmrlib
...
~$ cd dmrlib
dmrlib$ ./configure
...

If configure can't find Python, you can run Wright (our configuration utility) manually:

~$ export PYTHONPATH=$(pwd)/site_wright
~$ /c/Python27/pythonw.exe -m wright.main [.. configure flags ..]

Contributing

Check out https://github.com/pd0mz/dmrlib

Supported features

Cyclic Redundancy Checks

Algorithm Encoding Decoding
CRC-5
CRC-9 👍 👍
CRC-16 (CCITT) 👍 👍
CRC-32 👍 👍

(Forward) Error Correction

Algorithm Encoding Decoding
Block Product Turbo Code (196, 96) 👍 👍
Hamming (7,4,3) 👍 👍
Hamming (13,9,3) 👍 👍
Hamming (15,11,3) 👍 👍
Hamming (16,11,4) 👍 👍
Hamming (17,12,3) 👍 👍
Golay (20, 8) 👍 👍
Quadratic Residue (16, 7, 6) 👍 👍
Reed-Solomon (12, 9, 4) 2 👍 👍
Rate ¾ Trellis
Variable length BPTC 👍 👍
  1. Full Hamming error correction not yet available
  2. Simplified form, shortened syndrome not implemented

DMR Data Types

Data Type Encoding Decoding
Privacy Indicator
Voice Link Control 👍 👍
Terminator with Link Control
Control Signaling Block
Multiple Block Control
Data Header
Rate
Rate ¾ Data
Idle
Voice 1 👍 👍
  1. Depends on the availability of compatible hardware and/or software

Acknowledgements

The development of dmrlib wasn't possible without the help of the following people:

Bugs

You can use the issue tracker to file bug reports and feature requests.