Developing on the CAN Bus using higher-layer protocols—like SAE J1939, NMEA 2000, or CANopen—offers powerful features in vehicle, marine, and industrial systems. Yet this versatility comes with complexity. Whether you’re using off-the-shelf hardware (like PiCAN, Teensy, ESP32) or designing custom CAN hardware, having the right tools and a systematic troubleshooting approach is essential for success across all protocol layers.
1. Layered Troubleshooting: Start from the Ground Up
Following a structured, layer-by-layer strategy — starting from the physical layer and moving up to higher-layer protocols (HLP) — is key:
1.1 Physical Layer: Cable, Termination, and Transceivers
-
Check wiring integrity: Use a multimeter to verify termination resistance (should be ~60 Ω when the bus is unpowered, accounting for two 120 Ω end resistors).
-
Test voltage levels: With power on, CAN_H should be ~2.5–3.0 V vs. ground; CAN_L ~2.5–2.0 V .
-
Inspect connectors and grounding: Ground loops or improper connector usage often cause intermittent faults.
1.2 Transceiver Integrity
-
Resistance to ground: With the device unpowered and disconnected, CAN_H and CAN_L should show very high resistance (MΩ) to ground. Lower values suggest component damage.
1.3 Bit Rate and Frame Settings
-
Ensure all nodes use the same baud rate, and match settings for standard (11-bit) vs. extended (29-bit) IDs .
2. Using CAN Analyzers Effectively
2.1 Lowest Common Denominator: Raw Frame Analysis
Basic USB‑CAN adapters (like PCAN‑USB or PiCAN with SocketCAN) allow frame capture, logging, and simulation—but they expose only raw data frames. Useful for debugging at the lowest protocol level.
2.2 Higher-Layer Protocol Support (HLPs)
HLPs like J1939, NMEA 2000, and CANopen require analyzers that can decode PGNs, handle object dictionaries, or marine-specific frames. These tools are typically expensive, but simplify development significantly. Without them, analysis becomes manual and error-prone.
2.3 Affordable Exception: JCOM.J1939 Gateway + JCOM1939 Software
If you’re working primarily with J1939, the JCOM.J1939 series gateways paired with JCOM1939 Windows software offer powerful protocol decoding and simulation at a relatively low cost—making them a standout solution for budget-conscious developers.
3. Development Environments & Tools
3.1 Off-the-Shelf Hardware Path
-
PiCAN boards + Raspberry Pi: Run Linux with built-in compilers for C/C++ and Python, and use SocketCAN for native CAN support.
-
Teensy / ESP32-based boards: Typically programmed using the Arduino IDE; for more advanced control, alternatives like ESP‑IDF or MicroPython are available (with steeper learning curves).
3.2 Developing Custom CAN Hardware
-
Always validate on a known-good CAN network—e.g., using a PiCAN or PCAN as a reference node. This ensures that any issues are isolated to your custom hardware.
-
Pair your new hardware with a reliable CAN Analyzer—both for verifying physical connectivity and protocol-level correctness.
4. Guide to Structured Troubleshooting Workflow
-
Verify physical integrity: Check wiring, terminations, and voltage levels.
-
Confirm transceiver health: Inspect resistance to ground.
-
Monitor raw CAN traffic: Use basic analyzer tools for frame capture/logging.
-
Introduce HLP analysis (if needed): Simulate or decode J1939, CANopen, NMEA 2000—preferably with a tool like JCOM.J1939.
-
Iterate based on symptoms: Systematically isolate faults—whether they originate at the hardware, transceiver, or protocol level.
5. Optional: Reference Implementation—PiCAN2 Troubleshooting Tips
If you’re using PiCAN2 (Raspberry Pi CAN interface), be sure to:
-
Enable correct overlays in
config.txt, likemcp2515-can0with oscillator and interrupt parameters . -
Activate termination resistor via jumper at
JP3if needed. -
Use correct baud rate and frame ID length; mismatched settings or missing terminator often cause errors.
-
Ensure there’s at least one other active CAN node on the bus—otherwise communication fails trivially.
Conclusion
CAN Bus development—especially when working with protocols like J1939, NMEA 2000, or CANopen—benefits from a methodical, layered troubleshooting approach. Start at the physical layer, move up to raw frames, and finally dive into protocol-specific analysis with capable tools. Off-the-shelf boards and affordable analyzers (like JCOM.J1939) help streamline this process, while custom hardware designs should always be introduced into trusted network environments.
See also our post Essential Tools for CAN Bus Development (Including J1939, NMEA 2000, and CANopen)…
USB to CAN Analyzer Cable SavvyCAN-FD- C
High-Speed USB to CAN FD Converter
-
Fully compatible with CAN 2.0A, CAN 2.0B, and CAN FD protocols
-
Supports CAN FD bit rates from 25 kbit/s up to 12 Mbit/s
-
High-precision timestamp resolution down to 1 μs
-
Compatible with open-source software SavvyCAN on Windows, Linux, and macOS
-
Works seamlessly with SocketCAN, and includes pibiger CAN-UTILS, C/Python demo programs, and full source code
-
Ideal as a USB to CAN analyzer, USB to CAN adapter, or USB to CAN converter for automotive, industrial, and embedded applications









Comments are closed.