A new function in LIN 2.0 has the possibility of reading out diagnostic information from master and slave nodes in a LIN bus.

How is LIN Diagnostics possible?

Diagnosing a LIN vehicle network is possible. A new function in LIN 2.0 has the possibility of reading out diagnostics information from master and slave nodes. For this purpose, 2 frame identifiers are used, which both expect 8 data bytes:

  • Master request frame with ID 60 (0x3C)
  • Slave response frame with ID 61 (0x3D)

The first byte of a LIN diagnostics frame is a NAD (Node address for Diagnostics), which is a 1-byte long diagnostic node address. The value ranges from 1 – 127, while 0 is reserved and 128 – 255 is for free usage. There are 3 methods for LIN bus diagnostics:

  1. Signal based LIN Diagnostics
  2. User-defined LIN Diagnostics
  3. Diagnostic transport layer

Signal-based LIN Diagnostics

Signal Diagnostics is the simplest method and uses standard signals in ordinary frames which represent:

  • Low overhead in slave nodes
  • A standardized concept
  • Static with no flexibility

User-defined LIN Diagnostics

User-defined Diagnostics can be designed to fit the needs of a specific device, but this also means that it will not be useful for general purposes. This method uses NAD in the range 128 – 255.

Diagnostic Transport Layer

Diagnostic Transport Layer is useful for a LIN network, which is built on a CAN-based system where ISO diagnostics is used. In this diagnostics method, NADs 1 – 127 are used. This method represents:

  • Low load on the master device
  • Provides ISO diagnostics for LIN slaves
  • Intended for more complex and powerful LIN nodes

LIN Diagnostic frame structure

A Diagnostic frame is called a PDU (Packet Data Unit) and starts with a NAD which addresses a certain node. After that follows a PCI (Protocol Control Information), which handles flow control.

If the PCI type is a Single Frame (SF), the whole LIN Diagnostic request command will fit into a single PDU.

If the PCI type is a First Frame (FF), then the next byte (LEN) will describe the number of bytes to come.

The data bytes that do not fit into the first frame will be sent in the following frames with the PCI type of Continuation Frames (CF).

A service Identifier (SID) specifies the request and which data bytes to follow.

LIN Diagnostics frame structure

Compatibility with LIN 1.3 (older version)

A LIN 2.0 master is backward compatible with LIN 1.3 slave with limitations. Both LIN 2.0 and LIN 1.3 slave can coexist in a network, but some new features like the improved checksum and automatic baud rate detection have to be avoided.