Connects to the OBDII J1962 DLC and supports the following protocols.

1 CAN2 Single Wire
2 J1850PWM+ , J1850VPW
3 CAN2+
6 CAN+ (CAN-C only), SCI A Engine, 5v-20v out
7 ISO-9141 K-line, SCI A Engine, SCI A Trans, SCI B Engine
9 SCI B Trans, 5v-20v out or short-to-ground
10 J1850PWM-
11 CAN2- 5v-20v out
12 SCI B Engine 5v-20v out or short-to-ground
14 CAN- (CAN-C only), SCI A Trans 5v-20v out
15 ISO L Line, SCI B Trans, Short-to-ground

The PassThru device manufacturer supplies the hardware appliance and cable that connects to and communicates with the vehicle network.

The physical interface to the vehicle network is the SAE J1962 connector, which supports the various vehicle serial data protocols.

The following network layer protocols are supported:

ISO 9141
ISO 14230-4(KWP2000, Keyword Protocol)
SAE J1850 41.6 KBPS PWM(Pulse Width Modulation)
SAE J1850 10.4 KBPS VPW(Variable Pulse Width)
CAN(Controller Area Network, ISO 11898)
ISO 15765-4(CAN)
SAE J2610 DaimlerChrysler SCI(Serial Communications Interface)

J2534-1: Recommended Practice for Pass-Thru Vehicle Programming Last published version 12/2004

J2534-2: Optional Pass-Thru Features Last published version 04/2010

J2534-3: Conformance Test Cases for an SAE J2534-1 Device No published document

SAE J2534-1

defines an Application Program Interface (API) that can be used by Vehicle Manufacturers for reprogramming emission related modules.
This interface also includes some capabilities that may not be required for reprogramming,
but allows the interface to be used for other purposes without placing a significant burden on the interface manufacturers.

SAE J2534-2

defines optional features that takes advantage of the J2534-1 framework.
It allows the interface (J2534) to be used for other purposes and includes features that are above and beyond emission related reprogramming needs.
Many OEM’s wanted a standard for reprogramming other modules not “Emission Related”.
Those instructions were added into -2. It also expands the scope of what a J2534 device can do. (ie: Diagnostics)

SAE J2534-3

defines a set of conformance test cases, which can be used to check an interface’s compliance with SAE J2534-1 Conformance test cases are planned for J2534-2 features
also Some preliminary work has been done on the J2534-1 conformance test cases.
No work has been initiated for the J2534-2 conformance test cases.
There is no published standard yet.

J2534 framework includes application interfaces for the following functionality:

Network Initialization
Basic Send and Receive
Periodic Transmission Capability
Message Filters
Generic IO Control
Protocol Specific IO Control
Programming Voltage Supply
Other Utility Functions

Protocols Supported by a fully compliant SAE J2534-1 Device

J1850 VPW (GM Class2, Chrysler OBD)
J1850 PWM (Ford SCP)
High Speed CAN ISO 15765-4 (Diag. On CAN)
ISO 14230 (KWP)
ISO 9141-2
Chrysler SCI

Additional Protocols Currently Supported by the SAE J2534-2 Specifications

SAE J1939
SAE J1708
Single Wire CAN
GM UART
UART Echo Byte
Ford MS-CAN
Honda Diag-H
TP 2.0
Fault Tolerant CAN

6.5.1 ISO 9141

The following specifications clarify and, if in conflict with ISO 9141, override any related specifications in ISO 9141:

a. The maximum sink current to be supported by the interface is 100 mA. 
b. The range for all tests performed relative to ISO 7637-1 is –1.0 to +40.0 V. 
c. The default bus idle period before the interface shall transmit an address, shall be 300 ms. 
d. Support following baud rate with ±0.5% tolerance: 10400. 
e. Support following baud rate with ±1% tolerance: 10000. 
f. Support following baud rates with ±2% tolerance: 4800, 9600, 9615, 9800, 10870, 11905, 12500, 13158, 13889, 14706, 15625, and 19200. 
g. Support other baud rates if the interface is capable of supporting the requested value within ±2%. 
h. The baud rate shall be set by the application, not determined by the SAE J2534 interface. The interface is not required to support baud rate detection based on the synchronization byte. 
i. Support odd and even parity in addition to the default of no parity, with seven or eight data bits. Always one start bit and one stop bit.

