0 - OpenCPN - Feature Requests

This is the project for all Feature Requests except the ones concerning plugins. Please add this Feature Requests to the respective plugin project - thanks.

FS#344 - NMEA Network server for input of NMEA sentences

Attached to Project: 0 - OpenCPN - Feature Requests
Opened by Jim Dowling (decjd) - Sunday, 16 January 2011, 13:31 GMT-7
Last edited by AISEAG (Serge D) (AISEAG) - Sunday, 01 December 2013, 02:06 GMT-7
Task Type Feature Request
Category Backend / Core
Status Closed
Assigned To Dave (bdbcat)
Operating System All
Severity Low
Priority Normal
Reported Version future version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


A network server socket (either TCP or UDP) would be useful for input of NMEA sentences. This will allow input from multiple devices (via a concentrator) and/or devices other than GPS/AIS. Additionally, it would provide a handy means of testing various GPS, AIS, etc. NMEA inputs.
This task depends upon

Closed by  AISEAG (Serge D) (AISEAG)
Sunday, 01 December 2013, 02:06 GMT-7
Reason for closing:  Implemented
Additional comments about closing:  OpenCPN 3.2.2 provides requested functionality.
Comment by Jim Dowling (decjd) - Sunday, 16 January 2011, 13:41 GMT-7
Attached is a patch file that provides the above capability. Both a TCP and UDP server socket have been implemented (see the GPS tab in the Settings menu). Note that this is (at best) a beta. It has been tested on a Linux system only, so caveat user. To apply the patch, use:

cd <opencpn-2.3.1-source-root>
patch -p1 <server_socket.patch
cd <opencpn-2.3.1-source-root>/build

Comment by Jim Dowling (decjd) - Sunday, 16 January 2011, 13:52 GMT-7
Attached is TAR file containing a plugin that allows you to record all incoming NMEA sentences to a file of your choosing. Once you've recorded a file (and assuming you've applied the server socket patch) you can play it back (after enabling either a UDP or TCP server socket) using the provided nmea_playback executable. Also, the nmea_playback utility will allow you to create your own file of hand-edited NMEA sentences, just leave the checksum field blank (or use any other pair of non-hexadecimal characters like ?? or XX to indicate the omission) and it will be calculated automatically. If you have a GPX track file you've recorded and GPSBABEL you can use the following to convert it to appropriate NMEA sentences for playback:

gpsbabel -i gpx -f my_track.gpx -x track,fix=2d,course,speed -o nmea -F my_track.nmea

As above, this has only been tested on a Linux system.
Comment by Mario Andion (mandion) - Monday, 31 January 2011, 07:56 GMT-7
Hi Jim,

Any news about porting this to the windows build ? It will help me a lot !
Comment by Jim Dowling (decjd) - Monday, 31 January 2011, 19:44 GMT-7

Unfortunately, I only have a Linux system to test (and develop) with. When I posted this, I had hoped that someone with a Windows development system would give it a try and give me some feedback. At this point, we'll have to wait until someone (perhaps Dave or others) can try it out. This being said, I have every reason to believe that it will work on a Windows system, as I used vanilla wxWidgets to implement it. We'll just have to be patient:)

Comment by Marco (Mbjh9acu) - Sunday, 13 March 2011, 00:08 GMT-7
Would be a usefull feature for my use of OCPN.
Comment by Marco (Mbjh9acu) - Sunday, 04 December 2011, 00:09 GMT-7
Any progress in this one? Would like the feature very much, even if only port 10110 would be used (saves building configuration options, UDP or TCP can just be added to the port list).
10110 is the 'official' port number vor NMEA data (https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers). Maybe 'default' to 10110 and make the port number configurable through the .ini file only?
Comment by Jim Dowling (decjd) - Wednesday, 02 October 2013, 13:26 GMT-7

I believe that you can close this since version 3.2.2 of OCPN now supports equivalent (if not more capable) functionality. Thanks for all your work.