Exodus
Marine networking & protocols

Marine networking.

Getting instruments from different brands to talk to each other.

Your wind gear, your chartplotter, your autopilot and your radar were probably made by people who would rather you bought everything from them. They still have to talk over something. Here's what that something is, what it actually looks like on the wire, and where open source gets you past the fences.

Before anything else

None of what follows would be possible without Kees Verruijt. He reverse engineered NMEA 2000 from scratch and gave it away as CANboat — one man cracked it open for everybody. If you run Signal K or OpenCPN, you are using his work right now.

Sponsor Kees CANboat Everyone else we lean on

Watch them all running at once

Captured off this boat, before any of the explaining

This is your boat talking to itself. Four separate conversations, happening simultaneously, every second you are aboard — and almost nobody has ever seen any of them.

Press play on any of these first. It will make far more sense than reading about it cold.

The same boat, the same second

Click to play full size. Everything is slowed right down to human speed — at the real rate none of it is readable, which is rather the point.

Right — let me explain.
What you just watched is three different languages and one enormous firehose, all running down different cables on the same boat. The rest of this page takes each one apart: what it says, how it's written, why there are three of them, and where open source gets you past the fences. Keep scrolling.

Who are NMEA, anyway?

The initials nobody explains

National Marine Electronics Association.

They're a US trade body, founded in 1957 — a group of marine electronics dealers who met at the New York Boat Show and decided they'd get further working together than separately. Not a government agency, not a regulator. A members' organisation of manufacturers, dealers and installers.

Their useful contribution is standards. Before them, every manufacturer's gear spoke only to its own. NMEA got the industry to agree on a common language so a depth sounder from one company could feed a display from another. They published NMEA 0183 in 1983, NMEA 2000 around the turn of the century, and OneNet for ethernet since.

And the catch

The standards documents are sold, not published. You can buy them, and they are not cheap. For a hobbyist wanting to read their own boat's data, that's a wall — which is exactly the wall Kees Verruijt went around by reverse engineering NMEA 2000 from scratch and giving the result away.

So when you read a PGN on this page, you're reading it through one man's work rather than through the official document.

Three languages, three kinds of cable

Everything on a boat is one of these

What it carriesSpeed The cableOpen?
NMEA 0183 text sentences 4,800 baud two wires Yes
NMEA 2000 small binary messages 250 kbit/s one shared backbone Mostly
Ethernet radar and sonar pictures 100 Mbit/s + ordinary Cat5 No

Every argument about marine electronics compatibility comes down to which of those three a thing uses, and whether anyone has written down the format.

The actual plugs and wires

What each one looks like, and what's inside it

Three languages, three completely different connectors. Once you can recognise them on sight you can walk into any locker and tell what is talking to what.

NMEA 2000 — the round five-pin one

A circular M12 connector with a threaded collar you screw down by hand, five pins inside. On boats it's nearly always the smaller Micro-C size. It's not a marine invention — it's borrowed from DeviceNet, the industrial CAN standard, which is why it feels over-engineered for a yacht. It also means it's genuinely waterproof and locks shut.

Micro-C, looking at the face bare / drain Shield. Earthed at ONE point only. red NET-S — 12 V supply for the bus black NET-C — supply return white NET-H — CAN High (data) blue NET-L — CAN Low (data)
Pin numbers vs wire colours. The colours above are the standard and they are what you actually work with, because you buy made-up cables rather than crimping M12 pins. The pin numbering is printed differently by different sources, so if you ever do need it, take it off your own connector's drawing rather than off a web page — including this one.

The shape of the network matters as much as the plug:

RuleFigure
Speed250 kbit/s
Backbone length, Micro cable100 m max
Backbone length, Mini cable250 m max
Drop cable to any one device6 m max
Current the bus can carry, Micro3 A
Current the bus can carry, Mini8 A
Terminator at each end120 Ω

Two terminators, one at each far end of the backbone, always. Measure across the data pair with the power off and a correct network reads about 60 ohms — the two 120s in parallel. Read 120 and you've lost one. Read nothing and you've lost both. That single measurement finds most N2K faults in thirty seconds.

