Tuning Wiki

What a serial logger is asking for

A serial log from an engine control unit is a list of values that controller chose to transmit. The data-logging page covers what those channels can and cannot say about a prepared engine, and why a handful of samples a second is not a picture of one combustion cycle. This page is the communication underneath that log: the wire, the frame, and the service that names the channel.

The socket those wires sit in is a separate question. Manufacturer sockets on BMW, Mercedes-Benz, Volkswagen Group and PSA cars, and the 16-pin connector required once EOBD applied, are on the diagnostic ports page.

Three questions are easy to mix together. Which pins carry the bits? How is a message framed, addressed and timed? Which service asks for engine speed, a fault code, or a manufacturer measurement? Keyword Protocol 2000, legislated on-board diagnostics and Unified Diagnostic Services answer different parts of that list. A tool menu that says only "KWP" has not yet said which.

The documents, and which layer each one is

ISO 14230 is the Keyword Protocol 2000 series. It was published in four parts. Part 1 is the physical layer. Part 2 is the data-link layer. Part 3, still the 1999 edition, is the application layer. Part 4, published in 2000, states the requirements when that protocol is used for emissions-related on-board diagnostics, and it says the complete specification remains in parts 1 to 3 and in ISO 14229, with parts 1 to 3 applying to emissions work only where part 4 explicitly calls them in.

Parts 1 and 2 have since been revised under the title diagnostic communication over K-Line, usually shortened to DoK-Line. The data-link document current in 2016 is the third edition of ISO 14230-2. Its introduction places the pieces on the usual seven-layer model. On a K-line the physical layer is ISO 14230-1 and the data-link layer is ISO 14230-2. Legislated on-board diagnostics use ISO 15031-5 as the application layer. Enhanced diagnostics use ISO 14229-1, and ISO 14229-6 when those unified services are carried on the K-line. When the same kind of diagnostic message moves onto CAN, the transport is ISO 15765-2 and the emissions requirements are ISO 15765-4. The 2016 text also says a server supports only one of the K-line protocols defined in ISO 9141 and ISO 14230, so the tester has to tell them apart while it is waking the control unit up.

QuestionDocumentWhat it decides
The K-line wireISO 14230-1, and ISO 9141-2 for the legislated physical linkLevels, the K-line, the optional L-line, and the bit rate of an emissions session
Frames, addresses, checksum, timingISO 14230-2How a message is built and how long the tester must wait
Keyword Protocol 2000 servicesISO 14230-3:1999The older application-layer requests a KWP2000 session uses
Emissions OBD on that stackISO 14230-4:2000 and ISO 15031-5The restricted service list a legislated scan tool is entitled to
Unified servicesISO 14229-1, with ISO 14229-6 on K-line and ISO 14229-3 on CANThe service set later loggers mean by UDS, independent of the wire
Long messages on CANISO 15765-2, and ISO 15765-4 for emissions OBDHow one diagnostic message is split across CAN frames
Diagnostics over IPISO 13400-2, with ISO 14229-5 when the services are UDSHow the tester finds the vehicle, and how a diagnostic message is carried on TCP. The Diagnostics over IP page

The K-line

On ISO 9141-2 the physical link used for legislated diagnostics is a single bidirectional K-line. The line idles high, with the pull-up in the tester, and either end can pull it low. A byte is a start bit, eight data bits with the least significant bit first, and a stop bit. The published physical specification sets the data rate at 10.4 kbit/s, within 1 percent for the tester, and it limits a legislated message to between 5 and 11 bytes.

Keyword Protocol 2000 keeps that wire and adds an optional L-line. The 2016 data-link text defines the topology as a K-line plus an optional L-line. The L-line, where it is fitted, is part of waking the control unit. It is not a second data wire for the running session. After a five-baud initialisation the same data-link text allows communication from 1,200 baud to 10,400 baud. The tester learns the rate from the synchronisation byte, which is 55 hexadecimal. A fast initialisation does not offer that choice: every control unit started that way uses 10,400 baud for the wake-up and for the traffic that follows. The byte sequences, the key bytes that separate ISO 9141 from Keyword Protocol, and the 2.6 second wait after a failed fast initialisation are on the K-line page. The American pulse bus a scan tool tries in the same discovery is SAE J1850.

Starting the session

