This article is intended to give engineers a brief overview of the SAE J1939 protocol.
SAE J1939 is a replacement for the SAE J1587/J1708 network which has been used for medium and heavy duty commercial vehicles for the past 20 years. Today J1939 is used as the standard communications bus for commercial vehicle's diagnostic and control applications. Due to its popularity and success, it has been adopted by the agricultural (ISO 11789) and marine industries (NMEA2000). Competing high-level CAN protocols are ISO 15765 and CANopen.
J1939 Overview
SAE J1939 is a high level communications protocol, which operates on a Controller Area Network (CAN) bus. J1939 specifies exactly how information (e.g. engine RPM) is exchanged between electronic control units (ECUs) on a vehicle.
It defines the data's priority, size, scaling, and offset. For example, J1939 specifies engine RPM to have a default priority of 3, to have a size of 16-bits, a resolution of 0.125 rpm/bit, and an offset of 0.
The standard goes on to define many other aspects, including message timeouts, how large messages are fragmented and reassembled, the network speed, the physical layer, and how applications acquire network addresses.
J1939 Messages
At the heart of J1939 is the Parameter Group Number (PGN), which is a unique number assigned to every J1939 message. The PGN serves to identify the message and its data. Although sometimes a message will contain a single parameter (e.g. VIN), typically the PGN will contain a group of parameters. In the standard there is a total of 8,672 PGNs.
For an example message, take PGN 61,444. It identifies the "Electronic Engine Controller 1" message. Per the specification, "EEC1" has seven different parameters embedded in the data field of the message. Engine RPM is one of those seven parameters.
J1939 has three different allowed message sizes, they are: 3 bytes, 8 bytes, and variable length. There is only one message which is three bytes in length, and that is the request message (PGN 59,904).
The majority of messages in J1939 are 8 bytes in length. This allows for a more efficient use of the network bandwidth by maximizing the amount of data on the network by reducing the number of messages.
Variable length messages are messages with a length from 9 to 1,785 bytes. These messages are too large to fit in a single CAN data frame and must be fragmented by the transmitter and reassembled by the receiver. This process is defined by J1939's transport protocol which is specified by J1939-21.
Currently there are two 250 Kbps physical layers defined, J1939-11 and J1939-15, with a 500 Kbps layer, J1939-14, under development.
J1939-11 specifies a shielded twisted pair of wires with a maximum backbone length of 40 meters. It uses a three pin connector and allows for up to 30 nodes.
J1939-15 specifies an unshielded twisted pair of wires with a maximum backbone length of 40 meters. It uses a two pin connector and allows for up to 10 nodes.
J1939 Introduccin
Este artculo tiene por objeto dar a los ingenieros una breve descripcin del protocolo SAE J1939 .
SAE J1939 es un sustituto de la red SAE J1587/J1708 que se ha utilizado para los vehculos comerciales medios y pesados durante los ltimos 20 aos. Hoy en da J1939 se utiliza como el bus de comunicaciones estndar para aplicaciones de diagnstico y de control del vehculo comercial . Debido a su popularidad y xito, que ha sido aprobada por la agricultura (ISO 11789 ) y las industrias marinas ( NMEA2000 ) . Protocolos competidoras de alto nivel se estn ISO 15765 y CANopen .
SAE J1939 es un protocolo de comunicaciones de alto nivel , que opera en una red de rea de controlador (CAN ) bus . J1939 especifican exactamente cmo se intercambia la informacin ( por ejemplo, RPM del motor ) entre unidades de control electrnico (ECU ) en un vehculo .
Se define la prioridad de los datos , el tamao , la escala y offset. Por ejemplo , J1939 especifica RPM del motor para tener una prioridad por defecto de 3 , que tienen un tamao de 16 bits , una resolucin de 0.125 rpm / velocidad de bits , y un desplazamiento de 0 .
La norma pasa a definir muchos otros aspectos , como los tiempos de espera de mensajes, cmo se fragmenta y se vuelven a montar los mensajes grandes , la velocidad de la red , la capa fsica , y cmo las aplicaciones adquieren direcciones de red.
J1939 Mensajes
En el corazn de J1939 es el nmero del grupo de parmetros ( PGN ) , que es un nmero nico asignado a cada mensaje J1939 . La PGN sirve para identificar el mensaje y sus datos . Aunque a veces un mensaje contendr un solo parmetro ( por ejemplo, VIN ) , tpicamente la PGN contener un grupo de parmetros . En la norma hay un total de 8672 PGN .
En un mensaje de ejemplo, tomemos PGN 61444 . Identifica el mensaje " Electronic Engine Controller 1 " . Por la especificacin , " EEC1 " tiene siete diferentes parmetros embebidos en el campo de datos del mensaje . RPM del motor es uno de los siete parmetros .
J1939 tiene tres tamaos de los mensajes permitidos diferentes , que son: 3 bytes , 8 bytes , la longitud variable. Slo hay un mensaje que es de tres bytes de longitud , y que es el mensaje de solicitud ( PGN 59904 ) .
La mayora de los mensajes en J1939 son 8 bytes de longitud . Esto permite un uso ms eficiente del ancho de banda de la red mediante la maximizacin de la cantidad de datos en la red mediante la reduccin del nmero de mensajes .
Mensajes de longitud variable son mensajes con una longitud de 9 a 1785 bytes . Estos mensajes son demasiado grandes para caber en una sola trama de datos CAN y deben ser fragmentados por el transmisor y volver a montar por el receptor. Este proceso es definido por el protocolo de transporte de J1939 que se especifica en J1939- 21 .
Actualmente hay dos 250 Kbps capas fsicas definidas , J1939- 11 y J1939- 15 , con una capa de 500 Kbps , J1939- 14 , en fase de desarrollo .
J1939- 11 especifica un par trenzado de cables con una longitud mxima de columna vertebral de 40 metros. Se utiliza un conector de tres clavijas y permite hasta 30 nodos .
J1939- 15 especifica un par trenzado sin blindaje de los cables con una longitud mxima de columna vertebral de 40 metros. Se utiliza un conector de dos pines y permite hasta 10 nodos.
SAE J1939
This article is intended to give engineers a brief overview of the SAE J1939 protocol. For details on the specification itself, please visit the Society of Automotive Engineers. Here is a printable version of this J1939 introduction and Bosch CAN specification. SAE J1939 is a replacement for the SAE J1587/J1708 network which has been used for medium and heavy duty commercial vehicles for the past 20 years. Today SAE J1939 is used as the standard communications bus for commercial vehicle's diagnostic and control applications. Due to its popularity and success, it has been adopted by the agricultural (ISO 11789) and marine industries (NMEA2000).
J1939 Overview
SAE J1939 is a high level communications protocol, which operates on a Controller Area Network (CAN) bus. SAE J1939 specifies exactly how information (e.g. engine RPM) is exchanged between electronic control units (ECUs) on a vehicle. It defines the data's priority, size, scaling, and offset. For example, J1939 specifies engine RPM to have a default priority of 3, to have a size of 16-bits, a resolution of 0.125 rpm/bit, and an offset of 0. The standard goes on to define many other aspects, including message timeouts, how large messages are fragmented and reassembled, the network speed, the physical layer, and how applications acquire network addresses.
J1939 Datalink
SAE J1939 uses a simple datalink layer to communicate information. Altogether there are six subfields which are encoded into the 29-bit CAN identifier, they are shown below and are: Priority, Extended Data Page, Data Page, Protocol Format, Protocol Specific, and Source Address.
P 3 bits
EDP 1 bit
DP 1 bit
PF 8 bits
PS 8 bits
SA 8 bits
P is the priority of the message, EDP and DP make up 4 different pages with one page being reserved for ISO 15765-3. PF and PS define the parameter group number and destination address, and SA is the source address of the controller application. For details about this encoding, refer to SAE J1939-21.
J1939 Messages
At the heart of J1939 is the Parameter Group Number (PGN), which is a unique number assigned to every J1939 message. The PGN serves to identify the message and its data. Although sometimes a message will contain a single parameter (e.g. VIN), typically the PGN will contain a group of parameters. In the standard there is a total of 8,672 PGNs. For an example message, take PGN 61,444. It identifies the "Electronic Engine Controller 1" message. Per the specification, "EEC1" has seven different parameters embedded in the data field of the message. Engine RPM is one of those seven parameters.
Another difference between BAMs and CMs is the time is takes to send a messages. With a BAM, data packets must be spaced at least 50 ms apart and no more than 200 ms. With a CM, data frames may be sent as quickly as possible.
What is a J1939 protocol stack? A J1939 protocol stack is a software library that handles the appropriate layers of the OSI 7 layer model. J1939 specifies layer 1 (physical), layer 2 (data link), layer 3 (network), and layer 4 (transport), and layer 7 (application). In simple terms, a J1939 protocol stack, for inbound data, will convert and reassemble received raw CAN frames and present complete and valid J1939 messages to the user's application. For outbound data, a J1939 protocol stack will accept complete messages from the user's application then convert, fragment, and transmit raw CAN frames onto the J1939 network.
J1939 Specifications
SAE J1939 Parent Document SAE J1939-11 Physical Layer, 250 Kbps
SAE J1939-13 Off-Board Diagnostic Connector SAE J1939-14 Physical Layer, 500 Kbps SAE J1939-15 Reduced Physical Layer, 250 Kbps SAE J1939-21 Data Link Layer SAE J1939-31 Network Layer SAE J1939-71 Vehicle Application Layer SAE J1939-73 Vehicle Diagnostic Layer SAE J1939-74 Application - Configurable Messaging SAE J1939-75 Application Layer - Generator Sets and Industrial SAE J1939-81 Network Management SAE J1939-82 Compliance - Truck and Bus
SPN DA PDU2
DTC CA BAM
There are two J1939 software packages available: J1939-Full and J1939-Light. J1939-Full handles reception and transmission of standard single frame and multi-frame (i.e. Transport Protocol) J1939 messages. Also, the J1939-Full software package handles address claim arbitration specified by the network management layer. J1939-Light is identical to J1939-Full without support for the J1939 transport protocol which is used for multiframe messages. If you have questions about our J1939 software, please see our J1939 Protocol Stack FAQ for possible answers.
J1939 compliant
MISRA C compliant ANSI C source code Use with or without an RTOS Use with 8, 16, 32, or 64-bit CPU
Linux Windows XP/7/Embedded Texas Instruments RM4x (DCAN) Texas Instruments LM3Sx Texas Instruments TMS470x Texas Instruments TMS470Mx Texas Instruments TMS570x Texas Instruments Tiva TM4C Texas Instruments F28M35xx Texas Instruments TMS320F280x Texas Instruments TMS320F281x Texas Instruments TMS320F282x Texas Instruments TMS320F283x Texas Instruments AM3x - Sitara
Texas Instruments DM8x - DaVinci Atmel SAM7 Atmel AT90 Freescale HCS08 Freescale HCS12 Freescale HCS12X Freescale MC68xxx Freescale MCF5xxx Freescale MPC5xxx Freescale Kinetis Kxx Infineon C16x Infineon TriCore Intel 82527 Microchip PIC18 Microchip PIC24 Microchip PIC32 Microchip dsPIC30 Microchip dsPIC33 Microchip MCP2515 NXP LPC11xx NXP LPC17xx NXP LPC21xx NXP LPC23xx NXP SJA1000 Silicon Labs C8051 STMicro ST7 STMicro ST10 STMicro STR7 STMicro STM8 STMicro STM32F1x STMicro STM32F2x STMicro STM32F3x STMicro STM32F4x Xilinx LogiCORE AXI (axi_can)