j. Support for timer values that are less than or greater than those specified in ISO 9141 (see Figure 30 in Section 7.3.2). 
k. Support ability to disable automatic ISO 9141-2 / ISO 14230 checksum verification by the interface to allow vehicle manufacturer specific error detection. 
l. If the ISO 9141 checksum is verified by the interface, and the checksum is incorrect, the message will be discarded. 
m. Support both ISO 9141 5-baud initialization and ISO 14230 fast initialization. 
n. Interface shall not adjust timer parameters based on keyword values.

6.5.2 ISO 14230-4 (KWP2000)

The ISO 14230 protocol has the same specifications as the ISO 9141 protocol as outlined in the previous section. 
In addition, the following specifications clarify and, if in conflict with ISO 14230, override any related specifications in ISO 14230:

a. The pass-thru interface will not automatically handle tester present messages. The application needs to handle tester present messages when required. 
b. The pass-thru interface will not perform any special handling for the $78 response code. 
Any message received with a $78 response code will be passed from the interface to the application. 
The application is required to handle any special timing requirements based on receipt of this response code, including stopping any periodic messages.

6.5.3 SAE J1850 41.6 KBPS PWM (PULSE WIDTH MODULATION)

The following additional features of SAE J1850 must be supported by the pass-thru device:

a. Capable of 41.6 kbps and high speed mode of 83.3 kbps. 
b. Recommend Ford approved SAE J1850PWM (SCP) physical layer

6.5.4 SAE J1850 10.4 KBPS VPW (VARIABLE PULSE WIDTH)

The following additional features of SAE J1850 must be supported by the pass-thru device:

a. Capable of 10.4 kbps and high speed mode of 41.6 kbps 
b. 4128 byte block transfer 
c. Return to normal speed after a break indication

6.5.5 CAN

The following features of ISO 11898 (CAN) must be supported by the pass-thru device:

a. 125, 250, and 500 kbps 
b. 11 and 29 bit identifiers 
c. Support for 80% ± 2% and 68.5% ± 2% bit sample point 
d. Allow raw CAN messages. This protocol can be used to handle any custom CAN messaging protocol, including custom flow control mechanisms.

6.5.6 ISO 15765-4 (CAN)

The following features of ISO 15765-4 must be supported by the pass-thru device:

a. 125, 250, and 500 kbps 
b. 11 and 29 bit identifiers 
c. Support for 80% ± 2% bit sample point 
d. To maintain acceptable programming times, the transport layer flow control function, as defined in ISO 15765-2, must be incorporated in the pass-thru device (see Appendix A). 
If the application does not use the ISO 15765-2 transport layer flow control functionality, the CAN protocol will allow for any custom transport layer. 
e. Receive a multi-frame message with an ISO15765_BS of 0 and an ISO15765_STMIN of 0, as defined in ISO 15765-2. 
f. No single frame or multi-frame messages can be received without matching a flow control filter. 
No multi-frame messages can be transmitted without matching a flow control filter. 
g. Periodic messages will not be suspended during transmission or reception of a multi-frame segmented message.

6.5.7 SAE J2610 DAIMLERCHRYSLER SCI

Reference the SAE J2610 Information Report for a description of the SCI protocol.

When in the half-duplex mode (when SCI_MODE of TxFlags is set to {1} Half-Duplex), every data byte sent is expected to be "echoed" by the controller. 
The next data byte shall not be sent until the echo byte has been received and verified. 
If the echoed byte received doesn't match the transmitted byte, or if after a period of T1 no response was received, the transmission will be terminated. 
Matching echoed bytes will not be placed in the receive message queue.