Five-baud initialisation is the slow wake-up. The public K-line description has the tester send an address, one bit at a time, for about two seconds. The data-link text then has the control unit answer at the real communication rate: the synchronisation byte 55 hexadecimal, then two key bytes. The tester sends the second key byte inverted, and the control unit sends the address inverted. The 2016 edition defines five-baud initialisation as the sequence that starts with the bus idle and ends with that inverted address from the server.

The address selects who wakes. A physical initialisation is aimed at one control unit. A functional initialisation is aimed at a group, and the data-link text requires every control unit in that group to be using the same baud rate. Emissions initialisation, called CARB initialisation in the keyword-protocol text, is a functional case, and that text says it uses the five-baud method only. The key bytes are how the tester learns which header options this control unit implements, and, in the 2016 edition, which of the coexisting K-line protocols it is speaking. A control unit that answers as ISO 9141-2 is not then going to accept a Keyword Protocol 2000 header.

Fast initialisation skips the two-second address. The tester puts a wake-up pattern on the K-line and the L-line, then sends a StartCommunication request at 10,400 baud. The 2016 definition of fast initialisation runs from the idle bus to the reception of the positive StartCommunication responses from the servers that were addressed. StartCommunication, StopCommunication and AccessTimingParameter are data-link services in that edition. They open the link, close it, and change the waiting times. They are not themselves a request for engine speed.

How a Keyword Protocol 2000 message is built

The 1999 data-link text builds a message from a header of at most four bytes, a data field, and one checksum byte. The first header byte is the format byte. Its two highest bits select the address mode and its lower six bits carry a length.

Address bitsHeaderWho the message is for
00No address bytesA link with only one other node, so the target and source can be left out
01The CARB exceptionThe emissions form. The 1999 text points the format bytes 68 and 48 hexadecimal at ISO 9141-2 and SAE J1979 rather than defining them here
10Target and sourcePhysical addressing, one control unit
11Target and sourceFunctional addressing, a group. Several control units may answer

The six length bits count from the service identifier up to, but not including, the checksum. A length of 1 to 63 can live in the format byte. When those six bits are zero, a separate length byte is present and the data field may be from 1 to 255 bytes. The 1999 text puts the longest message at 260 bytes: the header, that data field, and the checksum. The first byte of the data field is the service identifier. Everything after it is the service's own data. The checksum is the simple 8-bit sum of every byte in the message except the checksum itself.

That length is the practical difference from a legislated ISO 9141-2 message. An 11-byte emissions message can carry one small answer. A keyword-protocol message can carry a long one. A 2005 summary of the legislated protocols makes the same comparison, giving ISO 9141-2 a maximum of 11 bytes and KWP 2000 a maximum around 260 bytes on the same kind of wire. The longer reply can hold more channels. The bit rate of a 10,400 baud session does not change.

The line time follows from the byte format already used on the logging page. Each byte is a start bit, eight data bits and a stop bit, so ten bit-times. At 10.4 kbit/s a 260-byte message occupies 2,600 bit-times, which is a quarter of a second, before any of the gaps below. A preparation log that asks for a short reply stays nearer the 11-byte case. A log that stuffs a long list of identifiers into one keyword-protocol reply pays for those bytes on the wire.

The gaps that set the sample rate

The Swedish implementation standard SSF 14230-2, issue 1 of 22 April 1997, is based on ISO 14230-2 and publishes a normal set of default timing windows, in milliseconds. It is an implementation standard agreed by the Swedish vehicle group named in that issue. It is not a statement that every control unit is running these numbers, and the same document says AccessTimingParameter can change them.

ParameterSSF normal defaultWhat the wait is
P10 to 20 msThe gap between bytes inside the control unit's response
P225 to 50 msFrom the end of the tester's request to the start of a response, or between responses when more than one control unit answers a functional request
P2*25 to 5,000 msThe extended window, used when the control unit sends a negative response with code 78 hexadecimal, meaning the request was received and the response is still pending
P355 to 5,000 msFrom the end of the last response to the next tester request. If nobody responds, it is measured from the end of the request
P45 to 20 msThe gap between bytes inside the tester's request

Read against a log, P3 is the one that dominates a short poll. The bits of a small request and a small reply can be on the wire in a few tens of milliseconds. The normal default then keeps the tester quiet for at least 55 ms before it may ask again. A response-pending reply, code 78 hexadecimal, replaces the short P2 window with the extended one, which in this default set may last five seconds. During that wait the channel is not being sampled. A logger that reports a smooth 10 Hz trace has either been given a faster timing set, or it is plotting values the control unit repeated from its own last calculation.