NMEA 0183 — bare wires on a screw terminal

Here's the thing nobody tells you: 0183 does not specify a connector at all. The standard describes the signalling and the sentences, and stops. So in practice it is four stripped wires going into a terminal block, and every manufacturer picks their own colours.

TALKER GPS, wind, sounder TX-A (+) TX-B (−) LISTENER plotter, autopilot, Pi RX-A (+) RX-B (−) one twisted pair — A to A, B to B shield / drain — earthed at the talker end only

The proper version is RS-422: a differential pair. The signal is the difference between A and B, so electrical noise picked up along the run hits both wires equally and cancels out. That is why it still works on a forty-year-old boat with an engine running next to the cable.

Cheaper gear does it single-ended instead — one signal wire and ground — and that mostly works too, until it doesn't.

Wire colours mean nothing here

There is no standard for 0183 wire colours. One manufacturer's orange is another's yellow. The only reliable guide is the manual for the device in your hand.

What is consistent: A goes to A and B goes to B. Swap them and you get nothing at all — no damage, no error, just silence. If a new 0183 connection is dead, try swapping the pair before you assume anything is broken.

WhatDetail
Speed, standard4,800 baud
Speed, AIS and high-speed38,400 baud
DirectionOne way. A talker talks, listeners listen.
How many listeners per talkerSeveral, wired in parallel — but only one talker per pair, ever
ConnectorNone specified. Terminal block, usually.

Ethernet — Cat5e, Cat6 and the marine shells

Radar and sonar pictures are far too big for either of the above, so they go down ordinary ethernet. Eight conductors in four twisted pairs, in an RJ45 plug — the same one on the back of your router.

latch 12 34 56 78 12 34 56 78 T568B — clip underneath, looking at the contacts pair 1 pair 2 pair 3 — note: 3 and 6, NOT 3 and 4 pair 4 1 white/orange5 white/blue 2 orange 6 green 3 white/green 7 white/brown 4 blue 8 brown

That's T568B, the order almost everyone uses. T568A is the same plug with the orange and green pairs swapped. Either works perfectly — what matters is that both ends of the cable use the same one.

The mistake everyone makes once. Look at the pair brackets: pins 1&2 are a pair, 4&5 are a pair, 7&8 are a pair — but the third pair is 3 and 6, straddling the blue pair in the middle. It looks wrong and it isn't. Wire 3&4 as a pair instead and you've split two pairs: the cable will test as continuous, short runs will even work, and long runs will drop packets in a way that is horrible to diagnose.

And the marine versions

Raymarine's RayNet and SeaTalk hs, Garmin's Marine Network, Furuno's equivalents — they all look proprietary and expensive, and the connector genuinely is. It's a sealed, locking, vibration-proof shell, which on a boat is a reasonable thing to want.

But it is ordinary ethernet inside. The signalling is standard, the pairs are standard, and adapter cables with an RJ45 on one end and the proprietary shell on the other are sold by the manufacturers themselves. That one fact is what lets a Raspberry Pi join a radar network at all.

The lock-in was never the cable. It's the format of the data going down it — which is the entire reason for the decoding work.

NMEA 0183 — the one you can read

1983, and still going

0183 is plain text. No decoding, no tooling. If you can see the wire, you can read the data.

$GPVTG,164.0,T,175.2,M,0.0,N,0.0,K,A
$WIMWV,274.1,R,11.7,N,A
$SDDBT,,f,,M,,F

Each line is a sentence. The first two letters after the $ say who is talking — GP is GPS, WI is wind, SD is a sounder. The next three say what kind of message it is. Then comma-separated fields, and a checksum on the end so the listener can tell if it arrived intact.

How it works: one device talks, and anything wired to it listens. That's the whole model. It's a one-way conversation down a pair of wires at 4,800 bits a second — about 40 sentences a second if you push it.

