-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.toml.example
More file actions
182 lines (154 loc) · 5.64 KB
/
config.toml.example
File metadata and controls
182 lines (154 loc) · 5.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Ship162 Configuration File Example
#
# This file demonstrates all available configuration options for ship162.
# Copy this file to one of the following locations:
# - $SHIP162_CONFIG (environment variable pointing to config file)
# - $XDG_CONFIG_HOME/ship162/config.toml
# - ~/.config/ship162/config.toml
# Output file for received AIS messages in JSON format
# output = "/tmp/ais_messages.jsonl"
# Logging configuration
# log_file = "/tmp/ship162.log" # Use "-" for stdout (only in non-interactive mode)
# Prevent computer from sleeping while decoding
prevent_sleep = false
# Redis configuration for message publishing
# redis_url = "redis://localhost:6379"
# redis_topic = "ship162"
# Multiple sources can be defined. Each [[sources]] section defines one source.
# --- RTL-SDR Examples ---
# Example 1: RTL-SDR with device index (default 288 kHz sample rate)
[[sources]]
rtlsdr = { device = 0 }
gain = 49.6 # Recommended gain for AIS reception (default: 49.6)
bias_tee = false # Enable to power external LNA (default: false)
# Example 2: RTL-SDR with custom sample rate (e.g., 1.536 MS/s)
# [[sources]]
# rtlsdr = { device = 0, sample_rate = 1536000 }
# gain = 49.6
# bias_tee = false
# Example 3: RTL-SDR with serial number
# [[sources]]
# rtlsdr = { serial = "00000001" }
# gain = 49.6
# bias_tee = true # Enable bias-tee for external LNA
# Example 4: RTL-SDR with manufacturer/product filters
# [[sources]]
# rtlsdr = { manufacturer = "Realtek", product = "RTL2838", serial = "00000001" }
# gain = 49.6
# --- SoapySDR Examples ---
# Example 5: SoapySDR source with RTL-SDR driver
# [[sources]]
# soapy = { args = "driver=rtlsdr" }
# gain = 49.6
# bias_tee = false
# Example 6: Airspy Mini at 3 MS/s (automatically upsampled to 3.072 MS/s)
# [[sources]]
# soapy = { args = "driver=airspy", sample_rate = 3000000 }
# gain = 49.6
# --- Direct Airspy Examples (requires `--features airspy`) ---
# Example 7: Airspy default device at 6 MS/s
# [[sources]]
# airspy = { device = 0 }
# gain = "auto"
# bias_tee = false
# Example 8: Airspy selected by serial with custom sample rate
# [[sources]]
# airspy = { serial = "0x35AC63DC2D8C7A4F", sample_rate = 3000000 }
# gain = "auto"
# --- IQ File Source ---
# Example 9: IQ file replay (assumes 288 kHz sample rate, cu8 format)
# [[sources]]
# iqfile = "/path/to/recording.iq"
# --- TCP Source ---
# Example 10: TCP source (Norwegian AIS server)
[[sources]]
tcp = "153.44.253.27:5631"
# Example 11: TCP source with SSH tunnel (requires ssh feature)
# [[sources]]
# tcp = { host = "remote-ais-server.example.com", port = 5631, jump = "jumphost.example.com" }
# or more simply
# tcp.host = "153.44.253.27"
# tcp.port = 5631
# tcp.jump = "jumphost"
# --- MQTT Source ---
# Example 12: MQTT source (Finnish Digitraffic broker)
[[sources]]
mqtt = "mqtt://mqtt.digitraffic.fi"
# ========== GAIN RECOMMENDATIONS ==========
#
# For AIS reception at 162 MHz, maximum gain is recommended:
#
# RTL-SDR: 49.6 dB (maximum gain)
# SoapySDR: 49.6 dB (when using RTL-SDR driver)
# Airspy: auto gain (recommended default)
# PlutoSDR: 73.0 dB (maximum gain)
#
# These defaults are used when gain is not specified.
#
# You may need to adjust gain based on:
# - Your antenna setup
# - Local interference levels
# - Distance from transmitters
# - Use of external LNA (Low Noise Amplifier)
#
# ========== BIAS-TEE SUPPORT ==========
#
# Bias-tee provides power to external LNAs through the antenna cable.
# Only supported on RTL-SDR and SoapySDR devices.
#
# WARNING: Only enable bias-tee if you have an LNA that requires it!
# Enabling bias-tee on devices without LNA protection can damage equipment.
#
# bias_tee = true # Enable 5V bias-tee power
# bias_tee = false # Disable (default)
# ========== SAMPLE RATE SUPPORT ==========
#
# All SDR sources (RTL-SDR, SoapySDR, PlutoSDR) support configurable sample rates.
# Default: 288 kHz (optimal for AIS reception)
#
# Supported rates (automatically decimated to 96 kHz for AIS decoding):
# - 96000 Hz (96 kHz, direct passthrough)
# - 192000 Hz (192 kHz, ÷2)
# - 288000 Hz (288 kHz, ÷3, default)
# - 384000 Hz (384 kHz, ÷4)
# - 576000 Hz (576 kHz, ÷6)
# - 768000 Hz (768 kHz, ÷8)
# - 1152000 Hz (1.152 MS/s, ÷12)
# - 1536000 Hz (1.536 MS/s, ÷16)
# - 2304000 Hz (2.304 MS/s, ÷24)
# - 3072000 Hz (3.072 MS/s, ÷32)
# - 6144000 Hz (6.144 MS/s, ÷64)
# - 12288000 Hz (12.288 MS/s, ÷128)
#
# Non-standard rates (automatically upsampled to nearest standard rate):
# - 3000000 Hz → 3.072 MS/s (Airspy Mini)
# - 6000000 Hz → 6.144 MS/s (Airspy Mini)
# - 10000000 Hz → 12.288 MS/s (Airspy R2)
#
# Example configurations:
# rtlsdr = { device = 0, sample_rate = 1536000 } # RTL-SDR at 1.536 MS/s
# soapy = { args = "driver=airspy", sample_rate = 3000000 } # Airspy at 3 MS/s
# pluto = { pluto = "192.168.2.1", sample_rate = 3072000 } # PlutoSDR at 3.072 MS/s
#
# Higher sample rates provide better signal quality but use more CPU.
# For most setups, the default 288 kHz is optimal.
# ========== SSH TUNNELING ==========
#
# SSH tunneling allows secure connections to remote AIS sources through jump hosts.
# Requires the 'ssh' feature to be enabled: cargo build --features ssh
#
# Configuration uses standard SSH setup:
# - ~/.ssh/config - SSH client configuration
# - ~/.ssh/known_hosts - Host verification keys
# - ~/.ssh/id_* - SSH keys for authentication
#
# Example SSH config (~/.ssh/config):
#
# Host jumphost.example.com
# User myuser
# IdentityFile ~/.ssh/id_ed25519
#
# TCP source with SSH tunnel:
# tcp = { host = "remote-server", port = 5631, jump = "jumphost.example.com" }
#
# The 'jump' parameter refers to a hostname in your ~/.ssh/config or a direct hostname.