Git Product home page Git Product logo

darc2json's Introduction

darc2json

darc2json is a DARC demodulator for Linux/macOS. It takes an FM multiplex signal as input, in raw PCM format, and outputs line-delimited JSON messages. It was designed to be used with the RTL-SDR tool rtl_fm, but it can read any FM multiplex signals.

The default input sample rate is 228 kHz.

Supported features

Currently, darc2json will decode:

  • L5 Group Data (type 12)
  • Raw Layer 4 LMCh data if type is something else
  • Block application channel: Layer 3 data
  • TDT: Country code, network name, date and time

TODO

  • Fragmented L5
  • Short message channel
  • Synchronous Frame Messages
  • PLL and symbol synchronization
  • Error correction beyond single bit flips
  • Don't drop block sync at first error
  • More allocation-efficient handling of bitstrings
  • COT, SCOT, AFT, SAFT
  • Conditional Access at L4
  • Don't repeat unchanged service messages

Installation

You will need git, the liquid-dsp library, and GNU autotools. Audio files can be decoded if libsndfile is installed. On macOS (OSX) you will also need XCode command-line tools (xcode-select --install).

  1. Clone the repository (unless you downloaded a release zip file):

     $ git clone https://github.com/windytan/darc2json.git
     $ cd darc2json
    
  2. Compile darc2json:

     $ ./autogen.sh && ./configure && make
    
  3. Install:

     $ make install
    

It is also simple to later pull the latest updates and recompile:

    $ git pull
    $ ./autogen.sh && ./configure && make clean && make
    $ make install

Usage

The simplest way to view DARC messages using rtl_fm is:

rtl_fm -M fm -l 0 -A std -p 0 -s 228k -g 20 -F 9 -f 87.9M | darc2json

Full usage

radio_command | darc2json [OPTIONS]

By default, a 228 kHz single-channel 16-bit MPX signal is expected via
stdin.

-f, --file FILENAME    Use an audio file as MPX input. All formats
                       readable by libsndfile should work.

-r, --samplerate RATE  Set stdin sample frequency in Hz. Will resample
                       (slow) if this differs from 228000 Hz.

-t, --timestamp FORMAT Add time of decoding to JSON groups; see
                       man strftime for formatting options (or
                       try "%c").

-v, --version          Print version string.

Troubleshooting

Can't find liquid-dsp on macOS

If you've installed liquid-dsp yet configure can't find it, it's possible that XCode command line tools aren't installed. Run this command to fix it:

xcode-select --install

Can't find liquid-dsp on Linux

Try running this in the terminal:

sudo ldconfig

Licensing

darc2json is released under the MIT license, which means it is copyrighted to Oona Räisänen OH2EIQ yet you're free to use it provided that the copyright information is not removed. (jsoncpp has its own license.) See LICENSE.

darc2json's People

Contributors

windytan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.