CANtrace Help
A powerful CAN bus analyser software and diagnostic tool
A powerful CAN bus analyser software and diagnostic tool
J1939 is an SAE standard which defines a higher layer protocol for the CAN bus. J1939 is widely used in heavy-duty vehicles, e.g. buses and trucks. It specifies exactly how information is exchanged between Electronic Control Units (ECUs) in a vehicle.
The J1939 standard includes several documents that specify different layers. The main documents are:
For more detailed information, go to the official SAE J1939 webpage: http://www.sae.org/standardsdev/groundvehicle/j1939a.htm
CANtrace can interpret the J1939 protocol. When analyzing a J1939 network, you can enable J1939 interpretation in the Trace tab to interpret the message ID and/or associate a J1939 database file to interpret the signals. CANtrace also assembles J1939 transport protocol frames and will show the combined long frame in the trace window.
29 Bit CAN extended identifier has the below structure in the J1939 protocol:
When PDU Format < 0xF0, the message is Peer-to-Peer and PDU Specific contains the destination address. When PDU Format > = 0xF0, the message is Broadcast and PDU Specific contains the group extension.
CANtrace interpretation fields for the J1939 protocol are:
For example, the message with ID 0xcf00203x in the figure below is a 29-bit extended CAN identifier. “x” means it’s an extended identifier. PGN field is 0xf002, source address is 0x03, Priority field is 0x03, DP field is 0x0, PDU Format is 0xF0, which means this is a broadcast message, therefore the PDU Specific contains the Group Extension which value is 0x02.
The J1939 standard supports more than 8 bytes of data for a single message. However, CAN specification allows a maximum of 8 bytes of data per single CAN message frame. So a single large message should be sent in multiple packets. The J1939 transport protocol defines how to disassemble, transfer and reassemble CAN messages larger than 8 bytes.
CANtrace parses the multiple packets and assembles them into a large message and displays it in the Trace tab. You can also send large messages from the Send tab as long as the messages are found in the associated J1939 database. The example below shows how to send a DM1 message from the Send tab in CANtrace. You can configure the raw value of the signal and then click on the Send button.
The figure below shows the Trace tab. The first five 8-bytes messages defines the 22-bytes DM1 message. The last message is the long frame assembled and displayed by CANtrace.
A J1939 database file is bundled with CANtrace starting from version 3.15 and can be found in the CANtrace folder under the public Documents folder in Windows ( e.g. in Windows 10 the default path is C:UsersPublicDocumentsCANtraceTKE_J1939.dbc).
The TKE J1939 database file has been created by TKE according to the SAE J1939 standard.
Source
SAE J1939TM Digital Annex of Serial Control and Communication – Heavy Duty Vehicle Network Data, December 2020
Supported Features
The database includes nearly all standard 8 byte messages and also the most important longer messages.
The main target for the TKE J1939 database is to facilitate the monitoring of a J1939 network using CANtrace. It is used to display message names (i.e. message acronyms from the SAE document) as well as signal names, raw values, physical values, units, value descriptions and comments. The following figure shows an example from the Trace tab in CANtrace.
The database uses a type of PGN notation that allows CANtrace and other tools to interpret messages on the CAN bus based only on the PGN, not taking into account the source and destination addresses. This is done by setting the source address of all messages (PDU1 and PDU2) and the destination address of PDU1 messages to the null address value 0xFE.
When a J1939 database is used with CANtrace it will automatically mask out the priority bits of the CAN ID. This means that even if a J1939 message is stored in the database with the default priority, messages with any priority will match the one in the database.
J1939 databases also support using the attribute SigType=DTC to properly decode DTCs of the DM1 and DM2 messages. Using the SigType attribute is compatible with how Vector tools recognize DTCs in databases and thus allows sharing database files with the Vector toolchain.
The database is compatible with CANtrace version 3.11 and newer as well as the Kvaser Database Editor version 2 (bundled with CANtrace 3.14 and earlier) and version 3 (bundled with CANtrace 3.15 and newer) and the Vector CANdb++ Editor. The version number and compilation date can be found on the first row when opening the database file in a text editor.
Unsupported Features
Most messages that cannot be automatically parsed from the SAE J1939 Digital Annex have been omitted.
Proprietary messages, i.e. PGNs 61184, 126720, 65280 to 65535 and 130816 to 131071 are not included since they might create a conflict should the end user be using his or her own proprietary database to complement the standard J1939 database.
Note: there is a known issue with the database when using the Kvaser Database Editor 2 (bundled with CANtrace versions prior to 3.15) as in some cases it may display garbage characters after a text string.
Editing the Database
IMPORTANT Rather than editing the database we would strongly recommend that you create your own database and associate that database with CANtrace in addition to the TKE J1939 database as needed.
TKE_J1939.dbc is installed as read-only. If you want to make changes to it you should first copy the database and give it a new name and then remove the read-only mode from your newly copied file. This is done since the database will be replaced if CANtrace is ever updated or reinstalled.