Documentation

This is the documentation for NanoRDS



Installation

Dependencies

NanoRDS needs a few dependency packages in order to work.

Debian-based distros:

sudo apt install libao-dev libsamplerate0-dev

Arch-based distros:

sudo pacman -S libao libsamplerate

Fedora-based distros:

sudo dnf install libao-devel libsamplerate-devel

Downloading

You can either download the software using the download button on this website, or using git:

git clone https://github.com/barteqcz/NanoRDS

Compilation

The Makefile shipped with NanoRDS provides a few options:

  • make - compiles the program.
  • make install - compiles the program and installs it system-wide, so that running nanords anywhere in the system, runs the encoder.
  • make uninstall - uninstalls the program system-wide, so that running nanords anywhere in the system, won't run the encoder anymore.
  • make clean - removes all the .o files and the executable file from NanoRDS directory.

To run the encoder that was installed system-wide, run this anywhere:

nanords


To run the encoder that wasn't installed system-wide, run this in the NanoRDS directory:

./nanords

Notice: both make install and make uninstall have to be run as root (e.g. sudo make install or sudo make uninstall)

Command-line arguments

To list all the available command-line arguments, run:

nanords -h

FIFO creation

Create the control pipe:

mkfifo rdsfifo

Run NanoRDS with the appropriate flag:

nanords --ctl rdsfifo

Now you can send commands to fifo, to control the RDS (manually, or using some automated script). Every line must start with a valid command, followed by one space character, and the desired value. Any other line format is silently ignored.

Notice: If you create the FIFO pipe in a directory other than where the NanoRDS executable is located, be sure to specify the full path to the FIFO pipe when running NanoRDS.

FIFO Commands

PS - stands for Program Service name and it allows to broadcast a 'title' for the station that is displayed on every receiver with RDS support (that's the most basic feature). Its length can be up to 8 characters. This is how you can set it in NanoRDS via fifo

PS * RDS *


RT - stands for RadioText and is basically a longer message that is displayed in most RDS receivers. It can contain up to 64 characters, and here's how you can set it

RT This is a RadioText message :)


RTPF - a 2-bit integer, applicable when you want to transmit RT+. It sets RT+ flags - 'running' and 'toggle'

  • RTPF 0 - unsets both flags,
  • RTPF 1 - sets the toggle flag,
  • RTPF 2 - sets the running flag,
  • RTPF 3 - sets both flags

Example usage:

RTPF 2


RTP - provides data for the RT+ group (in NanoRDS, RT+ is transmitted in 11A group). Its format is

content type 1, start 1, length 1, content type 2, start 2, length 2

It takes data from the RT. Example usage:

RTP 4,0,6,1,9,8


PTY - defines Program Type, so basically what content does the station broadcast. In NanoRDS, PTY is set using a code.

PTY 10


PTYN - basically a PTY extension. Able to hold up to 8 characters, typically used to add some additional info about the broadcast content type.

PTYN CHR


PI - Program Identification is a unique 16-bit hexadecimal, 4-character code that identifies the station. Here's how you can set it in NanoRDS

PI 2F08


AF - AF stands for Alternative Frequencies and allows the receiver to switch between pointed frequencies when the signal weakens. AF has two methods - both are supported by NanoRDS.

This is how you can use AF method A in NanoRDS. It is recommended that the first frequency on the list is the one your current transmitter is on

AF s 105.1 87.7 96.4

This is how you can set AF method B. In method B, you create frequency pairs. So as in the given example, 87.7 will be the main frequency and it will define paired 87.7 with 96.4

AF s 87.7 96.4 87.7

If you wish to clear the AF list, use

AF c


ECC - 8-bit hexadecimal code that defines country of origin of the station. It can be the same for many countries, since the second condition for country identification is the PI code. If you want to disable it, set its value to 0

ECC E2


LIC - 8-bit hexadecimal code - its value defines the language of the station. If you want to disable it, set its value to 0

LIC 06


MS - music/speech flag. Music is 1 and speech is 0.

MS 1


TP - Traffic Program flag. Defines whether station broadcasts traffic info. If yes, it's set to 1; if no, it's set to 0

TP 1


TA - Traffic Announcement flag - signals that there are traffic announcements being broadcasted at the moment

TA 1


DI - Decoder Information - identifies different operating modes. This enables controlling of individual decoders. Additionally it indicates if static or dynamic PTY codes are transmitted.

DI 1


STEREO - controls the stereo pilot volume.

STEREO 9

If you want to disable Stereo pilot, simply set its value to 0.


RDS - controls the RDS subcarrier volume.

RDS 4.5

If you want to disable RDS subcarrier, simply set its value to 0.


RESET - doesn't take any arguments - resets all the encoder parameters to the default ones

RESET


PTY codes

PTY codes for RDS

  • 0 - Undefined
  • 1 - News
  • 2 - Current affairs
  • 3 - Information
  • 4 - Sport
  • 5 - Education
  • 6 - Drama
  • 7 - Culture
  • 8 - Science
  • 9 - Varied
  • 10 - Pop music
  • 11 - Rock music
  • 12 - Easy listening
  • 13 - Light classical
  • 14 - Serious classical
  • 15 - Other music
  • 16 - Weather
  • 17 - Finance
  • 18 - Children's programmes
  • 19 - Social affairs
  • 20 - Religion
  • 21 - Phone-in
  • 22 - Travel
  • 23 - Leisure
  • 24 - Jazz music
  • 25 - Country music
  • 26 - National music
  • 27 - Oldies music
  • 28 - Folk music
  • 29 - Documentary
  • 30 - Alarm test
  • 31 - Alarm

PTY codes for RBDS

  • 0 - Undefined
  • 1 - News
  • 2 - Information
  • 3 - Sports
  • 4 - Talk
  • 5 - Rock
  • 6 - Classic rock
  • 7 - Adult hits
  • 8 - Soft rock
  • 9 - TOP 40
  • 10 - Country
  • 11 - Oldies
  • 12 - Soft music
  • 13 - Nostalgia
  • 14 - Jazz
  • 15 - Classical
  • 16 - Rhythm and blues
  • 17 - Soft rhythm and blues
  • 18 - Language
  • 19 - Religious music
  • 20 - Religious talk
  • 21 - Personality
  • 22 - Public
  • 23 - College
  • 24 - Spanish talk
  • 25 - Spanish music
  • 26 - Hip hop
  • 27 - Unassigned
  • 28 - Unassigned
  • 29 - Weather
  • 30 - Emergency test
  • 31 - Emergency