Recent Posts
Free SAE J1939 Protocol Stack for ESP32 — Open New Paths for CAN Bus Innovation
Posted by
onWe at Copperhill Technologies are excited to announce that we are releasing a fully functional SAE J1939 protocol stack for the ESP32 — and best of all, it’s completely free to use. Whether you’re an engineer, a student, or a maker, this opens up serious possibilities for CAN-bus projects and vehicle network applications — without licensing fees or restrictive terms.
What You Get — Professional-Grade J1939 Features, No Cost
While many protocol stacks lock you behind licensing fees or limited licenses, our J1939 stack removes that barrier. Here’s what it brings:
-
Zero licensing costs. You can use, modify, and deploy the software without paying royalties or worrying about vendor lock-in.
-
Full J1939 support, including:
-
Address claiming (so multiple ECUs can negotiate bus addresses)
-
Transport protocol (both BAM broadcast and RTS/CTS peer-to-peer for larger messages)
-
Request/response messages
-
Complete PGN (Parameter Group Number) handling
-
-
Robust error handling, bus-off recovery, and monitoring to keep the stack stable in real-world conditions
-
Ready for prototyping or real deployment in many use cases — from diagnostic tools to gateway devices
This stack is designed to be useful out of the box, but also transparent and modifiable — you can dig into the internals and tweak it for your needs.
Hardware Flexibility — Use It on Any ESP32 Board
We’ve tested this stack using our ESP32 module board that integrates Wi-Fi, Bluetooth (Classic + BLE), and a CAN transceiver. But the software is not tied to that specific board:
-
It will run on any ESP32 variant (DevKitC, WROOM, S3, etc.).
-
You may need to remap SPI or CAN interface pins depending on your board’s layout — a few lines of configuration are all that’s needed.
-
The idea is that, as long as you have an ESP32 and a CAN transceiver, you can adopt the stack with minimal hassle.
In short: “ESP32-based hardware? You’re good. Just adapt your pin wiring and go.”
Reliable CAN Bus Under the Hood
Implementing J1939 isn’t just about message formats. It’s also about reliability, robustness, and handling corner cases. To that end:
-
We enhanced the CAN driver with stricter error monitoring and automatic bus-off recovery (if the controller fails it can reset itself).
-
Full support for the J1939 transport protocol (both broadcast and peer-to-peer) means you can send and receive long messages on the network, segmented when needed.
-
These features help ensure stable, predictable behavior even in noisy or challenging environments (e.g. in-vehicle networks, industrial machines).
Deepen Your Knowledge with a Companion Text
If you’re not already deeply familiar with J1939 — or if you want a full reference — we recommend the companion textbook:
SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino
This book walks you through:
-
J1939 internals (timing, layering, PGN structure, etc.)
-
Hands-on examples (data loggers, network scanners, gateway systems)
-
Step-by-step walkthroughs tied to the codebase
-
Deeper insight into how the stack implementation works
Whether you’re a beginner or an experienced developer, it complements the software nicely.
Ideal Applications & Use Cases
With the flexibility of the ESP32 (wireless + processing) and a feature-rich J1939 stack, you can build many useful systems:
-
J1939 ↔ USB gateways or protocol converters
-
Vehicle network scanners or diagnostic tools
-
Fleet telematics or data loggers (with wireless upload to backend)
-
CAN bus monitoring or logging systems in industrial machinery
-
Simulation of ECUs or test benches
-
Remote or IoT-enabled monitoring (ESP32’s Wi-Fi/Bluetooth can bridge data to the cloud)
The integration of wireless networking with J1939 gives you a powerful platform for hybrid systems — on-vehicle data + wireless connectivity.
Get Started Right Now
Here’s how you can dive in:
-
Download the example sketch and full source code from our site.
-
Open & compile in Arduino IDE (or your preferred ESP32 toolchain).
-
Upload to your ESP32 board.
-
Connect the ESP32 + CAN transceiver to a J1939/CAN bus and start experimenting.
Note: This software is provided “as is” for educational and demonstration purposes. While it’s a strong foundation, you’ll want to validate and customize it further before deploying in commercial or safety-critical systems.
Summary
Copperhill Technologies is proud to contribute this free SAE J1939 protocol stack for ESP32 to the community. It’s versatile, powerful, and designed for transparency. No licensing fees. No hidden restrictions. Just a solid foundation for your next CAN bus or vehicle network project.
Whether you want to build gateways, diagnostic tools, data loggers, or do experiments with J1939 networks — this gives you the software building blocks. Combine it with ESP32’s communication features, and you’re ready to prototype connected, intelligent systems for automotive, industrial, or IoT environments.
SAE J1939 Starter Kit And Network Simulator
Our JCOM.J1939 Starter Kit and Network Simulator is built for both seasoned engineers and beginners who want to explore SAE J1939 data communication without relying on a real-world vehicle network such as a diesel engine.
To create a functioning network, you always need at least two nodes. This requirement is particularly important with CAN/J1939, where a single CAN controller will shut down if it transmits data but receives no response.
That’s why our Starter Kit includes two fully functional J1939 nodes. At its core is the JCOM.J1939.USB, an SAE J1939 ECU Simulator Board with a USB interface. Together, these nodes provide a self-contained test environment where you can send, receive, and analyze J1939 messages, experiment with network traffic, and develop applications — all without connecting to an actual engine or vehicle system. More information...