RTL SDR AIS RECEIVER

rtl-sdr-ais logo

What is it ?


It is an Android app that decodes AIS messages transmitted by vessels , ships, over radio using a cheap USB DVB-T /RTL-SDR stick.
AIS messages are transmitted over VHF.
Channel A: 161.975 MHz
Channel B: 162.025 MHz.
The app decodes both channels simultaneously.
This app needs no internet connection, it decodes the real time received messages.
This is a truly standalone full featured AIS receiver.

The received messages will be translated into NMEA0183 strings wihch can be forwared then via UDP or TCP streaming to third party apps, PC programs or other devices.
Such Apps can display the received AIS data for example on a map along with informations about the received objects.

Please note: The app needs additonal (very cheap) hardware to receive the radio signals.

FEATURES


  • Receive VHF AIS radio signals vis DVB-T / RTL SDR USB Stick
  • Decode AIS messages into NMEA0183 strings ( !AIVDM )
  • Send this messages via Network (UDP/TCP)
  • Device location (GPS,Network) translation into NMEA strings
  • Loacation NEMA forwarding via Network (UDP)
    (GPGSV,GPGSA,GPZDA,GPRMC,..)
    AIS Driver:
    Get it on Google PlayAIS Share:
    Get it on Google Play

HARDWARE


Typically costs about ~ 15-35€

  • OTG capable Android device with at least Android 4.1
    (today most of the devices fullfil this )
  • OTG USB cable (use a high quality one)
  • DVB-T – RTL-SDR USB stick
    Search for RTL2832U / 820T / 820T2 USB stick.
    Cheape AliExpress.com USB 2.0 DVB-T RTL2832U+R820T2 Stick ~10€
    I recommend a high quality stick you can find it http://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/
  • DIY Antenna
    http://www.radioforeveryone.com/p/ais-antennas.html
    or just use the Antenna shipped with your dongle ( then i recomend a telescopic aerial antenna extend to 44,4 cm )
  • Area in with you can receive AIS signals ( harbour, rivers, sea ,.. )

SOFTWARE


There are two apps avaliable in the Google Play Store.

RTL SDR AIS DRIVER

RTL SDR AIS DRIVER

This is the driver app, its needed in any case.
In the driver app there is demo/test mode implmented mainly to test the app if your hardware is compatible. Please use this demo mode before you buy the full Version. The demo mode is limited to 1000 received messages.

Why this driver app ?
The driver app will run as a service for AIS SHARE app. The service (background process) will run only on request of AIS SHARE ( only the signal proczessing part of the driver will run )
There is no neagtiv effect on battery drainning with this solution. (the driver app runs as prozess of AIS Share on request, like it would be intergated into AIS Share)

DEMO MODE / TEST IT

  1. Connect the USB Dongle with your device
  2. Switch the Slider to activate the Demonstration Mode ( DEMO)

    Switch >> Demo
    Switch >> Demo << ON
  3. Press the Play Button
    Press >> Play
    Press >> Play <<

     

  4. Have a look at the output window
    Driver should start
    Driver should start

    If you find the message: Driver Start OK
    then your Android device can successfully comunicate with the USB dongle. Your Hardware is compatible.

    If you installed the APP the first time, the settings for statistic is enabled.
    After 30 secondes you should receive a report about AIS package like:

    A:Received correctly: 40 packtes, worng CRC: 8 packets, wrong size 6 packets

If you receive 0 packets or 1 packet and please set up PPM settings. ( see PPM Chapter )

Please note:

The demo mode is limitited so far for 1000 messages (chan A OR chan B).
The demo mode has no Wifi wake lock.
The demo mode can share data only to one client.
The demo mode can not share GPS positon data.
The demo mode has a a reduced GUI
Need help –> info@ebcTech.eu

AIS SHARE

AIS SHARE

This is the full version of the app.

It allowes you to stream the received AIS messages to three different UDP clients, and acts as an TCP server (limited to one client)

Also GPS data can be forwarded to a client (UDP).

In any case you need to install the RTL SDR AIS DRIVER app first. Settings you may choosen in the in the RTL SDR AIS DRIVER app will not be considered with this app. You need to configure your settings in this APP.

Installation AIS SHARE / First start

  1. Install driver app from Google PlayTM store.Get it on Google Play
    https://play.google.com/store/apps/details?id=eu.ebctech.rtl_sdr_ais_driver
    Start it one time. After that you can close the app ( RTL SDR AIS Driver )
  2. Install AIS ShareGet it on Google Play
    https://play.google.com/store/apps/details?id=eu.ebctech.ais_share
  1. Start the AIS Share app go to the setting activity

    AisShare Dongle Settings

  2. Set the PPM setting
    This is really important.
  3. Set up the UDP Share
    As UDP HOST enter the IP Adress of the device you want to share the data to.
    ( so the IP Adress of the partner )For TCP sharing, just enter a port number the Android device is listen to.
    The app acts as an TCP server. (limited to just one connection, after sending the data it will close the connection)
  4. Start the driver
    with the pink floating action button.
  5. Status
    DRV –> RTL SDR AIS DRIVER is started
    AIS,UDP,TCP,GPS,INT  –> all internal moduls are ready.
    (means not active started)
  6. Message receive
    Watch out if you receive messages.
    AisShare run 1
  7. Statistic
    After 60 seconds the first information about received frames via channel A and channel B should appear (each pair in a grid represent chan A and next chan b )
  8. Please report bugs,wishes …
    info@ebcTech.eu
    or posted it in this blog

