Skip to main content

lplexdump

lplexdump is the CLI client for lplex. It connects to a running server (or reads journal files) and displays NMEA 2000 frames with optional PGN decoding.

Basic usage

# Auto-discover server via mDNS
lplexdump

# Specify server
lplexdump -server http://inuc1.local:8089

# With PGN decoding
lplexdump -server http://inuc1.local:8089 -decode

CLI flags

FlagDefaultDescription
-server(mDNS)Server URL
-client-idhostnameSession ID for buffered mode
-buffer-timeout(empty)Enable buffered mode with this timeout (ISO 8601)
-reconnecttrueAuto-reconnect on disconnect
-reconnect-delay2sDelay between reconnect attempts
-ack-interval5sHow often to ACK in buffered mode
-quietfalseSuppress stderr status messages
-jsonfalseForce JSON output (auto-enabled when piped)
-decodefalseDecode known PGNs into field values
-file(empty)Replay a .lpj journal file instead of connecting
-inspectfalseInspect journal file structure and exit
-speed1.0Playback speed for journal replay (0 = max speed)
-start(empty)Seek to this time (RFC 3339) before playing
-pgn(all)Filter by PGN number (repeatable)
-exclude-pgn(none)Exclude specific PGN from output (repeatable)
-manufacturer(all)Filter by manufacturer name (repeatable)
-instance(all)Filter by device instance (repeatable)
-name(all)Filter by 64-bit CAN NAME hex (repeatable)

Output modes

Terminal mode (default)

When stdout is a TTY, lplexdump shows a compact human-readable format:

2026-03-06T10:15:32.123Z  seq=1234  prio=2  pgn=129025  src=10  dst=255  [8] 5A1F2B3C4D5E6F70

With -decode, decoded fields appear on the next line:

2026-03-06T10:15:32.145Z  seq=1235  prio=3  pgn=130306  src=22  dst=255  [8] 01A4060000030000
{"sid":1,"wind_speed":1.7,"wind_angle":0.0,"wind_reference":"apparent"}

JSON mode

When stdout is piped (or -json is set), each frame is a JSON object per line:

{"seq":1235,"ts":"2026-03-06T10:15:32.145Z","prio":3,"pgn":130306,"src":22,"dst":255,"data":"01A4060000030000","decoded":{"sid":1,"wind_speed":1.7,"wind_angle":0.0,"wind_reference":"apparent"}}

The decoded field is only present when -decode is enabled and the PGN is known.

Journal replay

Replay a recorded journal file instead of connecting to a live server:

# Normal speed playback
lplexdump -file recording.lpj

# Fast-forward at 10x
lplexdump -file recording.lpj -speed 10

# As fast as possible
lplexdump -file recording.lpj -speed 0

# Seek to a specific time
lplexdump -file recording.lpj -start 2026-03-06T10:00:00Z

# Decode during replay
lplexdump -file recording.lpj -decode

# Inspect journal structure (block layout, device table, compression)
lplexdump -file recording.lpj -inspect
note

-file and -server are mutually exclusive. Journal replay does not require a running lplex server.

Filtering

Filters can be combined. Multiple values for the same filter type are OR'd together. Different filter types are AND'd.

# GPS position and SOG/COG from Garmin devices
lplexdump -pgn 129025 -pgn 129026 -manufacturer Garmin

See Filtering for details.

Piping and scripting

lplexdump is designed to work well in Unix pipelines:

# Extract just PGN numbers
lplexdump -server http://inuc1.local:8089 | jq -r .pgn

# Count frames per PGN over 10 seconds
timeout 10 lplexdump -server http://inuc1.local:8089 -json | jq .pgn | sort | uniq -c | sort -rn

# Record decoded data to file
lplexdump -server http://inuc1.local:8089 -decode > data.jsonl