It happens on a regular basis that I am contacted by a user of our SAE J1939 ECU Simulator Board With USB Port, complaining that our device does not display a PGN correctly or modifies the PGN before transmitting. The real problem here is a misinterpretation of the PGN and its purpose. For instance, a PGN between 61184 (0xEF00) and 61439 (0xEFFF) will always be displayed as 61184. The EF portion indicates a peer-to-peer message, where the second byte indicates the destination address. For instance, 0xEF20 sends data to node address 0x20 (32dec).
This is only one popular example. Consequently, a detailed knowledge of the PGN and its interpretation is essential when it comes to exploring and analyzing SAE J1939 data traffic. Studying the official SAE J1939 documentation (the SAE J1939 Standards Collection) is a good start, but makes for a dry reading. The following provides a quick overview, making it simpler to understand the standards. It is based on two components:
- Our book A Comprehensible Guide to J1939, available in print or PDF download.
- Our presentation SAE J1939 - Serial Control And Communications Vehicle Network.
SAE J1939 Message Format
The 18-Bit PGN is embedded in the CAN Bus data frame as part of the 29-bit message identifier. Out of the 18 bits, only 16 are used by the SAE J1939 Standard. To complicate things, the SAE J1939 Standard delves into acronyms and confusing descriptions. For instance, a PF between 0 and 239 indicates a destination address in PS, where a PF between 240 and 255 indicates an extension to the PDU format... There was a reason to write a comprehensible guide.
Let's describe the PGN Range in normal engineering terms:
As shown above, there are PGN ranges assigned by the SAE (Society of Automotive Engineers) and those assigned by manufacturers (meaning these PGNs are available for users). The most important range for engineers is 0xF000 (61440) and 0xFEFF (65279), because this is the range containing the PGNs as defined by SAE J1939/71, i.e. the PGNs containing vehicle data.
The SAE J1939/71 Standard also describes SPN (Suspect Parameter Numbers), which are NOT part of an SAE J1939 data frame. SPNs are mere documentation features.
In the above example, I refer to PGN 65262 - Engine Temperature. In this case, the SPNs describe the use of the data field for parameters such as Engine Coolant Temperature, Fuel Temperature, and more.
As I mentioned previously, the SAE J1939/71 Standard contains descriptions of all PGNs and SPNs. The following image gives you an example based on PGN 65262:
SAE J1939 Starter Kit And Network Simulator
Our JCOM.J1939 Starter Kit And Network Simulator is designed to allow the experienced engineer as well as the beginner to experiment with SAE J1939 data communication without the need of connecting to a real-world J1939 network, i.e. a diesel engine. It may sound obvious, but in order to establish a network, you need at least two nodes, and that fact applies especially to CAN/J1939 where the CAN controller will basically shut down after transmitting data without receiving a response. For that reason, our jCOM.J1939 Starter Kit And Network Simulator consists of two J1939 nodes, namely our jCOM.J1939.USB, an SAE J1939 ECU Simulator Board With USB Port.
The jCOM.J1939.USB gateway board is a high-performance, low-latency vehicle network adapter for SAE J1939 applications. The board supports the full SAE J1939 protocol according to J1939/81 Network Management (Address Claiming) and J1939/21 Transport Protocol (TP).
The following is an excerpt from A Comprehensible Guide To J1939 by Wilfried Voss. According to SAE J1939/81, network management procedures are used to “collectively manage the network”.While other higher layer protocols based on CAN Bus do not support dynamic node address assignments per default, the SAE J1939 standard provides yet another ingeniously designed feature to uniquely identify ECUs [...]
The following is an excerpt from A Comprehensible Guide To J1939 by Wilfried Voss. SAE J1939 is a very ingeniously designed protocol that takes a resourceful advantage of the CAN 29-Bit message identifier. Rather than relying on a myriad of protocol functions, SAE J1939 uses predefined parameter tables, which keeps the actual protocol on a comprehensible level. However, these parameter tables [...]
The following is an excerpt from A Comprehensible Guide To J1939 by Wilfried Voss. The main document describing the J1939 message format is SAE J1939/21 – Data Link Layer. J1939/21 defines the use of the CAN data frame (29-bit identifier, Parameter Group Numbers – PGN, etc.) and the transport protocol functions, i.e. a definition of how messages longer than the standard [...]
The following is an excerpt from A Comprehensible Guide To J1939 by Wilfried Voss. SAE J1939 is a higher-layer protocol based on Controller Area Network (CAN). It provides serial data communications between microprocessor systems (also called Electronic Control Units - ECU) in any kind of heavy-duty vehicles.Everything that has to do with CAN is based on maximum reliability with the [...]
This post is part of a series about SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino. Proving the capability of the most basic task of sending and receiving regular 8-byte (CAN) messages must be seen as an unnecessary test, since that had already taken place in previous chapters. Things change, however, with the transmission and reception of J1939 [...]
This post is part of a series about SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino. In a previous project (see chapter SAE J1939 Simulation Example) I demonstrated the simulation of SAE J1939 data traffic. However, the messages in that example were transmitted within a certain frequency. In the following, we will transmit messages according to user input. As before, [...]
This post is part of a series about SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino. In this following project, we will discover yet another SAE J1939 protocol feature, namely the Request Message (as defined in the SAE J1939/21 standard). As with the previous project, we will need two J1939 nodes, and therefore will need two projects, one to [...]
This post is part of a series about SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino. Parameters groups are, for instance, engine temperature, which includes coolant temperature, fuel temperature, oil temperature, etc. Parameter Groups and their numbers (PGN) are listed in SAE J1939 (roughly 300 pages) and defined in SAE J1939/71, a document containing roughly [...]
This post is part of a series about SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino. A Suspect Parameter Number (SPN) is a number assigned by the SAE to a specific parameter within a parameter group. It describes the parameter in detail by providing the following information: Data Length in bytes Data [...]