The 2016 data-link edition still defines these inter-byte and inter-message parameters, and it still provides AccessTimingParameter. The numeric defaults above are the ones printed in the 1997 Swedish issue. Where a manufacturer file or a tool's timing setup names different limits, those limits are the ones that session is using.

KWP 1281 is a different protocol

Volkswagen Group tools use the label KWP 1281 for an older diagnostic protocol, and KWP 2000 for the later one. Ross-Tech's description of the MkIV cars calls the engine controller KWP 1281, and calls some later ABS controllers KWP 2000. Its controller screen reports the live protocol as KWP 1281, KWP 2000, CAN or UDS. A measuring-block log on a 1281 controller is still a request and a response on the K-line. The block format is the group's own. It is not the ISO 14230 header, length byte and checksum described above, and a definition written for one will not read the other.

Legislated on-board diagnostics

ISO 15031-5 is the application layer a legislated emissions scan uses. The 2015 edition's service list, written there in hexadecimal, is the list a generic OBD logger is entitled to ask for:

  • Service 01. Current powertrain diagnostic data. This is the live data list: engine speed, calculated load, coolant temperature, and the other parameter identifiers the standard defines.
  • Service 02. Powertrain freeze-frame data, the snapshot stored with a fault.
  • Service 03. Emission-related diagnostic trouble codes.
  • Service 04. Clear those emissions records.
  • Service 05. Oxygen-sensor monitoring results.
  • Service 06. On-board monitoring results for specific systems.
  • Service 07. Emission-related codes detected during the current or last completed driving cycle.
  • Service 08. Control of an on-board system, test or component.
  • Service 09. Vehicle information, including the identifiers used to name the calibration.

Each parameter identifier has a defined encoding in that standard and in the associated SAE digital annex. The bytes on the wire are not engineering units until that encoding is applied. A preparation log that needs delivered ignition angle, requested boost, a torque limit or an injector quantity is asking for channels this emissions list was not written to contain. Those channels, where they exist, are manufacturer services. The ME7 logging page is one example of separating a request, a limit, a model, a measurement and an output once the bytes have been named.

Unified diagnostic services

ISO 14229-1 specifies the diagnostic services independently of the serial link. The tester is the client and the control unit is the server. The same application layer can sit on the K-line, on CAN, on FlexRay, on LIN, or on Internet Protocol, with the transport named in the implementation part for that link. ISO 14229-1:2020 names those transports, including ISO 15765-2 for CAN and ISO 13400-2 for diagnostics over IP. The layout of that IP transport is on the Diagnostics over IP page. Moving the service onto a faster network removes the K-line wake-up. It does not change the fact that the server answers with the data record it was built to hold.

The service a tuning logger usually means by "mode 22" is ReadDataByIdentifier. The 2026 edition of ISO 14229-1 lists it as service 22 hexadecimal. The client names one or more data identifiers and the server returns the data records for the identifiers it supports. ReadMemoryByAddress is service 23 hexadecimal. ReadDataByPeriodicIdentifier is service 2A hexadecimal, and DynamicallyDefineDataIdentifier is service 2C hexadecimal. Those last two are the services that let a tester build a group of values and have the server send the group repeatedly, which is the protocol mechanism behind a denser manufacturer log. The repetition rate is still the one that server and session agree, and it is still limited by the link timing.

A Softing training note on SAE J1979-2 describes how the legislated list was carried onto that service. Classic service 01, current powertrain data, becomes ReadDataByIdentifier. The two-byte identifier uses a prefix in the high byte, F4 hexadecimal among them, and the old parameter identifier in the low byte. That mapping is the legislated one in the note. A manufacturer identifier used by a calibration tool is a different number, defined for that control unit. Service 22 only returns it if this server publishes it. A negative response means the request was not served. It is not a reading of zero.

Keyword Protocol 2000 on CAN is this split, seen from the other direction. The application request can be a keyword-protocol or a unified service, and ISO 15765-2 carries it in CAN frames. There is no five-baud wake-up and no L-line, because those belong to the K-line data link. A tool that offers "KWP on CAN" and a tool that offers "UDS on CAN" may be speaking different service lists on the same transport. The identifier database has to match the service the control unit implements.

CAN diagnostics and a CAN broadcast