Important Settings


In both apps RTL SDR DRIVER and AIS SHARE there is a setting page.
Most important setting is the PPM settings. Nearly 99% of the USB dongle needs a frequency correction value. This value is different for every dongle.
The frequency for AIS is Channel A: 161.975 MHz and Channel B: 162.025 MHz. Because each dongle has a frequency drift, without correction the software is bassically not tuned on this frequency. As a result you won’t receive messages.

How to find out the right PPM:

Here are some useful links:
http://bashitout.com/2016/04/05/RTL-SDR-Frequency-Drift-Offset.html
http://rtl-sdr.sceners.org/?p=193
http://davidnelson.me/?p=371

google for frequency correction RTL SDR or PPM RTL SDR to find more

Andorid 6.0 >

Starting from Android 6.0 (API level 23), Android introduces two power-saving features that extend battery life for users by managing how apps behave when a device is not connected to a power source. Doze reduces battery consumption by deferring background CPU and network activity for apps when the device is unused for long periods of time. App Standby defers background network activity for apps with which the user has not recently interacted.

This could be a problem if you want to share AIS data to external device.

http://www.greenbot.com/article/2993199/android/how-to-turn-off-doze-mode-for-specific-apps-in-android-marshmallow.html

F A Q


I installed Martin Marinov RTL2832U driver app, do I need yours

YES, my driver app is tuned to AIS message receiption. AIS Share will not work without my driver app.
RTL AIS DRIVER app will not influence any other RTL SDR related app you have installed

I CAN’T RECEIVE A VESSEL AIS MESSAGE
Check PPM settings. In 99% this is the reason.

DRIVER IS UNSTABLE
Check if you use a high quality cable. Do you use a USB extension cable ? Try it without it.

Credits


Many thanks to Harmen Meijer for testing and tips.
visit his homepage  www.harmenmeijer.nl

Disclaimer:

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. DO NOT rely upon AIS Share for safety of life or property.

Please note that depending on your local law, receiving radio transmission AIS
@ AIS 1 – 161,975 MHz (Kanal 87B) AIS 2 – 162,025 MHz (Kanal 88B)communciation is maybe illegal. Please inform your self before you use this app in combination with a USB DVB Tongle.  Never use this app or the genrated data for communicacation purpose.

 

Legal attribution:

 

 

 

 

 

 

 

Using AIS Share and OpenCPN on sailboat

I live at a river. Especially in summer time sitting at the terrace and seeing all this nice river cruise ships travelling by, it comes to my mind, that it could be interesting to know a little bit more about these ships. At this time I knew about the possibility of tracking live airplane positions, but for ships? Soon I also found some similar pages in the internet, where you can watch vessel positions – but my region wasn’t covered. So i investigated a little bit more time and I found the amazing blog http://www.rtl-sdr.com/. The blog is absolute fantastic; showing several different applications what can be done with a so called RTL-SDR dongle. So in august 2015 I created a first Android app for decoding AIS ship positions.

It was beginning of december 2015 when I got an email from Harmen telling me that he would like to use my very first beta release of my RTL AIS driver app, but he had some problems with it. As my nautic experience was close to 0,  this connection was very helpful for me. The hole december and beginning of jannuary  Harmen tested my app , giving me some very useful ideas – just great that I got his email.

The main idea, why to use just my AIS decoder was, that it runs on Android > 4.1 devices.
This has some benefits:
Before he used an old Garmin navigation GPS, a cheap handheld scanner where he made a discrimator output using this with a laptop’s soundcard to get NMEA information and display this on OpenCPN for PC. But this configuration uses 3 – 4 amperes of the onboard 12 Volt supply.
Sometimes he sails more than 24 hours nonstop by the sea (no internet),  then power consumption is an issue.

So a couple of years ago he bought a NEXUS7 tablet to use seamap charts but in traffic lanes and by night he missed AIS information.

So he bought a cheap RTL-SDR dongle and started to experiment.


example: cheap DVB-T stick

That was the story how it started.

Harmen sent me some very nice pictures how his actual configuration looks like.

As you know one problem is that electronics don’t like water, even salt air is a problem with connectors.
So he made a special box for onboard.
This box is located close to the stearing place.
Harmen_sailboat_aisreceiver_enclosure_1

The backside of this box is equipped with:
— the USB dongle
— USB OTG cable with power supply so it does not use the tablett battery
— An MCX to BNC cable for the antenna.

Harmen_sailboat_aisreceiver_enclosure_backside_1.jpg

As Antenna he uses a coax collinear antenna. (The cheapest solution with high gain). See chapter (Coax Collinear Antenna) on http://www.rtl-sdr.com/rtl-sdr-tutorial-cheap-ais-ship-tracking/

So he uses the AIS Share app in combination with the free OpenCPN Android app to have navigation charts overlayed with live AIS ship information at low power consumption.

Harmen_sailboat_aisreceiver_ais_sharer

 

Harmen_sailboat_aisreceiver_opencpn

Harmen_sailboat_aisreceiver_opencpn2

OpenCPN settings with AISShare

It looks really great what Harmen created.

Soon it becomes summer, he will sail again. ( At this season his boat lies in port, some 30 km’s away from his homeplace. )

You can have a look at his hoempage as well.
http://www.harmenmeijer.nl/