All Projects → windytan → Redsea

windytan / Redsea

Licence: mit
A lightweight RDS to JSON decoder

Projects that are alternatives of or similar to Redsea

Wmbusmeters
Read the wireless mbus protocol to acquire utility meter readings.
Stars: ✭ 172 (-44.69%)
Mutual labels:  raspberry-pi, rtl-sdr
Dumpvdl2
VDL Mode 2 message decoder and protocol analyzer
Stars: ✭ 100 (-67.85%)
Mutual labels:  raspberry-pi, rtl-sdr
Iotwifi
Raspberry Pi (arm) wifi configuration container. Configure and control wifi connectivity with a JSON based REST api.
Stars: ✭ 236 (-24.12%)
Mutual labels:  json, raspberry-pi
R2cloud
Decode satellite signals on Raspberry PI or any other 64-bit intel.
Stars: ✭ 125 (-59.81%)
Mutual labels:  raspberry-pi, rtl-sdr
Fiscalberry
[JSON ↔ HW] Connect things using JSON API with the fiscalberry websocket server interact easily with any kind of Hardware. Another IoT solution...
Stars: ✭ 44 (-85.85%)
Mutual labels:  json, raspberry-pi
Live Stream Radio
24/7 live stream video radio station CLI / API 📹 📻
Stars: ✭ 175 (-43.73%)
Mutual labels:  json, raspberry-pi
Pifmadv
Advanced Raspberry Pi FM transmitter with RDS encoding
Stars: ✭ 316 (+1.61%)
Mutual labels:  rds, raspberry-pi
Portablecellnetwork
Utilize a Raspberry Pi and a Nuand BladeRF to generate your own portable local cell network
Stars: ✭ 302 (-2.89%)
Mutual labels:  raspberry-pi
Muuntaja
Clojure library for fast http api format negotiation, encoding and decoding.
Stars: ✭ 304 (-2.25%)
Mutual labels:  json
Toapi
Every web site provides APIs.
Stars: ✭ 3,209 (+931.83%)
Mutual labels:  json
Raspotify
Spotify Connect client for the Raspberry Pi that Just Works™
Stars: ✭ 3,623 (+1064.95%)
Mutual labels:  raspberry-pi
Iot 433mhz
🌐 IoT System to control 433 MHz RC power sockets, PIR, Door Sensors and much more.
Stars: ✭ 301 (-3.22%)
Mutual labels:  raspberry-pi
Bebop
An extremely simple, fast, efficient, cross-platform serialization format
Stars: ✭ 305 (-1.93%)
Mutual labels:  json
Ikigajson
A high performance JSON library in Swift
Stars: ✭ 302 (-2.89%)
Mutual labels:  json
Deepkit Framework
A new full-featured and high-performance web framework for sophisticated Typescript projects like complex admin interfaces, websites, games, desktop and mobile apps.
Stars: ✭ 307 (-1.29%)
Mutual labels:  json
K3sup
bootstrap Kubernetes with k3s over SSH < 1 min 🚀
Stars: ✭ 4,012 (+1190.03%)
Mutual labels:  raspberry-pi
Awesome Raspberry Pi
curated list of projects with raspberry pi
Stars: ✭ 309 (-0.64%)
Mutual labels:  raspberry-pi
Ultrajson
Ultra fast JSON decoder and encoder written in C with Python bindings
Stars: ✭ 3,504 (+1026.69%)
Mutual labels:  json
Pi Hole Unbound Wireguard
Turning your Raspberry Pi into an ad-blocking VPN with built-in DNS resolution using Pi-Hole, Unbound & WireGuard.
Stars: ✭ 302 (-2.89%)
Mutual labels:  raspberry-pi
Serialize.linq
C# library to serialize LINQ expressions
Stars: ✭ 304 (-2.25%)
Mutual labels:  json

redsea RDS decoder

redsea is a lightweight command-line FM-RDS decoder for Linux/macOS. It supports a large subset of RDS features.

release build

Decoded RDS groups are printed to the terminal as line-delimited JSON objects or, optionally, undecoded hex blocks (-x). Please refer to the wiki for input data formats.

Redsea can be used with any RTL-SDR USB radio stick with the rtl_fm tool, or any other SDR via csdr, for example. It can also decode raw ASCII bitstream, the hex format used by RDS Spy, and audio files containing multiplex signals (MPX). These use cases are documented in the wiki.

