Thursday 2 June 2016

Raspberry Pi RTL-SDR AIS marinetraffic image

Here is a Raspberry Pi SD card image that will decode AIS messages on VHF radio using an RTL-SDR dongle.

It will upload the data to marinetraffic.com (you will need to sign up to marinetraffic.com for this) and also broadcast the AIS sentences on your local area network.

This way, you can use the Raspberry Pi and RTL-SDR as an AIS receiver for OpenCPN

I have shrunk the image to fit on Dropbox.

Image file (.zip) for Raspberry Pi: *8GB SD card*

https://www.dropbox.com/s/pflj3xtczzfb2p2/marinetraffic_rtl_sdr01.zip?dl=0

Edit July 2017 - new link:

https://www.dropbox.com/s/p4wqacko4ru3jpl/marinetraffic_rtl_sdr01.zip?dl=0

~1.6GB download

Instructions for copying an image to SD card are given here:
https://www.raspberrypi.org/documentation/installation/installing-images/windows.md

Setup Instructions:

https://www.dropbox.com/s/nez9zzmkkcxcky4/Raspberry%20Pi%20RTL-SDR%20AIS%20receiver%2001.pdf?dl=0

https://www.dropbox.com/s/1q21f23xkysovd5/Raspberry%20Pi%20RTL-SDR%20AIS%20receiver%2001.pdf?dl=0


[update March 2017 - Fitipower FC0012/13 chips have different gain ranges than the suggested values in the notes. My notes are for RT820x based RTL receivers. To see your receiver's allowable gain values, 1) log into Pi via SSH2) stop the AIS code from auto running:   sudo nano ~/ais.sh 
   change line to GO=0
3) reboot the Pi (sudo reboot)
4) log in again, and run the commands:
    cd /usr/local/bin
    rtl_test
   (exit with CTRL-c)
This will list the allowable gain values for your device. Edit ~/ais.sh to use your new gain value.

I am by no means an expert. This image works for me. YMMV. I welcome feedback and improvements.

You might consider using KPLEX http://www.stripydog.com/kplex/examples/marinetraffic.html to distribute AIS to marinetraffic as well as local network addresses, instead of the 'pipe tee' method used on the image.