J1939 Standards Overview
The SAE J1939 standards
The complete set of specifications can be purchased from SAE; there’s an overview here.
J1939 comprises the following sub standards:
- J1939 – Recommended Practice for a Serial Control & Communications Vehicle Network
- J1939/11 – Physical Layer – 250k bits/s, Shielded Twisted Pair
- J1939/13 – Off-Board Diagnostic Connector
- J1939/21 – Data Link Layer
- J1939/31 – Network Layer
- J1939/71 – Vehicle Application Layer
- J1939/73 – Application Layer – Diagnostics
- J1939/81 – Network Management
J1939/11 Physical Layer
The physical properties of the bus:
- Shielded twisted pair wire.
- Max 40 meter.
- 250 kbit/s.
- Max 30 nodes (ECUs).
- Based on ISO11898.
J1939/13 Off-Board Diagnostic Connector
This document defines a standard connector for diagnostic purpose. The connector described, Deutsch HD10 – 9 – 1939, is a 9-pin round connector.
J1939 Off-Board Diagnostic Connector
J1939/21 Data Link Layer
This document defines the use of the CAN frame (29-bit identifier, PGN etc.) and the transport protocol functions, which defines how messages longer than 8 bytes are transmitted on a J1939 bus network.
J1939 messages are organized in to Protocol Data Units (PDU) which consists of an identifier and 8 data bytes. Numerical data that is larger than a single byte is sent with least significant byte (LSB) first. J1939 uses CAN 2.0B with the extended (29 bit) identifier. The CAN identifier consists of a priority(3 bits), a reserved (1 bit), a data page (1 bit), PDU format (one byte), PDU specific (one byte) and source address (one byte).
There are two different PDU formats. PDU1 format is used for sending messages with a specific destination address. PDU2 format can only be sent broadcast. The PDU format byte in the identifier determines the message format. If the PDU format byte is less than 240 (0xF0) then the format is PDU1 and if it is greater than 239 it is PDU2.
This J1939 document also describes 5 types of message types: Commands, Requests, Broadcasts/Responses, Acknowledgment, and Group Functions.
The transport protocol provides functions for transmitting messages longer than 8 bytes since they will not fit in a single CAN frame. In J1939, these messages are segmented into 7 byte packets with a sequence number for each packet. There are special Connection Management (CM) messages for handling the communication of segmented messages. Examples of these messages are: Request to Send (RTS), Clear to Send (CTS) and Broadcast Announce Message (BAM). The segmented messages can be sent to a specific device or as broadcast. CM messages provide a virtual connection and a handshake procedure between the sender and receiver. The sender requests to send a segmented message and the receiver answers with how many segments it can receive for the moment (figure 4). Segmented messages can be sent as broadcast as well with no handshaking between sender and receiver(s).
J1939/31 Network Layer
This particular document describes the services and functions needed for intercommunication between different segments of a J1939 network. A segment can be a sub network, which is delimited by the ECUs “seeing” the same signal. J1939/31 describes four ECU types that provide functions for network interconnection between segments: Repeater (forwarding), Bridge (forwarding and filtering), Router (forward, filter, and address translation), and Gateway (forward, filter, address translation, and message repackaging).
J1939/71 Vehicle Application Layer
This document describes and defines “standard” parameters which are grouped together in a message frame and given a PGN. This document is updated approximately four times a year to include new standard parameters and messages.
There are different lengths of parameters defined in the document; 1, 2, 4 bytes. If the most significant byte of a parameter has the value 0xFE this indicates an error and if the value is 0xFF this indicates that the parameter is not available. This document also recommends appropriate scaling, limits and offset depending on the length and the physical property of a parameter.
A parameter’s description starts with a name and an explanation of the value to be represented (i.e. method of measurement used to obtain the parameter value). The following information then describes the content of the parameter:
- Data length (bytes)
- Resolution (scaling and offset, unit of measurement)
- Data range (range of the physical value, after scaling)
- Type (status, measured value )
- Suspect Parameter Number (SPN) (parameter specific number)
- PGN (reference to the message frame it is sent in)
Every Parameter Group is described with a name and then the following information:
Transmission repetition rate (a time interval or on request)
- Data length (bytes)
- Data page (0 or 1, has to do with the PGN)
- PDU format (0 to 255, has to do with the PGN)
- PDU specific (depends on PDU format)
- Default priority (value between 0 and 7 where 0 is the highest priority)
- Parameter Group Number (PGN)
- Data parameter bytes (all parameters included with reference and byte order)
Most of the internal messages are sent as broadcast without a specific destination address.
For a discussion specifically of the J1939 DBC file, click here.
J1939/73 Application Layer – Diagnostics
This document defines functions and messages for accessing diagnostic and calibration data. There is a number of predefined Diagnostic Messages (DM) used for:
- Reading and writing to ECU memory
- Reporting diagnostic information when running
- Identification of lamp status
- Reading and clearing Diagnostic Trouble Codes (DTCs)
- Start/stop broadcast DMs
Newer versions of this document include additional information regarding the interpretation of Diagnostic Trouble Codes (DTC). The DTC is a 32 bit identifier inherited from J1587 and consists of 4 elements: Suspect Parameter Number (SPN), Failure Mode Identifier (FMI), Occurrence Count (OC) and SPN Conversion Method. The DTC together with the source address identifies a component or sub system.
J1939/81 Network Management
This document contains information about the content of an ECU Name and how the ECU claims an addressing using that Name. The Name is a 64 bit (8 bytes) long number that gives every ECU a unique identity. The name has two main purposes:
- Provide a description of an ECU, including function.
- Serve as a numerical value that can be used for arbitration when claiming an address.
The J1939/81 document also describes how the address claim process works. There are basically three types of messages for this purpose defined in the document.
- Request for Address Claimed (PGN 59904) which is sent to retrieve information about addresses being used by other devices on the network.
- Address Claimed (PGN 60928) which can be divided into:
- Address Claimed, which is sent to claim an address or as a response to the “Request for Address Claimed” message to indicate the address of a device. The Source address is set to the address that is claimed.
- Address Cannot Claim, which is sent when the ECU fails the address claim process. If the ECU has failed the address claim process and receives a “Reuest for Address Claimed” message, Address Cannot Claim is sent in response. The Source Address is set to 0x254 to indicate no address.
- Commanded Address (PGN 65240) which is used to set an ECU to a specific address. This can be done by a diagnostic tool or an interconnecting ECU (bridge, gateway).
When arbitration for an address is performed, the Name is treated as an 8 byte numerical value where the lower the value, the higher the priority.