As a professional in the automotive industry, understanding the intricacies of J1939 communication is crucial for ensuring efficient data transmission and system interoperability. The SAE J1939 protocol is a key standard for heavy-duty vehicles, providing a robust framework for communicating and controlling the vehicle's electronic systems. In our earlier article on introduction to SAE J1939 standard, we covered various sub standards associated with this and how the overall scheme of things works. In this comprehensive guide, we will delve deep into the various aspects of J1939 communication, from message frame formats to parameter group numbers, and explore the nuances.

J1939 Protocol Message Frame Format

As described earlier, the J1939 protocol message frame format is based on the high-speed CAN specification ISO11898 specification and leverages the 29-bit extended frame format of the CAN to encode information of the data being transferred.

SAE J1939 CAN ID PGN Mapping

The 29-bit ID field is split in to 3 components:

Priority :

3 bits - Specifies the priority of the message. Leveraging the CAN's arbitration procedure, 0 has the highest priority and 7 the lowest priority. Critical control messages like torque data from transmission are transmitted with higher priority and non-critical information are transmitted with lower priority.

Parameter Group Number :

18 bits - Indicates the information associated with this message. Source address - 8 bits - Contains the address of the originator of this message with value between 1 to 254.

The Parameter Group Number (PGN) is further split into 4 fields:

  • Reserved :1 bit - Always 0
  • Data Page :1 bit - Used to expand hte number of PGN's that can be carried on the network
  • PDU format (PF)8 bits - Indicates if it is a broadcast message (240 to 255) or transmitted to specific node (0 to 239)
  • PDU specific (PS):8 bits - Indicates that destination for addressable messages or Group Extension for broadcast messages.
  • Group Extension is essentially used to increase the number of available messages to be broadcast.

    Parameter Group Number in J1939 Protocol

    The parameter group number (PGN) in the J1939 protocol serves as a key identifier for different categories of data transmitted across the network. Each PGN corresponds to a specific type of information, such as engine speed, vehicle position, or diagnostic trouble codes (DTCs). Defined by the J1939/71 standard, all the standard parameters used in any vehicle network are given a unique number that is used to identify the contents of the data section of the frame.

    Suspect Parameter Number in J1939 Protocol

    In the context of J1939 communication, the suspect parameter number (SPN) is a critical element that facilitates the precise identification of specific parameters within the transmitted data. Each SPN corresponds to a distinct parameter, such as vehicle speed, engine oil temperature, or brake system status.

    SAE J1939 SPN

    By standardizing the SPNs, J1939 ensures consistency and interoperability across different vehicle models and manufacturers.

    The PGNs and SPNs are typically equivalents of messages and signals in typical in-vehicle networking and are available as DBC files that can be quicky used with standard tools like CANAnalyser, CANKing etc.

    J1939 Transport Protocols for Larger Data Transmission

    As the volume and complexity of data within vehicle systems continues to grow, the need for efficient transport protocols for larger data transmission becomes increasingly critical. The J1939 protocol addresses this demand through the implementation of robust transport protocols, enabling the reliable transfer of extensive data payloads across the network. These transport protocols support the fragmentation, transmission, and reassembly of large data sets, ensuring that comprehensive diagnostic information and system updates can be effectively exchanged between ECUs.

    The J1939-21 defines two mechanisms to transfer data larger than 8 bytes - one for broadcast messages and another for peer-to peer communication called Broadcast Announcement Message (BAM) and Connection Mode (CM) respectively. Both protocols work salary and with difference on the reliability and control on delivery. To begin the transfer, they utilize a special message called Transport Protocol Connection Management message (TP.CM). This message carries the connection command, the PGN of the large message about to be transmitted and the method of reconstructing the received message. Then the actual data is transmitted using a message called Transport Protocol Data Transfer message (TP.DT). The first byte of the data field has the sequence number of the chunk along with 7-byte data chuck.

    Broadcast Announce Message in J1939 Protocol

    As the name implies, the Broadcast Announcement Messages (BAM) mechanism is used to broadcast data to multiple nodes. Hence it is not possible to implement handshake mechanism and transmitter has to manage the flow so that the receiver can handle without overloading, typically transmitted a specific time gap between the messages. Even if the receiver loses a part of the message, there is no way to request it again. Here the transmitter is responsible for managing the entire flow of data across the network.

    Broadcast Announcement Messages

    As depicted, the source sends the TP.CM message with value of 32 in control byte indicating BAM. Then it start sending the data over TP.DT messages till all are sent. The last packet, if it does not have 7 bytes of data, the remaining area is padded with 0xFF.

    Connection Mode in J1939 Protocol

    The Connection Mode is a peer-to-peer transfer with mechanism for handshaking and acknowledgments and can ensure successful data transfer. The receiver has fine control over the data flow and can request the sender to pause and continue transmission when needed. And both the parties can choose to abort the transmission at any point.

    Connection Mode

    As given in the flow diagram, the sender starts transmission with a TP.CM message with a control byte Request to Send - value of 16. Typically the receiver responds with TP.CM with control byte set as 17 - Clear to Send (17) and current sequence number to transfer and number of TP.DT packets allowed in the data field. The sender then sends TP.DT messages starting at the sequence requested till the allowed number of TP.DT messages reached. At any point the receiver can choose the pause the transfer by sending CTS with Packets To send as 0. When it is ready, it sends the CTS with Packets To send as non-0 allowing sender to transmit again. Once all the data is received, the receiver sends a TP.CM with control byte set as 19 - End of Message Acknowledgment

    Address Claim Procedure in J1939 Protocol

    The address claim procedure is a vital aspect of J1939 communication, governing the allocation of unique addresses to ECUs within the network. As vehicles incorporate an increasing number of electronic control units, the address claim procedure plays a crucial role in ensuring that each ECU can communicate effectively without causing conflicts or disruptions. By following a standardized process for address allocation, the J1939 protocol facilitates seamless integration of new ECUs into the network, promoting scalability and interoperability across diverse vehicle configurations.

    During the address claim procedure, each ECU broadcasts its preferred address and listens for potential conflicts with other ECUs. If a conflict arises, the ECUs involved engage in a prioritized arbitration process to resolve the conflict and secure unique addresses. This systematic approach to address assignment minimizes the risk of communication errors and fosters a stable network environment for the exchange of critical vehicle data. By grasping the intricacies of the address claim procedure, automotive professionals can ensure the smooth integration of new ECUs and uphold the integrity of the J1939 network.

    Conclusion

    In conclusion, a thorough understanding of J1939 communication is indispensable for automotive professionals seeking to harness the full potential of SAE standards for data transmission and system control. From the intricate message frame formats to the standardized parameter identification and transport protocols, the J1939 protocol offers a comprehensive framework for robust and reliable communication within heavy-duty vehicles. By delving into the nuances of J1939 communication, professionals can elevate their diagnostic capabilities, optimize system performance, and ensure seamless interoperability across diverse vehicle components.

    Subscribe to our Insights