JSON Configuration¶
AIS-catcher (v0.41+) supports extensive configuration through JSON files. This guide describes the JSON structure, key settings, and common patterns.
To start AIS-catcher with a JSON configuration file, use the -C option followed by the path to your config.json file:
AIS-catcher -C config.json
Basic Structure¶
A JSON configuration file always starts with the configuration header:
{
"config": "aiscatcher",
"version": 1
}
Where:
config: Identifies the configuration type. Must be"aiscatcher".version: Configuration version. Currently, only1is supported.
This is the absolute minimal structure (just the first two keys). If no receiver is configured, AIS-catcher will use the default behaviour for selecting an input device.
To select the RTL-SDR as an input device:
{
"config": "aiscatcher",
"version": 1,
"receiver": [
{
"input": "rtlsdr"
}
]
}
Note: older configurations allowed receiver selection at the root level (e.g.
input,serial). This is legacy and may disappear in a future release. Prefer defining receivers in thereceiverarray. 1
Important Notes¶
- JSON keys are case-sensitive and must be lowercase.
- CLI setting names are not case-sensitive.
- Define receivers in the
receiverarray (even for a single receiver). - Device sections (e.g.
rtlsdr,airspy,hydrasdr) configure the device, but do not select it. Useinput(and optionallyserial) inside each receiver object. activeis optional in any section; if omitted, it is assumed to betrue.- Outputs like
udpare arrays to support multiple output channels.
Configuration Keys¶
Configuration keys are grouped below by purpose.
General Overview¶
General (mostly optional) settings define fundamental aspects of AIS-catcher's operation.
Root-level keys¶
| Key | Type | Description | Documentation |
|---|---|---|---|
| General | |||
config |
string | "aiscatcher" | |
version |
number | 1 | |
sharing |
boolean | Enable community feed sharing | Community Feed |
sharing_key |
string | Community feed key | Community Feed |
| Receiver array | |||
receiver |
array | List of receiver objects (recommended even for a single receiver) 1 | Receiver configuration |
| Output channels | |||
server |
array | Web viewer configuration | Web Viewer |
udp |
array | UDP output configuration | UDP Output |
tcp |
array | TCP output configuration (client) | TCP Output |
tcp_listener |
array | TCP output configuration (server) | TCP Output |
http |
array | HTTP output configuration | HTTP Output |
mqtt |
array | MQTT output configuration | MQTT Output |
Receiver configuration (receiver array)¶
The root-level receiver key contains an array of receiver objects. This is the recommended structure going forward.
Receiver object keys¶
Each entry in the root-level receiver array is a receiver object. These keys live inside each receiver object:
| Key | Type | Description | Documentation |
|---|---|---|---|
input |
string | Selects the input device type for this receiver (e.g. rtlsdr, airspy, hydrasdr, spyserver, ...) |
Input Overview |
serial |
string/number | Receiver identifier (recommended; also used to target per-receiver CLI overrides in some setups) | |
verbose |
boolean | Enable verbose output for this receiver | Console Output |
verbose_time |
number | Verbose update interval (seconds) for this receiver | Console Output |
screen |
number | Screen output mode (0-5) for this receiver | Console Output |
meta |
string | Metadata tags (T/D/M) for this receiver | Console Output |
own_mmsi |
number | Own MMSI of receiver station | |
<device section> |
object | Device-specific configuration object matching input (e.g. rtlsdr, airspy, hydrasdr, ...). See examples in Input Device Settings. |
Input Overview |
model |
object | Decoder model configuration for this receiver | Model |
Multi-receiver example¶
Example with two receivers:
{
"config": "aiscatcher",
"version": 1,
"receiver": [
{
"input": "airspy",
"serial": "airspy",
"airspy": {
"sample_rate": "3000K"
}
},
{
"input": "rtlsdr",
"serial": "ais",
"rtlsdr": {
"bandwidth": "192k"
}
}
]
}
In this example, each receiver selects a device via input, is optionally named via serial, and is configured via its device section (e.g. rtlsdr, airspy, hydrasdr).
Input Device Settings¶
AIS-catcher supports various input devices. Each device type has specific configuration options. Below are the supported devices and their respective settings. The documentation of the relevant keys can be found in the Configuration sections. Below we provide a few examples.
RTL-SDR (rtlsdr)¶
Example
{
"rtlsdr": {
"active": true,
"rtlagc": true,
"tuner": "auto",
"bandwidth": "192K",
"sample_rate": "1536K",
"biastee": false
}
}
Airspy (airspy)¶
Example
{
"airspy": {
"sample_rate": "3000K",
"linearity": 17,
"biastee": false
}
}
HydraSDR (hydrasdr)¶
Example
{
"hydrasdr": {
"sample_rate": "3000K",
"linearity": 17,
"biastee": false
}
}
Airspy HF+ (airspyhf)¶
Example
{
"airspyhf": {
"sample_rate": "192k",
"threshold": "low",
"preamp": false
}
}
HackRF (hackrf)¶
Example
{
"hackrf": {
"sample_rate": "6144k",
"lna": 8,
"vga": 20,
"preamp": false
}
}
SDRPlay (sdrplay)¶
Example
{
"sdrplay": {
"sample_rate": "2304K",
"agc": true,
"lnastate": 5,
"grdb": 40
}
}
SoapySDR (soapysdr)¶
Example
{
"soapysdr": {
"active": true,
"device": "driver=rtlsdr",
"sample_rate": "1536K"
}
}
Serial Port Input (serialport)¶
Example
{
"serialport": {
"baudrate": 38400,
"port": "/dev/tty0"
}
}
Full Serial Port Documentation
NMEA2000 (nmea2000)¶
Example
{
"nmea2000": {
"active": true,
"port": "can0"
}
}
File Input Settings¶
WAV File (wavfile)¶
Example
{
"wavfile": {
"active": true,
"filename": "recording.wav"
}
}
Raw File (file)¶
Example
{
"file": {
"active": true,
"filename": "data.raw"
}
}
Network Input Settings¶
TCP Client (rtltcp)¶
Example
{
"rtltcp": {
"host": "192.168.1.100",
"port": 12345
}
}
SpyServer (spyserver)¶
Example
{
"spyserver": {
"host": "server.example.com",
"port": 5555
}
}
UDP Server (udpserver)¶
Example
{
"udpserver": {
"active": true,
"port": 10110
}
}
ZMQ (zmq)¶
Example
{
"zmq": {
"active": true,
"endpoint": "tcp://localhost:5555"
}
}
Output Settings¶
AIS-catcher supports various output channels. Each output channel has specific configuration options. The documentation of the relevant keys can be found in the Configuration sections with some JSON examples below.
Web Viewer (server)¶
Example
{
"server": [
{
"active": true,
"port": 8100,
"station": "My Station",
"share_loc": true,
"lat": 52,
"lon": 4.3
}
]
}
UDP Output (udp)¶
Example
{
"udp": [
{
"active": true,
"host": "192.168.1.235",
"port": 4002,
"filter": false,
"allow_type": "1,2,3,5,18,19,24"
}
]
}
TCP Output (Client) (tcp)¶
Example
{
"tcp": [
{
"active": true,
"host": "5.9.207.224",
"port": 12,
"keep_alive": false
}
]
}
TCP Output (Server) (tcp_listener)¶
Example
{
"tcp_listener": [
{
"active": true,
"port": 5012
}
]
}
HTTP Output (http)¶
Example
{
"http": [
{
"active": true,
"url": "http://example.com/ais",
"interval": 10,
"response": "json"
}
]
}
MQTT Output (mqtt)¶
Example
{
"mqtt": [
{
"active": true,
"host": "mqtt.example.com",
"port": 1883,
"topic": "ais/messages",
"username": "user",
"password": "pass"
}
]
}