Search code examples
usblinux-device-drivernmeaais

Receiving NMEA 1083 data over USB on linux?


We're trying to read data from a digital yacht AISnet base station on a linux box. From what I've read, Digital Yacht has drivers for both osx and windows (but not linux for this unit) and their job is to create a virtual com port so that the device can send an NMEA 1083 stream as if it's doing RS-232 serial communication. We are OK with parsing the NMEA data ourselves, but I don't know much about drivers. Wondering if anyone has any experience getting NMEA data from a digital yacht or similar device in to linux? Is the USB to virtual RS-232 something common for other devices or something that would be practical to make ourselves? Any pointers much appreciated.


Solution

  • Answering myself: use the GPSD gps daemon, as GPS uses the same protocol as AIS (something I didn't know when I posted the initial question and was first dipping into AIS). GPSD handles listening to the stream of raw NMEA data on the device and provides a high level interface to get the data already parsed to JSON. It was very easy to get going on linux and supposedly also runs on OSX though I haven't tried it.

    If using Python, there is also a client library for working with the GPSD stream to making AIS listening applications.

    GPSD: http://www.catb.org/gpsd/

    https://github.com/wadda/gps3/blob/master/examples/agegps3.py