The catch: one talker per wire. Want your GPS heard by three things? You wire it to three things, or buy a multiplexer. It's slow, it's clumsy, and it is still on almost every boat afloat because it is dead simple and it never stops working.

A multiplexer is the box that gets around this. It takes several 0183 inputs, merges them into one tidy stream, and sends it out of a single output — usually converting baud rates and filtering out what you don't want along the way. A Raspberry Pi running Signal K is one, and a more capable one than most you can buy. Longer explanation on the parts page →

Reading 0183, character by character

Every field in one sentence

Here's a real one off this boat. It scrolls past about forty times a second, which is why nobody ever stops to look at it:

$GPVTG,164.0,T,175.2,M,0.0,N,0.0,K,A*23
PieceWhat it is
$Start of sentence. Everything before this is noise.
GPTalker ID — who is speaking. GP is a GPS.
VTGSentence type — Course Over Ground and Ground Speed.
164.0Course over ground
T…and that one was True
175.2Course over ground again
M…this time Magnetic. The 11.2° gap is local variation.
0.0Speed over ground
N…in kNots
0.0Speed over ground
K…in Kilometres per hour. Same number, both units.
AMode. A = autonomous fix, good data.
*23Checksum. See below.

That's the whole design. A label saying who's talking, a label saying what kind of message, then comma-separated values where each number is followed by a letter telling you its units.

Another one, same rules

$WIMWV,274.1,R,11.7,N,A

WI = Weather Instruments. MWV = Wind Speed and Angle. Wind at 274.1°, R for Relative (apparent, not true), 11.7 knots, A for valid.

The checksum, which is cleverer than it looks

That *23 on the end is a two-digit hex number. To make it, the talker takes every character between the $ and the * and XORs them all together. The listener does the same sum and compares.

It costs almost nothing to compute and it catches the single-character corruption you get from a noisy wire on a boat. Forty-year-old engineering, still doing its job.

Talker IDs you'll actually see

GP GPSGN combined GNSS SD depth sounderWI weather
HC magnetic compassHE gyro AI AISVW water speed
II integrated instrumentsIN integrated nav EC chart systemRA radar

And sentences worth recognising

RMCRecommended minimum — position, speed, course, date. The workhorse.
GGAFix data — position, satellites used, fix quality, altitude
VTGCourse and speed over ground
DBT / DPTDepth below transducer / depth with offset
MWV / MWDWind angle and speed / wind direction
MTWWater temperature
HDG / HDTHeading, magnetic / true
VDM / VDOAIS — other vessels / your own
GSVSatellites in view

Learn those and you can read most of what crosses an 0183 wire without looking anything up.

NMEA 2000 — the shared bus

A network instead of a wire per device

N2K fixed the one-talker problem. Everything hangs off one backbone and everything hears everything.

Underneath, it is CAN bus — the same technology your car uses to let the engine talk to the dashboard. 250 kilobits a second, shared by every instrument aboard. Messages are tiny: eight bytes at a time.

Here is the depth sounder on this boat, as it actually appears:

0DF50B05#FF19020000000099
|        |  |        |  |
|        |  |        |  +-- max range
|        |  |        +----- transducer offset
|        |  +-------------- 537 x 0.01 m = 17.6 ft
|        +----------------- sequence tag (unused)
+-------------------------- priority 3, PGN 128267, from device 5

That PGN — Parameter Group Number — is the key. 128267 means "water depth" on every N2K boat in the world, regardless of who built the sensor. 127250 is heading. 130306 is wind. It is a shared dictionary, and that is why a Garmin display can read a Airmar sensor.

And they really are all just cables

This part costs people money. Raymarine sell SeaTalkNG. Simrad and B&G sell SimNet. Furuno have CAN bus. They come in different colours with different plugs and they are sold as if they were different systems.

They are all NMEA 2000. Same two signal wires, same power pair, same 250 kbit CAN bus, same PGNs. What differs is the connector moulded on the end. An adapter cable — which every one of those manufacturers will happily sell you — makes them the same network, because they always were.

If someone tells you their kit "needs" a particular brand of backbone, what they mean is it needs a particular plug.