What is an API?

An API (Application Programming Interface) is a 'rendezvous point' between two pieces of software.

For example, any Windows application (such as MS Word and Photoshop) can print to any printer.

How is this possible? The application and the printer driver communicate via an API. Even though each printer has different hardware,

all printer drivers 'look the same' to Windows applications.

You are free pick any printer based on your preferences (color, size, durability, cost, speed) without worrying about software incompatibilities.

In a similar vein, the J2534 API makes all "car communications" hardware look the same.

The Software

The EPA is forcing car manufacturers to release software that updates the firmware on their cars.

The application must run on Windows and use the J2534 API to talk to the car.

Anyone can buy this software, even individual car enthusiasts.

The software must be sold 'for a reasonable price', which will probably be a few hundred dollars.

The Hardware

A J2534 device plugs into a cars' OBD connector on one side, and a computer on the other side.

These devices are not made by car manufacturers, but by any company that sees an opportunity.

Under the hood, the device must speak a myriad of different vehicle protocols (ISO9141, J1850VPW/PWM, CAN, etc.)

used by the different manufacturers. Each protocol has different voltage and timing requirements,

so this is no trivial task. Fortunately, each device comes with a software driver that implements the J2534 API.

Since the driver invisibly handles communication to the device, application software

writers don't have to worry about the connection details or low-level car protocols.

http://www.drewtech.com/support/J2534/errorcodes.html

All the error codes returned by J2534 API are listed below:

Value Name Description
0x00 STATUS_NOERROR Function completed successfully.
0x01 ERR_NOT_SUPPORTED Function option is not supported.
0x02 ERR_INVALID_CHANNEL_ID Channel Identifier or handle is not recognized.
0x03 ERR_INVALID_PROTOCOL_ID Protocol Identifier is not recognized.
0x04 ERR_NULL_PARAMETER NULL pointer presented as a function parameter, NULL is an invalid address.
0x05 ERR_INVALID_IOCTL_VALUE Ioctl GET_CONFIG/SET_CONFIG parameter value is not recognized.
0x06 ERR_INVALID_FLAGS Flags bit field(s) contain(s) an invalid value.
0x07 ERR_FAILED Unspecified error, use PassThruGetLastError for obtaining error text string.
0x08 ERR_DEVICE_NOT_CONNECTED PassThru device is not connected to the PC.
0x09 ERR_TIMEOUT Timeout violation.
PassThru device is unable to read specified number of messages from the vehicle network.
The actual number of messages returned is in NumMsgs.
0x0A ERR_INVALID_MSG Message contained a min/max length, ExtraData support or J1850PWM specific source address conflict violation.
0x0B ERR_INVALID_TIME_INTERVAL The time interval value is outside the specified range.
0x0C ERR_EXCEEDED_LIMIT The limit (ten) of filter/periodic messages has been exceeded for the protocol associated the communications channel.
0x0D ERR_INVALID_MSG_ID The message identifier or handle is not recognized.
0x0E ERR_DEVICE_IN_USE The specified PassThru device is already in use.
0x0F ERR_INVALID_IOCTL_ID Ioctl identifier is not recognized.
0x10 ERR_BUFFER_EMPTY PassThru device could not read any messages from the vehicle network.
0x11 ERR_BUFFER_FULL PassThru device could not queue any more transmit messages destined for the vehicle network.
0x12 ERR_BUFFER_OVERFLOW PassThru device experienced a buffer overflow and receive messages were lost.
0x13 ERR_PIN_INVALID Unknown pin number specified for the J1962 connector, or resource is already in use.
0x14 ERR_CHANNEL_IN_USE An existing communications channel is currently using the specified network protocol.
0x15 ERR_MSG_PROTOCOL_ID The specified protocol type within the message structure is different from the protocol associated
with the communications channel when it was opened.
0x16 ERR_INVALID_FILTER_ID Filter identifier is not recognized.
0x17 ERR_NO_FLOW_CONTROL No ISO15765 flow control filter is set, or no filter matches the header of an outgoing message.
0x18 ERR_NOT_UNIQUE An existing filter already matches this header or node identifier.
0x19 ERR_INVALID_BAUDRATE Unable to honor requested Baud rate within required tolerances.
0x1A ERR_INVALID_DEVICE_ID PassThru device identifier is not recognized.
 
