finds.dev← search

// the find

DanielMartensson/Open-SAE-J1939

★ 623 · C · MIT · updated Jun 2026

SAE J1939 protocol free to use for embedded systems or PC with CAN-bus

A free C89 implementation of the SAE J1939 CAN bus protocol stack, targeting embedded systems (STM32, AVR, PIC, Arduino) and Linux SocketCAN. The real spec costs money; this fills the gap for people who need J1939 without paying for the standard document. Good starting point for industrial vehicle ECU work.

ANSI C89 with no dynamic allocation means it drops into any MISRA-constrained embedded project without argument. The hardware abstraction is clean — four callbacks for send/receive/traffic/delay, so porting to a new CAN peripheral is a one-file job. Transport layer is complete: BAM, RTS/CTS, and EOM are all there, which is the part that trips people up when hand-rolling J1939. CMake FetchContent support makes it easy to pull in as a dependency without copying source files manually.

Coverage of the actual SAE J1939 PGN space is shallow — you get ECU identification, software identification, DM1-3/14-16, and a handful of ISO 11783 valve messages. If your application needs engine speed, transmission state, or any of the hundreds of vehicle-specific PGNs, you're writing them yourself. The limitation on concurrent multi-packet transfers (only one TP session to a given destination at a time) is documented in the FAQ but is a real operational constraint in busy networks. No unit tests anywhere in the repo — the only way to validate behavior is to wire up real hardware or use the internal loopback mode. The PDF documentation is an ODT export, not generated from the code, so it will drift over time.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →