J1939 协议简介
J1939协议是基于CAN 2.0B所发展的出来的,基于CAN 的物理层。主要用于commercial vehicle的通信。J1939的主要目的是制定统一的上层application诊断的信息。
J1939的最大特点是定义了PGN(Parameter Group Number). 大多数的PGN是8个字节。 0xFE - 错误, 0xFF - 数据不存在。
以下是J1939 CAN ID 的 mapping.
CAN 和 J1939 的区别
- J1939 is built on Extended CAN i.e., only 29-bit identifier will be used, where as CAN operates on 11 bit (Standard CAN) and 29 bit (Extended CAN)
- J1939 protocol is used for communicating b/w nodes as well as for diagnostics whereas CAN is used for communicating & doesn’t have its own Diagnostic Protocol because of which UDS & KWP protocols were used over CAN.
- J1939 used PDU format for determining whether the message can be transmitted with a destination address or if the message is always transmitted as a broadcast message whereas CAN bus is a broadcast type of bus. This means that all nodes can “hear” all transmissions. There is no way to send a message to just a specific node; all nodes will invariably pick up all traffic. The CAN hardware, however, provides local filtering so that each node may react only on the interesting messages.