API Functions
PassThruOpen
PassThruClose
PassThruConnect
PassThruDisconnect
PassThruReadMsgs
PassThruWriteMsgs
PassThruStartPeriodicMsg
PassThruStopPeriodicMsg
PassThruStartMsgFilter
PassThruStopMsgFilter
PassThruSetProgrammingVoltage
PassThruReadVersion
PassThruGetLasError
PassThruIoctl

PassThruScanForDevices 
  PassThruGetNextDevice 
  PassThruGetDeviceContent 
  PassThruLogicalConnect
  PassThruLogicalDisconnect
  PassThruQueueMsgs

IOCTLS
GET_CONFIG
SET_CONFIG
READ_VBATT
FIVE_BAUD_INIT
FAST_INIT
CLEAR_TX_BUFFER
CLEAR_RX_BUFFER
CLEAR_PERIODIC_MSGS
CLEAR_MSG_FILTERS
CLEAR_FUNCT_MSG_LOOKUP_TABLE
DELETE_FROM_FUNCT_MSG_LOOKUP_TABLE
READ_PROG_VOLTAGE

http://www.drewtech.com/support/J2534/index.html

The following pages explain DrewTech's implementation, and should be useful to end-users who want to program with our DLL:

Category Name Description
Setup PassThruOpen Initialize and connect to a CarDAQ
PassThruClose Disconnect from a CarDAQ
PassThruConnect Connect to a vehicle network
PassThruDisconnect Disconnect from vehicle network
PassThruIoctl Fast init sequence (ISO 9141)
PassThruIoctl Five baud init sequence (ISO 9141)
PassThruIoctl Report configuration parameter
PassThruIoctl Set configuration parameter
PassThruIoctl Add functional address (J1850PWM)
PassThruIoctl Delete functional address (J1850PWM)
PassThruIoctl Clear functional address table (J1850PWM)
Status PassThruReadVersion Report version information
PassThruGetLastError Describe most recent error
PassThruIoctl Read vehicle battery voltage
Reading PassThruReadMsgs Receive network message(s)
PassThruStartMsgFilter Apply a network message filter
PassThruStopMsgFilter Stop a network message filter
PassThruIoctl Halt all network message filters
PassThruIoctl Clear receive buffer
Writing PassThruWriteMsgs Transmit network message(s)
PassThruStartPeriodicMsg Continuously transmit message(s)
PassThruStopPeriodicMsg Stop transmitting a message continuously
PassThruIoctl Halt all continuous messages
PassThruIoctl Clear transmit queue
Reflashing PassThruSetProgrammingVoltage Apply voltage on J1962 pin
PassThruIoctl Report programming voltage
Analog PassThruIoctl Read most recent analog sample
PassThruIoctl Read stored analog sample(s)

https://github.com/hackingvolvo/SardineCAN-Win32/tree/master/Sardine

https://github.com/hackingvolvo/SardineCAN-Win32/blob/master/Sardine/j2534_v0404.h

 
https://code.google.com/p/j2534-logger/source/browse/trunk/ptshim32/j2534_v0404.h
 
 
 

8. Message Structure
The following message structure will be used for all messages (Transmit, Receive, Filters, and Periodics)
and indications. The total message size (in bytes) is the DataSize, and includes header bytes, ID bytes,
and data bytes. For consistency, all interfaces should detect only the errors listed for each protocol in the
following sections when returning ERR_INVALID_MSG.
8.1 C / C++ Definition