ISO 15765-2 is the transport and network layer that segments one diagnostic message into CAN frames and reassembles them. The four frame types and the flow-control separation time are on the ISO-TP page. Volkswagen Group modules of this era that open a channel before they will carry a service are on the TP 2.0 page. A long ReadDataByIdentifier reply is several frames, with the transport's own control bytes, not one value per frame. The 2005 Sofia summary describes the legislated CAN on-board diagnostic link, ISO 15765-4, as 500 kbit/s. That figure is the speed of that diagnostic bus in the summary. It is not the sample rate of engine speed or lambda, and it is not a claim about every other CAN network on the vehicle. Powertrain broadcasts often share a bus with diagnostics, and a manufacturer may run a bus at another rate. The rate belongs to that network.

A listening logger is a different record from a diagnostic poll. Frames the controllers already broadcast can be stored without a request. A diagnostic session still asks, waits, and stores the response. The logging page sets out that distinction and the reason a 100 Hz broadcast channel is still only a couple of samples across one four-stroke cycle at 6,000 rpm. Segmentation and a 500 kbit/s bus do not turn a polled identifier into an intra-cycle measurement. They change how long the request and the reply occupy the bus.

What to assume on a preparation log

Name the link and the service in the log header. "K-line" does not say whether the session was ISO 9141-2, Keyword Protocol 2000, or KWP 1281. "CAN" does not say whether the file is a broadcast recording or a diagnostic poll. "Mode 22" does not say whether the identifiers are the legislated F4 set or a manufacturer list.

Then read the rate from the session, not from the headline baud rate. On a 10,400 baud K-line the normal timing defaults above already keep a short poll well under ten samples a second, and a long reply or a response-pending gap makes it slower. On CAN the bus can carry much more, and the control unit still updates each identifier on its own schedule. The value in the file is the value the server transmitted, scaled by the definition that belongs to that identifier. The logging page is the place to decide whether that value is a sensor, a model, a request or a limiter, and whether the question needs a scope or a crank-angle record instead.

Sources

  • ISO 9141-2 physical-layer extract. Bidirectional K-line, 10.4 kbit/s, byte format, and messages of 5 to 11 bytes. Accessed 2026-11-12.
  • K-line communication description. OBD Clearinghouse. Five-baud address and the move to 10.4 kbit/s. Accessed 2026-11-12.
  • ISO 14230-2:1999 preview. SIS. Header, address modes, length byte, 255-byte data field, 260-byte message and the 8-bit checksum. Accessed 2026-11-12.
  • ISO 14230-2 data-link text. Five-baud and fast initialisation, key bytes, and communication from 1,200 to 10,400 baud. Accessed 2026-11-12.
  • ISO 14230-2:2016. DoK-Line data-link layer. Scope, K-line and optional L-line, protocol determination, and the layer table. Accessed 2026-11-12.
  • SSF 14230-2, issue 1, 22 April 1997. Swedish implementation standard based on ISO 14230-2. Normal default timing windows in milliseconds, and response code 78 hexadecimal. Accessed 2026-11-12.
  • ISO 14230-4:2000. Requirements for emission-related systems, and the limit on how far parts 1 to 3 apply. Accessed 2026-11-12.
  • ISO 14229-1:2020. Unified diagnostic services, application layer, and the transports including ISO 15765-2 and ISO 13400-2. Accessed 2026-11-12.
  • ISO 14229-1:2026 contents. ReadDataByIdentifier, ReadMemoryByAddress, ReadDataByPeriodicIdentifier and DynamicallyDefineDataIdentifier. Accessed 2026-11-12.
  • ISO 15031-5:2015 preview. Legislated services 01 to 09. Accessed 2026-11-12.
  • Simplifying OBD use cases. Softing. Mapping of SAE J1979 service 01 onto UDS service 22, and the F4 identifier prefix in J1979-2. Accessed 2026-11-12.
  • Dzhelekarski and Alexiev. Electronics 2005, Technical University of Sofia. ISO 9141-2, KWP 2000 message length, and ISO 15765-4 at 500 kbit/s. Accessed 2026-11-12.
  • Volkswagen MkIV. Ross-Tech. KWP 1281 and KWP 2000 on those controllers. Accessed 2026-11-12.
  • Open controller. Ross-Tech VCDS. Protocol reported as KWP 1281, KWP 2000, CAN or UDS. Accessed 2026-11-12.

Continue the conversation

If this topic interests you, consider joining the following forums. They host material referenced in this article.