Reading NMEA 2000, bit by bit

The same depth message, taken apart

N2K isn't text, so you can't just look at it. But it's not complicated either — it's an address followed by eight bytes. Here's the depth sounder on this boat:

0DF50B05#FF19020000000099
\_______/ \______________/
  address      eight data bytes

The address, which is three things in one

That 0DF50B05 is a 29-bit CAN identifier, and it's packed with three separate pieces of information:

FieldWhereValueMeaning
Prioritytop 3 bits3 How urgent. Lower wins the bus. 3 is normal instrument data.
PGNmiddle 18 bits128267 What this message is. 128267 means Water Depth, on every boat in the world.
Sourcebottom 8 bits5 Which device said it. Devices claim an address when they join the bus.

Work it the other way and it reassembles exactly: priority 3 shifted up 26 bits, plus PGN 128267 shifted up 8, plus source 5, gives 0x0DF50B05. That's the whole addressing scheme.

And the eight bytes

BytesFieldHere
FFSequence ID — ties related messages together 255, meaning unused
19 02 00 00Depth, 32-bit, 0.01 m per count 537 × 0.01 m = 5.37 m = 17.6 ft
00 00Transducer offset — to waterline or keel zero, not configured
99Maximum range, 10 m per count 153 × 10 = 1530 m
Why is the depth written backwards? 19 02 00 00 reads as 0x00000219 = 537, not 0x19020000. That's little-endian — least significant byte first. CAN does it, your PC does it, and it trips up everybody the first time.

PGNs worth recognising

127250Vessel heading 128267Water depth
129025Position, rapid update 129026Course and speed over ground
130306Wind data 130310Environmental — water temp, pressure
127245Rudder angle 127508Battery status
129029GNSS position data 126996Product information

When eight bytes isn't enough

A CAN frame carries eight bytes and no more. Plenty of messages need more than that — a GNSS position fix with satellites and accuracy runs to dozens.

The answer is fast-packet: the sender chops the message into eight-byte pieces, numbers them, and the receiver glues them back together. It works, and it's a large part of why reading N2K properly is harder than it looks — and why a complete PGN database took one person years to build.

Ethernet — where the pictures go

Ordinary network cable, extraordinary secrecy

Radar and sonar imagery will not fit on NMEA 2000. Not even close. So manufacturers run a second network: plain ethernet, the same Cat5 cable as a home router.

On this boat the radar streams to one multicast address and the fishfinder to another. Any machine on that network can ask for a copy — which is exactly how our Raspberry Pi gets them.

StreamAddressRate
Quantum radar232.1.216.1:2574250 spokes/rev
Axiom fishfinder226.192.224.0:322171 pings/sec, 157 kB/s

The cable is standard. The connectors are standard. Only the format is secret, and only because nobody published it. That is the one real wall left, and it is made of paperwork rather than technology.

Which is why we sat down and read the bytes.

Eight bytes, or a hundred and fifty thousand

Why one is open and the other isn't

The depth number is eight bytes once a second, and it is open to everyone. The sonar picture is 150,000 bytes a second, and it is locked. That is not a conspiracy, it is arithmetic: one sonar channel is about five times the entire capacity of an NMEA 2000 network. It was never going to fit, so it never got standardised, so it never got opened.

One is eight bytes. The other is a hundred and fifty thousand. The small one fits on an open standard somebody reverse-engineered in an attic. The big one never did.

The decoding work in detail →

So what does open source actually buy you?

The reason any of this matters

A translator in the middle, that speaks all three and belongs to nobody.

On this boat that translator is Signal K, running on a Raspberry Pi. It reads 0183. It reads NMEA 2000. It listens on the ethernet. And it turns all of it into one common set of names that any program can ask for.

What that means in practice:

None of this requires throwing away your marine electronics. We run Raymarine gear and we are glad of it. The open-source layer sits alongside, reads the same wires, and removes the part where one company decides what your own data is allowed to do.

Signal K OpenPlotter Who built all this →