KWP1281

from Wikipedia, the free encyclopedia

KWP1281 , an acronym for Key Word Protocol in 1281 , is an exclusively at Volkswagen AG common outdated communication protocol for automotive electronics , which in the SAE  was defined J2818 later in January of 2008. It is only intended for manufacturer-specific diagnosis of control units in vehicle diagnosis systems.

Interior view of an engine control of the Golf III
WBH-Diag ( freeware for vehicle diagnosis with KWP1281 via a KL interface )

Despite the standardization in SAE J2818, KWP1281 is a proprietary protocol. Although the standard defines layers 1 and 2 of the OSI model , a diagnostic connection to the vehicle is not possible without knowledge of the other layers. Layers 3 to 7 are not published by Volkswagen AG, which is the sole user of KWP1281. This prevents free competition in the development of vehicle diagnostic systems and the customer and his vehicle are tied to the manufacturer's workshop network, which hinders free workshops. With the block exemption regulation , this restriction should be removed (see Further influences of legislation on vehicle diagnostics), which is why SAE J2818 was also defined to meet this requirement. There are now various alternative diagnostic solutions that KWP1281 can handle and are freely available. The knowledge about the higher OSI layers was usually gained by means of reverse engineering . Suppliers such as Robert Bosch GmbH benefit from the fact that they work closely with Volkswagen and have always been involved in the development of engine control units, etc. and thus have internal knowledge of the protocols.

SAE J2818 only defines bidirectional communication via the K line . The sometimes necessary initialization via the unidirectional L-line or the improper use of the L-line as a bidirectional connection is not defined, although both are common practice in diagnosis at Volkswagen.

A diagnostic connection from the diagnostic tester to the vehicle is initialized by a 10- bit data word which is sent at a transmission rate of 5  baud (corresponds to 200 ms per bit). Part of this stimulus signal is the address of the control unit with which the following communication is to take place. The address is sent in data format 7O1 (7  user data bytes , odd parity , 1  stop bit ). Before the stimulus phase, the K line must have been on logic 1 for at least 300 ms, analogous to parameter W5 from ISO 14230-2 .

Data function
1 start bit logical 0, identification of the stimulus phase
7 data bits Address of the control unit
1 parity bit odd parity
1 stop bit logical 1

The addresses for the control units are not standardized. Some addresses are:

address Control unit
1 Engine ( engine control unit )
2 automatic transmission
3 Anti-lock braking system

The control unit sends a response for synchronization and for signaling that the addressed control unit exists and feels addressed. There are 10 alternating bits, starting with a logical 0. If you consider this bit sequence in the 8N1 data format (1 start bit, 8 user data bytes, no parity, 1 stop bit), the user data byte has the hexadecimal value 55 hex .

The synchronization pattern enables the tester to determine the baud rate for further communication, which the control unit specifies by measuring the time span for a bit or the entire synchronization pattern and then calculating a baud rate from this:

SAE J2818 states that control units that have no emissions- related reference should use a baud rate other than 10,400 Bd. Practice shows that this is not observed. Baud rates of 1,200, 2,400, 4,800, 9,600 and 10,400 Bd. Can be found for all types of control units.

After the synchronization pattern, the control unit sends two more key bytes (7O1), which inform the tester of the protocol used. The tester returns the second key byte in inverted form as an acknowledgment of receipt. The initialization phase is now complete. Further communication now takes place in the 8N1 data format. The control unit waits for the first byte from the tester. The communication is structured byte by byte: Every byte sent (except for the last byte of every message) is confirmed by the recipient as a complement to FF hex . A message usually has the following structure:

Type description
length Number of following bytes
counter Consecutive counter 00 hex to FF hex
title Message type
n payload Data
The End 03 hex

The communication can be either by a message entitled communications end be terminated by the tester or is terminated automatically after a period of 1100 ms, as this is the maximum allowable time between the end of a message and the beginning of the next.

Web links

literature