Example output:

{"pi":"0xD3C2","group":"0A","ps":"MDR JUMP","di":{"dynamic_pty":true},"is_music":true,"prog_type":"Pop music","ta":false,"tp":false}
{"pi":"0xD3C2","group":"2A","prog_type":"Pop music","tp":false}
{"pi":"0xD3C2","group":"2A","radiotext":"Das Leichteste der Welt von Silbermond JETZT AUF MDR JUMP","prog_type":"Pop music","tp":false}
{"pi":"0xD3C2","group":"12A","prog_type":"Pop music","radiotext_plus":{"item_running":true,"item_toggle":1,"tags":[{"content-type":"item.title","data":"Das Leichteste der Welt"},{"content-type":"item.artist","data":"Silbermond"}]},"tp":false}
{"pi":"0xD3C2","group":"3A","open_data_app":{"app_name":"RadioText+ (RT+)","oda_group":"12A"},"prog_type":"Pop music","tp":false}

Contents

Installation

These commands should be run in the terminal. Don't type the $ in the beginning.

  1. Install the prerequisites. On Ubuntu:

     $ sudo apt install git build-essential autoconf libsndfile1-dev libliquid-dev
    

Or on macOS (OSX) using Homebrew:

    $ brew install autoconf automake libsndfile liquid-dsp
    $ xcode-select --install
  1. Clone the repository (unless you downloaded a release zip file):

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

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

     $ make install
    

How to later get the latest updates and recompile:

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

For a slower machine it can take some time to compile the TMC support. This can be disabled (./configure --disable-tmc).

If you only need to decode hex or binary input and don't need demodulation, you can compile redsea without liquid-dsp (./configure --without-liquid).

Usage

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

The simplest way to view RDS groups using rtl_fm is:

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

Please refer to the wiki for more details and usage examples.

Full usage

radio_command | redsea [OPTIONS]
redsea -f WAVFILE

-b, --input-bits       Input is an unsynchronized ASCII bit stream
                       (011010110...). All characters but '0' and '1'
                       are ignored.

-c, --channels CHANS   Number of channels in the raw input signal. Each
                       channel is demodulated independently.

-e, --feed-through     Echo the input signal to stdout and print
                       decoded groups to stderr.

-E, --bler             Display the average block error rate, or the
                       percentage of blocks that had errors before
                       error correction. Averaged over the last 12
                       groups. For hex input, this is the percentage
                       of missing blocks.

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

-h, --input-hex        The input is in the RDS Spy hex format.

-l, --loctable DIR     Load TMC location table from a directory in TMC
                       Exchange format. This option can be specified
                       multiple times to load several location tables.

-p, --show-partial     Show some multi-group data even before they've been
                       fully received (PS names, RadioText, alternative
                       frequencies). partial_ will be prepended to their
                       names. This is good for noisy conditions.

-r, --samplerate RATE  Set sample frequency of the raw input signal in Hz.
                       Will resample (slow) if this differs from 171000 Hz.

-R, --show-raw         Show raw group data as hex in the JSON stream.

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

-u, --rbds             RBDS mode; use North American program type names
                       and "back-calculate" the station's call sign from
                       its PI code. Note that this calculation gives an
                       incorrect call sign for most stations that transmit
                       TMC.

-v, --version          Print version string and exit.

-x, --output-hex       Output hex groups in the RDS Spy format,
                       suppressing JSON output.

Formatting and filtering the JSON output

The JSON output can be tidied and/or colored using jq:

$ rtl_fm ... | redsea | jq

It can also be used to extract only certain fields, for instance the program type:

$ rtl_fm ... | redsea | jq '.prog_type'

Requirements

  • Linux or macOS
  • For realtime decoding, a Raspberry Pi 1 or faster
  • ~8 MB of free memory (~128 MB for RDS-TMC)
  • C++14 compiler
  • GNU autotools
  • libiconv
  • libsndfile
  • liquid-dsp
  • rtl_fm (from rtl-sdr) or any other source that can output demodulated FM multiplex signals

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

Contributing

Bug reports are welcome. See CONTRIBUTING for more information.

Also, if a station in your area is transmitting an interesting RDS feature that should be implemented in redsea, I would be happy to see a minute or two's worth of hex data using the -x switch. You could use a gist or an external pastebin service and post a link to it.

Licensing

Redsea 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 and iconvpp have their own licenses.) See LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].