π‘AIS Hardware
How to deploy your own Automatic Identification System (AIS) receiver.
In addition to utilizing AIS data provided by Spire for the Canadian coasts, you can install AIS receiver hardware to capture AIS data directly. The received data can be processed and stored in databases, which can then be used with AISdb. This approach offers additional data sources and allows users to collect and process their data (as illustrated in the pipeline below). Doing so allows you to customize your data collection efforts to meet specific needs and seamlessly integrate the data with AISdb for enhanced analysis and application. At the same time, you can share the data you collect with others.
Requirements
Raspberry Pi or other computers with internet working capability
162MHz receiver, such as the Wegmatt dAISy 2 Channel Receiver
An antenna in the VHF frequency band (30MHz - 300MHz) e.g. Shakespeare QC-4 VHF Antenna
Optionally, you may want
Antenna mount
A filtered preamp, such as this one sold by Uputronics, to improve signal range and quality
An additional option includes free AIS receivers from MarrineTraffic. This option may require you to share the data with the organization to help expand its AIS-receiving network.
Hardware Setup
When setting up your antenna, place it as high as possible and far away from obstructions and other equipment as is practical.
Connect the antenna to the receiver. If using a preamp filter, connect it between the antenna and the receiver.
Connect the receiver to your Linux device via a USB cable. If using a preamp filter, power it with a USB cable.
Validate the hardware configuration
When connected via USB, the AIS receiver is typically found under
/dev/
with a name beginning withttyACM
, for example/dev/ttyACM0
. Ensure the device is listed in this directory.To test the receiver, use the command
sudo cat /dev/ttyACM0
to display its output. If all works as intended, you will see streams of bytes appearing on the screen.
A visual example of the antenna hardware setup that MERIDIAN has available is as follows:
Software Setup
Quick Start
Connect the receiver to the Raspberry Pi via a USB port, and then run the configure_rpi.sh
script. This will install the Rust toolchain, AISdb dispatcher, and AISdb system service (described below), allowing the receiver to start at boot.
Custom Install
Install Raspberry Pi OS with SSH enabled: Visit https://www.raspberrypi.com/software/ to download and install the Raspberry Pi OS. If using the RPi imager, please ensure you run it as an administrator.
Connect the receiver: Attach the receiver to the Raspberry Pi using a USB cable. Then log in to the Raspberry Pi and update the system with the following command:
sudo apt-get update
Install the Rust toolchain: Install the Rust toolchain on the Raspberry Pi using the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Afterward, log out and log back in to add Rust and Cargo to the system path.Install the network client and dispatcher: (a) From crates.io, using
cargo install mproxy-client
(b) To install from the source, use the local path instead, e.g.cargo install --path ./dispatcher/client
Install systemd services: Set up new systemd services to run the AIS receiver and dispatcher. First, create a new text file
./ais_rcv.service
with contents in the block below, replaceUser=ais
and/home/ais
with the username and home directory chosen in step 1.
This service will broadcast receiver input downstream to aisdb.meridian.cs.dal.ca via UDP. You can add additional endpoints at this stage; for more information, see mproxy-client --help.
Additional AIS networking tools, such as mproxy-forward
, mproxy-server
, and mproxy-reverse
, are available in the ./dispatcher
source directory.
Next, link and enable the service on the Raspberry Pi to ensure the receiver starts at boot:
See more examples in docker-compose.yml
Last updated