Connect/disconnect, Getseed/unlock, Read/write memory – National Instruments CAN 372139B-01 User Manual
Page 14

Chapter 1
Introduction
© National Instruments Corporation
1-3
Automotive Diagnostic Command Set User Manual
as second byte, and a ResponseCode as third byte. The only exception to 
this format is the negative response to an EscapeCode service; here, the 
third byte is an echo of the user-defined service code, and the fourth byte 
is the ResponseCode. The KWP2000 standard partly defines the 
ResponseCodes, but there is room left for manufacturer-specific 
extensions. For some of the ResponseCodes, KWP2000 defines an error 
handling procedure. Because both positive and negative responses have an 
echo of the requested service, you can always assign the responses to their 
corresponding request.
Connect/Disconnect
KWP2000 expects a diagnostic session to be started with 
StartDiagnosticSession and terminated with StopDiagnosticSession. 
However, StartDiagnosticSession has a DiagnosticMode parameter that 
determines the diagnostic session type. Depending on this type, the ECU 
may or may not support other diagnostic services, or operate in a restricted 
mode where not all ECU functions are available. The DiagnosticMode 
parameter values are manufacturer specific and not defined in the standard.
For a diagnostic session to remain active, it must execute the TesterPresent 
service periodically if no other service is executed. If the TesterPresent 
service is missing for a certain period of time, the diagnostic session is 
terminated, and the ECU returns to normal operation mode.
GetSeed/Unlock
A GetSeed/Unlock mechanism may protect some diagnostic services. 
However, the applicable services are left to the manufacturer and not 
defined by the standard.
You can execute the GetSeed/Unlock mechanism through the 
SecurityAccess service. This defines several levels of security, but the 
manufacturer assigns these levels to certain services.
Read/Write Memory
Use the Read/WriteMemoryByAddress services to upload/download data 
to certain memory addresses on an ECU. The address is a three-byte 
quantity in KWP2000 and a five-byte quantity (four-byte address and 
one-byte extension) in the calibration protocols.
The Upload/Download functional unit services are highly manufacturer 
specific and not well defined in the standard, so they are not a good way to 
provide a general upload/download mechanism.
