REV.
DEC2004
2002-02
2004-12
J2534 FEB2002
® J2534-1
Issued
Revised
Superseding
SURFACE
VEHICLE
RECOMMENDED
PRACTICE
(R) Recommended Practice for Pass-Thru Vehicle Programming
Foreword
The use of reprogrammable memory technology in vehicle electronic control units (ECUs) has increased
in recent years, and is expected to continue in the future. Use of this technology has increased the
flexibility of being able to use a single ECU hardware part to be used in many different vehicle
configurations, with the only difference being the software and calibrations programmed into the unit.
Reprogramming of those ECUs in the service environment also allows for ease of field modification of
system operation and calibrations. Variations in reprogramming capability and the multiple tools
necessary to reprogram vehicles are a burden on aftermarket repair facilities that service different makes
of vehicles.
This document describes a standardized system for programming that includes a standard personal
computer (PC), standard interface to a software device driver, and an interface that connects between the
PC and a programmable ECU in a vehicle. The purpose of this system is to facilitate programming of
ECUs for all vehicle manufacturers using a single set of programming hardware. Programming software
from multiple vehicle manufacturers will be able to execute on this set of hardware to program their
unique ECUs.
The U.S. Environmental Protection Agency (EPA) and the California Air Resources Board (ARB) have
been working with vehicle manufacturers to provide the aftermarket with increased capability to service
emission-related ECUs for all vehicles with a minimal investment in hardware needed to communicate
with the vehicles. Both agencies have issued regulations that will require standardized programming
tools to be used for all vehicle manufacturers. The Society of Automotive Engineers (SAE) developed
this Recommended Practice to satisfy the intent of the U.S. EPA and the California ARB.
SAE Technical Standards Board Rules provide that: “This report is published by SAE to advance the state of technical and engineering sciences. The use of this report is
entirely voluntary, and its applicability and suitability for any particular use, including any patent infringement arising therefrom, is the sole responsibility of the user.”
SAE reviews each technical report at least every five years at which time it may be reaffirmed, revised, or cancelled. SAE invites your written comments and suggestions.
Copyright © 2004 SAE International
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or by any means, electronic, mechanical, photocopying,
recording, or otherwise, without the prior written permission of SAE.
TO PLACE A DOCUMENT ORDER:
SAE WEB ADDRESS:
Tel: 877-606-7323 (inside USA and Canada)
Tel: 724-776-4970 (outside USA)
Fax: 724-776-0790
Email: custsvc@sae.org
http://www.sae.org
SAE J2534-1 Revised DEC2004
TABLE OF CONTENTS
Scope ..................................................................................................................................... 5
References............................................................................................................................. 5
Applicable Documents ........................................................................................................... 5
SAE Publications.................................................................................................................... 5
ISO Documents...................................................................................................................... 6
Definitions............................................................................................................................... 6
Acronyms ............................................................................................................................... 6
Pass-Thru Concept ................................................................................................................ 7
Pass-Thru System Requirements .......................................................................................... 8
PC Requirements................................................................................................................... 8
Software Requirements and Assumptions............................................................................. 8
Connection to PC ................................................................................................................... 9
Connection to Vehicle ............................................................................................................ 9
Communication Protocols ...................................................................................................... 9
ISO 9141 ................................................................................................................................ 9
ISO 14230-4 (KWP2000) ..................................................................................................... 10
SAE J1850 41.6 kbps PWM (Pulse Width Modulation) ....................................................... 10
SAE J1850 10.4 kbps VPW (Variable Pulse Width) ............................................................ 10
CAN...................................................................................................................................... 11
ISO 15765-4 (CAN).............................................................................................................. 11
SAE J2610 DaimlerChrysler SCI ......................................................................................... 11
Simultaneous Communication on Multiple Protocols........................................................... 11
Programmable Power Supply .............................................................................................. 12
Pin Usage............................................................................................................................. 13
Data Buffering ...................................................................................................................... 14
Error Recovery ..................................................................................................................... 14
Device Not Connected ......................................................................................................... 14
Bus Errors ............................................................................................................................ 14
Win32 Application Programming Interface .......................................................................... 15
API Functions – Overview.................................................................................................... 15
API Functions - Detailed Information ................................................................................... 15
PassThruOpen ..................................................................................................................... 15
C/C++ Prototype .................................................................................................................. 15
Parameters........................................................................................................................... 16
Return Values ...................................................................................................................... 16
PassThruClose..................................................................................................................... 16
C/C++ Prototype .................................................................................................................. 16
Parameters........................................................................................................................... 16
Return Values ...................................................................................................................... 17
PassThruConnect ................................................................................................................ 17
C/C++ Prototype .................................................................................................................. 17
Parameters........................................................................................................................... 17
Flag Values .......................................................................................................................... 18
Protocal ID Values ............................................................................................................... 19
- 2 -
1.
2.
2.1
2.1.1
2.1.2
3.
4.
5.
6.
6.1
6.2
6.3
6.4
6.5
6.5.1
6.5.2
6.5.3
6.5.4
6.5.5
6.5.6
6.5.7
6.6
6.7
6.8
6.9
6.10
6.10.1
6.10.2
7.
7.1
7.2
7.2.1
7.2.1.1
7.2.1.2
7.2.1.3
7.2.2
7.2.2.1
7.2.2.2
7.2.2.3
7.2.3
7.2.3.1
7.2.3.2
7.2.3.3
7.2.3.4
SAE J2534-1 Revised DEC2004
Return Values ...................................................................................................................... 20
PassThruDisconnect............................................................................................................ 20
C/C++ Prototype .................................................................................................................. 20
Parameters........................................................................................................................... 21
Return Values ...................................................................................................................... 21
PassThruReadMsgs............................................................................................................. 21
C/C++ Prototype .................................................................................................................. 22
Parameters........................................................................................................................... 22
Return Values ...................................................................................................................... 23
PassThruWriteMsgs............................................................................................................. 23
C/C++ Prototype .................................................................................................................. 24
Parameters........................................................................................................................... 24
Return Values ...................................................................................................................... 25
PassThruStartPeriodicMsg .................................................................................................. 26
C/C++ Prototype .................................................................................................................. 26
Parameters........................................................................................................................... 26
Return Values ...................................................................................................................... 27
PassThruStopPeriodicMsg .................................................................................................. 27
C/C++ Prototype .................................................................................................................. 28
Parameters........................................................................................................................... 28
Return Values ...................................................................................................................... 28
PassThruStartMsgFilter ....................................................................................................... 28
C/C++ Prototype .................................................................................................................. 31
Parameters........................................................................................................................... 31
Filter Types .......................................................................................................................... 32
Return Values ...................................................................................................................... 33
PassThruStopMsgFIlter ....................................................................................................... 33
C/C++ Prototype .................................................................................................................. 33
Parameters........................................................................................................................... 34
Return Values ...................................................................................................................... 34
PassThruSetProgrammingVoltage ...................................................................................... 34
C/C++ Prototype .................................................................................................................. 34
Parameters.......................................................................................................................... .35
Voltage Values ..................................................................................................................... 35
Return Values ...................................................................................................................... 35
PassThruReadVersion......................................................................................................... 36
C/C++ Prototype .................................................................................................................. 36
Parameters........................................................................................................................... 36
Return Values ...................................................................................................................... 37
PassThruGetLastError ......................................................................................................... 37
C/C++ Prototype .................................................................................................................. 37
Parameters........................................................................................................................... 37
Return Values ...................................................................................................................... 37
PassThruIoctl ....................................................................................................................... 38
C/C++ Prototype .................................................................................................................. 38
Parameters........................................................................................................................... 38
Ioctl ID Values ...................................................................................................................... 39
Return Values ...................................................................................................................... 39
IOCTL Section...................................................................................................................... 40
GET_CONFIG...................................................................................................................... 41
SET_CONFIG ...................................................................................................................... 42
- 3 -
7.2.3.5
7.2.4
7.2.4.1
7.2.4.2
7.2.4.3
7.2.5
7.2.5.1
7.2.5.2
7.2.5.3
7.2.6
7.2.6.1
7.2.6.2
7.2.6.3
7.2.7
7.2.7.1
7.2.7.2
7.2.7.3
7.2.8
7.2.8.1
7.2.8.2
7.2.8.3
7.2.9
7.2.9.1
7.2.9.2
7.2.9.3
7.2.9.4
7.2.10
7.2.10.1
7.2.10.2
7.2.10.3
7.2.11
7.2.11.1
7.2.11.2
7.2.11.3
7.2.11.4
7.2.12
7.2.12.1
7.2.12.2
7.2.12.3
7.2.13
7.2.13.1
7.2.13.2
7.2.13.3
7.2.14
7.2.14.1
7.2.14.2
7.2.14.3
7.2.14.4
7.3
7.3.1
7.3.2
SAE J2534-1 Revised DEC2004
READ_VBATT...................................................................................................................... 46
READ_PROG_VOLTAGE.................................................................................................... 46
FIVE_BAUD_INIT ................................................................................................................ 47
FAST_INIT ........................................................................................................................... 47
CLEAR_TX_BUFFER .......................................................................................................... 48
CLEAR_RX_BUFFER.......................................................................................................... 48
CLEAR_PERIODIC_MSGS ................................................................................................. 49
CLEAR_MSG_FILTERS ...................................................................................................... 49
CLEAR_FUNCT_MSG_LOOKUP_TABLE .......................................................................... 49
ADD_TO_FUNCT_MSG_LOOKUP_TABLE ....................................................................... 50
DELETE_FROM_FUNCT_MSG_LOOKUP_TABLE ........................................................... 50
Message Structure ............................................................................................................... 51
C/C++ Definition................................................................................................................... 51
Elements .............................................................................................................................. 51
Message Data Formats........................................................................................................ 52
Format Checks for Messages Passed to the API ................................................................ 53
Conventions for Returning Messages from the API............................................................. 53
Conventions for Returning Indications from the API............................................................ 53
Message Flag and Status Definitions .................................................................................. 54
RxStatus............................................................................................................................... 54
RxStatus Bits for Messaging Status and Error Indication.................................................... 55
TxFlags................................................................................................................................. 56
DLL Installation and Registry ............................................................................................... 57
Naming of Files .................................................................................................................... 57
Win32 Registy ...................................................................................................................... 57
User Application Interaction with the Registry ..................................................................... 59
Attaching to the DLL from an application............................................................................. 60
Export Library Definition File................................................................................................ 61
Return Value Error Codes.................................................................................................... 61
Notes .................................................................................................................................... 63
Marginal Indicia .................................................................................................................... 63
7.3.3
7.3.4
7.3.5
7.3.6
7.3.7
7.3.8
7.3.9
7.3.10
7.3.11
7.3.12
7.3.13
8.
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.7.1
8.7.2
8.7.3
9.
9.1
9.2
9.2.1
9.2.2
9.2.2.1
10.
11.
11.1
Appendix A General ISO 15765-2 Flow Control Example ...................................................................... 64
Flow Control Overview......................................................................................................... 64
A.1
Examples Overview ............................................................................................................. 65
A.1.1
A.2
Transmitting a Segmented Message ................................................................................... 66
Conversation Setup.............................................................................................................. 66
A.2.1
Data Transmission ............................................................................................................... 67
A.2.2
Verification............................................................................................................................ 68
A.2.3
Transmitting an Unsegmented Message ............................................................................. 69
A.3
A.3.1
Data Transmission ............................................................................................................... 70
Verification............................................................................................................................ 70
A.3.2
Receiving a Segmented Message ....................................................................................... 70
A.4
Conversation Setup.............................................................................................................. 70
A.4.1
A.4.2
Reception Notification .......................................................................................................... 70
Data Reception .................................................................................................................... 71
A.4.3
A.5
Receiving and Unsegmented Messages ............................................................................. 72
- 4 -
SAE J2534-1 Revised DEC2004
1.
Scope
This SAE Recommended Practice provides the framework to allow reprogramming software applications
from all vehicle manufacturers the flexibility to work with multiple vehicle data link interface tools from
multiple tool suppliers. This system enables each vehicle manufacturer to control the programming
sequence for electronic control units (ECUs) in their vehicles, but allows a single set of programming
hardware and vehicle interface to be used to program modules for all vehicle manufacturers.
This document does not limit the hardware possibilities for the connection between the PC used for the
software application and the tool (e.g., RS-232, RS-485, USB, Ethernet…). Tool suppliers are free to
choose the hardware interface appropriate for their tool. The goal of this document is to ensure that
reprogramming software from any vehicle manufacturer is compatible with hardware supplied by any tool
manufacturer.
U.S. Environmental Protection Agency (EPA) and the California Air Resources Board (ARB) "OBD
service information" regulations include requirements for reprogramming emission-related control
modules in vehicles for all manufacturers by the aftermarket repair industry. This document is intended to
conform to those regulations for 2004 and later model year vehicles. For some vehicles, this interface
can also be used to reprogram emission-related control modules in vehicles prior to the 2004 model year,
and for non-emission related control modules. For other vehicles, this usage may require additional
manufacturer specific capabilities to be added to a fully compliant interface. A second part to this
document, SAE J2534-2, is planned to include expanded capabilities that tool suppliers can optionally
include in an interface to allow programming of these additional non-mandated vehicle applications. In
addition to reprogramming capability, this interface is planned for use in OBD compliance testing as
defined in SAE J1699-3. SAE J2534-1 includes some capabilities that are not required for Pass-Thru
Programming, but which enable use of this interface for those other purposes without placing a significant
burden on the interface manufacturers.
Additional requirements for future model years may require revision of this document, most notably the
inclusion of SAE J1939 for some heavy-duty vehicles. This document will be reviewed for possible
revision after those regulations are finalized and requirements are better understood. Possible revisions
include SAE J1939 specific software and an alternate vehicle connector, but the basic hardware of an
SAE J2534 interface device is expected to remain unchanged.
2.
References
2.1 Applicable Publications
The following publications form a part of this specification to the extent specified herein. Unless
otherwise indicated, the latest version of SAE publications shall apply.
2.1.1 SAE PUBLICATIONS
Available from SAE, 400 Commonwealth Drive, Warrendale, PA 15096-0001.
SAE J1850—Class B Data Communications Network Interface
SAE J1939—Truck and Bus Control and Communications Network (Multiple Parts Apply)
SAE J1962—Diagnostic Connector
SAE J2610—DaimlerChrysler Information Report for Serial Data Communication Interface (SCI)
- 5 -
SAE J2534-1 Revised DEC2004
2.1.2
ISO DOCUMENTS
Available from ANSI, 25 west 43rd Street, New York, NY 10036-8002.
ISO 7637-1:1990—Road vehicles—Electrical disturbance by conduction and coupling—Part 1:
Passenger cars and light commercial vehicles with nominal 12 V supply voltage
ISO 9141:1989—Road vehicles—Diagnostic systems—Requirements
for
interchange of digital
information
ISO 9141-2:1994—Road vehicles—Diagnostic systems—CARB requirements for interchange of digital
information
ISO 11898:1993—Road vehicles—Interchange of digital information—Controller area network (CAN) for
high speed communication
ISO 14230-4:2000—Road
vehicles—Diagnostic
systems—Keyword
protocol
2000—Part
4:
Requirements for emission-related systems
ISO/FDIS 15765-2—Road vehicles—Diagnostics on controller area networks (CAN)—Network layer
services
ISO/FDIS 15765-4—Road vehicles—Diagnostics on controller area networks (CAN)—Requirements for
emission-related systems
3.
Definitions
3.1 Registry
A mechanism within Win32 operating systems to handle hardware and software configuration
information.
Acronyms
4.
API
ASCII
CAN
CRC
DLL
ECU
IFR
IOCTL
KWP
OEM
PC
PWM
SCI
SCP
USB
VPW
Application Programming Interface
American Standard Code for Information Interchange
Controller Area Network
Cyclic Redundancy Check
Dynamic Link Library
Electronic Control Unit
In-Frame Response
Input / Output Control
Keyword Protocol
Original Equipment Manufacturer
Personal Computer
Pulse Width Modulation
Serial Communications Interface
Standard Corporate Protocol
Universal Serial Bus
Variable Pulse Width
- 6 -
SAE J2534-1 Revised DEC2004
5.
Pass-Thru Concept
Programming application software supplied by the vehicle manufacturer will run on a commonly available
generic PC. This application must have complete knowledge of the programming requirements for the
control module to be programmed and will control the programming event. This includes the user
interface, selection criteria for downloadable software and calibration files, the actual software and
calibration data to be downloaded, the security mechanism to control access to the programming
capability, and the actual programming steps and sequence required to program each individual control
module in the vehicle. If additional procedures must be followed after the reprogramming event, such as
clearing Diagnostic Trouble Codes (DTC), writing part numbers or variant coding information to the
control module, or running additional setup procedures, the vehicle manufacturer must either include this
in the PC application or include the necessary steps in the service information that references
reprogramming.
This document defines the following two interfaces for the SAE J2534 pass-thru device:
a. Application program interface (API) between the programming application running on a PC and a
software device driver for the pass-thru device
b. Hardware interface between the pass-thru device and the vehicle
The manufacturer of an SAE J2534 pass-thru device shall supply connections to both the PC and the
vehicle. In addition to the hardware, the interface manufacturer shall supply device driver software, and a
Windows installation and setup application that will install the manufacturer's SAE J2534 DLL and other
required files, and also update the Windows Registry. The interface between the PC and the pass-thru
device can be any technology chosen by the tool manufacturer, including RS-232, RS-485, USB,
Ethernet, or any other current or future technology, including wireless technologies.
All programming applications shall utilize the common SAE J2534 API as the interface to the pass-thru
device driver. The API contains a set of routines that may be used by the programming application to
control the pass-thru device, and to control the communications between the pass-thru device and the
vehicle. The pass-thru device will not interpret the message content, allowing any message strategy and
message structure to be used that is understood by both the programming application and the ECU being
programmed. Also, because the message will not be interpreted, the contents of the message cannot be
used to control the operation of the interface. For example, if a message is sent to the ECU to go to high
speed, a specific instruction must also be sent to the interface to go to high speed.
The OEM programming application does not need to know the hardware connected to the PC, which
gives the tool manufacturers the flexibility to use any commonly available interface to the PC. The pass-
thru device does not need any knowledge of the vehicle or control module being programmed. This will
allow all programming applications to work with all pass-thru devices to enable programming of all control
modules for all vehicle manufacturers.
- 7 -
SAE J2534-1 Revised DEC2004
Figure 1 shows the relationship between the various components required for pass-thru programming
and responsibilities for each component:
Vehicle
Vehicle
manufacturer
determines
programming
sequence
and security
access
Cable
Pass-thru
interface
Cable
Tool supplier
defines cable
requirements,
if any,
between PC
and interface
Capabilities
defined in
SAE J2534
Hardware
supplied by
tool supplier
Could be
implemented
in scan tool
Tool
supplier
defines
interface
with pass-
thru device
SAE J1962
on vehicle
end
5 meter
max. length
Vehicle
manufacturer
Tool supplier
Interface
driver
Tool supplier
device driver,
installation, and
setup
procedure
based on
hardware
supported
Examples are:
RS-232,
USB,
PCMCIA,
Ethernet,
IEEE1394,
Bluetooth
Programming PC
API
Application
SAE
J2534
Vehicle
manufacturer
programming
application
controls user
interface, vehicle
software and
calibration
selection,
programming
sequence, and
security access
SAE
J2534
Vehicle
manufacturer
6.
Pass-Thru System Requirements
FIGURE 1—SAE J2534 OVERVIEW
A "fully" compliant SAE J2534 interface shall support all communication protocols and capabilities defined
in this document. The interface's registry entry "Protocols Supported" (see section 9.2-Win32 Registry)
specifies the protocols fully supported by the interface.
6.1 PC Requirements
Generic PC running a Win32 Operating System (e.g., Windows 95/Windows 98/Windows NT/Windows
Millennium Edition, Windows 2000, Windows XP, …). The PC should be capable of connection to the
Internet.
6.2 Software Requirements and Assumptions
Reprogramming applications can assume that the PC will be connected to the Internet, although not all
applications will require this. The OEM application is limited to a single thread for communication with the
tool manufacturer DLL/API. Multiple protocols may be connected and used from the single application
thread (see Section 6.6).
- 8 -