28 November 2011

Packetlogger Documentation: Getting data out of your Actisense NGT-1

The programs that I make available are all command line utilities. Normal for UNIX folks, somewhat exotic for OS X folks and downright frightening for Microsoft Windows users. Or maybe the other way around. Anyway, I don't have the time to develop GUI programs.

If you are not used to command line tools, and don't fancy learning them these programs are not for you.

So the first thing you need to do is open up a terminal or console. Or for those still used to that terminology, open up a DOS box. It hasn't been a DOS box for ten years, but that's what my sailing friends still call this. Click Start -> Run then type cmd.exe<enter> to get a console.

On Microsoft Windows you'll use the program actisense-reader.exe. First run it without any arguments. It will show you a list of COM ports. One of them should be your Actisense NGT-1 NMEA 2000 gateway, and it should say "Available" as well.

For instance:
actisenser-reader $Rev: 235 $ $Date: 2011-11-28 09:23:14 +0100 (ma, 28 nov 2011) $
(C) 2009-2011 Keversoft, Harlingen, The Netherlands.

Usage: actisense-reader.exe <com-port> [<baud-rate>]

<com-port> is an integer from the following list:
1: COM1 - Communications Port (Available)
2: COM2 - Communications Port (Available)
3: COM3 - Actisense NGW/NGT NMEA 2000 Gateway (Available)

<baud-rate> is an integer from the following list: 4800 38400 115200 230400 (default is 115200)

This program reads from the indicated COM port until input on stdin is received. Normally this means until you press the 'Enter' key on the keyboard.
Once you have found the appropriate free NGT com port you can start the program again and pass it the number of the COM port, for instance:
C:\packetlogger\windows-x86>actisense-reader.exe 3
If your NGT-1 is connected to a network you'll see the program start emitting ASCII data, one line per NMEA 2000 PGN:
On Linux and OS X the program to use is called actisense-serial, and it needs a device name. You'll have to dig around in your OS console logs (OS X: console.app, Linux: dmesg) to see how your NGT-1 has been recognized by the operating system. Let's assume it is /dev/ttyUSB0, in that case you use
actisense-serial -r /dev/ttyUSB0
Why the -r? Well, this program can also write PGNs to the bus using the same ASCII protocol as it uses to receive PGNs. This means that if you have, for instance, two NMEA2000 networks and you want messages to be passed from network A to B -- in other words read from A and write to B you do this like this:
actisense-serial -r /dev/networkA | actisense-serial -w /dev/networkB
Or if you want to read PGNs from A, inject those into B and then view the output from both networks you do this like this:
actisense-serial -r /dev/networkA | actisense-serial /dev/networkB | ....
If you do not want to inject the messages from A into network B, but you do want to view the output from both networks you use the 'pass thru' option:
actisense-serial -r /dev/networkA | actisense-serial -p /dev/networkB | ....
In a next blog post I'll show you what the output format generated by these programs contains and what you can do with the output.


  1. A silly question no doubt, but can you use an Actisense NGW-1 instead of a NGT-1 and if not does it matter which version of the NGT-1 (USB or ISO) one uses?

  2. @Unknown

    No you cannot use a NGW-1. It does not offer access to the NMEA-2000 data stream -- the NGW-1 is a bidirectional NMEA-2000/NMEA-0183 converter.

    Yes it does not matter which version you use. With a ISO version you need to attach it to a high speed (115.200 baud or higher) serial port directly attached to a PC (ie. not via a NMEA-0183 multiplexer).