Blog
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...
ESP32 for CAN Bus Application Developments
The ESP32 has become one of the most versatile microcontrollers in modern embedded development. With its dual-core processor, integrated Wi-Fi and Bluetooth, and robust peripheral set, it is a natural fit for advanced networking and control applications. One of its rising uses is in Controller Area Network (CAN Bus) systems, where the ESP32 provides both [...]
Comparing Embedded System Choices for CAN Bus: Arduino, Teensy, and ESP32
At Copperhill Technologies, we frequently receive inquiries asking us to recommend the “best” embedded system for CAN Bus applications. It’s a fair question, but unfortunately, there is no universal answer. The choice depends heavily on a user’s technical knowledge, development experience, and—most importantly—the specific requirements of their application. Instead of prescribing a one-size-fits-all solution, we would [...]
Unlock the Future of Marine Apps with the ESP32-S3 CAN Bus Board with NMEA 2000 Connector
As the marine industry continues to embrace smart technologies, there's a growing demand for powerful, connected, and reliable embedded solutions that can handle everything from engine diagnostics to GPS data aggregation. Whether you're building a marine monitoring system, an onboard data logger, or an intelligent control unit, you need a development board that offers high [...]
Build Smarter Interfaces: ESP32-S3 with 4” Display, Wi-Fi, Bluetooth & CAN FD
Looking to build an advanced HMI, diagnostic tool, or industrial control panel with cutting-edge connectivity and sleek graphics? Meet our ESP32-S3 4" 480x480 IPS LCD Board, a powerhouse designed for developers and engineers who demand performance, versatility, and ease of integration. Feature-Packed for Modern Applications At the heart of this board is the Espressif ESP32-S3-WROOM-1U-N16R8, a powerful [...]
CAN Bus Development for Embedded Systems: With and Without an Operating System
The Controller Area Network (CAN) Bus has become an essential communication protocol in automotive, industrial, marine, and robotics applications due to its robustness, efficiency, and real-time capabilities. When it comes to embedded systems, developers have multiple hardware and software platforms to choose from—some with full operating systems (OS), others running bare-metal (without OS). At Copperhill Technologies, [...]
Introducing the ESP32 with Dual Isolated CAN Bus Port
The ESP32 Development Board is renowned for its versatility, boasting features like Wi-Fi, Bluetooth, and ample processing power. When combined with the Dual Isolated CAN Bus HAT, it transforms into a formidable tool for CAN bus communication. Key Features: Dual CAN Channels: Facilitates simultaneous communication over two separate CAN networks. Galvanic Isolation: Each CAN channel is electrically isolated, [...]
The ESP32 Processor and Programming MCP2515 and MCP2517/18 Per SPI Port
Introduction The ESP32 is a powerful, low-cost microcontroller developed by Espressif Systems, widely used in IoT applications. It features integrated Wi-Fi and Bluetooth, making it a popular choice for embedded systems. Among its various interfaces, the Serial Peripheral Interface (SPI) plays a crucial role in facilitating communication with peripherals such as sensors, displays, and external memory [...]