kplex icon indicating copy to clipboard operation
kplex copied to clipboard

kplex marine data multiplexer

kplex: A multiplexer for various nmea 0183 interfaces Copyright Keith Young 2012-2018 [email protected] Blurb: Details of the GPLv3 under which this software is distributed can be found in the file COPYING in this directory.

This software almost certainly contains bugs and should not be relied on as part of a safety critical system, ie as a sole source of marine navigational information.

Installation From Source

You've got this far so you've unpacked it. So "make" should be the obvious next step. If you're using FreeBSD or some other system where GNU make is not default, you make have to type "gmake" instead. There's only one executable ("kplex").

"make install" will install kplex into /usr/bin on Linux systems, /usr/local/bin on other systems. You can change this by setting BINDIR. ie to install to /usr/sw/bin use: make -D BINDIR=/usr/sw/bin install alternatively if using sh/ksh/bash: BINDIR=/usr/sw/bin make install

The "install" target does not install a start script. Tihs must be done manually if required. It does not create a configuration file. The file "kplex.conf.ex" can be used as a starting point to create your own configuration file using the information contained in this README file.

"make uninstall" will remove the kplex binary. If you specified a non-standard installation location using BINDIR, specify it again for the uninstall target.

If you want to have kplex start on boot, kplex.init is an example init script for debian-derived systems. It expects kplex to be installed in /usr/bin and a configuration file in /etc/kplex.conf. Change these as necessary, install by copying kplex.init to /etc/init.d/kplex and run: update-rc.d kplex defaults to create symlinks in the appropriate rc.d directories.

kplex.init will run kplex as root, but this is neither required nor recommended. To automatically run kplex as a different user, change RUN_AS_USER as appropriate. The user kplex runs as does require permissions to read /write serial interfaces as necessary. Typically this will mean being a member of the group which owns serial devices. On debian-based systems like ubuntu this means adding the user to the "dialout" group.

From .deb file

If you've installed from a debian binary package, the startup script and binary are installed for you. The default start script is not configured to run at boot time but can be made to do so using update-rc.d(8). The start script runs kplex as root but this is not recommended. Instead create a user (e.g. "kplex") and change the RUN_AS_USER definition in /etc/init.d/kplex to specify that kplex run as that user. Be sure to add this user to the group which owns the serial ports (normally "dialout" on modern debian-based systems).

The configuration file the .deb installation installs in /etc/kplex.conf actually does nothing (all directives are commented out). Read the instructions in this README file for how to create a confiuration file. A quick start example which bridges between a tcp server and a 38400 baud serial-to-usb connection is commented out in this example file.

Invocation:

kplex [-V] | [-d 1..9] [-f ] [-p ] [-o

Where The "-d" flag, if specified, will cause kplex to print debugging information, the verbosity of which is controlled by the flag's argument with "1" producing minimal additional debugging information and "9" producing verbose debug information.

is the path of a configuration file to use where default options and interfaces are defined. If not specified, kplex will look for its configuration in the following locations and use the first file found:

  • A location specified in the KPLEXCONF environment variable
  • OSX ONLY: ~/Library/Preferences/kplex.ini. This location is for backwards compatibility, will not be supported in the next major release and its use is discouraged.
  • OS ONLY: ~/Library/Preferences/kplex.conf
  • ~/.kplex.con
  • /etc/kplex.conf

Specifying filename as "-" disables looking for the default configuration files.

is the path of a file where kplex will write its pid for the convenience of mechanisms such as init files used to control system processes. If this option is specified and kplex finds that is locked by another process it will print a warning and exit.