Being able to stream CAN bus data live is nice.
But wouldn't it be great to be able to load a CAN *.DBC file and live stream converted human-readable data?
The CLX000 now supports the *.DBC format for both logged data via CANvas and live streamed data in Wireshark.
In short, this means that you can now easily convert raw CAN data to physical values - ready for analysis!
In this article we introduce the CAN bus DBC file format, including how to use it in CANvas and our Wireshark Plugin.
For a quick intro, check out our 3 min video above, showing the DBC Wireshark plugin feature in practice!
THE DBC DATABASE FORMAT
The DBC communications database for CAN contains information on CAN bus Messages and Signals.
The format is used to store rules for converting raw CAN data to human-readable values, aka scaled engineering values.
For example, the right DBC database file would allow you to take the raw data below ...
… and return understandable data like below:
How does DBC conversion work?
The DBC file contains Messages (often equal to CAN IDs), each containing Signals that reflect data parameters (e.g. RPM).
For each Signal, a specified start bit and bit-length allows you to extract the relevant raw bit string from the CAN data frame.
To convert a Signal, you take the DEC bit string, multiply it by a Scale and add an Offset specified by the DBC file.
Let’s take an example:
Assume we extracted raw CAN data from a passenger bus under the SAE J1939 protocol and wish to analyse the RPM parameter.
To do so, we identify in a J1939 DBC file that RPM (or EngSpeed) is a Signal in the Message EEC1 with PGN F004 (in HEX).
Before moving on, note that J1939 is a bit special in regards to the CAN DBC file format:
- The ID is extended 29 bit - in DBC context, this means that the the leading bit of the ID is “flipped” and needs to be re-flipped
- Secondly, the relevant ID is the PGN, i.e. a sub part of the CAN ID (start bit 9, length 18)
Both CANvas and our Wireshark Plugin support J1939 as a special DBC case, taking the above into account.