0
\$\begingroup\$

I'm working on designing a communication interface for a poorly documented system that has a proprietary CANbus system.

I want to monitor/listen to the CANbus traffic during system operation to understand what the communication packets look like and how the system functions.

My dilemma is that this system is pcb and wires only. There are no ODB or similar DB9 connectors. So, I want to piggyback or sniff the signals but not disturb or interfere with the system - yet!

So, looking for ways to do this and software packages. I've looked at SavvyCAN and CANpie (api) so far but haven't used either.

I'd appreciate some guidance from someone who's done this before :?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

Your PC does not come with CAN so you will need an adapter and a corresponding listener software.

The mandatory adapter + software tool combo is called a CAN analyser (or sniffer if you will), well-known vendors include IXXAT, Kvaser and Vector. Generally these can be set in a listen-only mode from the PC side, which means they will not ACK or otherwise intrude on the bus - just passively listen. As for free open source gunk, I have no recommendations or positive experiences to share.

Optionally you can in addition also use an oscilloscope, some have CAN frame decoding as an option, but oscilloscopes are mostly suited for troubleshooting CAN hardware, not so much for watching CAN traffic.

From there you just localize CANH, CANL and a signal ground, then hook up whatever lab wires/connectors that might suit. Most CAN analysers work as a CAN-to-USB translator, so your "lab connection" ought to end in a standardized DB9 connector. Pin 2=CANL, pin 5=GND, pin 7=CANH and there you go.

Please keep in mind that reverse-engineering CAN buses is hacky and dangerous practice. You can in practice figure out which stuff that does what from here, even "mock"/replace certain data on the bus etc. But going ahead and intruding on a CAN bus which you have no specification about is not recommended. Whoever designed the bus (hopefully) put some serious considerations into timing, priorities, data collisions and so on. If you go ahead and wildly transmit something there without knowing the rules, you could cause unexpected and dangerous behavior. In particular, intruding on vehicle or heavy machinery buses is very dangerous practice. This is no job for a CAN beginner.

\$\endgroup\$
5
  • \$\begingroup\$ Thanks for the Pin assignment. \$\endgroup\$
    – EngMarc
    Commented Aug 17, 2023 at 21:48
  • \$\begingroup\$ @EngMarc CANopen has become the industry standard for CAN connectors and pinouts, since the IEC CAN standard itself does not mention them. If you register at can-cia.org you can download the CANopen standards free of charge. CiA 303-1 is the document for cabling and connectors - all CAN implementations tend to follow these, whether they use CANopen or not. There's standards for DB9, header strips/ribbon, RJ45, M8/M12 and terminal blocks (and various other more exotic ones). \$\endgroup\$
    – Lundin
    Commented Aug 18, 2023 at 7:39
  • \$\begingroup\$ I think for 650 Euros I can do quite a lot on my own. \$\endgroup\$
    – EngMarc
    Commented Aug 18, 2023 at 17:44
  • \$\begingroup\$ What's the most current Canbus standard 2B or? \$\endgroup\$
    – EngMarc
    Commented Aug 18, 2023 at 20:32
  • \$\begingroup\$ @EngMarc 650€ is nothing in a professional context, is this a hobby project or something? As for the CAN bus standard "Bosch 2.0B" is outdated by some 30 years but still mostly correct still (I use that old draft myself still when I need to look something up). What it doesn't cover is CAN FD. The latest standard for classic "high speed" CAN would be ISO 11898-2:2016. There's also "CAN XL" but it's a work in progress still and there's no telling how successful it will be. \$\endgroup\$
    – Lundin
    Commented Aug 21, 2023 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.