Reference library for the M17 open digital-voice protocol.
Find a file
2026-01-25 14:35:19 +01:00
.github community: add GitHub funding definition so that a "Sponsor" button appears 2025-10-17 12:15:54 -05:00
decode minor tweaks 2026-01-18 11:07:16 +01:00
doc CMake build 2024-01-24 12:25:12 -05:00
encode minor polishes in the convolutional encoder 2026-01-18 13:11:52 +01:00
math got rid of some pedantic warnings 2026-01-25 14:35:19 +01:00
payload got rid of some pedantic warnings 2026-01-25 14:35:19 +01:00
phy minor tweaks 2026-01-18 11:07:16 +01:00
unit_tests fixed radius and lat/lon calculation 2026-01-18 12:49:08 +01:00
.gitignore Revert "versioning improvement" 2025-06-11 16:03:02 +02:00
CMakeLists.txt added missing .c file 2026-01-17 15:20:47 +01:00
LICENSE moved libm17 to a separate repo 2024-01-24 11:25:39 +01:00
m17.c minor tweaks 2026-01-18 11:07:16 +01:00
m17.h got rid of some pedantic warnings 2026-01-25 14:35:19 +01:00
Makefile got rid of some pedantic warnings 2026-01-25 14:35:19 +01:00
README.md readme update 2026-01-17 17:39:41 +01:00

libm17

Overview

Libm17 is a C implementation of the M17 protocol's RF stack, as described by its specification document.

The library includes:

  • soft symbol slicer (RX) and symbol mapper (TX),
  • convolutional encoder with soft Viterbi decoder (utilizing fixed point arithmetic),
  • Golay encoder with soft decoder (fixed point arithmetic),
  • bit interleaver and randomizer,
  • cyclic redundancy check (CRC) calculation (LSF/LSD and arbitrary input),
  • callsign encoder and decoder,
  • LSF/LSD META field extended callsign data, cryptographic nonce, and GNSS position data encoders/decoders,
  • Root Raised Cosine (RRC) filter taps (for 24kHz and 48kHz sample rates) - linear and polyphase.

There's no support for any encryption within the library - it has to be handled by the developer, using own code.

Address encoding convention

As per the specification document, the address space is divided into parts. Encodable callsign space is accessed by using the base40 alphabet. If the first character is set to #, the address belongs to the extended hash-address space. The broadcast address is represented by @ALL. Zero-address is invalid and decodes into a null-string. The reserved chunk for application use cannot be accessed using any string.

Legacy Makefile building

  1. Build the shared object libm17.so by running make.
  2. Optionally, the library object can be installed with make install.

Unit tests are available and can be compiled and run with make test && make testrun.

Cmake building

  1. Configure the build - run cmake -B build to get default options.
  2. Build the library by running cmake --build build.
  3. At this point tests can be run by doing any of:
  • cmake --build build --target test
  • ctest --test-dir build
  • ./build/unit_tests/unit_tests
  1. Finally, installation is just sudo cmake --install build

Unit tests

Unit tests use the Unity unit testing framework.