AIS decoder for Wifi on Android

Fig.: AIS receiver integrated into marine radio (ICOM)

AIS Automatic Identification System

AIS is an identification system for watercraft. It is based on the transmission of boat information such as location, speed, direction, size of the boat and other information sent out via radio signals. Other boats can receive the information and create a situational picture of the area with traffic flow information. This gives you significantly more information than you can pick up with radar. Modern navigation systems can integrate AIS information into nautical charts and thus make traffic flow visible live.

Fig.: Ship movements (Marine Traffic)

AIS decoder as a software solution for Android

If you want to decode AIS signals cost-effectively with a simple DVBT stick under Android, you can now do so with the combination of RTL SDR AIS Driver and AIS Share make. A simple DVBT stick serves as the signal receiver, which is actually intended for TV reception of television programs. The UMTS stick is a fully digitized SDR receiver for radio emissions in the frequency range from 1 MHz to 1 GHz. This allows radio emissions to be received and decoded at any frequency. The AIS signal is transmitted in digital form on two frequencies 161.975 MHz (channel A) and 162.025 MHz (channel B). With the Android app RTL SDR AIS Driver The DVBT stick can be configured so that it can receive AIS signals on both frequencies at the same time and convert them into NMEA0183 telegrams. The AIS information in the form of NMEA0183 telegrams is then sent out in the network via WiFi on UDP port 10110 and can be received by any apps such as AVnav, Navionics or other navigation apps.

Fig .: RTL SDR V3 USB stick

The DVBT receiver is connected to the cell phone or tablet and an AIS antenna. The antenna supplied for television reception cannot be used because it is intended for television frequencies and can only receive AIS signals very poorly. A special AIS antenna or marine radio antenna is necessary. Marine radio antennas often use SO239 connectors that cannot be connected directly to the DVBT stick. Special adapters from SO239 to SMA are still required. An SMA to SMA adapter cable is also necessary. If you want, you can also build a cheap, high-reception AIS antenna yourself.

Fig.: Adapter SO239 to SMA

When it comes to DVBT sticks, you have to pay attention to which stick you buy. They are also often called RTL-SDR sticks sold. Not all sticks are suitable because they do not have sufficient frequency stability. This means that the digitally set reception frequency is not precise enough and also changes with the temperature. To receive AIS signals, frequency-stable receivers are required in order to be able to reliably receive narrow-band emissions. Well-suited SDR receivers only have a frequency drift of 0…1 PPM over the entire temperature range. Simpler DVBT or SDR sticks can also be used, but they require correct frequency correction and a stable operating temperature. Corrections of up to 60…70 PPM are necessary. This makes safe operation quite difficult and the reception frequency often runs out and the received signal strengths are too weak to be able to decode AIS signals. Current modern RTL-SDR sticks like that RTL SDR V3 with 1 PPM are preferable as they no longer have such problems. If you buy other SDR sticks, pay attention to 0…1 PPM temperature drift behavior.

In order to use an SDR stick on a cell phone or tablet, the device must have one USB OTG have connection. The SDR stick may not be recognized on other USB ports and may not work. Most current cell phones have USB OTG ports.

The app RTL SDR AIS Driver is the basic requirement to be able to operate an SDR stick on a cell phone or tablet. It acts as a driver under Android and provides the basic functions such as setting the reception frequency and decoding the AIS signals. The app is free and is also used to evaluate the hardware used. It decodes up to 1000 AIS telegrams and can output them via port 10110. The app will then stop serving you. A very useful feature is the waterfall graphic of the received frequency spectrum. The frequency stability of the SDR stick can be checked with the markers of the two reception frequencies.

Fig.: Waterfall graphic for the frequency spectrum in the RTL SDR AIS Driver app

If you use a suitable SDR stick, you can control the setting of the frequency correction in PPM very precisely. For this purpose, the maxima of the signal amplitudes of the received AIS signals are displayed in the frequency spectrum above the waterfall graphic. But that takes some time. Two elevations then emerge. The elevations must then be brought into line with the markers. The corresponding PPM value that then results is the frequency correction value. With good SDR receivers it should be 0…1 PPM. It is significantly larger for poor receivers. However, frequency correction is only possible if you are in an area where AIS signals are transmitted. This is usually possible on coasts or near rivers with boat traffic. Frequency correction will not be possible directly inland without AIS signals.

In order to be able to permanently decode AIS signals, there is also a paid co-app called AIS Share, which costs 3.50 euros. It is the actual AIS application that accesses the driver app and decodes the AIS signals. It offers significantly more functionality than that RTL SDR AIS Driver App, but does not contain a waterfall graphic for setting the frequency correction. AIS Share In addition to the AIS signals, it can also provide GPS signals from the cell phone in the WiFi network via UDP and acts as a data server for several devices in the network. This means that multiple applications can be supplied with AIS and GPS signals. In addition, up to 5 ports can be provided where the data can be accessed via TCP in addition to UDP. The 3.50 euros are well invested.

Fig.: AIS Share

Integration into navigation software

There is a configuration point in the navigation software through which external devices can be connected via WiFi via NMEA0183. This means that AIS and GPS signals can be used by multiple devices at the same time.

The following settings must be made in Navionics. Go under menu on Paired devices and press on top of that Plus sign. Then press down below Add device. Then fill out the following 3 fields:

  • Surname: AIS server
  • Host: IP address of the cell phone or tablet on which AIS-Share is running. If it is the same device, use this:
  • Port: 10110

Then they choose UDP and press at the top of the blue line Save on computer.

Fig. Settings in Navionics

questions and answers

Is my SDR or DVBT stick compatible?

To find out, the manufacturer of the software, ebctech, has a detailed tutorial provided in English. A lot of details are taken into account and in the end you know which stick you should buy.

I am not receiving AIS signals and do not see any bumps in the waterfall frequency spectrum. Why is that?

On the one hand, they need an antenna that is suitable for marine radio. The antenna included with the SDR stick is not suitable for this. Buy a marine radio antenna with an appropriate adapter or build a marine radio antenna yourself. On the other hand, it may be because you are in an area where AIS signals cannot be received. This is mostly the case inland. Because AIS emissions from ships are only sent out at a distance of approx. 5…15 nm. The transmission power is only 5W. Go near coasts or rivers with boat traffic. Then they will be able to receive AIS signals.

RTL SDR AIS Driver runs for a while and then stops receiving AIS signals

RTL SDR AIS Driver is just a test app to test the hardware used. After 1000 AIS telegrams, transmission via UDP is stopped. If you want the app to send out AIS signals again, you must restart the app. Alternatively, you can use the paid app AIS Share to install.

AIS Share runs for a while and then stops receiving AIS signals

Some phone manufacturers use very aggressive power saving policies and force the app to close when it is running in the background. If you encounter this issue, the only solution is to manually whitelist both the RTL-SDR driver and the AIS Share app in your device. Instructions for various providers can be found here.

Another reason could be the USB OTG adapter or USB OTG cable is poor quality. This can lead to transmission errors or the power supply required for the SDR stick is not stable. Here you will find some recommendations: USB OTG cable

How can I set AIS Share so that all devices on the network can receive the AIS information at the same time?

Enter as the IP address for the shares AIS Share a. If you use UDP, all AIS information is sent to all network participants simultaneously as a broadcast message.