Tech!

Kplex Home
Quickstart
Overview
Install
Config
Download
Changelog
Issues
Examples
top border

Kplex Overview

kplex is a program for combining and routing NMEA-0183 data to and from multiple sources and destinations. kplex inputs and outputs may be any of

Serial lines
The traditional transport for NMEA-0183. Ideally for marine electronics an opto-isolated RS422 interface, although some devices produce outputs designed for PCs (either RS232 or USB). Many people exploit wide tollerances and accept the risk of damage to plug un-isolated NMEA-0183 outputs into their computers either directly or via a serial to usb converter.
kplex makes no distinction between usb and rs232 serial lines. The operating system hides the distinction between the two.
Pseudo Terminals (ptys)
Pseudo Terminals (or "pty"s) are "virtual" serial ports. kplex can read or write data to/from an existing pty just like a "real" serial port. kplex can also create ptys. This presents an interface to, for example, a navigation program which only knows about serial input, allowing it to read data which has actually been received over an IP network. By creating multiple ptys, kplex can "own" serial inputs allowing it to route data where you want, but also allow multiple navigation programs to co-exist, each of which needs to "own" the interface on which it sends and receives data.
Network Interfaces
kplex can create a network server process allowing programs to connect to it over a TCP/IP network. IPv4 and IPv6 are supported. This option is especially useful in conjunction with a wireless access point, allowing devices with only wireless connectivity such as ipads running navigation programs to send and receive nmea data. kplex can also connect to a remote tcp server such as a physical nmea-to-wireless box or another instance of kplex, allowing you to, for example, receive nmea data wirelessly on your laptop.
kplex can also send and receive nmea data over unicast, multicast or broadcast UDP. Broadcast is not a concept used by IPv6, so that is an IPv4-only feature.
Files
kplex can read or write data to or from a file. Using a regular file can be useful to log sentences received or to send test data. This option is most useful when the "file" is the user's terminal: sentences can be monitored in real time and manually input.
The exact number of inputs and outputs kplex can support depends on the way it is configured, but unless you need many tens of thousands of interfaces, you will be limited only by your system's capacity to process the data.

Advanced Features

kplex does more than just copying all data input to all of its outputs.

Checksumming

kplex can be instructed to discard any packets whose nmea checksum is incorrect.This feature can be enabled or disabled globally or on an interface-by- interface basis.

Sentence Filtering

kplex can filter sentences on input, accepting or discarding those which match a particular sentence type or talker on a per-interface basis. kplex also allows you to select what data you do or do not pass to each output.

Sentence Source Failover

Sometimes you have more than one source for the same type of data. You want to use one source if it is available, but fail to a different source if the primary stops working. kplex allows you to specify, independently for any talker ID or sentence type, a priority list of input sources. For each sentence type sepcified in a failover list, when that data type has not been observed on the primary source interface for a specified period of time, kplex will allow that data type to be received from the next interface in the priority list. Multiple ordered failover sources may be specified.

Rate Limiting

kplex can limit the rate at which sentences matching a particular pattern enter or leave an interface. This can be useful in data logging where you wish to record your position once per hour (for example).

Disclaimer

As with most navigation-related software, kplex should not be relied on as part of an essential primary navigation system. It works for me and many other people, but it might not for you. It comes with no warranty or guarantee. Use it at your own risk.

Downloading and Installing

Instructions for installing kplex are here.

Providing Feedback

If you've found a bug or wish to provide feedback try the kplex google group. Alternatively personal contact details can be found in the README file packaged with the source. If kplex works for you or if it doesn't, do please let me know!

bottom border