typedef struct {
unsigned long ProtocolID;
unsigned long RxStatus;
unsigned long TxFlags;
unsigned long Timestamp;
unsigned long DataSize;
unsigned long ExtraDataIndex;
unsigned char Data[];
} PASSTHRU_MSG;

SAE J2534-2

SAE J2534-1 defines a standard vehicle network interface that can be used to reprogram emissionrelated control modules.

However, there is a need to support vehicles prior to the 2004 model year as well as non-emission related control modules.

The SAE J2534-2 document meets these needs by detailing extensions to an SAE J2534-1 interface.

Together, these extensions provide the framework for a common interface to protect the software investment of the Vehicle OEMs and Scan Tool manufacturers.

Only the optional features will be described by this document. Unless otherwise noted it is expected that these features are added

to a fully compliant interface adhering to the December 2004 publication of SAE J2534-1.

Only the optional features will be described by this document. Unless otherwise noted it is expected that these features

are added to a fully compliant interface adhering to the December 2004 publication of SAE J2534-1.

Extending the protocols supported by SAE J2534-1 this document adds two new types of ProtocolIDs.

1. ProtocolIDs with the suffix ‘_PS’ for connecting to a vehicle, via the SAE J1962 connector using the technique outlined in the section titled ‘SAE J1962 Pin Selection’.
2. Generic ProtocolIDs, with the suffixes ‘_CH1’ through ‘_CH128’ for protocols that terminate at a vendor specific connector on the device. See the section titled ‘Access to Additional Channels’.

5. SAE J1962 Pin Selection

5.1 Scope of the SAE J1962 Pin Selection Optional Feature

This section identifies the pin selection mechanism for ProtocolIDs that have the ‘_PS’ suffix.

The API extensions detailed here describe the method of specifying the SAE J1962 pin(s) to which the selected protocol should be connected.

While the API allows for all combinations of protocol / pin assignments, the actual combinations implemented are vendor specific.

5.2 Pass-Thru System Requirements

5.2.1 PIN USAGE

The set of pins that can be switched is dependant on the set of optional protocols supported by the interface.

A new SET_CONFIG parameter is defined for the application to specify the pins to be switched.

5.3 Win32 Application Programming Interface

5.3.1 API FUNCTIONS – OVERVIEW

The new ProtocolIDs with ‘_PS’ suffix indicates that the protocol physical layer is not connected to the SAE J1962 pins on PassThruConnect.

A new Ioctl configuration parameter is also added, that allows connection of a physical layer to specific SAE J1962 pins.

For support of SAE J2534-1 protocols on different pins than those defined in SAE J2534-1, new ProtocolIDs are assigned to enable the pin-switching feature as defined in Figure 1:

As an example, in order to utilize a CAN channel connected to Pins 3 and 11 (often used for Medium Speed CAN network), the new CAN_PS ProtocolID is used in PassThruOpen.
Note that the SAE J2610 (DaimlerChrysler SCI) protocols are consolidated into a single new ProtocolID, J2610_PS.
However the SAE J2534-1 SCI protocols shall continue to be supported as defined in SAE J2534-1.
New SAE J2534-2 optional feature protocols use the ProtocolIDs defined in Figure 2:

