AIS receiver and server

The Raspberry Pi computer can act as an AIS receiver using a USB SDR dongle and serve the AIS informastion to any number of clients onboard.

More information is found here or by watching this video and Kplex. More examples are found here : NMEAS router (windows), OpenCPN repeater or OpenCPN-Networking-repeater . Most use it with OpenCPN where the AIS targets are displayed on the chart directly. It could also be used as a received for a listening station for Marine traffic web service.

The picture show a simple AIS receiver prototype where the DVT-USB receiver assembly is put in a box making at bit simpler to use and a convenient platform for the BNC VHF telescope antenna when using it from a car or sitting on the dock (I'm currently without a boat).

Using the USB-DVT or more general USB-SDR as an AIS receiver for OpenCPN is well known. This is quite easy to do and works well, see my project about USB-SRD dongle as an AIS reciver. Connecting this receiver to the Pi yacht server and let the Pi serve out AIS signals over the Ethernet to any device is a god idea. It will leave the AIS server independent of the Laptop and let the yacht server be the heart of the yacht computer system.

The build quality of USB-SDR receivers vary, which mandate more of less frequent calibration. A bit upmarket version is this low drift version which claim far better stability that the ones mostly offered. Most software come with setup for calibration. One way to calibrate is using the GSM signal which has fixed (and known) frequencies, procedure given below.

SDR-RTL and RTL-AIS software for ARM and Raspberry Pi is available for download, start here. Kplex also installs nicely as a debian package for Raspberry.

Before any usage the SDR-RTL receiver need to be calibrated. The low cost hardware in the 10 EUR USB DVT sticks are not really accurate. The crystal is not temperature controled nor of high precision. The set frequency is often a bit away from the requested. In order to calibrate the receiver one need som software, this page contain software and information to do this.

An example of calibration of my AIS receiver (picture above) using the GSM frequencies :

src/kal -s E-GSM-900

Found 1 device(s):

0: Generic RTL2832U OEM

Using device 0: Generic RTL2832U OEM

Found Rafael Micro R820T tuner

Exact sample rate is: 270833.002142 Hz

kal: Scanning for E-GSM-900 base stations.

E-GSM-900:

chan: 63 (947.6MHz - 24.346kHz) power: 28839.51

After establishing the channel number we can use this to fixed frequency to calibrate the receiver :

src/kal -c 63

Found 1 device(s):

0: Generic RTL2832U OEM

Using device 0: Generic RTL2832U OEM

Found Rafael Micro R820T tuner

Exact sample rate is: 270833.002142 Hz

kal: Calculating clock frequency offset.

Using GSM-900 channel 63 (947.6MHz)

average [min, max] (range, stddev)

- 24.252kHz [-24326, -24195] (131, 35.014236)

overruns: 0

not found: 539

average absolute error: 25.593 ppm

After many runs and waiting for the electronics (crystal) to reach thermal equlibrium I consistently get about 26 pmm offset. This number is to be noted down and used whenever calling up the radio receivcer.