15 April 2012

Packetlogger update: Microsoft Windows issues resolved

Last November I changed the compiler used for packetlogger on Microsoft Windows from MSVC to Cygwin and gcc. This resolved a whole heap of problems with the redistributable libraries; you needed the right MSVCRT.DLL on your system or it wouldn't work. It also made the building process for me a lot easier.

Unfortunately, it also broke the actisense-reader.exe program that reads the data off the Actisense NGT-1, as that still used the ActisenseComms.DLL which in turn was still compiled using MSVC. This week I was informed by two readers of this, so this morning out came the soldering iron. Errr, I mean the compiler suite!

To be frank I wasn't very happy with the existing status quo anyway -- there were two distinct programs accessing the Actisense device; one on Windows, using the ActisenseComms.DLL, and one on the other UNIX (Linux/OS X) platforms using my own access code, bypassing the DLL. I'm personally using the Linux version for real, so the UNIX version was extended over time to be able to write to the NGT-1 as well as read from it. As you can imagine I didn't much fancy extending the Windows code with the 'write' capabilities when I wasn't going to use it.

I also didn't fancy having to extend the source code with #ifdef Windows and putting Windows specific serial port access in.

Luckily there was an easy solution to this problem. Cygwin's UNIX emulation is so perfect that I was able to port the UNIX source code within 10 minutes!

So from now on there is only one program used to talk to a NGT-1 and that is actisense-serial[.exe].

This does mean that you Windows folks will have to adjust a little. Unlike actisense-reader which showed you a list of COM ports when called with zero arguments you will need to know where your NGT-1 is connected to by some other means. You can do this by going into the Device Manager and hunting down the COM ports there, or you can start Actisense's NMEA reader and note which COM port you need from that.

Once you have the COM port, for instance COM7, deduct one (Cygwin, like Linux, numbers its serial ports from 0, not 1 like DOS and Microsoft Windows) and use that as follows:

actisense-serial -r /dev/ttyS<N>

For instance:

actisense-serial -r /dev/ttyS6


I recommend using the -d debug option so you can see whether opening the port is succeeding if you have any issues.

The new packetlogger binaries can be downloaded from the usual spot:

http://www.keversoft.com/Keversoft/Packetlogger.html


3 comments:

  1. Hi Kees,

    Please can you email me: justin@darrennortheast.co.uk - we are doing work for Actisense, and I am interested in your blog.

    Thank you,
    Justin

    ReplyDelete
  2. Hi Kees,

    Does Packetlogger work with the Maretron USB100 NMEA2000/USB Gateway (http://www.maretron.com/products/usb100.php)? The latter also does NMEA2000 to NMEA0183 translation.

    If not, what would be the approx effort to create a maretron-serial program to provide functionality equivalent to actisense-serial?

    Maretron supplies drivers for Windows as well as a closed-source N2KAnalyzer analyzer program.

    Regards,
    Alan

    ReplyDelete
    Replies
    1. Hi Alan,

      Nope, it does not work with the Maretron USB100 yet. It could be anywhere from a one day to two week project. As I understand it by default it behaves as a NMEA0183 serial port, and there is a special mode that only the Maretron products know about to switch it to NMEA2000 mode.

      You'd have to use a USB logger to see what they do, and then emulate this in the open source product.

      Delete