Sunday 15 November 2015

AIS Engine and Android

A friend asked last night how to connect his Nasa AIS Engine to his Google Nexus tablet so he could see AIS plots on his charts.

He uses Marine Navigator and has the tablet plugged in to the boat power all the time to keep it charged.

I did a quick search and as I expected it is complicated...

Marine Navigator doesn't support AIS - at least it doesn't mention it  on the Google Play page.

MemoryMap does. He would have to buy his charts all over again though. When are we going to get chart portability between apps?

MemoryMap does - NMEA input via wifi or Bluetooth including DSC and AIS.

So the obvious thing to do would be to connect an NMEA to USB converter like the Actisense one to the tablet.

Not so simple. Nexus tablets are rumoured not to support OTG devices when charging.

Not so simple. Android doesn't support serial devices.

I did find one piece of good news. The NMEA output on the Nasa AIS engine is RS232 compatible. So we don't need an expensive NMEA to USB converter. A cheap RS232 to USB converter will do.

Other good news is that libusb works on Android and there is open source software to connect to a libusb connected serial port adapter if it has either an FTDI chip (most do) or a pl2303 chip (mine does).

So there is a way to do it if the charging problem isn't real:

1) Connect the AIS Engine to an RS232 to USB adapter.
2) Connect the RS232 to USB adapter to a Nexus compatible USB OTG adapter.
3) write a little app that uses the open source libusb and serial port drivers and acts as a tcp/ip server for NMEA messages
4) install Memory-Map

If the charging problem is real, or we want to be able to walk around the boat with the tablet, then we can put the app on a Raspberry Pi instead and MemoryMap can connect over wireless.

So this is my bill of materials for the Pi solution.

Hardware:
1 x raspberry Pi 1 Model B (for example)
1 x SD Card
1 x 5V 3A radio control model BEC (DC-DC converter)
1 x RS232/USB Adapter
1 x USB Wifi Module
1 x Mini USB cable
1 x box to put it in

Software
raspian
kplex

I'll get this working and feed it some canned AIS messages and see if I can overlay them on memory map.

It turns out the AIS features in MemoryMap are "pro" features and cost over $100. That's not what we want.

The demo I tried didn't let me use the internal GPS and an external (tcp) AIS receiver. I don't know if this is fundamental but it breaks the model for me.

I wrote an add-on for gpsfeed+ which makes it generate an AIS target near the track in simulation mode. This is just the kind of test software I need for making everything BUT the RF ais decoder work in my NMEA based projects. That is really useful.

No comments:

Post a Comment