{"id":2547,"date":"2016-12-21T12:34:21","date_gmt":"2016-12-21T12:34:21","guid":{"rendered":"http:\/\/tomdenton.org\/blog\/?p=2547"},"modified":"2016-12-21T12:34:21","modified_gmt":"2016-12-21T12:34:21","slug":"introduction-to-sae-j2534-pass-through","status":"publish","type":"post","link":"http:\/\/tomdenton.org\/blog\/?p=2547","title":{"rendered":"Introduction to SAE J2534 (Pass through)"},"content":{"rendered":"<h3><strong><em>Introduction<\/em><\/strong><\/h3>\n<p>J2534 is a concept that enables flash programming of an emission related ECU regardless of the communication protocol that is used by the ECU. The purpose is that only one tool (hardware device), often referred to as the pass-thru device, should be needed for all kind of ECUs. The connection between the J2534 device and the ECU is a SAE J1962 connector. The J2534 hardware device is to be connected to a standard PC which holds the Application Program Interface (API) from the vehicle manufacturer (Figure 1). The connection between the PC and the J2534 hardware device is up to the manufacturer of the tool, but USB is probably the most common. A J2534 API DLL is provided from the hardware tool developer which handles the communication to the PC. The J2534 document withholds requirements for the hardware and software of a J2534 tool. The communication protocols supported are; ISO9141, ISO14230 (KWP2000), J1850, CAN (ISO11898), ISO15765 and SAE J2610. In 2005 J1939 was also included.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/tomdenton.org\/blog\/wp-content\/uploads\/2016\/12\/fig1-j2534-setup1.jpg\" rel=\"attachment wp-att-2548\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2548\" data-permalink=\"http:\/\/tomdenton.org\/blog\/?attachment_id=2548\" data-orig-file=\"https:\/\/i0.wp.com\/tomdenton.org\/blog\/wp-content\/uploads\/2016\/12\/fig1-j2534-setup1.jpg?fit=504%2C62\" data-orig-size=\"504,62\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"fig1-j2534-setup1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/tomdenton.org\/blog\/wp-content\/uploads\/2016\/12\/fig1-j2534-setup1.jpg?fit=504%2C62\" class=\"alignnone size-medium wp-image-2548\" src=\"https:\/\/i0.wp.com\/tomdenton.org\/blog\/wp-content\/uploads\/2016\/12\/fig1-j2534-setup1.jpg?resize=300%2C37\" alt=\"\" width=\"300\" height=\"37\" srcset=\"https:\/\/i0.wp.com\/tomdenton.org\/blog\/wp-content\/uploads\/2016\/12\/fig1-j2534-setup1.jpg?resize=300%2C37 300w, https:\/\/i0.wp.com\/tomdenton.org\/blog\/wp-content\/uploads\/2016\/12\/fig1-j2534-setup1.jpg?resize=210%2C26 210w, https:\/\/i0.wp.com\/tomdenton.org\/blog\/wp-content\/uploads\/2016\/12\/fig1-j2534-setup1.jpg?w=504 504w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Figure 1. J2534 setup.<\/p>\n<h4><strong><em>Background<\/em><\/strong><\/h4>\n<p>Vehicles become more and more complex and almost every function is controlled by an Electronic Control Unit (ECU). The ECUs are often connected onto a communication bus to be able to share data between each other. The most common protocol is CAN, but there are other protocols. There are many Vehicle manufactures and almost as many different communication protocols. Every vehicle manufacturer has a tool for analyzing and reprogramming their product, and this tool is often expensive. This makes it difficult for a car, bus or truck workshop to analyze and repair all kind of vehicles.<\/p>\n<p>U.S. Environmental Protection Agency (EPA) and the California Air Resources Board (ARB) have been trying to get vehicle manufactures to support common emission-related services for the aftermarket. The Society of Automotive Engineers (SAE) created the J2534 standard, in 2002, to promote the EPA and ARB in their work.<\/p>\n<h4><strong><em>Hardware Requirements<\/em><\/strong><\/h4>\n<p>The J2534 hardware works like a gateway between the vehicle ECU and the PC. This pass-thru device translates messages sent from the PC into messages of the protocol being used in the vehicle ECU. J2534 supports the following protocols:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.kvaser.com\/external-link?url=http:\/\/en.wikipedia.org\/wiki\/On-board_diagnostics&amp;back_url=https:\/\/www.kvaser.com\/about-can\/can-standards\/j2534\/\"><u>ISO9141<\/u><\/a><\/li>\n<li><a href=\"http:\/\/www.kvaser.com\/external-link?url=http:\/\/en.wikipedia.org\/wiki\/Keyword_Protocol_2000&amp;back_url=https:\/\/www.kvaser.com\/about-can\/can-standards\/j2534\/\"><u>ISO14230 (KWP2000)<\/u><\/a><\/li>\n<li><a href=\"http:\/\/www.kvaser.com\/external-link?url=http:\/\/standards.sae.org\/wip\/j1850\/&amp;back_url=https:\/\/www.kvaser.com\/about-can\/can-standards\/j2534\/\"><u>J1850<\/u><\/a><\/li>\n<li><a href=\"http:\/\/www.kvaser.com\/can-protocol-tutorial\/\"><u>CAN (ISO11898)<\/u><\/a><\/li>\n<li><a href=\"http:\/\/www.kvaser.com\/external-link?url=http:\/\/en.wikipedia.org\/wiki\/ISO_15765-2&amp;back_url=https:\/\/www.kvaser.com\/about-can\/can-standards\/j2534\/\"><u>ISO15765<\/u><\/a><\/li>\n<li><a href=\"http:\/\/www.kvaser.com\/external-link?url=http:\/\/standards.sae.org\/wip\/j2610\/&amp;back_url=https:\/\/www.kvaser.com\/about-can\/can-standards\/j2534\/\"><u>SAE J2610<\/u><\/a><\/li>\n<li><a href=\"http:\/\/www.kvaser.com\/about-can\/higher-layer-protocols\/j1939-introduction\/\"><u>J1939<\/u><\/a> (since 2005)<\/li>\n<\/ul>\n<p>The connection between the PC and the J2534 hardware can freely chosen by the manufacturer of the device i.e. RS-232, USB or maybe a wireless interface. The vehicle manufacturers programming application is not dependant on the hardware connection. Therefore any device can be used for programming any vehicle regardless of the manufacturer.<\/p>\n<p>The connection between the J2534 hardware and the vehicle should be the SAE J1962 connector, also called the OBDII connector. The maximum length of the cable between the J2534 device and the vehicle is 5 meters. If the vehicle manufacturer doesn\u2019t use the J1962 connector, necessary information for connection has to be provided.<\/p>\n<p>The J2534 hardware interface should be able to provide a supply voltage between 5 and 20 volts to the J1962 connector. The power supply should use one of the pins 6, 9, 11, 12, 13 or 14 of the connector and this choice should be selectable in the software. The maximum source current is 200mA and the settling time should be within 1ms.<\/p>\n<p>The J2534 hardware interface should have enough memory to buffer 4Kb of transmit messages and 4Kb of received messages. And the processor must naturally be fast enough to process all messages so that no messages are lost.<\/p>\n<h4><strong><em>Software Requirements<\/em><\/strong><\/h4>\n<p>Programming of an emission related ECU using J2534 is done from a PC, preferably a laptop computer, with a Win32 operating system (Windows 95 or later).<\/p>\n<p>Each vehicle manufacturer will have an own API software used for analyzing and programming of their vehicles. If their vehicles only use i.e. ISO 9141, no other protocols have to be supported by the application. It is important that this application conform to the functions in the J2534 API.<\/p>\n<p>This application will have complete information of the ECUs that are supported by the application. This application also includes a user interface where choices can be made depending on the ECU and what action to perform.<\/p>\n<p>A vehicle repair workshop that wants to analyze and re-program vehicles from different manufactures must have an API for each. This API can be downloaded from the internet or installed from a CD or DVD. How this API is provided depend on the manufacturer, but they do charge the customer (repair workshop) ordering it. The price differs a lot between manufacturers, a one year subscription costs between $75 and $2500.<\/p>\n<p>Each manufacturer of a J2534 tool (hardware device) must have a DLL-file which includes functions and routines for communicating with the PC. The DLL-file is then loaded into the vehicle manufacturer\u2019s application. The functions in the J2534 tool are linked to a corresponding function in the application. The DLL-file also includes routines for the connection (RS-232, USB etc.) between the J2534 tool and the PC.<\/p>\n<p>The intention is that every J2534 tool should to be capable of communicating with all protocols supported by the J2534 standard. The application provided by the vehicle manufacturers use commands described in J2534 standard to connect to a hardware tool (of any brand). The connection and initialization gives the hardware tool information of which protocol that is used. Thereafter it is up to the hardware tool to manage the connection to the vehicle with de desired protocol. The PC application will send messages in the earlier determined protocol format to the hardware tool which buffers the messages and transmits the messages in the order they were received.<\/p>\n<h4><strong><em>J2534 Application Programming Interface (API)<\/em><\/strong><\/h4>\n<p>The J2534 API consists of a number of functions for communication which must be supported by both hardware tool and vehicle manufacturer application. For the PC application developer this means that all commands and messages must made with the functions defined in the API. See table 1 below.<\/p>\n<table width=\"95%\">\n<thead>\n<tr>\n<td width=\"33%\">Function<\/td>\n<td width=\"66%\">Description<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td width=\"33%\">PassThruConnect<\/td>\n<td width=\"66%\">Establish a connection with a protocol channel.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruDisconnect<\/td>\n<td width=\"66%\">Terminate a connection with a protocol channel.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruReadMsgs<\/td>\n<td width=\"66%\">Read message(s) from a protocol channel.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruWriteMsgs<\/td>\n<td width=\"66%\">Write message(s) to a protocol channel.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruStartPeriodicMsg<\/td>\n<td width=\"66%\">Start sending a message at a specified time interval on a protocol channel.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruStopPeriodicMsg<\/td>\n<td width=\"66%\">Stop a periodic message.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruStartMsgFilter<\/td>\n<td width=\"66%\">Start filtering incoming messages on a protocol channel.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruStopMsgFilter<\/td>\n<td width=\"66%\">Stops filtering incoming messages on a protocol channel.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruSetProgrammingVoltage<\/td>\n<td width=\"66%\">Set a programming voltage on a specific pin.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruReadVersion<\/td>\n<td width=\"66%\">Reads the version information for the DLL and API.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruGetLastError<\/td>\n<td width=\"66%\">Gets the text description of the last error.<\/td>\n<\/tr>\n<tr>\n<td width=\"33%\">PassThruIoctl<\/td>\n<td width=\"66%\">General I\/O control functions for reading and writing protocol configuration parameters (e.g. initialization, baud rates, programming voltages, etc.).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>J2534 function description.<\/p>\n<p>The first command that is sent is the PassThruConnect which establish the connection between the PC application and the J2534 hardware tool. This command includes information about which protocol to use, standard or extended CAN identifier or if ISO15765 is used. The command also includes a channel identification which will be used for all following communication. If the connection was successful, a STATUS_NOERROR value is returned, which indicates that the function has been successfully performed. Before any messages can be sent an initialization has to be made, PassThruIoctl, where parameters like node address, baud rate or protocol specific parameters are set.<\/p>\n<p>All messages sent from the PC application follow the same structure which consists of: protocol type (i.e. J1850, CAN, J9141), receive message status, transmit message flags, received message timestamp (microseconds), data size in bytes, extra data index (start position of extra data in received message i.e. IFR, CRC, checksum), and last but not least an array of data bytes (the received message). It is possible to send CAN messages longer than 8 bytes using ISO15765 commands if this feature was selected upon connection.<\/p>\n<p>Some ECUs sends a lot of messages with short period of time between each message. The filter function, PassThruStartMsgFilter, can be set to either block or pass messages. This will decrease the messages needed to be sent between the hardware tool and the PC. The message is first \u201cANDed\u201d with a mask which gives the opportunity to compare only some important bits of the identifier. Thereafter the \u201cANDed\u201d message is compared to a specific pattern.<\/p>\n<h4><strong><em>J2534 API DLL<\/em><\/strong><\/h4>\n<p>The J2534 API DLL provides a linkage between the API functions and the hardware tool. Since the PC application should not have to care about which communication protocol is being used between the PC and the hardware tool. Each manufacturer of a hardware tool has a DLL-file with a unique name. This way it is possible for the software application on the PC to distinguish which hardware tool to connect. It is important that the developer of the firmware in the hardware tool follows the API and name the functions exactly as in the J2534 description. Otherwise it will be impossible for the PC application to find the functions in the DLL when performing the linkage.<\/p>\n<p>Source: <a href=\"https:\/\/www.kvaser.com\/about-can\/can-standards\/j2534\/\"><u>https:\/\/www.kvaser.com\/about-can\/can-standards\/j2534\/<\/u><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction J2534 is a concept that enables flash programming of an emission related ECU regardless of the communication protocol that is used by the ECU. The purpose is that only one tool (hardware device), often referred to as the pass-thru device, should be needed for all kind of ECUs. The connection between the J2534 device [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[15,34],"tags":[],"class_list":["post-2547","post","type-post","status-publish","format-standard","hentry","category-automotive","category-diagnostics"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p79TdE-F5","jetpack-related-posts":[{"id":1429,"url":"http:\/\/tomdenton.org\/blog\/?p=1429","url_meta":{"origin":2547,"position":0},"title":"Engine mapping \u2013 quick overview re Red Bull F1","author":"Tom Denton","date":"July 22, 2012","format":false,"excerpt":"The following is from one of my textbooks and refers to ignition timing \u2013 fig 10-17 shows a timing and dwell map (a similar method is used to determine engine fuelling. The F1 issue seems to be that the FIA regulations say that the 'looked up' (vertical axis) should be\u2026","rel":"","context":"In &quot;Motorsport&quot;","block_context":{"text":"Motorsport","link":"http:\/\/tomdenton.org\/blog\/?cat=23"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2808,"url":"http:\/\/tomdenton.org\/blog\/?p=2808","url_meta":{"origin":2547,"position":1},"title":"Automated driving in cities","author":"Tom Denton","date":"July 12, 2018","format":false,"excerpt":"Bosch and Daimler select Nvidia AI platform Bosch and Daimler to source Drive Pegasus platform AI processors and software supplied by the U.S. AI computing company Nvidia Systems architectures for fully automated and driverless urban driving must be versatile, redundant, and fail-operational. Bosch and Daimler machine-learning methods will generate vehicle-driving\u2026","rel":"","context":"In &quot;Automated driving&quot;","block_context":{"text":"Automated driving","link":"http:\/\/tomdenton.org\/blog\/?cat=38"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/tomdenton.org\/blog\/wp-content\/uploads\/2018\/07\/bosch-automated-cars-300x169.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1565,"url":"http:\/\/tomdenton.org\/blog\/?p=1565","url_meta":{"origin":2547,"position":2},"title":"Electric parking brakes (EPB)","author":"Tom Denton","date":"February 26, 2013","format":false,"excerpt":"Introduction The electric (or electronic) parking brake, also known as an automatic parking brake (APB), is a function offering the driver increased comfort and convenience. In addition, as the hand lever is not used, car manufacturers have more freedom of choice as to where they site the operating parts within\u2026","rel":"","context":"In &quot;Automotive&quot;","block_context":{"text":"Automotive","link":"http:\/\/tomdenton.org\/blog\/?cat=15"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2363,"url":"http:\/\/tomdenton.org\/blog\/?p=2363","url_meta":{"origin":2547,"position":3},"title":"New regulations for exhaust-gas analyses in guideline 5","author":"Tom Denton","date":"April 23, 2015","format":false,"excerpt":"All new Bosch emission testers work in accordance with the device guideline 5 becoming effective in July 2015 New device guideline for tests on Euro 6 vehicles \u00a0Simplified test sequence for the exhaust-gas analysis on diesel vehicles \u00a0Complying exhaust-gas-analysis guideline 5 with Bosch BEA PC SystemSoft \u00a0Repurchase campaigns and Bosch\u2026","rel":"","context":"In &quot;Automotive&quot;","block_context":{"text":"Automotive","link":"http:\/\/tomdenton.org\/blog\/?cat=15"},"img":{"alt_text":"1-AA-21054","src":"https:\/\/i0.wp.com\/tomdenton.org\/blog\/wp-content\/uploads\/2015\/04\/1-AA-21054-217x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1003,"url":"http:\/\/tomdenton.org\/blog\/?p=1003","url_meta":{"origin":2547,"position":4},"title":"Automotive Ethernet","author":"Tom Denton","date":"April 14, 2011","format":false,"excerpt":"Automotive systems have tended to use custom standards such as MOST, but one of the leading automotive networking chip suppliers, SMSC, has produced a high-performance single-chip 10\/100 Ethernet controller. Definition Ethernet: A set of network cabling and network access protocol standards for bus topology computer networks invented by Xerox but\u2026","rel":"","context":"In &quot;Automotive&quot;","block_context":{"text":"Automotive","link":"http:\/\/tomdenton.org\/blog\/?cat=15"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":232,"url":"http:\/\/tomdenton.org\/blog\/?p=232","url_meta":{"origin":2547,"position":5},"title":"Google brings free turn-by-turn satnav to UK","author":"Tom Denton","date":"April 22, 2010","format":false,"excerpt":"Interesting,\u00a0I wonder if car manufacturers will stop charging silly money for satnavs now? Tom ============ Google has brought its free turn-by-turn software to the UK. The update to Google Maps is being made available today as a free download for any smartphone running Android 1.6 or above. Google confirmed at\u2026","rel":"","context":"In &quot;Automotive&quot;","block_context":{"text":"Automotive","link":"http:\/\/tomdenton.org\/blog\/?cat=15"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2547"}],"version-history":[{"count":1,"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2547\/revisions"}],"predecessor-version":[{"id":2549,"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2547\/revisions\/2549"}],"wp:attachment":[{"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2547"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tomdenton.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}