SAE J2534 Pass-Thru API的更多相关文章

  1. SAE J2534介绍

    概要 J2534是一种针对与射频相关的ECU进行闪存编程的概念,而不用考虑ECU使用的通信协议.其目的是所有类型的ECU都应当只需一个工具(硬件设备),通常被称为通过式设备.J2534设备和ECU之间 ...

  2. J2534 Pass-Thru Vehicle Programming ( SAE J1962 connector and Protocol )

    SAE J1962—Diagnostic Connector SAE J1850—Class B Data Communications Network Interface SAE J1939—Tru ...

  3. 【转】最佳Restful API 实践

    原文转自:https://bourgeois.me/rest/ REST APIs are a very common topic nowaday; they are part of almost e ...

  4. RequireJS API

    可以找到许多的解读,但是原文总是最重要的,也是最正宗的说明,直接访问 RequireJS 有时不太方便,这里将 RequireJS 2.0 API 的原文转载到博客园,方便查看. This is th ...

  5. Harbor api 操作

    harbor 的版本为 1.5.2 为 Harbor 配置 swagger 官网参考: https://github.com/goharbor/harbor/blob/v1.5.2/docs/conf ...

  6. 使用CloudSight API进行图像识别的Python脚本

    # -*- coding: utf-8 -*- # @Time : 2018/03/20 17:02 # @Author : cxa # @File : sss.py # @Software: PyC ...

  7. Flask 教程 第二十三章:应用程序编程接口(API)

    本文翻译自The Flask Mega-Tutorial Part XXIII: Application Programming Interfaces (APIs) 我为此应用程序构建的所有功能都只适 ...

  8. Appium之常用API

    Appium常用API解析 1.current_activity:获取当前页面的activity名,比如com.taobao.tao.TBMainActivity 或 com.taobao.brows ...

  9. 关于Vector CANoe的讨论

    默认排序​ 踩猫尾巴 汽车电子攻城狮 27 人赞同了该回答 好像是很久以前的问题啊,为什么会现在收到邀请. 我觉得 @lijuqqkiko 介绍的足够啦. 我再额外发散一点吧. 目前在CAN总线测试和 ...

随机推荐

  1. Symfony2学习笔记之数据校验

    校验在web应用程序中是一个常见的任务.数据输入到表单需要被校验.数据在被写入数据库之前或者传入一个webservice时也需要被校验. Symfony2 配备了一个Validator 组件,它让校验 ...

  2. window 7 下一台cp 两个mysql 配置主从

    环境 : 个人 pc windows7 一台 ; 使用 : 官方下载: mysql-noinstall-5.5.11-win32.zip 1. 解压 成2个 (文件夹) mysql_master (主 ...

  3. 网络编辑基础:对HTTP协议的头信息详解

    HTTP(HyperTextTransferProtocol) 是超文本传输协议的缩写,它用于传送WWW方式的数据,关于HTTP 协议的详细内容请参 考RFC2616.HTTP协议采用了请求/响应模型 ...

  4. Oracle数据库“Specified cast is农田valid”

    这种错误是笔者在执行一条计算符合条件的行有多少个,用OracleDataReader读取计算出的行数时发生. 查询语句为: Select Count(1) FROM HP_TS Where TS_ID ...

  5. java jxl 向Excel中追加数据而不覆盖原来数据的例子

    向先原来就有数据的Excel写数据是不会覆盖原有的数据,只是在追加数据. public class Excel {     public Excel() {     }     public void ...

  6. php获取网站根目录

    php获取网站根目录方法一:<?phpdefine("WWWROOT",str_ireplace(str_replace("/","\\&quo ...

  7. Selenium RC配置

    Selenium  RC: -----作者: 虫师 ========================================================================== ...

  8. JS 实现 ResizeBar,可拖动改变两个区域(带iframe)大小

    将网页化成两个区域,左边区域是一个树结构,右边区域是一个iframe,点击左边区域时,右边区域加载页面.实现功能:在两个区域间加一个可拖动条,拖动时改变左右两个区域的大小.在Google上搜索slid ...

  9. 实体框架 (EF) 入门 => 四、CodeFirst 枚举支持

    当使用 Code First 开发时,通常是从编写用来定义概念(域)模型的 .NET Framework 类开始. 插入记录没有为 Budget 赋值. 数值类型默认值为0,数据库中都为not nul ...

  10. Dagger2学习资源

    文章 Jack Wharton关于Dagger的幻灯片 代码 用Dagger2改写Jack Wharton的U+2020 我自己写的,包含了dagger2和单元测试 chiuki写的,包含了dagge ...