= The Intrig Message Decoder :sectnums: :toc: :toc-placement!:
image:https://travis-ci.com/intrig/xenon.svg?branch=master["Build Status", link="https://travis-ci.com/intrig/xenon"]
toc::[]
== Introduction
Intrig Xenon provides flexible, powerful and easy to use C++ API for decoding protocol messages.
Originally developed for 3G and 4G programmers and test engineers to decode their complex messages, the xenon decoder has evolved into a general purpose open source tool with an ever expanding protocol support base.
Support for 5G is underway. See progress at https://github.com/intrig/xenon/issues/44
And, using XDDL, you can support your own proprietary message formats.
See xenon in action for yourself using the Intrig online decoder: https://intrig.com/decode/3GPP/TS-36.331/DL-DCCH-Message/0C01513C9FB9C248283B11084808F0080824810A1FA800A8202C090A1FA800010C0098090808C82E4194DFE830[SMS Message]
=== Quick Start
Xenon is a CMake based project. It builds on Linux, MacOS, and Windows.
A Makefile is provided for convenience only and can be used on MacOS and Linux.
==== Building on Mac and Linux
git clone --recurse-submodules http://github.com/intrig/xenon.git
cd xenon
cmake -B build -S . -GNinja -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build -v
For MacOS you can also use -Gxcode
in the above cmake command to make an xcode
project in the xcode
subdirectory.
==== Building on Windows
Windows requires the following steps:
This currently builds a static libary.
=== Dependencies
Checkout the .github/workflow/ccpp.yml
file to see how these are installed for
the CI system on the latest OS versions.
== Using Xenon
Link with the libxenon.so library, found in:
/usr/local/lib//libxenon.so
on Linux,/usr/local/lib/libxenon.dylib
on MacOS.C:\Program Files (x86)\xenon\lib\xenon.lib
on Windows.Header files:
/usr/local/include/xenon
on MacOS and Linux,C:\Program Files (x86)\xenon\include\xenon
on Windows.The XDDL data files:
/usr/local/share/xddl
on MacOS and Linux,C:\Program Files (x86)\xenon\share\xddl
on Windows.See the xenon/examples
directory for some common uses of the decoder.
If you want to parse your own custom protocols, then the https://github.com/intrig/xenon/blob/master/docs/xddl.adoc[XDDL Reference] is a complete reference containing useful examples.
Also, the tools directory contains useful examples, such as xenon-dm
and
xenon-xv
.
These two programs are installed into /usr/local/bin
.
=== Converting 3GPP asn.1 to XDDL
asnx
converts asn.1 PER files to xddl. It handles a subset of the asn.1 spec.
If there any problems please submit an issue.
For 3GPP specs, e.g. 36.331:
Download the latest pdf spec.
Save it to text file, e.g. 36.331.txt.
+
Ubuntu the pdftotext command can be used, for example:
+
pdftotext -nopgbrk -layout ts_136331v150700p.pdf 36.331.txt
Run: asn-strip -m 36.331.txt > 36.331.asn
Run: asnx -o TS-36.331.xddl -t 36.331.asn + Edit 36.331.asn by hand. Some of the lines may have been broken at '-' characters. Fix the errors by hand and run the above step repeatedly until you fixed the errors.
Add resulting xddl file to git.
Enjoy!