SURFACE VEHICLE RECOMMENDED PRACTICE J2534™-2 Issued Revised DEC2020 2006-03 2020-12 Superseding J2534-2 JAN2019 Optional Pass-Thru Features RATIONALE This update to API version 04.04 of the SAE J2534-2 specification is to add support for Ethernet NDIS protocol and the read voltage on an SAE J1962 pin functionality. TABLE OF CONTENTS 1. 1.1 1.2 SCOPE ..................................................................................................................................................... 10 Purpose .................................................................................................................................................... 10 Documentation Convention ...................................................................................................................... 10 2. 2.1 2.1.1 2.1.2 2.1.3 2.1.4 REFERENCES......................................................................................................................................... 10 Applicable Documents ............................................................................................................................. 10 SAE Publications...................................................................................................................................... 10 IHS Markit ................................................................................................................................................ 11 ISO Documents ........................................................................................................................................ 11 IEEE Publications..................................................................................................................................... 11 3. DEFINITIONS .......................................................................................................................................... 12 4. 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 ACRONYMS ............................................................................................................................................ 13 Acronyms for Single Wire CAN ................................................................................................................ 13 Acronyms for GM UART .......................................................................................................................... 13 Acronyms for Analog Inputs ..................................................................................................................... 13 Acronyms for UART Echo Byte Protocol ................................................................................................. 13 Acronyms for SAE J1939 ......................................................................................................................... 13 Acronyms for TP 2.0 ................................................................................................................................ 13 Acronyms for Fault-Tolerant CAN ............................................................................................................ 13 Acronyms for CAN FD and ISO15765 on CAN FD .................................................................................. 13 Acronyms for ETHERNET_NDIS ............................................................................................................. 14 5. ENABLING SAE J2534-2 FEATURES AND ACCESSING MULTIPLE SAE J2534 DEVICES............... 14 __________________________________________________________________________________________________________________________________________ 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 revised, reaffirmed, stabilized, or cancelled. SAE invites your written comments and suggestions. Copyright © 2020 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: +1 724-776-4970 (outside USA) Fax: 724-776-0790 Email: CustomerService@sae.org http://www.sae.org For more information on this standard, visit https://www.sae.org/standards/content/J2534-2_202012 SAE INTERNATIONAL J2534™-2 DEC2020 Page 2 of 146 6. 6.1 6.2 6.2.1 6.3 6.3.1 6.3.2 6.3.3 6.4 PIN SELECTION ...................................................................................................................................... 14 Scope of the Pin Selection Optional Feature ........................................................................................... 14 Pass-Thru System Requirements ............................................................................................................ 14 Pin Usage ................................................................................................................................................. 14 Win32 Application Programming Interface............................................................................................... 14 API Functions - Overview......................................................................................................................... 14 API Functions - Detailed Information ....................................................................................................... 15 IOCTL ....................................................................................................................................................... 16 Discovery Support .................................................................................................................................... 19 7. 7.1 ACCESS TO ADDITIONAL CHANNELS ................................................................................................. 19 Discovery Support .................................................................................................................................... 19 8. 8.1 8.2 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.3 MIXED FORMAT FRAMES ON A CAN NETWORK ............................................................................... 20 Scope of the Mixed Format Frames on a CAN Network Optional Feature.............................................. 20 Win32 Application Programming Interface............................................................................................... 20 API Functions - Overview......................................................................................................................... 20 API Functions - Detailed Information ....................................................................................................... 23 IOCTL Section .......................................................................................................................................... 24 Message Structure ................................................................................................................................... 25 Elements .................................................................................................................................................. 25 Discovery Support .................................................................................................................................... 25 9. 9.1 9.2 9.2.1 9.3 9.3.1 9.3.2 9.3.3 9.4 9.4.1 9.5 SINGLE WIRE CAN ................................................................................................................................. 25 Scope of the Single Wire CAN Optional Feature ..................................................................................... 25 Pass-Thru System Requirements ............................................................................................................ 25 Pin Usage ................................................................................................................................................. 25 Win32 Application Programming Interface............................................................................................... 25 API Functions - Overview......................................................................................................................... 25 API Functions - Detailed Information ....................................................................................................... 27 IOCTL Section .......................................................................................................................................... 27 Message Structure ................................................................................................................................... 30 Elements .................................................................................................................................................. 30 Discovery Support .................................................................................................................................... 31 10. 10.1 10.2 10.2.1 10.2.2 10.3 10.3.1 10.3.2 10.3.3 10.4 10.4.1 10.4.2 10.4.3 10.5 ANALOG INPUTS .................................................................................................................................... 31 Scope of the Analog Inputs Optional Feature .......................................................................................... 31 Pass-Thru System Requirements ............................................................................................................ 31 Analog Inputs ........................................................................................................................................... 31 Simultaneous Communication on Multiple Protocols............................................................................... 31 Win32 Application Programming Interface............................................................................................... 31 API Functions - Overview......................................................................................................................... 31 API Functions - Detailed Information ....................................................................................................... 31 IOCTL Section .......................................................................................................................................... 32 Message Structure ................................................................................................................................... 36 Examples ................................................................................................................................................. 36 Message Flag and Status Definitions ...................................................................................................... 37 DLL Installation and Registry ................................................................................................................... 37 Discovery Support .................................................................................................................................... 37 11. 11.1 11.2 11.2.1 11.3 11.3.1 11.3.2 11.3.3 GM UART (SAE J2740) ........................................................................................................................... 38 Scope of the GM UART Optional Feature ............................................................................................... 38 Pass-Thru System Requirements ............................................................................................................ 38 Pin Usage ................................................................................................................................................. 38 Win32 Application Programming Interface............................................................................................... 38 API Functions - Overview......................................................................................................................... 38 API Functions - Detailed Information ....................................................................................................... 39 IOCTL Section .......................................................................................................................................... 39 SAE INTERNATIONAL J2534™-2 DEC2020 Page 3 of 146 11.4 11.4.1 11.4.2 11.5 11.6 Message Structure ................................................................................................................................... 43 Elements .................................................................................................................................................. 43 Message Data Formats ............................................................................................................................ 43 DLL Installation and Registration ............................................................................................................. 43 Discovery Support .................................................................................................................................... 43 12. 12.1 12.2 12.2.1 12.2.2 12.3 12.3.1 12.3.2 12.3.3 12.3.4 12.4 12.4.1 12.4.2 12.4.3 12.4.4 12.5 12.6 UART ECHO BYTE PROTOCOL ............................................................................................................ 43 Scope of the UART Echo Byte Protocol Optional Feature ...................................................................... 43 Pass-Thru System Requirements ............................................................................................................ 43 Simultaneous Communication on Multiple Protocols............................................................................... 43 Pin Usage ................................................................................................................................................. 43 Win32 Application Programming Interface............................................................................................... 44 API Functions - Overview......................................................................................................................... 44 API Change List ....................................................................................................................................... 45 API Functions - Detailed Information ....................................................................................................... 45 IOCTL Section .......................................................................................................................................... 46 Message Structure ................................................................................................................................... 48 C/C++ Definition ....................................................................................................................................... 48 Message Data Formats ............................................................................................................................ 48 Format Checks for Messages Passed to the API .................................................................................... 48 Message Flag and Status Definitions ...................................................................................................... 48 Return Value Error Codes ........................................................................................................................ 48 Discovery Support .................................................................................................................................... 49 13. 13.1 13.2 13.2.1 13.2.2 13.2.3 13.2.4 13.2.5 13.2.6 13.3 13.3.1 13.3.2 13.3.3 13.4 13.4.1 13.4.2 13.4.3 13.4.4 13.4.5 13.5 HONDA DIAG-H PROTOCOL ................................................................................................................. 49 Scope of the Honda DIAG-H Optional Feature ........................................................................................ 49 Pass-Thru System Requirements ............................................................................................................ 49 Simultaneous Communication on Multiple Protocols............................................................................... 49 Programmable Power Supply .................................................................................................................. 49 Pin Usage ................................................................................................................................................. 49 Honda Diagnostic Connectors ................................................................................................................. 49 Serial Communication Interface/Protocol................................................................................................. 51 Electrical Characteristics of Interface....................................................................................................... 52 Win32 Application Programming Interface............................................................................................... 54 API Functions - Overview......................................................................................................................... 54 API Functions - Detailed Information ....................................................................................................... 55 IOCTL Section .......................................................................................................................................... 55 Message Structure ................................................................................................................................... 56 C/C++ Definition ....................................................................................................................................... 56 Elements .................................................................................................................................................. 56 Message Data Formats ............................................................................................................................ 56 Format Checks for Messages Passed to the API .................................................................................... 56 Message Flag and Status Definitions ...................................................................................................... 56 Discovery Support .................................................................................................................................... 56 14. 14.1 14.2 14.2.1 14.2.2 14.3 REPEAT MESSAGING ............................................................................................................................ 56 Scope of the Repeat Messaging Protocol Optional Feature.................................................................... 56 Win32 Application Programming Interface............................................................................................... 56 API Functions - Overview......................................................................................................................... 56 IOCTL Section .......................................................................................................................................... 57 Discovery Support .................................................................................................................................... 61 15. 15.1 15.2 15.3 15.3.1 15.3.2 15.4 EXTENDED PROGRAMMING VOLTAGE SUPPORT ............................................................................ 61 Scope of the Extended Programming Voltage Feature ........................................................................... 61 Pass-Thru System Requirements ............................................................................................................ 61 Win32 Application Programming Interface............................................................................................... 61 API Functions - Overview......................................................................................................................... 61 API Functions - Detailed Information ....................................................................................................... 61 Discovery Support .................................................................................................................................... 61 SAE INTERNATIONAL J2534™-2 DEC2020 Page 4 of 146 16. 16.1 16.2 16.2.1 16.2.2 16.2.3 16.3 16.3.1 16.3.2 16.3.3 16.4 16.4.1 16.4.2 16.4.3 16.4.4 16.4.5 16.4.6 16.5 16.6 SAE J1939 PROTOCOL .......................................................................................................................... 62 Scope of the SAE J1939 Protocol Optional Feature................................................................................ 62 Pass-Thru System Requirements ............................................................................................................ 62 Connection to Vehicle .............................................................................................................................. 62 Communication Protocol .......................................................................................................................... 62 Simultaneous Communication on Multiple Protocols............................................................................... 62 Win32 Application Programming Interface............................................................................................... 62 API Functions - Overview......................................................................................................................... 62 API Functions - Detailed Information ....................................................................................................... 63 IOCTL Section .......................................................................................................................................... 64 Message Structure ................................................................................................................................... 65 C/C++ Definition ....................................................................................................................................... 65 Elements .................................................................................................................................................. 65 Message Data Formats ............................................................................................................................ 65 Format Checks for Messages Passed to the API .................................................................................... 66 Conventions for Returning Messages from the API ................................................................................. 66 Message Flag and Status Definitions ...................................................................................................... 66 Return Value Error Codes ........................................................................................................................ 67 Discovery Support .................................................................................................................................... 67 17. 17.1 17.2 17.2.1 17.2.2 17.2.3 17.3 17.3.1 17.3.2 17.4 17.4.1 17.4.2 17.4.3 17.4.4 17.4.5 17.5 SAE J1708 PROTOCOL .......................................................................................................................... 67 Scope of the SAE J1708 Protocol Optional Feature................................................................................ 67 Pass-Thru System Requirements ............................................................................................................ 67 Connection to Vehicle .............................................................................................................................. 67 Communication Protocol .......................................................................................................................... 68 Simultaneous Communication on Multiple Protocols............................................................................... 68 Win32 Application Programming Interface............................................................................................... 68 API Functions - Overview......................................................................................................................... 68 API Functions - Detailed Information ....................................................................................................... 68 Message Structure ................................................................................................................................... 69 C/C++ Definition ....................................................................................................................................... 69 Elements .................................................................................................................................................. 69 Message Data Formats ............................................................................................................................ 69 Conventions for Returning Messages from the API ................................................................................. 70 Message Flag and Status Definitions ...................................................................................................... 70 Discovery Support .................................................................................................................................... 70 18. 18.1 18.2 18.3 18.3.1 18.4 18.4.1 18.4.2 18.5 EXTENDED PASSTHRUIOCTL FOR DEVICE CONFIGURATION PARAMETERS .............................. 70 Scope of the Extended PassThruIoctl Optional Feature.......................................................................... 70 Pass-Thru Concept .................................................................................................................................. 70 Win32 Application Programming Interface............................................................................................... 70 API Functions - Overview......................................................................................................................... 70 IOCTL Section .......................................................................................................................................... 71 GET_DEVICE_CONFIG .......................................................................................................................... 71 SET_DEVICE_CONFIG ........................................................................................................................... 72 Discovery Support .................................................................................................................................... 74 19. 19.1 19.2 19.2.1 19.2.2 19.3 19.3.1 19.3.2 19.3.3 TP2.0 PROTOCOL .................................................................................................................................. 74 Scope of the TP2.0 Protocol Optional Feature ........................................................................................ 74 Pass-Thru System Requirements ............................................................................................................ 75 Simultaneous Communication on Multiple Protocols............................................................................... 75 Pin Usage ................................................................................................................................................. 75 Win32 Application Programming Interface............................................................................................... 75 API Functions - Overview......................................................................................................................... 75 API Functions - Detailed Information ....................................................................................................... 76 IOCTL Section .......................................................................................................................................... 77 SAE INTERNATIONAL J2534™-2 DEC2020 Page 5 of 146 19.4 19.4.1 19.4.2 19.4.3 19.4.4 19.5 19.6 Message Structure ................................................................................................................................... 80 C/C++ Definition ....................................................................................................................................... 80 Message Data Formats ............................................................................................................................ 80 Format Checks for Messages Passed to the API .................................................................................... 81 Message Flag and Status Definitions ...................................................................................................... 81 Return Values .......................................................................................................................................... 82 Discovery Support .................................................................................................................................... 82 20. 20.1 20.2 20.2.1 20.3 20.3.1 20.3.2 20.4 20.4.1 20.4.2 20.5 FAULT-TOLERANT CAN ......................................................................................................................... 82 Scope of the Fault-Tolerant CAN Optional Feature ................................................................................. 82 Pass-Thru System Requirements ............................................................................................................ 82 Pin Usage ................................................................................................................................................. 82 Win32 Application Programming Interface............................................................................................... 82 API Functions - Overview......................................................................................................................... 82 API Functions - Detailed Information ....................................................................................................... 83 Message Structure ................................................................................................................................... 83 Elements .................................................................................................................................................. 83 Message Flag and Status Definitions ...................................................................................................... 83 Discovery Support .................................................................................................................................... 84 21. 21.1 21.2 21.2.1 21.2.2 21.2.3 21.3 21.3.1 21.3.2 21.4 21.4.1 21.4.2 21.4.3 21.4.4 21.4.5 21.4.6 21.4.7 21.5 CAN FD PROTOCOL............................................................................................................................... 84 Scope of the CAN FD Optional Feature................................................................................................... 84 Pass-Thru System Requirements ............................................................................................................ 84 Pin Usage ................................................................................................................................................. 84 Communication Protocol .......................................................................................................................... 84 Simultaneous Communication on Multiple Protocols............................................................................... 85 Win32 Application Programming Interface............................................................................................... 85 API Functions - Overview......................................................................................................................... 85 API Functions - Detailed Information ....................................................................................................... 85 Message Structure ................................................................................................................................... 87 C/C++ Definition ....................................................................................................................................... 87 Elements .................................................................................................................................................. 87 Message Data Formats ............................................................................................................................ 87 Format Checks for Messages Passed to the API .................................................................................... 87 Conventions for Returning Messages from the API ................................................................................. 88 Conventions for Returning Indications from the API ................................................................................ 88 Message Flag and Status Definitions ...................................................................................................... 88 Discovery Support .................................................................................................................................... 89 22. 22.1 22.2 22.2.1 22.2.2 22.2.3 22.3 22.3.1 22.3.2 22.4 22.4.1 22.4.2 22.4.3 22.4.4 22.4.5 22.4.6 22.4.7 22.5 ISO15765 ON CAN FD ............................................................................................................................ 89 Scope of the ISO15765 on CAN FD Optional Feature ............................................................................ 89 Pass-Thru System Requirements ............................................................................................................ 89 Pin Usage ................................................................................................................................................. 89 Communication Protocol .......................................................................................................................... 89 Simultaneous Communication on Multiple Protocols............................................................................... 90 Win32 Application Programming Interface............................................................................................... 90 API Functions - Overview......................................................................................................................... 90 API Functions - Detailed Information ....................................................................................................... 91 Message Structure ................................................................................................................................... 93 C/C++ Definition ....................................................................................................................................... 93 Elements .................................................................................................................................................. 93 Message Data Formats ............................................................................................................................ 93 Format Checks for Messages Passed to the API .................................................................................... 93 Conventions for Returning Messages from the API ................................................................................. 93 Conventions for Returning Indications from the API ................................................................................ 93 Message Flag and Status Definitions ...................................................................................................... 94 Discovery Support .................................................................................................................................... 95 SAE INTERNATIONAL J2534™-2 DEC2020 Page 6 of 146 23. 23.1 23.2 23.3 READING THE VOLTAGE ON AN SAE J1962 PIN ................................................................................ 95 Scope of the Pin Voltage Read Optional Feature .................................................................................... 95 Win32 Application Programming Interface............................................................................................... 95 Discovery Support .................................................................................................................................... 96 24. 24.1 24.2 24.2.1 24.2.2 24.2.3 24.2.4 24.2.5 24.3 24.4 ETHERNET_NDIS ................................................................................................................................... 96 Scope of the Ethernet Optional Feature .................................................................................................. 96 Pass-Thru System Requirements ............................................................................................................ 97 Connection to Vehicle .............................................................................................................................. 97 Protocol Details ........................................................................................................................................ 98 Simultaneous Communication on Multiple Protocols............................................................................... 98 Pin Usage ................................................................................................................................................. 98 API Functions - Overview......................................................................................................................... 98 Discovery Support .................................................................................................................................. 101 TDLL Installation and Registration ......................................................................................................... 101 25. 25.1 25.2 25.3 25.3.1 25.3.2 DISCOVERY MECHANISM ................................................................................................................... 102 Scope of the Discovery Mechanism Feature ......................................................................................... 102 Pass-Thru System Requirements .......................................................................................................... 102 Win32 Application Programming Interface............................................................................................. 102 API Functions - Overview....................................................................................................................... 102 API Functions - Detailed Information ..................................................................................................... 103 26. 26.1 26.2 26.3 26.4 26.5 26.6 26.7 26.8 26.9 26.10 26.11 SAE J2534-2 RESOURCE .................................................................................................................... 136 Connect Flag Values .............................................................................................................................. 136 ProtocolID Values .................................................................................................................................. 138 Filter Type Values .................................................................................................................................. 140 IOCTL ID Values .................................................................................................................................... 140 IOCTL GET/SET CONFIG Parameter Details ....................................................................................... 141 IOCTL GET/SET DEVICE_CONFIG Parameter Details........................................................................ 142 GET_DEVICE_INFO Defines ................................................................................................................ 142 GET_PROTOCOL_INFO Defines .......................................................................................................... 144 Error Return Values ............................................................................................................................... 144 TxFlags Bits ........................................................................................................................................... 145 RxStatus Bits .......................................................................................................................................... 145 27. 27.1 NOTES ................................................................................................................................................... 146 Revision Indicator................................................................................................................................... 146 Figure 1 Figure 2 Processing of received messages when CAN_MIXED_FORMAT is CAN_MIXED_FORMAT_ON........ 21 Processing of received messages when CAN_MIXED_FORMAT is CAN_MIXED_FORMAT_ALL_FRAMES ................................................................................................. 22 12-pin vehicle connector .......................................................................................................................... 38 12-pin tool connector................................................................................................................................ 38 Process flow for obtaining bus mastership .............................................................................................. 42 Diagnostic communication line configuration (3-pin DLC model) ............................................................ 50 Diagnostic communication line configuration (5-pin DLC model) ............................................................ 50 Diagnostic communication line configuration (16-pin DLC model without CAN) ..................................... 51 Diagnostic communication line configuration (16-pin DLC model with CAN) .......................................... 51 Recommended interface circuit on tester ................................................................................................ 52 Load circuit ............................................................................................................................................... 53 Definition of tDST........................................................................................................................................ 53 Threshold voltage..................................................................................................................................... 54 ETHERNET_NDIS implementation.......................................................................................................... 97 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 SAE INTERNATIONAL Table 1 Table 2 Table 3 Table 4 Table 5 Table 6 Table 7 Table 8 Table 9 Table 10 Table 11 Table 12 Table 13 Table 14 Table 15 Table 16 Table 17 Table 18 Table 19 Table 20 Table 21 Table 22 Table 23 Table 24 Table 25 Table 26 Table 27 Table 28 Table 29 Table 30 Table 31 Table 32 Table 33 Table 34 Table 35 Table 36 Table 37 Table 38 Table 39 Table 40 Table 41 Table 42 Table 43 Table 44 Table 45 Table 46 Table 47 Table 48 Table 49 Table 50 Table 51 Table 52 Table 53 Table 54 Table 55 Table 56 Table 57 Table 58 Table 59 J2534™-2 DEC2020 Page 7 of 146 Protocol ID values (SAE J2534-1 defined) .............................................................................................. 15 SAE J2534 API functions ......................................................................................................................... 15 IOCTL GET_CONFIG/SET_CONFIG parameter details ......................................................................... 17 SAE J2534 API functions ......................................................................................................................... 22 IOCTL GET_CONFIG/SET_CONFIG parameter details ......................................................................... 24 SAE J2534 API functions ......................................................................................................................... 27 ProtocolID descriptions ............................................................................................................................ 27 IOCTL details ........................................................................................................................................... 28 IOCTL GET_CONFIG/SET_CONFIG parameter details ......................................................................... 29 SW_CAN_HS details ............................................................................................................................... 29 SW_CAN_NS details ............................................................................................................................... 29 RxStatus bit definitions............................................................................................................................. 30 TxFlags bit definitions .............................................................................................................................. 30 SAE J2534 API functions ......................................................................................................................... 31 ProtocolID values ..................................................................................................................................... 32 IOCTL GET_CONFIG/SET_CONFIG parameter details ......................................................................... 33 Values for the AVERAGING_METHOD parameter ................................................................................. 34 Sample A/D parameter configuration ....................................................................................................... 36 Data from ANALOG_IN_1 subsystem with READINGS_PER_MSG = 1 ................................................ 36 Data from ANALOG_IN_2 subsystem with READINGS_PER_MSG = 1 ................................................ 37 Data from ANALOG_IN_1 subsystem with READINGS_PER_MSG = 2 ................................................ 37 Data from ANALOG_IN_2 subsystem with READINGS_PER_MSG = 2 ................................................ 37 Data from ANALOG_IN_1 subsystem with ACTIVE_CHANNELS = 0xB ................................................ 37 RxStatus bit definitions............................................................................................................................. 37 SAE J2534 API functions ......................................................................................................................... 39 Protocol ID values .................................................................................................................................... 39 IOCTL details ........................................................................................................................................... 40 SET_POLL_RESPONSE details ............................................................................................................. 40 Poll response message ............................................................................................................................ 40 Typical 3-byte type poll message............................................................................................................. 40 Typical 4-byte type poll message............................................................................................................. 41 BECOME_MASTER detail ....................................................................................................................... 41 Allowed message sizes per protocol........................................................................................................ 43 SAE J2534 API functions ......................................................................................................................... 45 Protocol ID values .................................................................................................................................... 45 SET_CONFIG and GET_CONFIG additional parameters ....................................................................... 46 Parameter translation table ...................................................................................................................... 47 Allowed message sizes per protocol........................................................................................................ 48 Simultaneous communication options ..................................................................................................... 49 Serial interface parameters ...................................................................................................................... 52 Electrical characteristics........................................................................................................................... 52 Transmitter electrical requirements.......................................................................................................... 53 Transmitter timing requirements .............................................................................................................. 53 Receiver electrical requirements.............................................................................................................. 54 Receiver timing requirements .................................................................................................................. 54 SAE J2534 API functions ......................................................................................................................... 55 Protocol ID values .................................................................................................................................... 55 Allowed message sizes per protocol........................................................................................................ 56 SAE J2534 API functions ......................................................................................................................... 57 IOCTL details ........................................................................................................................................... 57 START_REPEAT_MESSAGE details...................................................................................................... 58 QUERY_REPEAT_MESSAGE details..................................................................................................... 60 Status parameter values .......................................................................................................................... 60 STOP_REPEAT_MESSAGE details........................................................................................................ 60 SAE J2534 API functions ......................................................................................................................... 61 SAE J2534 API functions ......................................................................................................................... 63 Protocol ID values .................................................................................................................................... 63 Return values ........................................................................................................................................... 63 IOCTL details ........................................................................................................................................... 64 SAE INTERNATIONAL Table 60 Table 61 Table 62 Table 63 Table 64 Table 65 Table 66 Table 67 Table 68 Table 69 Table 70 Table 71 Table 72 Table 73 Table 74 Table 75 Table 76 Table 77 Table 78 Table 79 Table 80 Table 81 Table 82 Table 83 Table 84 Table 85 Table 86 Table 87 Table 88 Table 89 Table 90 Table 91 Table 92 Table 93 Table 94 Table 95 Table 96 Table 97 Table 98 Table 99 Table 100 Table 101 Table 102 Table 103 Table 104 Table 105 Table 106 Table 107 Table 108 Table 19 Table 110 Table 111 Table 112 Table 113 Table 114 Table 115 Table 116 Table 117 Table 118 Table 119 J2534™-2 DEC2020 Page 8 of 146 IOCTL GET_CONFIG/SET_CONFIG parameters details ....................................................................... 64 Protect_J1939_addr details ..................................................................................................................... 65 Allowed message sizes per protocol........................................................................................................ 66 RxStatus bit definitions............................................................................................................................. 67 SAE J2534 API functions ......................................................................................................................... 68 Connect flag values.................................................................................................................................. 69 Protocol ID values .................................................................................................................................... 69 Allowed message sizes per protocol........................................................................................................ 69 TxFlags bit definitions .............................................................................................................................. 70 SAE J2534 API functions ......................................................................................................................... 71 IOCTL details ........................................................................................................................................... 71 GET_DEVICE_CONFIG details ............................................................................................................... 72 SET_DEVICE_CONFIG details ............................................................................................................... 73 IOCTL GET_DEVICE_CONFIG/SET_DEVICE_CONFIG parameter details .......................................... 74 SAE J2534 API functions ......................................................................................................................... 76 Protocol ID values .................................................................................................................................... 77 IOCTL details ........................................................................................................................................... 77 TP2.0 configuration parameters ............................................................................................................... 78 REQUEST_CONNECTION details .......................................................................................................... 79 TEARDOWN_CONNECTION details ...................................................................................................... 80 Allowed message sizes per protocol........................................................................................................ 80 RxStatus bit definitions............................................................................................................................. 81 TxFlag bit definition .................................................................................................................................. 82 Additional return values for the TP2.0 protocol ........................................................................................ 82 SAE J2534 API functions ......................................................................................................................... 83 ProtocolID descriptions ............................................................................................................................ 83 New RxStatus definitions ......................................................................................................................... 83 SAE J2534 API functions ......................................................................................................................... 85 Connect flag values.................................................................................................................................. 86 <ProtocolID> descriptions ........................................................................................................................ 86 IOCTL GET_CONFIG/SET_CONFIG parameters details ....................................................................... 87 Allowed message sizes per protocol........................................................................................................ 87 <RxStatus> bit definitions ........................................................................................................................ 88 <TxFlags> bit definitions .......................................................................................................................... 89 SAE J2534 API functions ......................................................................................................................... 90 Connect flag values.................................................................................................................................. 91 <ProtocolID> descriptions ........................................................................................................................ 91 IOCTL GET_CONFIG/SET_CONFIG parameters details ....................................................................... 92 Allowed message sizes per protocol........................................................................................................ 93 <RxStatus> bit definitions ........................................................................................................................ 94 <TxFlags> bit definitions .......................................................................................................................... 95 READ_J1962PIN_VOLTAGE details ....................................................................................................... 96 Simultaneous communication options ..................................................................................................... 98 ETHERNET_NDIS pin usage details ....................................................................................................... 98 SAE J2534 API functions ......................................................................................................................... 99 <Flags> descriptions ................................................................................................................................ 99 <ProtocolID> descriptions ...................................................................................................................... 100 GET_NDIS_ADAPTER_INFO details .................................................................................................... 101 SAE J2534 API functions ....................................................................................................................... 102 IOCTL details ......................................................................................................................................... 103 GET_DEVICE_INFO details .................................................................................................................. 104 GET_DEVICE_INFO parameter details ................................................................................................. 105 GET_PROTOCOL_INFO details ........................................................................................................... 131 Protocol groups ...................................................................................................................................... 132 GET_PROTOCOL_INFO parameter details .......................................................................................... 132 Connect flag values................................................................................................................................ 137 ProtocolID values ................................................................................................................................... 138 Filter type values .................................................................................................................................... 140 IOCTL ID values..................................................................................................................................... 140 IOCTL GET_CONFIG/SET_CONFIG ID values .................................................................................... 141 SAE INTERNATIONAL Table 120 Table 121 Table 122 Table 123 Table 124 Table 125 Table 126 J2534™-2 DEC2020 Page 9 of 146 IOCTL GET_DEVICE_CONFIG/SET_DEVICE_CONFIG details.......................................................... 142 GET_DEVICE_INFO defines values...................................................................................................... 142 GET_PROTOCOL_INFO defines values ............................................................................................... 144 Error return values ................................................................................................................................. 144 New SAE J2534-1 return values ............................................................................................................ 145 TxFlags values ....................................................................................................................................... 145 RxStatus bits .......................................................................................................................................... 145 SAE INTERNATIONAL J2534™-2 DEC2020 Page 10 of 146 1. SCOPE SAE J2534-1 defines a standard vehicle network interface that can be used to reprogram emission-related 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 API version 04.04 of the SAE J2534-1 specification. It is not required for an interface to be fully compliant with API version 04.04 of the SAE J2534-1 specification to implement some of the features specified in this document. 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 and are based on the December 2004 publication of SAE J2534-1. 1.1 Purpose Each section included in this document specifies features that extend API version 04.04 of the SAE J2534-1 specification. The specific feature operation will be described directly or reference another existing specification. In each case, the required calling structure, via the SAE J2534-1 API version 04.04, will be documented and coordinated by this document. 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 “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.” 1.2 Documentation Convention For each protocol defined in this document: • Unless explicitly specified otherwise, all SAE J2534-1 PassThru function calls will be supported. • SAE J2534-1 ConnectFlags, RxStatus, TxFlags, and Indications are not supported unless explicitly specified. 2. REFERENCES 2.1 Applicable Documents The following publications form a part of this specification to the extent specified herein. Unless otherwise indicated, the latest issue of SAE publications shall apply. 2.1.1 SAE Publications Available from SAE International, 400 Commonwealth Drive, Warrendale, PA 15096-0001, Tel: 877-606-7323 (inside USA and Canada) or +1 724-776-4970 (outside USA), www.sae.org. SAE J1939 Serial Control and Communications Heavy Duty Vehicle Network - Top Level Document SAE J1939-21 Data Link Layer SAE J1939-81 Network Management SAE J1962 Diagnostic Connector SAE J2284-3 High-Speed CAN (HSC) for Vehicle Applications at 500 Kbps SAE J2284-4 High-Speed CAN (HSC) for Vehicle Applications at 500 Kbps with CAN FD Data at 2 Mbps SAE INTERNATIONAL J2534™-2 DEC2020 Page 11 of 146 SAE J2284-5 High-Speed CAN (HSC) for Vehicle Applications at 500 Kbps with CAN FD Data at 5 Mbps SAE J2534-1 Recommended Practice for Pass-Thru Vehicle Programming SAE J2740 General Motors UART Serial Data Communications SAE J2809 Honda Diagnostic Serial Data Link Protocol - ABS/VSA System SAE J2818 Keyword Protocol 1281 SAE J2819 TP2.0 Vehicle Diagnostic Protocol 2.1.2 IHS Markit The current published manufacturer-specific documents may be acquired from the following URL: http://global.ihs.com/. GMW3089 GMLAN Single Wire CAN Physical and Data Link Layers Specification Definitions GMW3110 GMLAN Enhanced Diagnostics Test Mode Specifications GMW3173 Architecture & Bus Wiring Requirements 2.1.3 ISO Documents Copies of these documents are available online at http://webstore.ansi.org/. ISO9141 Road Vehicles - Diagnostic Systems - CARB Requirements for Interchange of Digital Information ISO9141 Road Vehicles - Diagnostic Systems - Requirements for Interchange of Digital Information ISO9141-2 Road Vehicles - Diagnostic Systems - CARB Requirements for Interchange of Digital Information ISO11898-1:2015 Road Vehicles - Controller Area Network (CAN) – Part 1: Data Link Layer and Physical Signalling ISO11898-2 Road Vehicles - Controller Area Network (CAN) - Part 2: High-Speed Medium Access Unit ISO11898-3 Road Vehicles - Controller Area Network (CAN) - Part 3: Low-Speed, Fault-Tolerant, MediumDependent Interface ISO13400-2 Diagnostic Communication over Internet Protocol (DoIP) - Transport Protocol and Network Layer Services ISO13400-3:2016 Diagnostic Communication over Internet Protocol (DoIP) - Wired Vehicle Interface Based on IEEE 802.3 ISO15765-2 Road Vehicles - Diagnostics Communication Over Controller Area Networks (DoCAN) - Transport Protocol and Network Layer Services ISO15765-4 Road Vehicles - Diagnostics Communication Over Controller Area Networks (DoCAN) - Requirements for Emission-Related Systems 2.1.4 IEEE Publications Available from IEEE Operations Center, 445 and 501 Hoes Lane, Piscataway, NJ 08854-4141, Tel: 732-981-0060, www.ieee.org. IEEE 802.1Q IEEE Standard for Local and Metropolitan Area Networks IEEE 802.3 IEEE Standard for Ethernet SAE INTERNATIONAL J2534™-2 DEC2020 Page 12 of 146 3. DEFINITIONS 3.1 Definitions for Analog Inputs CHANNEL: An analog-to-digital channel. SUBSYSTEM: A collection of similar channels. 3.2 Definitions for Honda DIAG-H DIAG-H: Honda proprietary single wire UART-based diagnostic communication bus. 92 Hm/2: Honda proprietary diagnostic communication protocol. 3.3 Definitions for TP 2.0 TELEGRAM: A CAN message used on an established transport protocol connection. 3.4 Definitions for CAN FD ACTIVE MESSAGE: Refers to a message that has started the transmission process on the network. PASS-THRU DEVICE: Refers only to the physical hardware portion of the SAE J2534 interface, where the circuitry resides. PASS-THRU INTERFACE: Refers to all components of an SAE J2534 interface, including both hardware and software. QUEUED MESSAGE: Refers to the acceptance of a full message from the application by the pass-thru interface (via the API), which is intended to become active at some point in the future. REGISTRY: A mechanism within Windows operating systems to handle hardware and software configuration information. TERMINATE A MESSAGE: Refers to the process of stopping reception or transmission of a message by the pass-thru interface. TRANSMITTED MESSAGE: Refers to a message that has been successfully placed on the network. CAN MESSAGE FORMAT: Refers to the message format of the CAN frame which can be either CAN 2.0 (Classical CAN) or CAN FD. CAN 2.0 STANDARD FRAME: Classical base frame format. CAN 2.0 EXTENDED FRAME: Classical extended frame format. CAN FD STANDARD FRAME: FD base frame format. CAN FD EXTENDED FRAME: FD extended frame format. 3.5 Definitions for Ethernet AUTO-MDI(X): Automatic medium-dependent interface crossover device that allows the Ethernet hardware to decide whether a cross-linked cable or a one-to-one connected (patch) cable is used for the connection between two Ethernet ports and which configures the physical layer transceiver (PHY) according to the type of cable in order to correctly connect Tx and Rx lines. DOIP EDGE NODE: Host inside the vehicle, where an Ethernet activation line in accordance with ISO13400-3:2016 is terminated and where the link from the first node/host in the external network is terminated (from ISO13400-3:3016). SAE INTERNATIONAL J2534™-2 DEC2020 4. ACRONYMS 4.1 Acronyms for Single Wire CAN GMLAN: General Motors Local Area Network SWCAN: Single Wire CAN 4.2 Acronyms for GM UART UART: Universal Asynchronous Receiver/Transmitter 4.3 Acronyms for Analog Inputs A/D: Analog to Digital 4.4 Acronyms for UART Echo Byte Protocol ABS: Anti-Lock Braking System VSA: Vehicle Stability Assist 4.5 Acronyms for SAE J1939 BAM: Broadcast Announce Message 4.6 Acronyms for TP 2.0 TP: Transport Protocol 4.7 Acronyms for Fault-Tolerant CAN FTCAN: Fault-Tolerant CAN (refer to ISO11898-3) 4.8 Acronyms for CAN FD and ISO15765 on CAN FD API: Application Programming Interface BRS: Bit Rate Switch CAN: Controller Area Network CAN FD: Flexable Datarate CAN (refer to ISO11898-1:2015) CRC: Cyclic Redundancy Check EDL: Extended Data Length FDF: Flexible Data-Rate Format Indicator (also known as EDL) IOCTL: Input/Output Control CAN 2.0 : Refers to Classical CAN Page 13 of 146 SAE INTERNATIONAL 4.9 J2534™-2 DEC2020 Page 14 of 146 Acronyms for ETHERNET_NDIS IP: Internet Protocol MAC: Media Access Control NIC: Network Interface Card NDIS: Network Driver Interface Specification RNDIS: Remote Network Driver Specification WINSOCK: Windows Sockets API 5. ENABLING SAE J2534-2 FEATURES AND ACCESSING MULTIPLE SAE J2534 DEVICES To enable SAE J2534-2 features, call PassThruOpen with pName pointing to a NULL terminated string that begins with the ASCII characters “J2534-2:” If pName is NULL, only SAE J2534-1 features shall be allowed. If pName is not NULL and it does not begin with “J2534-2:” no assumptions can be made regarding the SAE J2534-1 or SAE J2534-2 features. To use multiple devices from the same PC, the application shall append the vendor-specific device name to the string identified above. Example: “J2534-2:” to open the SAE J2534-2 default device as determined by the vendor. “J2534-2:VendorX Device1” to open an SAE J2534-2 device identified as “VendorX Device1” A device, to be compliant to the SAE J2534-2 specification, shall implement the Discovery Mechanism and shall support all the parameters specified for GET_DEVICE_INFO and GET_PROTOCOL_INFO IoctlIDs. See Section 25 for details. 6. PIN SELECTION 6.1 Scope of the 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 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. 6.2 6.2.1 Pass-Thru System Requirements Pin Usage The set of pins that can be switched is dependent on the set of optional protocols supported by the interface. A new set of SET_CONFIG parameters are defined for the application to specify the pins to be switched on various standard cables. 6.3 6.3.1 Win32 Application Programming Interface API Functions - Overview The new ProtocolIDs with “_PS” suffix indicates that the protocol physical layer is not connected to any pins on PassThruConnect. A new IOCTL configuration parameter is also added, that allows connection of a physical layer to specific pins on the specified cable. SAE INTERNATIONAL J2534™-2 DEC2020 Page 15 of 146 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 Table 1. Table 1 - Protocol ID values (SAE J2534-1 defined) Definition J1850VPW_PS J1850PWM_PS ISO9141_PS Description GM/Chrysler CLASS2 Ford SCP ISO9141 and ISO9141-2 ISO14230_PS CAN_PS ISO14230-4 (Keyword Protocol 2000) Raw CAN (flow control not handled automatically by interface) ISO15765-2 (flow control enabled) SAE J2610 (Chrysler SCI) ISO15765_PS J2610_PS NOTE: This is not an exhaustive list of _PS protocols. See Section 24 for a complete list. 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 PassThruConnect. The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_MSG_PROTOCOL_ID. (The only exception to this is the mixed format frames feature on a CAN network.) Note that SAE J2610 (Chrysler 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 Section 24. The interface must manage resource locking of pins that are in use. If an existing channel is using a pin that is requested by a PassThruIoctl call, the new request shall be rejected. The interface must also prevent a channel from being assigned to different pins on different cables at the same time. Table 2 summarizes the changes to the SAE J2534-1 API functions. Table 2 - SAE J2534 API functions Function PassThruConnect PassThruIoctl 6.3.2 6.3.2.1 Description of Change For all protocols with the “_PS” suffix defined above, no connection to any pins is made on the call to PassThruConnect. Add a new configuration parameter to allow selection of cable and pins. API Functions - Detailed Information PassThruConnect When PassThruConnect is called, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG, J1962_PINS, J1939_PINS, or J1708_PINS is made. There are two major differences from PassThruConnect usage in SAE J2534-1. • The new ProtocolIDs (ending in “_PS”) are not assigned pins upon connection. No transmission or reception on a channel is possible until the pins are assigned using the IOCTL parameter J1962_PINS, J1939_PINS, or J1708_PINS. • If the interface supports multiple instances of a given protocol device, the “_PS” ProtocolIDs can be opened multiple times. For example, if an interface device supports two independent CAN controllers, a program could open CAN_PS and request pins 3 and 11, then open CAN_PS again and request pins 1 and 12. SAE INTERNATIONAL J2534™-2 DEC2020 Page 16 of 146 Devices that are not physically capable of supporting the requested protocol shall return ERR_NOT_SUPPORTED. Example 1: Devices that do not support any transceivers of a particular type (e.g., SW_CAN_PS). Example 2: Devices with only one controller of a particular type (e.g., one physical CAN controller) shall disallow opening that “_PS” ProtocolID multiple times (since it could never satisfy the second request). For further information regarding failure conditions, see 6.3.2.7. 6.3.2.2 PassThruDisconnect This API function shall return the SAE J1962 pins to the default state, as specified by SAE J2534-1. The SAE J1939 and SAE J1708 pins shall be returned to a high-impedance state. 6.3.2.3 PassThruReadMsgs If pins have not been assigned, ERR_PIN_INVALID shall be returned if this function is called. 6.3.2.4 PassThruWriteMsgs If pins have not been assigned, ERR_PIN_INVALID shall be returned if this function is called. 6.3.2.5 PassThruStartPeriodicMsg If pins have not been assigned, ERR_PIN_INVALID shall be returned if this function is called. 6.3.2.6 PassThruStartMsgFilter If pins have not been assigned, ERR_PIN_INVALID shall be returned if this function is called. 6.3.2.7 PassThruIoctl Pins are assigned via SET_CONFIG with the J1962_PINS, J1939_PINS, or J1708_PINS parameters. See 6.3.3.2 for details regarding this parameter. All other PassThruIoctl functions for this Channel ID shall return ERR_PIN_INVALID until the pin assignment is successfully completed. The application must call PassThruDisconnect before attempting to reassign pins. 6.3.3 6.3.3.1 IOCTL GET_CONFIG The following configuration parameters are supported: J1962_PINS J1939_PINS J1708_PINS See Table 3 for more details. SAE INTERNATIONAL 6.3.3.2 J2534™-2 DEC2020 Page 17 of 146 SET_CONFIG The configuration parameters J1962_PINS, J1939_PINS, and J1708_PINS are added as defined in Table 3. For the protocol channel referenced in the ChannelID parameter of the SET_CONFIG call, these parameters specify which connector and pin or pins this protocol’s physical layer is to be connected to. The act of setting this parameter causes the connection of the protocol physical layer to the specified pins. At the vendors discretion, detection of the correct cable can be used to reject an invalid request with a return code of ERR_INVALID_IOCTL_VALUE. NOTE: Unpredictable results may occur if cable detection is not implemented and an incorrect cable is connected. Table 3 - IOCTL GET_CONFIG/SET_CONFIG parameter details Parameter Valid Values for Parameter J1962_PINS 0x0000PPSS where: PP: 0x00 - 0x10 SS: 0x00 - 0x10 PP ! = SS, except when set to 0x0000 Exclude pins 4, 5, & 16 J1939_PINS 0x0000PPSS where: PP: 0x00 - 0x09 SS: 0x00 - 0x09 PP ! = SS, except when set to 0x0000 Exclude pins 1 & 2 Default Value (decimal) 0 Description For a channel of any protocol type, this selects the SAE J1962 pin, or pair of pins, onto which the physical layer is to be switched. NOTE: A value of 0 can never be set. Reading a value of 0 indicates that pin selection has not been performed. PP is the pin number for the primary signal, e.g., ISOK-line, CAN-H, +ve, SCI Tx, DIAG-H, SAE J1850+, etc. SS is the pin number for the secondary signal, where a secondary signal is present, e.g., ISOL-line, CAN-L, -ve, SCI Rx, SAE J1850-, etc. SS shall equal 0x00 if no secondary pin is required or enabled. For a channel of any protocol type, this selects the SAE J1939-13 pin, or pair of pins, onto which the physical layer is to be switched. SAE J1939-13 PIN Function PIN Number A Ground 1 B Battery+ 2 C CAN_H 3 D CAN_L 4 E Shield/NC 5 F J1708+ 6 G J1708- 7 H - 8 J - 9 SAE INTERNATIONAL J2534™-2 DEC2020 Page 18 of 146 NOTE: A value of 0 can never be set. Reading a value of 0 indicates that pin selection has not been performed. PP is the pin number for the primary signal, e.g., ISOK-line, CAN-H, +ve, SCI Tx, DIAG-H, SAE J1850+, etc. SS is the pin number for the secondary signal, where a secondary signal is present, e.g., ISOL-line, CAN-L, -ve, SCI Rx, SAE J1850-, etc. SS shall equal 0x00 if no secondary pin is required or enabled. J1708_PINS 0x0000PPSS where: PP: 0x00 - 0x09 For a channel of any protocol type, this selects the pin or pair of pins on the SAE J1708 6 pin Deutch connector, onto which the physical layer is to be switched. SS: 0x00 - 0x09 PP ! = SS, except when set to 0x0000 Exclude pins 3 & 5 SAE J1708 PIN Function PIN Number A J1708+ 1 B J1708- 2 C Battery+ 3 D - 4 E Ground 5 F - 6 NOTE: A value of 0 can never be set. Reading a value of 0 indicates that pin selection has not been performed. PP is the pin number for the primary signal, e.g., ISOK-line, CAN-H, +ve, SCI Tx, DIAG-H, SAE J1850+, etc. SS is the pin number for the secondary signal, where a secondary signal is present, e.g., ISOL-line, CAN-L, -ve, SCI Rx, SAE J1850-, etc. SS shall equal 0x00 if no secondary pin is required or enabled. For existing SAE J2534-1 base protocols, the physical interface is connected to the SAE J1962 pins automatically when PassThruConnect is called, as defined in SAE J2534-1. The J1962_PINS parameter does not need to be supported for SAE J2534-1 base protocols, but the use of these protocols will impact the pins that are available for the _PS protocols. For protocols with the “_PS” suffix, at least one of the J1962_PINS, J1939_PINS, or J1708_PINS parameters must be supported, and the default value of the parameter shall be 0x0000. Certain combinations of SAE J1962, SAE J1939, or SAE J1708 pins could result in vehicle or interface damage. ERR_PIN_INVALID is returned for combinations that are outside of the defined range. The application programmer is responsible for determining if the potential exists for damage to the vehicle and taking the necessary steps to prevent it. Only one SET_CONFIG, with the parameter J1962_PINS, J1939_PINS, or J1708_PINS can be performed for a given Channel ID. After a successful call to SET_CONFIG, if a second call for a given Channel ID is attempted, ERR_CHANNEL_IN_USE shall be returned. PassThruDisconnect is required before an alternate cable or pin selection may be attempted. SAE INTERNATIONAL J2534™-2 DEC2020 Page 19 of 146 For the J1962_PINS, J1939_PINS, and J1708_PINS parameters, the following error handling shall be applied: • PassThruIoctl requests unsupported pin combination. PassThruIoctl, SET_CONFIG, is called, requesting a value of the J1962_PINS, J1939_PINS, or J1708_PINS parameter that are valid but can’t be supported by the hardware or having the potential of damaging the interface device. Result: PassThruIoctl returns ERR_NOT_SUPPORTED. • PassThruIoctl requests pin combination that would cause conflict. PassThruIoctl, SET_CONFIG, is called, setting the J1962_PINS, J1939_PINS, or J1708_PINS parameter to a value that causes a pin conflict with an existing channel. Result: PassThruIoctl returns ERR_PIN_IN_USE. 6.4 Discovery Support The device shall report support for pin switching and associated parameters through the discovery mechanism defined in Section 25. 7. ACCESS TO ADDITIONAL CHANNELS This section defines an optional mechanism available to initiate and use multiple channels of the same protocol, if vendor hardware provides the support. The channels addressed this way are not be tied to pins on the SAE J1962 connector. What channel appears at what pins on the interface device will depend on the vendor configuration. The channels are typically accessed using custom cable built to hardware vendor’s specification of connection details. For example, a particular vendor’s hardware may support four channels of dual-wire high-speed CAN. These additional channels will be available as separate ProtocolIDs defined by SAE J2534-2. This document will allocate 128 predefined ProtocolIDs for each protocol to target a possible maximum of 128 channels of each protocol. The ProtocolIDs will follow the following format: CAN_CH1 CAN_CH2 ………….. CAN_CH128 This scheme of providing additional ProtocolIDs will apply to both SAE J2534-1 and SAE J2534-2 defined protocols. A complete list of ProtocolIDs for multiple channel access can be found in Section 24. The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_MSG_PROTOCOL_ID. (The only exception to this is the mixed format frames feature on a CAN network.) Based on vendor implementation protocols initiated using J2534-1, _PS, or _CHx ProtocolIDs may use the same hardware resources. When there is a resource conflict, a call to PassThruConnect will return ERR_RESOURCE_IN_USE. In the case where the requested resource does not exist, ERR_NOT_SUPPORTED is returned. 7.1 Discovery Support The device shall report support for multiple channels through the discovery mechanism defined in Section 25. SAE INTERNATIONAL J2534™-2 DEC2020 Page 20 of 146 8. MIXED FORMAT FRAMES ON A CAN NETWORK 8.1 Scope of the Mixed Format Frames on a CAN Network Optional Feature This section details the extensions to SAE J2534-1 that will allow the simultaneous reception and transmission of ISO15765 messages and unformatted CAN frames on an ISO15765 channel. The ProtocolID (in the PASSTHRU_MSG structure) will be used to identify the format of the associated message. This section details only the changes from SAE J2534-1. Items not specifically detailed in this section are assumed not to have changed. 8.2 8.2.1 Win32 Application Programming Interface API Functions - Overview Connecting to an ISO15765 channel and then setting the IOCTL configuration parameter CAN_MIXED_FORMAT to CAN_MIXED_FORMAT_ON shall allow messages to be processed as either unformatted CAN frames or as ISO15765 messages. Additionally, setting the IOCTL configuration parameter CAN_MIXED_FORMAT to CAN_MIXED_FORMAT_ALL_FRAMES shall allow the individual frames of an ISO15765 message (including flow control) to also be processed in a parallel path as an unformatted CAN frame. Unformatted CAN frames shall have the ProtocolID in the PASSTHRU_MSG structure set to an appropriate CAN Protocol ID and shall follow the requirements and restrictions for that protocol. ISO15765 messages shall have the ProtocolID in the PASSTHRU_MSG structure set to an appropriate ISO15765 Protocol ID and shall follow the requirements and restrictions for that protocol. For example, CAN is associated with ISO15765, SW_CAN_PS is associated with SW_ISO15765_PS, CAN_PS is associated with ISO15765_PS, etc. When transmitting a message or starting a periodic message, the Protocol ID in the PASSTHRU_MSG structure shall be used to identify how the associated message shall be processed. If the configuration setting LOOPBACK is set to ON, then transmitted messages (including flow control) shall be processed in the same manner as received messages. As with SAE J2534-1, messages will be sent one at a time. This makes it possible for an ISO15765 message to block other messages until transmission is complete, including unformatted CAN frames. The function PassThruStartMsgFilter shall be used to identify ISO15765 messages as well as unformatted CAN frames. A received message that matches a FLOW_CONTROL_FILTER shall be processed as an ISO15765 message and shall have the appropriate ProtocolID in the PASSTHRU_MSG structure before it is added to the receive queue. Additionally, based upon the setting of CAN_MIXED_FORMAT, the CAN frames may also be subject to the PASS_FILTERs and BLOCK_FILTERs, where the ProtocolID in the PASSTHRU_MSG structure shall be set to reflect an unformatted CAN frame before it is added to the receive queue. Figures 1 and 2 outline how received messages are processed for the various settings of CAN_MIXED_FORMAT. SAE INTERNATIONAL J2534™-2 DEC2020 Page 21 of 146 Forward to DLL/PC Add to interface receive queue Does not match any BLOCK_FILTER or no BLOCK_FILTER is set BLOCK_FILTER Evaluation Matches a BLOCK_FILTER Discard message Matches a PASS_FILTER PASS_FILTER Evaluation Does not match any PASS_FILTER or no PASS_FILTER is set Does not match any FLOW_CONTROL_FILTER or no FLOW_CONTROL_FILTER is set FLOW_CONTROL_FILTER Evaluation Matches a FLOW_CONTROL_FILTER ISO 15765 Message Builder CAN Frame from network Figure 1 - Processing of received messages when CAN_MIXED_FORMAT is CAN_MIXED_FORMAT_ON SAE INTERNATIONAL J2534™-2 DEC2020 Page 22 of 146 Forward to DLL/PC Add to interface receive queue Does not match any BLOCK_FILTER or no BLOCK_FILTER is set BLOCK_FILTER Evaluation ISO 15765 Message Builder Matches a BLOCK_FILTER Matches a FLOW_CONTROL_FILTER Discard message Matches a PASS_FILTER PASS_FILTER Evaluation Does not match any FLOW_CONTROL_FILTER or no FLOW_CONTROL_FILTER is set FLOW_CONTROL_FILTER Evaluation Does not match any PASS_FILTER or no PASS_FILTER is set CAN Frame from network Figure 2 - Processing of received messages when CAN_MIXED_FORMAT is CAN_MIXED_FORMAT_ALL_FRAMES If the optional feature is not supported on the current ISO15765 channel, the call to get or set the IOCTL configuration parameter CAN_MIXED_FORMAT shall return the value ERR_NOT_SUPPORTED. Table 4 summarizes the changes to the SAE J2534-1 API functions. Table 4 - SAE J2534 API functions Function PassThruStartMsgFilter PassThruIoctl Description of Change Increase the minimum number of FLOW_CONTROL_FILTERs to 64 and PASS_FILTERs/BLOCK_FILTERs to a total of 10. Add a new configuration parameter. SAE INTERNATIONAL 8.2.2 8.2.2.1 J2534™-2 DEC2020 Page 23 of 146 API Functions - Detailed Information PassThruReadMsgs There is no change to this function. However, only ISO15765 channels will allow the IOCTL configuration parameter CAN_MIXED_FORMAT to be either CAN_MIXED_FORMAT_ON or CAN_MIXED_FORMAT_ALL_FRAMES. In these cases, the ProtocolID in the PASSTHRU_MSG structure shall reflect either an unformatted CAN frame (e.g., CAN, SW_CAN_PS, etc.) or an ISO15765 message (e.g., ISO15765, SW_ISO15765_PS, etc.). Consult the appropriate SAE J2534 document for the requirements, restrictions, and error conditions for the specific protocol. Additionally, each time the IOCTL configuration parameter CAN_MIXED_FORMAT is set, the receive queue shall be cleared. 8.2.2.2 PassThruWriteMsgs There is no change to this function. However, only ISO15765 channels will allow the IOCTL configuration parameter CAN_MIXED_FORMAT to be either CAN_MIXED_FORMAT_ON or CAN_MIXED_FORMAT_ALL_FRAMES. In these cases, the ProtocolID in the PASSTHRU_MSG structure shall reflect either an unformatted CAN frame (e.g., CAN, SW_CAN_PS, etc.) or an ISO15765 message (e.g., ISO15765, SW_ISO15765_PS, etc.). Consult the appropriate SAE J2534 document for the requirements, restrictions, and error conditions for the specific protocol. This function will return a value of ERR_MSG_PROTOCOL_ID if the IOCTL configuration parameter CAN_MIXED_FORMAT is set to CAN_MIXED_FORMAT_OFF and the ProtocolID reflects an unformatted CAN frame. Additionally, each time the IOCTL configuration parameter CAN_MIXED_FORMAT is set, the transmit queue shall be cleared. The SAE J2534 device will not protect the user from writing an unformatted CAN frame that may be interpreted as a valid ISO15765 frame. The consequences of this action are undefined and may disrupt ISO15765 communications taking place on the network. 8.2.2.3 PassThruStartPeriodicMsg There is no change to this function. However, only ISO15765 channels will allow the IOCTL configuration parameter CAN_MIXED_FORMAT to be either CAN_MIXED_FORMAT_ON or CAN_MIXED_FORMAT_ALL_FRAMES. In these cases, the ProtocolID in the PASSTHRU_MSG structure shall reflect either an unformatted CAN frame (e.g., CAN, SW_CAN_PS, etc.) or an ISO15765 message (e.g., ISO15765, SW_ISO15765_PS, etc.). Consult the appropriate SAE J2534 document for the requirements, restrictions, and error conditions for the specific protocol. This function will return a value of ERR_MSG_PROTOCOL_ID if the IOCTL configuration parameter CAN_MIXED_FORMAT is set to CAN_MIXED_FORMAT_OFF and the ProtocolID reflects an unformatted CAN frame. Additionally, each time the IOCTL configuration parameter CAN_MIXED_FORMAT is set, periodic messages with ProtocolID of CAN shall be deleted. The SAE J2534 device will not protect the user from writing a CAN message that may be interpreted as a valid ISO15765 frame. The consequences of this action are undefined and may disrupt ISO15765 communications taking place on the network. 8.2.2.4 PassThruStartMsgFilter Each ISO15765 channel shall support ten PASS_FILTERs/BLOCK_FILTERs. a minimum of 64 FLOW_CONTROL_FILTERs, as well as This function shall be used to identify ISO15765 messages, as well as unformatted CAN frames. A received message that matches a FLOW_CONTROL_FILTER shall be processed as an ISO15765 message and shall have the appropriate ProtocolID in the PASSTHRU_MSG structure before it is added to the receive queue. Additionally, based upon the setting of CAN_MIXED_FORMAT, the CAN frames may also be subject to the PASS_FILTERs and BLOCK_FILTERs, where the ProtocolID in the PASSTHRU_MSG structure shall be set to reflect an unformatted CAN frame before it is added to the receive queue. SAE INTERNATIONAL J2534™-2 DEC2020 Page 24 of 146 Only ISO15765 channels will allow the IOCTL configuration parameter CAN_MIXED_FORMAT to be set to either CAN_MIXED_FORMAT_ON or CAN_MIXED_FORMAT_ALL_FRAMES. In these cases, the ProtocolID in the PASSTHRU_MSG structure must reflect an unformatted CAN frame (e.g., CAN, SW_CAN_PS, etc.) for a PASS_FILTER or a BLOCK_FILTER and an ISO15765 message (e.g., ISO15765, SW_ISO15765_PS, etc.) for a FLOW_CONTROL_FILTER. Consult the appropriate SAE J2534 document for the requirements, restrictions, and error conditions for the specific protocol and filter type. This function will return a value of ERR_MSG_PROTOCOL_ID if the ProtocolID is not appropriate for the type of filter being started. Additionally, each time the IOCTL configuration parameter CAN_MIXED_FORMAT is set, all PASS_FILTERs and BLOCK_FILTERs shall be deleted. 8.2.3 IOCTL Section If this feature is not supported on the current ISO15765 channel, the call to get or set the IOCTL configuration parameter CAN_MIXED_FORMAT shall return the value ERR_NOT_SUPPORTED. 8.2.3.1 GET_CONFIG The configuration parameter CAN_MIXED_FORMAT has been defined but it is only applicable to ISO15765 channels. See Table 5 for more details. 8.2.3.2 SET_CONFIG The configuration parameter CAN_MIXED_FORMAT has been defined but it is only applicable to ISO15765 channels. CAN_MIXED_FORMAT configuration parameter is defined in Table 5. Table 5 - IOCTL GET_CONFIG/SET_CONFIG parameter details Parameter CAN_MIXED _FORMAT Valid Values for Parameter 0 (CAN_MIXED_FORMAT_OFF) 1 (CAN_MIXED_FORMAT_ON) 2 (CAN_MIXED_FORMAT_ALL_ FRAMES) Default Value 0 (CAN_MIXED_ FORMAT_OFF) Description For ISO15765 channels only, this enables the transmission and reception of messages with the ProtocolID of ISO15765 or unformatted CAN frames. FLOW_CONTROL_FILTERs will identify messages with the ProtocolID that reflects an ISO15765 message, while PASS_FILTERs and BLOCK_FILTERs will identify messages with the ProtocolID that reflects an unformatted CAN frame. Any time this parameter is set, the transmit and receive queues shall be cleared, all PASS_FILTERs and BLOCK_FILTERs shall be deleted, and periodic messages whose ProtocolID reflects an unformatted CAN frame shall be deleted. 0 = Messages will be treated as ISO15765 only. 1 = Messages will be treated as either ISO15765 or an unformatted CAN frame. 2 = Messages will be treated as ISO15765, an unformatted CAN frame, or both. SAE INTERNATIONAL 8.2.4 Message Structure 8.2.5 Elements J2534™-2 DEC2020 Page 25 of 146 There is no change to any of the elements, but it should be noted that the ProtocolID in the PASSTHRU_MSG structure shall identify the message type (e.g., ISO15765, CAN, SW_ISO15765_PS, SW_CAN_PS, etc.). Consult the appropriate SAE J2534 document for the requirements, restrictions, and error conditions for the specific protocol. 8.3 Discovery Support The device shall report support for mixed format frames on the CAN network through the discovery mechanism defined in Section 25. 9. SINGLE WIRE CAN 9.1 Scope of the Single Wire CAN Optional Feature Information contained in this section will define extensions to a compliant SAE J2534-1 interface to support single wire CAN. 9.2 9.2.1 Pass-Thru System Requirements Pin Usage Single wire CAN is connected to pin 1 of the SAE J1962 connector. Note that when PassThruConnect is called, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG, J1962_PINS is made. 9.3 9.3.1 Win32 Application Programming Interface API Functions - Overview Information contained in this section is intended to define the API resources required to incorporate an optional protocol channel. This channel, identified as single wire CAN (SWCAN), will require hardware and software API support to fully implement this feature. The details on the physical implementation of SWCAN are defined in GMW3089, titled “GMLAN Single Wire CAN Physical and Data Link Layers Specification.” This section outlines the requirements for providing an interface channel supporting this protocol. At a high level, a new ProtocolID has been defined to indicate the use of the single wire CAN physical layer. Unless indicated otherwise, SAE J2534-1 definitions of requirements, restrictions, and error conditions for CAN and ISO15765 protocols will apply to single wire CAN channels. Additionally, flags required to support high-voltage wakeup and high/normal speed are defined as required. The device is required to support high-voltage wakeup and time-critical data rate changes defined in SWCAN specification. This section details the API resources required to enable use of the SAE J2534 API as applied to SWCAN. If this feature is not supported an error code, ERR_NOT_SUPPORTED, will be returned by the call PassThruConnect. The IOCTL and Configuration settings related to SW_CAN speed change and load resistor control are designed for use when the SAE J2534-2 hardware interface is used in either of two modes: 1. As a hardware interface for a flash-programming application. 2. As a hardware interface for any other application that could be used to monitor traffic during a flash-programming event performed by another test tool on the bus. SAE INTERNATIONAL J2534™-2 DEC2020 Page 26 of 146 GMW3110 requires a maximum transition time of 30 ms to switch between bus speeds. Depending on the individual SAE J2534-2 hardware interface and its associated PC communications interface and application processing speed, the 30 ms transition time may or may not be met using speed transition logic that is embedded in the PC application. The IOCTL and configuration settings allow for this speed change logic to be controlled by either the application or the SAE J2534-2 hardware interface itself. Since not all application/SAE J2534-2 interface combinations can control speed transition timing within the GMW3110 specification, a method is required to allow the SAE J2534-2 hardware interface to automatically switch speeds while performing a flash-programming operation. The following example illustrates this sequence: Assume all settings are in the default mode. 1. The application sets the configuration of the SW_CAN_RES_SWITCH parameter - AUTO_RESISTOR. 2. The application sets the configuration of SW_CAN_SPEEDCHANGE_ENABLE - ENABLE_SPDCHANGE. 3. The application sends the correct GMW 3110 HS programming message sequence (0xA5 0x02, 0xA5 0x03). 4. The SAE J2534-2 hardware interface monitors the (0xA5 0x02, 0xA5 0x03) sequence and automatically switches in the load resistor, changes the SWCAN transceiver mode, and reconfigures the CAN controller. Note that this must be accomplished within 30 ms of the 0xA5 0x03 frame. A SW_CAN_HS_RX indication will be generated upon completion of this transition. 5. Upon completion of the flash programming event, the application transmits the return to normal mode command (mode $20). A SW_CAN_NS_RX indication will be generated upon completion of this transition. 6. The SAE J2534-2 hardware interface responds to the return to normal mode command, which reconfigures the CAN controller, changes the transceiver mode, and disconnects the load resistor. Note that this must be accomplished within 30 ms of the transmission of the return to normal mode frame. There are also times when the SAE J2534-2 hardware interface could be used with a separate application to monitor a flash-programming event being performed by another test tool. In this case, the SAE J2534-2 hardware interface would need to be able to perform speed transitions within the GMW3110 specified limit. An SAE J2534-2 hardware interface used in this manner should not connect its load resistor, as this functionality should already be contained in the test tool performing the flash-programming event. The following example illustrates the setup for monitoring such an event: Assume all settings are in the default mode. 1. The application sets the configuration of SW_CAN_SPEEDCHANGE_ENABLE - ENABLE_SPDCHANGE. 2. The SAE J2534-2 hardware interface monitors the (0xA5 0x02, 0xA5 0x03) sequence and automatically changes the SWCAN transceiver mode and reconfigures the CAN controller. (It does not switch in the load resistor.) Note that this must be accomplished within 30 ms of the 0xA5 0x03 frame. A SW_CAN_HS_RX indication will be generated upon completion of this transition. 3. Upon completion of the flash programming event, the SAE J2534-2 hardware interface receives the return to normal mode command (mode $20). A SW_CAN_NS_RX indication will be generated upon completion of this transition. 4. The SAE J2534-2 hardware interface responds to the return to normal mode command, which reconfigures the CAN controller and changes the transceiver mode. Note that this must be accomplished within 30 ms of the transmission of the return to normal mode frame. Although the option of manual load resistor activation (CONNECT_LOAD_RESISTOR) is not shown in any of the above examples, this capability was included to accommodate special test applications that might require this feature. Table 6 summarizes the changes to the SAE J2534-1 API functions. SAE INTERNATIONAL J2534™-2 DEC2020 Page 27 of 146 Table 6 - SAE J2534 API functions Function PassThruConnect PassThruIoctl 9.3.2 9.3.2.1 Description of Change Added new ProtocolID values. Added GET_CONFIG and SET_CONFIG parameters. Added new IOCTLs to support SWCAN capability. API Functions - Detailed Information PassThruConnect When PassThruConnect is called with either the SW_CAN_PS or SW_ISO15765_PS Protocol ID, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG is made to select the desired cable and pins. 9.3.2.2 ProtocolID Values Only the definition and description of the ProtocolID value is defined in Table 7. The actual value is defined in Section 24. Table 7 - ProtocolID descriptions Definition SW_CAN_PS SW_ISO15765_PS SW_CAN_CHx SW_ISO15765_CHx 9.3.2.3 Description Raw single wire CAN messages with pin selection. Single wire CAN adhering to ISO15765-2 flow control with pin selection. Additional channels of raw single wire CAN messages. Additional channels of single wire CAN adhering to ISO15765-2 flow control. PassThruReadMsgs The RxStatus indications identified in 9.4.1.1 will be received for both commanded and automatic speed changes. 9.3.3 IOCTL Section The Protocol IDs SW_ISO15765_PS and SW_ISO15765_CHx support the same IOCTL IDs as defined in the SAE J2534-1 specification for ISO15765. SW_CAN_PS and SW_CAN_CHx support the same IOCTL IDs as defined in the SAE J2534-1 specification for CAN. This section details additional IOCTLs defined in this document. Table 8 provides the details of the IOCTLs available through PassThruIoctl function. SAE INTERNATIONAL J2534™-2 DEC2020 Page 28 of 146 Table 8 - IOCTL details Value of IoctlID SW_CAN_HS SW_CAN_NS 9.3.3.1 InputPtr Represents NULL pointer OutputPtr Represents NULL pointer NULL pointer NULL pointer Purpose Initiates the transition of the SW_CAN channel from SW_CAN_NS (normal speed) mode to SW_CAN_HS (high speed) mode. This transition includes resetting the SW_CAN transceiver mode to the HS setting and changing the SW_CAN controller configuration to the SW_CAN_HS_DATA_RATE. Initiates the transition of the SW_CAN channel from SW_CAN_HS (high speed) mode to SW_CAN_NS (normal speed) mode. This transition includes resetting the SW_CAN transceiver mode to the normal mode setting and changing the SW_CAN controller configuration to the DATA_RATE. GET_CONFIG Support three new parameters added to GET_CONFIG. See 9.3.3.2 and Table 9 for more details. 9.3.3.2 SET_CONFIG The Protocol IDs SW_ISO15765_PS and SW_ISO15765_CHx support the same Get/Set parameter IDs as defined in SAE J2534-1 specification for ISO15765. SW_CAN_PS and SW_CAN_CHx support the same Get/Set parameter IDs as defined in the SAE J2534-1 specification for CAN. This section details additional IOCTLs defined in this document. SW_CAN_HS mode is to be used exclusively for the reprogramming of devices. It requires the coordinated and selective configuration of three pieces of hardware: the load resistor, the SW_CAN transceiver, and the SW_CAN controller. Specific information regarding each piece is as follows: 1. A load resistor is connected to the SW_CAN bus within the tool, which helps compensate for reduced bit times by decreasing the active to passive transition times. To prevent excessive electrical loading of the SW_CAN bus, this feature shall only be activated by the programming device. All other devices or tools used to monitor high-speed communication shall remain in the normal impedance state. 2. The SW_CAN transceiver is placed into a mode which also compensates for the reduced bit times by disabling waveshaping and decreasing the passive to active transition times. 3. The CAN controller is configured to provide the appropriate high-speed data rate. SAE INTERNATIONAL J2534™-2 DEC2020 Page 29 of 146 Table 9 - IOCTL GET_CONFIG/SET_CONFIG parameter details Parameter SW_CAN_HS_DATA_RATE SW_CAN_SPEEDCHANGE_ ENABLE SW_CAN_RES_SWITCH 9.3.3.3 Valid Values for Parameter 5-100000 (Some transceivers support 100k) 0 (DISABLE_SPDCHANGE) 1 (ENABLE_SPDCHANGE) 0 (DISCONNECT_ RESISTOR) 1 (CONNECT_ RESISTOR) 2 (AUTO_ RESISTOR) Default Value (Decimal) 83333 0 0 Description The data rate to be used in response to a call to SW_CAN_HS IOCTL. Control the behavior of the SAE J2534 device in response to speed change SW_CAN messages 0 = Ignore all bus speed transition messages on the bus. 1 = Process transmitted and received bus speed transition messages (refer to GMW3110 Section 10.17.5.2). Control Load Resistor switching 0 = Default value. Disable automatic switching and disconnect load resistor. 1 = Disable automatic switching and connect load resistor. 2 = Automatically switch in the load resistor when transitioning to high speed (and switch off the load resistor while transitioning back to normal speed). SW_CAN_HS The IoctlID value of SW_CAN_HS is used to initiate a transition of the single wire CAN bus to high speed mode. A successful transition will be noted by a SW_CAN_HS_RX indication. The speed transitioned to is the value of the SW_CAN_HS_DATA_RATE parameter. Parameter definition for SW_CAN_HS is defined in Table 10. Table 10 - SW_CAN_HS details Parameter ChannelID IoctlID InputPtr OutputPtr 9.3.3.4 Description Channel ID assigned by DLL during PassThruConnect. Is set to SW_CAN_HS. Is a NULL pointer, as this parameter is not used. Is a NULL pointer, as this parameter is not used. SW_CAN_NS The IoctlID value of SW_CAN_NS is used to initiate a transition of the single wire CAN bus to normal speed mode. A successful transition will be noted by a SW_CAN_NS_RX indication. The speed transitioned to is the value of the DATA_RATE parameter. Parameter definition for SW_CAN_NS is detailed in Table 11. Table 11 - SW_CAN_NS details Parameter ChannelID IoctlID InputPtr OutputPtr Description Channel ID assigned by DLL during PassThruConnect. Is set to SW_CAN_NS. NULL pointer. NULL pointer. SAE INTERNATIONAL 9.4 J2534™-2 DEC2020 Page 30 of 146 Message Structure 9.4.1 Elements The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_MSG_PROTOCOL_ID. (The only exception to this is the mixed format frames feature on a CAN network.) 9.4.1.1 RxStatus This section defines RxStatus bits in addition to the ones defined for CAN/ISO15765 sections of the SAE J2534-1 specification. Definitions for RxStatus bits are defined in Table 12. Table 12 - RxStatus bit definitions 9.4.1.2 Definition SW_CAN_NS_RX RxStatus Bit(s) 18 SW_CAN_HS_RX 17 SW_CAN_HV_RX 16 Description Indicates that the single wire CAN bus has transitioned to normal speed. All communication after this event will occur in normalspeed mode. The message data in this message is undefined. Indicates that the single wire CAN bus has transitioned to high speed. All communication after this event will occur in highspeed mode. The message data in this message is undefined. Indicates that the single wire CAN message received was high-voltage message. Value 0 = no event 1 = transition to normal speed 0 = no event 1 = transition to high speed 0 = normal message 1 = high-voltage message TxFlags This section defines TxStatus bits are in addition to the ones defined for CAN/ISO15765 sections of SAE J2534-1 specification. Table 13 defines the TxFlags bit definition. Table 13 - TxFlags bit definitions Definition SW_CAN_HV_TX TxFlags Bit(s) 10 Description Indicates that the single wire CAN message should be transmitted as a highvoltage message. Simultaneously transmitting in high voltage and high speed mode will result in undefined behavior. Value 0 = normal message 1 = high-voltage message SAE INTERNATIONAL 9.5 J2534™-2 DEC2020 Page 31 of 146 Discovery Support The device shall report support for single wire CAN network and associated parameters through the discovery mechanism defined in Section 25. 10. ANALOG INPUTS 10.1 Scope of the Analog Inputs Optional Feature This section details the extensions to SAE J2534-1 that define the common method of supporting analog input channels. This section details only the changes from SAE J2534-1. Items not specifically detailed in this section are assumed not to have changed. This standard does not specify the timing between the same subsystem or different subsystems. Depending on the device, all the active channel readings could be made simultaneously, or could be spaced out in time. 10.2 Pass-Thru System Requirements 10.2.1 Analog Inputs Information contained in this section will define extensions to a compliant SAE J2534-1 interface. This section specifically defines the common method of supporting analog input channels. 10.2.2 Simultaneous Communication on Multiple Protocols The operation of the A/D subsystem shall be independent of the operation of the communications protocols. The interface must support simultaneous collection of analog data and communication on multiple protocols as specified in SAE J2534-1 and SAE J2534-2. 10.3 Win32 Application Programming Interface 10.3.1 API Functions - Overview Information contained in this section is intended to define the API resources required to incorporate analog input channels on a PassThru device. Analog inputs will require hardware and software API support to fully implement this feature. It allows compliant devices to acquire analog data in an efficient and deterministic manner. Physical connection of the SAE J2534-2 interface to the vehicle is defined by the interface manufacturer. This new feature allows an application to open a connection to an analog subsystem via PassThruConnect. The subsystem parameters can be set via the GET_CONFIG/SET_CONFIG IOCTLs. The actual analog readings can be obtained with PassThruReadMsgs, using the ChannelID from PassThruConnect. Table 14 summarizes the changes to the SAE J2534-1 API functions. Table 14 - SAE J2534 API functions Function PassThruConnect PassThruReadMsgs PassThruIoctl Description of Change Add new ProtocolID values. Format of returned analog readings. Add new configuration parameters to control A/D. 10.3.2 API Functions - Detailed Information 10.3.2.1 PassThruConnect The new protocol identifiers ANALOG_IN_1 through ANALOG_IN_32 connect to analog subsystems. Each subsystem can have up to 32 discrete equivalent channels, allowing for as many as 1024 analog inputs to be supported. SAE INTERNATIONAL J2534™-2 DEC2020 Page 32 of 146 The various parameters (such as sample rate and averaging method) apply to all channels within a subsystem. The parameters can be different on different subsystems. A device with eight A/D channels should have eight subsystems only if each A/D channel can be controlled independently. The device should have one subsystem if all eight channels must have the same sample rate. ProtocolIDs beyond those supported by the device shall return ERR_NOT_SUPPORTED. 10.3.2.2 ProtocolID Values Only the definition and description of the ProtocolID value is defined Table 15. The actual value is defined in section titled “SAE J2534-2 Resource.” Protocol values for the analog feature are identified in Table 15. Table 15 - ProtocolID values Definition ANALOG_IN_1 ANALOG_IN_2 ANALOG_IN_3 … ANALOG_IN_32 Description Analog subsystem 1 Analog subsystem 2 Analog subsystem 3 … Analog subsystem 32 10.3.2.3 PassThruReadMsgs To the application, each analog subsystem appears like all the other vehicle protocols. An analog subsystem will periodically generate PASSTHRU_MSG structures which are placed in the queue where the application can read them. The normal PassThruReadMsg features, such as waiting (using timeout) and gathering multiple messages (using *pNumMsgs) are supported. See the Message Structure sub-sections for the formatting of the samples within a message. 10.3.2.4 PassThruWriteMsgs This function will return ERR_NOT_SUPPORTED if passed a ChannelID opened for analog input. 10.3.2.5 PassThruStartPeriodicMsg This function will return ERR_NOT_SUPPORTED if passed a ChannelID opened for analog input. 10.3.2.6 PassThruStartMsgFilter This function will return ERR_NOT_SUPPORTED if passed a ChannelID opened for analog input. 10.3.3 IOCTL Section Each analog subsystem shall support 3 IOCTL functions: GET_CONFIG, SET_CONFIG, and CLEAR_RX_BUFFER. The CLEAR_RX_BUFFER IOCTL shall remove any queued messages for the subsystem. 10.3.3.1 GET_CONFIG There are several new parameters that are used to setup and control the A/D subsystem. See Table 16 for more details. 10.3.3.2 SET_CONFIG The following parameters control the analog subsystem. Note that there is no way to set parameters for each channel individually. See Table 16 for more details. SAE INTERNATIONAL J2534™-2 DEC2020 Page 33 of 146 Table 16 - IOCTL GET_CONFIG/SET_CONFIG parameter details Parameter ACTIVE_CHANNELS SAMPLE_RATE SAMPLES_PER_READING READINGS_PER_ MSG AVERAGING_METHOD SAMPLE_RESOLUTION INPUT_RANGE_LOW INPUT_RANGE_HIGH Valid Values for Parameter 0 - 0xFFFFFFFF 0 - 0xFFFFFFFF 1 - 0xFFFFFFFF 1 - 0x00000408 (1 - 1032) 0 - 0xFFFFFFFF Default (decimal) Hardware dependent 0 1 1 0 0x1-0x20 (1 - 32) 0x80000000 - 0x7FFFFFFF (-2147483648 - 2147483647) Hardware dependent Hardware dependent 0x80000000 - 0x7FFFFFFF (-2147483648 - 2147483647) Hardware dependent Description Bitmask of channels being sampled Samples/second or seconds/sample Samples to average into a single reading Number of readings for each active channel per PASSTHRU_MSG structure The way in which the samples will be averaged The number of bits of resolution for each channel in the subsystem (read only) Lower limit in millivolts of A/D input (example: 0xFFFFB1E0 = -20.00V) (read only) Upper limit in millivolts of A/D input (example: 20000 = +20.00V) (read only) 10.3.3.2.1 ACTIVE_CHANNELS The ACTIVE_CHANNELS parameter controls the number of channels that are actively read into the PASSTHRU_MSG structure. The ACTIVE_CHANNELS parameter is a 32-bit unsigned long bit mask. Each bit that is set indicates that the corresponding channel is active. Changes to the ACTIVE_CHANNELS take effect after the completion of the current message (i.e., specified readings per message). The interface must reject combinations of ACTIVE_CHANNELS and READINGS_PER_MSG that would result in a message that is larger than the size of a PASSTHRU_MSG structure (1032 data points). In this case, the error returned shall be ERR_INVALID_IOCTL_VALUE. The interface may not reject valid combinations of ACTIVE_CHANNELS and READINGS_PER_MSG. The default value for ACTIVE_CHANNELS is for all available channels to be active. For example, a subsystem with seven channels will set ACTIVE_CHANNELS to 0x7F (127) initially. Trying to set bits for channels that don’t exist will return error ERR_INVALID_IOCTL_VALUE. 10.3.3.2.2 SAMPLE_RATE The SAMPLE_RATE parameter sets the number of samples per second or the number of seconds per sample for each of the active channels. If the SAMPLE_RATE is less than 0x80000000, then the SAMPLE_RATE represents the number of samples per second. For example, 0x7D0 represents 2000 samples/second for each channel. On the other hand, values above 0x80000000 represent seconds per sample (minus the most significant bit). For example, 0x8000000A would be one sample on each channel every 10 seconds. Note that 0x80000001 is the same as 0x00000001. 0x80000000 should be treated the same as 0. Setting this value to zero has the effect of disabling the associated A/D subsystem. No new messages will be queued, but the existing messages will not be cleared. If the device does not support the requested sample rate, the device must return ERR_INVALID_IOCTL_VALUE. Changes to this value take effect at the end of the current cycle or immediately if the subsystem was disabled. The default value for SAMPLE_RATE is zero (subsystem disabled). NOTE: Setting SAMPLE_RATE to 0 value will stop the data streaming. SAE INTERNATIONAL J2534™-2 DEC2020 Page 34 of 146 10.3.3.2.3 SAMPLES_PER_READING The SAMPLES_PER_READING parameter sets the number of samples per reading. AVERAGING_METHOD determines how the reading will be derived from the collected samples. The parameter As you increase the SAMPLES_PER_READING, you increase the number of samples required to fill a PASSTHRU_MSG structure. For example, setting SAMPLES_PER_READING to three (without changing other parameters) will make the messages come three times slower. If the device does not support the requested value, the device must return ERR_INVALID_IOCTL_VALUE. The device must support the default value of one, even if the device does not support averaging. A value of one means that averaging is off. The default value for SAMPLES_PER_READING is one. The return code ERR_NOT_SUPPORTED will be returned if the sample rate is not zero. 10.3.3.2.4 READINGS_PER_MSG The READINGS_PER_MSG parameter sets the number of readings of each active channel that will be placed in a PASSTHRU_MSG structure. The readings will be placed in the PASSTHRU_MSG message in channel order starting from lowest active channel to highest active channel. This format will repeat “READINGS_PER_MSG” times. The interface must reject combinations of ACTIVE_CHANNELS and READINGS_PER_MSG that would result in a message that is larger than the size of a PASSTHRU_MSG structure (1032 data points). In this case, the error returned shall be ERR_INVALID_IOCTL_VALUE. The interface shall not reject valid combinations of ACTIVE_CHANNELS and READINGS_PER_MSG. Setting this value to zero has the effect of disabling the associated A/D subsystem. Changes to this value take affect at the end of the current cycle or immediately if the subsystem was disabled. The default value for READINGS_PER_MSG is one. The return code ERR_NOT_SUPPORTED will be returned if the sample rate is not zero. 10.3.3.2.5 AVERAGING_METHOD When SAMPLES_PER_READING is above one, each reading will consist of several samples. The AVERAGING_METHOD specifies how each reading will be computed. If the device does not support a particular value, ERR_INVALID_IOCTL_VALUE shall be returned. The default value (SIMPLE_AVERAGE) must be supported, even if the device does not support averaging. See Table 17 for more details. Table 17 - Values for the AVERAGING_METHOD parameter Method SIMPLE_AVERAGE MAX_LIMIT_AVERAGE MIN_LIMIT_AVERAGE MEDIAN_AVERAGE (SAE J2534-2 reserved) (Vendor Reserved) Value 0x00000000 0x00000001 0x00000002 0x00000003 0x00000004 - 0x7FFFFFFF 0x80000000 - 0xFFFFFFFF Description Simple arithmetic mean Choose the biggest value Choose the lowest value Choose arithmetic median Reserved Specific to the vendor SAE INTERNATIONAL 10.3.3.2.5.1 J2534™-2 DEC2020 Page 35 of 146 SIMPLE_AVERAGE The SIMPLE_AVERAGE is the arithmetic average of SAMPLES_PER_READINGS samples. In other words: Reading = (Sample1 + Sample2 + ... + SampleSAMPLES_PER_READING)/SAMPLES_PER_READING 10.3.3.2.5.2 MAX_LIMIT_AVERAGE The MAX_LIMIT_AVERAGE simply chooses the maximum value. Reading = Max (Sample1 + Sample2 + ... + SampleSAMPLES_PER_READING) 10.3.3.2.5.3 MIN_LIMIT_AVERAGE The MIN_LIMIT_AVERAGE simply chooses the minimum value. Reading = Min (Sample1 + Sample2 + ... + SampleSAMPLES_PER_READING) 10.3.3.2.5.4 MEDIAN_AVERAGE The MEDIAN_AVERAGE chooses the median value. Sort the samples, then compute: Reading = Sample(SAMPLES_PER_READING+1)/2 Or if SAMPLES_PER_READING is even: Reading = (SampleSAMPLES_PER_READING/2 + Sample(SAMPLES_PER_READING/2)+1 )/2 10.3.3.2.5.5 Vendor-specific Averaging Methods Vendors are free to add their own averaging methods. They should use the range provided so they do not conflict with extensions to this standard. 10.3.3.2.6 SAMPLE_RESOLUTION This read-only parameter indicates the number of bits of resolution that the A/D channels have in this subsystem. For example, a 12-bit A/D would return 12. Attempting to set this parameter shall return the value ERR_INVALID_IOCTL_PARAM_ID. 10.3.3.2.7 INPUT_RANGE_LOW This signed, read-only parameter indicates the lower limit of the A/D subsystem. For example, an A/D subsystem that can measure voltages from -20.0V to +36V would return -20000 (0xFFFFB1E0). Attempting to set this parameter shall return the value ERR_INVALID_IOCTL_PARAM_ID. 10.3.3.2.8 INPUT_RANGE_HIGH This signed, read-only parameter indicates the upper limit of the A/D subsystem. For example, an A/D subsystem that can measure voltages from -20.0V to +36V would return 36000 (0x00008CA0). Attempting to set this parameter shall return the value ERR_INVALID_IOCTL_PARAM_ID. 10.3.3.3 CLEAR_RX_BUFFER The device shall remove any queued messages for the subsystem. SAE INTERNATIONAL J2534™-2 DEC2020 Page 36 of 146 10.4 Message Structure When a set of readings is ready, the device will queue a PASSTHRU_MSG structure for the application to read. This section specifies how to fill in that structure: • ProtocolID contains the analog protocol that was connected (i.e., ANALOG_IN_1). • RxStatus contains the overflow flags (see 10.4.2). • TxFlags shall be zero and should be ignored by the application. • Timestamp contains the time stamp of the first set of readings in the message. The application can calculate the timestamp of the remaining readings. The timestamp must correlate with the timestamp of normal message traffic. • DataSize contains the number of bytes that the readings take up in the message. DataSize must be a multiple of 4 between 4 (a single reading) and 4128 (a full message), inclusive. The value of DataSize can be computed as READINGS_PER_MSG * (# bits set in ACTIVE_CHANNELS). • Data[] contains the actual readings. The formatting of the data depends on the various parameters: â—‹ Each reading will take 4 bytes (32 bits), signed little endian format in millivolts. â—‹ All active channels in the subsystem (and only channels marked active) are represented. Each active channel is appended in order (starting from lowest active channel to highest active channel). â—‹ This format will repeat READINGS_PER_MSG times. 10.4.1 Examples The SAE J2534 device assumed for this example has two analog input subsystems that it supports via protocols ANALOG_IN_1 and ANALOG_IN_2. The ANALOG_IN_1 subsystem provides four 16-bit A/D converters. The ANALOG_IN_2 subsystem provides two 24-bit A/D converters. Tables 18 to 23 provide examples of different parameters and the resulting structures. Table 18 - Sample A/D parameter configuration Parameter ACTIVE_CHANNELS Value for ANALOG_IN_1 0xF Value for ANALOG_IN_2 3 SAMPLE_RATE 2 0x80000005 SAMPLES_PER_READING 1 1 READINGS_PER_MSG 1 1 AVERAGING_METHOD 1 1 SAMPLE_RESOLUTION 16 24 This example uses the default values, except that a SAMPLE_RATE has been set for both subsystems. The first subsystem generates the following data twice per second: NOTE: Only the PASSTHRU_MSG Data[] array is shown. Each box represents a 4-byte sample. Table 19 - Data from ANALOG_IN_1 subsystem with READINGS_PER_MSG = 1 Channel 1 Sample 1 Channel 2 Sample 1 Channel 3 Sample 1 Channel 4 Sample 1 SAE INTERNATIONAL J2534™-2 DEC2020 Page 37 of 146 The second subsystem generates the following data once every 5 seconds: Table 20 - Data from ANALOG_IN_2 subsystem with READINGS_PER_MSG = 1 Channel 1 Sample 1 Channel 2 Sample 1 Changing the READINGS_PER_MSG parameter on each channel from 1 to 2 changes the format and the rate of messages. The first subsystem now generates this message once per second: Table 21 - Data from ANALOG_IN_1 subsystem with READINGS_PER_MSG = 2 Channel 1 Sample 1 Channel 2 Sample 1 Channel 3 Sample 1 Channel 4 Sample 1 Channel 1 Sample 2 Channel 2 Sample 2 Channel 3 Sample 2 Channel 4 Sample 2 The second subsystem now generates this message every 10 seconds: Table 22 - Data from ANALOG_IN_2 subsystem with READINGS_PER_MSG = 2 Channel 1 Sample 1 Channel 2 Sample 1 Channel 1 Sample 2 Channel 2 Sample 2 Changing the ACTIVE_CHANNELS on subsystem 1 to 0xB (11 decimal, 1011 binary) disables channel 3. In this case, the structure would now be: Table 23 - Data from ANALOG_IN_1 subsystem with ACTIVE_CHANNELS = 0xB Channel 1 Sample 1 Channel 2 Sample 1 Channel 4 Sample 1 Channel 1 Sample 2 Channel 2 Sample 2 Channel 4 Sample 2 10.4.2 Message Flag and Status Definitions Definitions for RxStatus bits are shown in Table 24. Table 24 - RxStatus bit definitions Definition OVERFLOW RxStatus Bit(s) 16 Description Indicates that the input range of the A/D has been exceeded on one or more samples in the received message Value 0 = All samples good 1 = Some samples clipped 10.4.3 DLL Installation and Registry A registry key ANALOG_IN_x indicates the support for an analog sub-system where <x> indicates the sub-system number. Example: ANALOG_IN_3 indicates support for Analog Sub-System #3, which can have up to 32 analog input channels. In the case of devices which contain dynamic hardware architecture, an application will be able to determine the lack of runtime ANALOG_IN_x support when ERR_NOT_SUPPORTED is returned from a PassThruConnect(). The registry entries are retained for support of legacy applications. New applications shall use the discovery mechanism defined Section 25. 10.5 Discovery Support The device shall report support for Analog channels and associated parameters through the discovery mechanism defined in Section 25. SAE INTERNATIONAL J2534™-2 DEC2020 Page 38 of 146 11. GM UART (SAE J2740) 11.1 Scope of the GM UART Optional Feature Information contained in this section will define extensions to a compliant SAE J2534-1 interface. This section specifically defines the common method of supporting GM’s UART protocol as defined in SAE J2740. 11.2 Pass-Thru System Requirements 11.2.1 Pin Usage All GM vehicles built since the 1996 model year, and a few built during the 1995 model year, have been equipped with an SAE J1962 connector. GM UART uses either pin 9 or pin 1 of this connector. Typically, SAE J1962 pin 9 (primary) is used while SAE J1962 pin 1 (secondary) is occasionally used. As with all SAE J2534-2 optional protocols, no default pin is identified; therefore, the application developer will be required to set the pin to be used. Refer to SAE J1962 for discussion of pin usage. Most GM vehicles with serial data links built prior to the 1996 model year are equipped with a 12-pin connector as shown in Figure 3. The mating tool connector is shown in Figure 4. For programming these older vehicles using an SAE J2534 interface, a 12-pin connector must be available instead of an SAE J1962 connector to interface to the vehicle. The signal ground (pin 5 on an SAE J1962 connector) must be connected to pin A of the 12-pin connector. The serial data line (pin 9 on an SAE J1962 connector) must be connected to pin M of the 12-pin connector. The 12-pin connector does not contain battery power, so the SAE J2534 interface cannot be powered from the 12-pin connector. Figure 3 - 12-pin vehicle connector Figure 4 - 12-pin tool connector 11.3 Win32 Application Programming Interface 11.3.1 API Functions - Overview Information contained in this section is intended to define the API resources required to incorporate an optional protocol channel. This protocol, identified as the GM UART protocol, will require software API support and hardware to fully implement this feature. At a high level, the ProtocolID GM_UART_PS and GM_UART_CHx have been defined to indicate the physical layer. The protocol defines a master/slave relationship between the tester and the electronic control unit (ECU). The tester must request and be granted mastership over the vehicle bus before communications can begin. This section details the API resources required to enable use of the SAE J2534 API as applied to GM UART protocol. If the feature is not supported, an error code, ERR_NOT_SUPPORTED, will be returned by the call to PassThruConnect. SAE INTERNATIONAL J2534™-2 DEC2020 Page 39 of 146 Generally, vehicle bus mastership is accomplished by calling the PassThruIoctl function BECOME_MASTER which monitors the vehicle bus for a poll message and when the poll message is received, a poll response message is returned. Upon receiving the poll response message, the current master will relinquish mastership to sender. However, in some vehicles, there is no poll message, so the SAE J2534 device will be instructed by the application to send the poll response message immediately. Prior to calling the PassThruIoctl function BECOME_MASTER, the application will first listen to the communication link (using PassThruReadMsgs function) to determine if a tester polling message exists, the type of the polling message (3 byte or 4 byte), and the Device ID of the polling device (4-byte poll only). Using this data, the application will call the PassThruIoctl function SET_POLL_RESPONSE to define the poll response message. The application then calls the BECOME_MASTER function to direct the interface to either wait for a poll message with the same Message ID Byte (MIB) as specified in the poll_ID parameter passed to the BECOME_MASTER command, or to send the poll response message immediately (depending upon the poll ID specified). Table 25 summarizes the changes to the SAE J2534-1 API functions. Table 25 - SAE J2534 API functions Function PassThruConnect PassThruIoctl Description of Change Added new ProtocolID values. Added new PassThruIoctl sub-functions SET_POLL_RESPONSE and BECOME_MASTER. 11.3.2 API Functions - Detailed Information 11.3.2.1 PassThruConnect When PassThruConnect is called with the GM_UART_PS Protocol ID, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG is made to select the desired cable and pins. 11.3.2.1.1 ProtocolID Values (GM UART) One additional ProtocolID Value has been defined. Only the definition and description of the ProtocolID value is defined in Table 26. The actual value is defined in Section 24. Table 26 - Protocol ID values Definition GM_UART_PS GM_UART_CHx Description GM UART protocol with pin selection Additional channels of GM UART protocol 11.3.3 IOCTL Section Table 27 provides the details on the IOCTLs available through the PassThruIoctl function. SAE INTERNATIONAL J2534™-2 DEC2020 Page 40 of 146 Table 27 - IOCTL details Value of IoctlID SET_POLL_RESPONSE BECOME_MASTER InputPtr Represents Points to SBYTE_ARRAY which contains the poll response message Poll ID: 0 - don’t wait for poll message or Non-zero - wait for poll ID value OutputPtr Represents NULL pointer NULL pointer Purpose Defines poll response message. Waits for valid poll message and upon receipt transmits poll response message if POLL_ID does not equal zero. If Poll ID is zero, poll response message is sent immediately (no wait). 11.3.3.1 SET_POLL_RESPONSE Details of the SET_POLL_RESPONSE are shown in Table 28. The IoctlID parameter of SET_POLL_RESPONSE is used to define the poll response message. Typically, the poll response message is a “Disable Normal Communications” (Mode 8) message, but this will be set by the application. Table 28 - SET_POLL_RESPONSE details Parameter ChannelID IoctlID InputPtr OutputPtr Description Channel ID assigned by DLL during PassThruConnect. Is set to SET_POLL_RESPONSE Points to unsigned char PollResponseMsg[100] NULL pointer See Table 29 for a typical 4-byte poll response message example: Table 29 - Poll response message Byte 1 2 3 4 Value F4 56 08 CS Description Message ID (MIB) Message length (not including message ID OR CHECKSUM) + 0X55 ALDL Mode ID CHECKSUM The poll response message shall be sent by the interface upon the receipt of a tester poll message. There are two types of tester poll messages based on length. The 4-byte type includes a device ID while the 3-byte type does not. The two types are described are described in Tables 30 and 31. Table 30 - Typical 3-byte type poll message Byte 1 2 3 Value F0 55 CS Description Message ID (MIB) Message length (not including message ID or CHECKSUM) + 0X55 CHECKSUM SAE INTERNATIONAL J2534™-2 DEC2020 Page 41 of 146 Table 31 - Typical 4-byte type poll message Byte 1 2 3 4 Value F0 56 F4 CS Description Message ID (MIB) Message length (not including message ID or CHECKSUM) + 0X55 Device ID CHECKSUM 11.3.3.2 BECOME_MASTER The IoctlID value of BECOME_MASTER will transmit the Poll Response Message as identified in the SET_POLL_RESPONSE function depending upon which of the two modes it is functioning under. The two functional modes are: 1. Polling mode, where the poll response message begins within 1.42 ms after receipt of a valid poll message (start of transmission is in 1.42 ms). Refer to SAE J2740 for more details. 2. Non-polling mode, where the poll response message is sent out immediately. Specifying a Poll_ID parameter value of zero puts BECOME_MASTER into non-polling mode, while a Poll_ID parameter of non-zero puts BECOME_MASTER into polling mode. If in polling mode, BECOME_MASTER will scan incoming messages for one with a Message ID equal to the Poll_ID parameter value specified in the BECOME_MASTER command. Upon receipt of a valid poll message, BECOME_MASTER will respond by transmitting the poll response message, or, if no poll message is received within 2 seconds, the function will return to the caller with an ERR_FAILED error. In the event that the poll response message was successfully transmitted, the BECOME_MASTER function will return STATUS_NOERROR. See Table 32 for BECOME_MASTER detail. When a poll message is received, it may be either a 4-byte type (containing device ID) or a 3-byte type (no device ID). Table 32 - BECOME_MASTER detail Parameter ChannelID IoctlID InputPtr OutputPtr Description Channel ID assigned by DLL during PASSTHRUCONNECT Is set to BECOME_MASTER Points to unsigned char Poll_ID (Value to be compared to Poll Message MIB) NULL pointer Figure 5 defines the generalized process flow of obtaining bus mastership and is included for information only. Most of this logic will be included in the reprogramming application and does not need to be incorporated into an SAE J2534-2 device and driver. SAE INTERNATIONAL J2534™-2 DEC2020 There are three scenarios that occur on GM UART communications link. 1. There is no Bus master to send a poll message to the tester. In this case the tester may begin communications without receiving a poll message. 2. The bus master sends a 3 byte poll message to tester 0xF0 0x55 CS (CS is the two's comp check sum of all bytes proceeding the check sum). The tester responds to this message with 0xF0 0x55 CS. 3. The bus master sends a 4 byte poll message to tester 0xF0 0x56 ID CS (ID is the bus masters message ID). The tester responds to this message with 0xID 0x56 0x08 CS. Poll message length = 4 bytes ? GM UART Start Communications Logic Check for bus masters poll message to tester. Poll message received ? Yes Yes Insert byte 3 from received message into byte 1 of Mode 8 message and send it to the bus master. No Retransmit the received message Begin communications with target module. Page 42 of 146 Begin communications with target module. When communications with target are complete, insert byte 3 form poll message into byte 1 of mode 0 and send mode 0 to the bus master. When communications with target are complete, insert 0xF0 into byte 1 of mode 0 and send mode 0 to the bus master Done Figure 5 - Process flow for obtaining bus mastership No No Has it been 1 second since starting to look for a poll message? Yes Begin communications with target module. When communications with target are complete, nothing needs to be done. SAE INTERNATIONAL J2534™-2 DEC2020 Page 43 of 146 11.4 Message Structure 11.4.1 Elements The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_MSG_PROTOCOL_ID. 11.4.2 Message Data Formats One additional protocol has been added and is defined in Table 33. Table 33 - Allowed message sizes per protocol Protocol ID GM_UART_PS or GM_UART_CHx Min Tx 3 Max Tx 170 Min Rx 3 Max Rx 170 Notes 3 header bytes containing destination ID, source ID and length. Length will be the actual length plus 0x55. Messages can contain 0 data bytes. 11.5 DLL Installation and Registration Upon device installation, a key will be set in the appropriate registry folder to indicate the support for the GM UART protocol. In the case of devices which contain dynamic hardware architecture, an application will be able to determine the lack of runtime support when an error is returned from a PassThruConnect(). The registry entries are retained for support of legacy applications. New applications shall use the discovery mechanism defined in Section 25. 11.6 Discovery Support The device shall report support for the GM UART protocol and associated parameters through the discovery mechanism defined in Section 25. 12. UART ECHO BYTE PROTOCOL 12.1 Scope of the UART Echo Byte Protocol Optional Feature This section details the extensions to an SAE J2534-1 interface that will allow support of the UART Echo Byte protocol. This section details only the changes from SAE J2534-1. Items not specifically detailed in this section are assumed not to have changed from SAE J2534-1 12.2 Pass-Thru System Requirements 12.2.1 Simultaneous Communication on Multiple Protocols Support for simultaneous communication of UART Echo Byte protocol with other protocols shall be equivalent to the definition for ISO9141 in SAE J2534-1. 12.2.2 Pin Usage VW and Audi use of UART Echo Byte is connected to pin 7 of the SAE J1962 connector. As with all SAE J2534-2 optional protocols, no default pin is identified. Therefore, the application developer will be required to set the pin to be used. See Section 6 for details of the method used to switch SAE J1962 pins. SAE INTERNATIONAL J2534™-2 DEC2020 Page 44 of 146 12.3 Win32 Application Programming Interface 12.3.1 API Functions - Overview Feature Implementation Summary: This feature supports a UART based protocol that uses an ISO9141 K line physical layer interface. Refer to SAE J2809 Honda ABS/VSA or SAE J2818 KWP 1281 for the detailed protocol information. ECU wakeup is done by a variation of the ISO9141-2 5 baud wakeup sequence, where the transmission of the inverse of the wakeup address by the ECU is replaced by the transmission of an ECU ID message. A key feature of the protocol is the byte echo scheme employed for every tester and ECU transmission. Following the transmission of each byte from the source device, the destination device responds with the complement of the received byte. This interleaved sequence continues until the complete message has been transmitted by the source device. The guidelines to implement this communication capability to SAE J2534-2 API are shown below: • The interface shall receive and check the echo bytes returned from ECU during transmitting request message. • Echoed bytes received from the ECU during a transmission by the interface shall not be returned to the application. • Echo bytes generated by the interface when receiving a message from the ECU shall not be returned to the application. • When any error is detected in transmitting a request message as defined in the “Error Handling During Normal Communication” sections of SAE J2809 or SAE J2818, the interface shall retransmit the failed message. If two subsequent retransmissions fail, the error shall be indicated to the application (i.e., ERR_TIMEOUT is returned in case of a blocking write). To account for this, the application should set the PassThruWriteMsgs timeout to a value that accounts for the possibility of the three transmission attempts by the interface. • The interface shall automatically transmit the echo bytes when receiving a response message. • For response messages, if the interface detects ETX (the last byte) in response message lost, the interface shall wait for two times UEB_T7_MAX to receive possible repeat transmission of the response message from the ECU. Following two times the value of UEB_T7_MAX expiry, the response message with absent ETX shall be queued (in this case, the application will detect loss of ETX and request the interface to transmit a No Acknowledge message). • For a message to be valid, bytes at least up to ETX (excluding ETX) must be received. Otherwise, the message will be discarded. • The message counter (the second byte of messages) shall be generated and controlled by the application. • The application is responsible for handling received No Acknowledge messages from the ECU and repeating transmission of the requested message. • The interface shall discard any bytes received unexpectedly, i.e., outside the bounds of an in-progress receive message. The interface is not required to transmit Acknowledge messages to the ECU, except in the case of the ECU ID receive mechanism described in 12.3.3.2. Messages passed to PassThruWriteMsgs by the application will include all message data bytes, including ETX. All received message bytes including ETX shall be queued by the interface for retrieval by calls to PassThruReadMsgs. Support for the UART Echo Byte protocol is achieved by the addition of a new ProtocolID, modified behavior of FIVE_BAUD_INIT and a new low-level implementation for transmission and reception of messages. This protocol identified as UART_ECHO_BYTE_PS or UART_ECHO_BYTE_CHx requires additional API and device software support, but no additional hardware compared with a standard SAE J2534-1 device. SAE INTERNATIONAL J2534™-2 DEC2020 Page 45 of 146 If UART Echo Byte protocol feature is not supported, ERR_NOT_SUPPORTED will be returned by the call PassThruConnect. The calling application will be required to notify the user that this optional feature may not be supported by the interface. The SAE J2534-2 Repeat Messaging feature shall not be supported on this protocol as it is not feasible for the interface to correctly maintain MessageCounter values. 12.3.2 API Change List Table 35 summarizes the changes to the SAE J2534-1 API functions. Table 34 - SAE J2534 API functions Function PassThruConnect PassThruWriteMsgs PassThruStartPeriodicMsg PassThruIoctl Description of Change Added new ProtocolID values. This function only accepts one message at a time, i.e., pNumMsgs must always be 1. This function is not supported. FIVE_BAUD_INIT is enhanced. New configuration parameters are added. NOTE: There is no change to PassThruStartMsgFilter function. However, the interface shall participate in the echoed byte receive process for all received messages, regardless of any filter settings. Standard SAE J2534-1 filtering shall be applied to all completed messages received by the interface. 12.3.3 API Functions - Detailed Information 12.3.3.1 PassThruConnect When PassThruConnect is called with the UART_ECHO_BYTE_PS Protocol ID, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG is made to select the desired cable and pins. 12.3.3.1.1 C/C++ Prototype There are no changes defined for the function prototype. 12.3.3.1.2 Parameters There are no changes to the parameters. 12.3.3.1.3 Connect Flag Values There are no changes to the connect flags. 12.3.3.1.4 ProtocolID Values Only the definition and description of the ProtocolID value is defined in Table 35. The actual value is defined in Section 24. Table 35 - Protocol ID values Definition UART_ECHO_BYTE_PS UART_ECHO_BYTE_CHx Description Honda ABS/VSA described in SAE J2809, or KWP1281 described in SAE J2818, with pin selection Additional channels of Honda ABS/VSA described in SAE J2809 or KWP1281 described in SAE J2818 SAE INTERNATIONAL J2534™-2 DEC2020 Page 46 of 146 12.3.3.2 PassThruWriteMsgs 12.3.3.2.1 C/C++ Prototype There are no changes defined for the function prototype. 12.3.3.2.2 Parameters Due to the MessageCounter being incremented alternately by tester and ECU, multiple messages cannot be transmitted by a single call to PassThruWriteMsgs. Therefore, the only acceptable value for *pNumMsgs is one. If value pointed to by pNumMsgs is greater than one, ERR_EXCEEDED_LIMIT shall be returned. 12.3.3.3 PassThruStartPeriodicMsg This function is not supported on this protocol as it is not feasible for the interface to correctly maintain MessageCounter values. If this function is called, ERR_NOT_SUPPORTED shall be returned. 12.3.4 IOCTL Section 12.3.4.1 SET_CONFIG and GET_CONFIG Additional Parameters Ten new configuration parameters will be added to support UART Echo Byte protocol. Table 36 - SET_CONFIG and GET_CONFIG additional parameters SAE J2534-2 Parameter UEB_T0_MIN UEB_T1_MAX UEB_T2_MAX UEB_T3_MAX UEB_T4_MIN UEB_T5_MAX UEB_T6_MAX Valid Values 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 ms per bit) Default Values 10 400 200 200 1 1000 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 ms per bit) 200 UEB_T7_MAX 0X0 - 0XFFFF (1 ms per bit) 40 UEB_T9_MIN 0X0 - 0XFFFF (1 ms per bit) 1 UEB_T7_MIN 1 Description Minimum idle time before the start of transmission of the address byte. Maximum time between correct stimulation and start of the synchronization byte. Maximum time between synchronization byte and key-byte 1. Maximum time between key-byte 1 and key-byte 2. Minimum time between key-byte 2 and complement key-byte 2. Maximum time between key-byte 2 and the renewed output of the synchronization byte. (If complement key-byte 2 incorrectly received by control unit.) Maximum time between key-byte 2 and start of ECU identification. Minimum time between bytes within a message (i.e., between a byte from the ECU and its complement from the interface). Maximum time between bytes within a message (i.e., between a byte from the interface and its complement from the ECU). Minimum time between end of a message and start of the next message The DATA_RATE parameter shall also be supported, and the default value shall be 9600 bps. SAE INTERNATIONAL J2534™-2 DEC2020 Page 47 of 146 No other SAE J2534-1 defined configuration parameters are supported with the exception of SAE J1962_PINS. Table 37 translates the UART Echo Byte protocol configuration parameters to the SAE J2809 and SAE J2818 parameters. Table 37 - Parameter translation table SAE J2534-2 Parameter UEB_T0_MIN SAE J2809 Parameter t0 SAE J2818 Parameter T_R0 UEB_T1_MAX t1 t_r1 UEB_T2_MAX t2 t_r2 UEB_T3_MAX t3 t_r3 UEB_T4_MIN t4 t_r4 UEB_T5_MAX t5 t_rkmax UEB_T6_MAX t6 t_r5 UEB_T7_MIN t7 minimum t_r6 UEB_T7_MAX t7 maximum t_r8 max UEB_T9_MIN t9 t_rb Description Minimum idle time before the start of transmission of the address byte. Maximum time between correct stimulation and start of the synchronization byte. Maximum time between synchronization byte and key-byte 1. Maximum time between key-byte 1 and key-byte 2. Minimum time between key-byte 2 and complement key-byte 2. Maximum time between key-byte 2 and the renewed output of the synchronization byte. (If complement key-byte 2 incorrectly received by control unit.) Maximum time between key-byte 2 and start of ECU identification. Minimum time between bytes within a message (i.e., between a byte from the ECU and its complement from the interface). Maximum time between bytes within a message (i.e., between a byte from the interface and its complement from the ECU). Minimum time between end of a message and start of the next message. 12.3.4.2 FIVE_BAUD_INIT The interface to the IOCTL function is identical to the definition in SAE J2534-1. However, as described in the Telegram-Specific Overview section of SAE J2809, or Stimulation and Initialization section of SAE J2818, the transmission of the key-byte 2 is followed by the transmission of a two-part ECU ID message. The ECU ID message following 5-baud initialization shall be received and checked for correct timing by the interface, before indicating success of the initialization process. Then the ECU ID message shall be discarded by the interface. Note that that interface shall not use the synchronization byte to set the baud rate. The baud rate shall be as specified by the DATA_RATE parameter. The interface shall not support the initialization retry strategy initiated by the control unit’s retransmission of the synchronization byte, described in the Communication Set-Up section of SAE J2809 or SAE J2818. The sequence of the ECU ID message output is shown below. Note that the echoed complement bytes are omitted in the example data streams below: • First part of the identification message is transmitted by the ECU. Example: 0x0F 0x01 0xF6 0x30 0x32 0x36 0x35 0x39 0x35 0x30 0x30 0x31 0x34 0x20 0x20 0x03 • The interface sends an Acknowledge message. Example: 0x03 0x02 0x09 0x03 SAE INTERNATIONAL • J2534™-2 DEC2020 Page 48 of 146 The ECU sends the second part of the identification message. Example: 0x0B 0x03 0xF6 0x42 0x42 0x20 0x32 0x39 0x30 0x36 0x30 0x03 • The interface sends a second Acknowledge message. Example: 0x03 0x04 0x09 0x03 • The ECU then sends an Acknowledge message in response. Example: 0x03 0x05 0x09 0x03 • This signals the end of the sequence. The interface is only required to generate Acknowledge messages in the specific situation described above. In all other situations, the application generates the Acknowledge messages. Note that the interface must generate the Message Counter field in both Acknowledge messages described above, and the values shall be 2 and 4. 12.4 Message Structure 12.4.1 C/C++ Definition There is no change to the C/C++ definition. 12.4.2 Message Data Formats When using UART Echo Byte protocol, all message bytes including ETX are defined by the application. All received messages that comply with the timing and message structure requirements shall be queued to the application. UART Echo Byte Protocol IDs and message limitations are defined in Table 38. Table 38 - Allowed message sizes per protocol Protocol ID UART_ECHO_BYTE_PS or UART_ECHO_BYTE_CHx Min Tx 4 Max Tx 256 Min Rx 3 Max Rx 256 Notes Data[0] = byte message length Data[1] = message counter Data[2] = message title Data[3 - (n-1)] = optional message-specific data Data[n] = ETX all application defined The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_MSG_PROTOCOL_ID. 12.4.3 Format Checks for Messages Passed to the API The vendor DLL shall validate all PASSTHRU_MSG structures, and return an error, ERR_INVALID_MSG if DataSize violates Min Tx or Max Tx columns in Table 38. 12.4.4 Message Flag and Status Definitions No TxFlags, RxStatus, or Indications are supported for this protocol. These flags are undefined for this protocol. 12.5 Return Value Error Codes ERR_EXCEEDED_LIMIT will be returned when more than one message is written at a time. SAE INTERNATIONAL J2534™-2 DEC2020 Page 49 of 146 12.6 Discovery Support The device shall report support for UART Echo Byte protocol and associated parameters through the discovery mechanism defined in Section 25. 13. HONDA DIAG-H PROTOCOL 13.1 Scope of the Honda DIAG-H Optional Feature This section details the extensions to SAE J2534-1 that will allow support of the Honda 92 Hm/2 protocol and DIAG-H protocol interface. DIAG-H is a bi-directional serial communication line that provides diagnostic communication capability using the “92 Hm/2” communication protocol which is Honda proprietary. DIAG-H line is a single wire communication bus based on a UART interface. 13.2 Pass-Thru System Requirements 13.2.1 Simultaneous Communication on Multiple Protocols The interface shall be capable of supporting one of the protocols from data link set DATA LINK SET 1, one of the protocols from DATA LINK SET 2 and one of the protocols from DATA LINK SET 3. An attempt to open an unsupported protocol channel shall result in the ERR_NOT SUPPORTED return code from PassThruConnect. Table 39 - Simultaneous communication options Data Link Set 1 HONDA_DIAGH_PS or HONDA_DIAGH_CHx Data Link Set 2 ISO9141 ISO14230 Data Link Set 3 CAN ISO15765 13.2.2 Programmable Power Supply There are no changes to this section. 13.2.3 Pin Usage When the vehicle is equipped with an SAE J1962 connector, DIAG-H may be absent, or may be present on SAE J1962 pin 14 or pin 1. On vehicles that have the CAN_L line present on pin 14, normal mode communication between ECUs on the CAN bus may be corrupted by connection to a tester DIAG-H circuit. Therefore, the tester’s DIAG-H circuit shall be disconnected (500 kΩ minimum impedance) from pin 14 until commanded by the diagnostic application. As with all SAE J2534-2 optional protocols, no default pin is identified. Therefore, the application developer will be required to set the pin to be used. Refer to SAE J1962 or SAE J2534-2 for details of the method used to switch SAE J1962 pins. 13.2.4 Honda Diagnostic Connectors Figures below show the diagnostic communication line configuration of OBD regulation compliant and non-OBD regulation compliant Honda vehicles. The DIAG-H protocol shall be supported on SAE J1962 pin 1 and on SAE J1962 pin 14. Most Honda non-OBD (1992 to 2000 model year) vehicles are equipped with 3 pin or 5 pin DLC. The “DIAG-H” bi-directional serial communication line is connected to the DLC and provides serial data stream to the tester in 92 Hm/2 protocol. The 3-pin and 5-pin DLC vehicles are supported by existing SAE J1962 adaptor cables that route SAE J1962 pin 14 to pin 1 of the 3-pin or 5-pin DLC. (The Honda diagnostic application always assigns DIAG-H to SAE J1962 pin 14 when communicating with these vehicles.) SAE INTERNATIONAL J2534™-2 DEC2020 Page 50 of 146 On the other hand, Honda OBD compliant vehicles are equipped with 16-pin DLC conformed to SAE J1962/ISO15031-3 for the off-board diagnostic communication. Mainly, 92 Hm/2 protocol is used for the Chassis/Body System ECUs. Note that N.C. in Figure 6 indicates that some 3-pin DLC vehicles do not include battery positive supply on the DLC. In this case, the SAE J2534 interface device must be powered by a separate cable, from the cigar lighter, for example. 3P DLC (Honda specified) 2 Battery Positive/N.C. 1 DIAG-H 3 GND Sumitomo 3 way HD090 Male Connector, P/N 6098-0242 DIAG-H Bus Tester Connector Figure 6 - Diagnostic communication line configuration (3-pin DLC model) 5P DLC (Honda specified) 4 Battery Positive 3 ISO9141 L-LINE 2 ISO9141 K-LINE 1 DIAG-H 5 GND Sumitomo 5 way HD090 Male Connector, P/N 6098-0343 Tester Connector DIAG-H Bus Figure 7 - Diagnostic communication line configuration (5-pin DLC model) The maximum current on a ground pin of Honda 3-pin and 5-pin DLC is 1.5 A. It is equivalent to the specification for signal ground (pin 5) defined in SAE J1962. SAE INTERNATIONAL J2534™-2 DEC2020 Page 51 of 146 SAE J1962 16P DLC ISO9141 K-Line Bus Powertrain ECU(s) & Other System ECUs Terminal 7 Terminal 14 DIAG-H Bus Chassis/Body System ECUs Figure 8 - Diagnostic communication line configuration (16-pin DLC model without CAN) High-speed CAN SAE J1962 16P DLC DOC-H 6 14 7 1 DOC-L K-LINE DIAG-H Powertrain ECUs & Other System ECUs Chassis / Body System ECUs Figure 9 - Diagnostic communication line configuration (16-pin DLC model with CAN) 13.2.5 Serial Communication Interface/Protocol Table 40 describes the serial interface of Honda DIAG-H communication. SAE INTERNATIONAL J2534™-2 DEC2020 Page 52 of 146 Table 40 - Serial interface parameters Signal Line Communication Speed Bit Encoding Byte Frame Format Network Access Message Format “DIAG-H”; Bidirectional, Half-Duplex, Voltage Drive (0 to 5 V) 9600 bps NRZ Asynchronous 1 start bit, 8 data bits, 1 stop bit No parity bit Master/slave Single request/single response (Any initialization process such as ISO9141/-2 is NOT required) Honda 92 message format; defined by HONDA 13.2.6 Electrical Characteristics of Interface This section states the requirements of the serial communication interface of the off-board diagnostic tester to communicate with the ECU on the Honda vehicles through DIAG-H bus line. 13.2.6.1 Electrical Characteristics Table 41 - Electrical characteristics Item Power Supply Voltage (Vcc) Capacitance (CT) Pull-Up Resistance Requirements 5.0 V ± 5% Description Voltage of power supply to DIAG-H line Less than 2000 pF Total capacitance of tester and all its cabling (see Figure 10) Resistance pull-up to Vcc 4.7 kΩ ± 5% Vcc Receiver DIAG-H Line 4.7kΩ DLC (Data Link Connector) Is UART CT Communication Interface on Tester Signal Ground Figure 10 - Recommended interface circuit on tester SAE INTERNATIONAL J2534™-2 DEC2020 Page 53 of 146 13.2.6.2 Requirements of Transmitter Table 42 - Transmitter electrical requirements Item Logic 0 Voltage Sink Current (IS) Logic 1 Voltage Requirements Less than 0.5 V More than 50 mA More than 4.5 V Description Output voltage at logic 0 Sink Current at logic 0 (Figure 10) Output voltage at logic 1 with the load shown in Figure 11 Table 43 - Transmitter timing requirements Item Transmission Speed tDST (Figure 12) Requirements 9600 bps ± 0. 2% 5.0 seconds Condition At DLC terminal Disconnected from vehicle Diag-H Line RTLH RTLH : 1 kΩ RTLL RTLL : 14 kΩ DLC Signal Ground Load Circuit Tester Figure 11 - Load circuit Vccx 0.5 T0 T1 tDST = T0 -T1 “tDST” is defined as time difference between duration of logic 0 and 1, when 0 and 1 bits are transmitted alternately. Figure 12 - Definition of tDST SAE INTERNATIONAL J2534™-2 DEC2020 Page 54 of 146 13.2.6.3 Requirements of Receiver Table 44 - Receiver electrical requirements Item Logic 0 Threshold Logic 1 Threshold Internal Resistance Hysteresis Requirements More than 1.9 V Less than 3.1 V More than 100 k ± (to Signal Ground) More than 4.4 kΩ (to Vcc) More than 0.4 V Description Threshold voltage to determine logic 0 Threshold voltage to determine logic 1 Internal resistance in receiving state Difference of threshold voltage between 0 and 1 Table 45 - Receiver timing requirements Item Acceptable Communication Speed tDST (See Figure 12) Requirements 9600 bps ± 1.5% ±17.0 seconds Condition With wiring and ECUs *1 *1 - - - - Total Capacitance of Vehicle: Less than 2700 pF. ECU pulled-up resistor to Vcc: 4.7 k ± 5% (maximum 7 units). Hysteresis Logic Level 1 0 0V Vcc Logic “0” Threshold DIAG-H Line Voltage Logic “1” Threshold Figure 13 - Threshold voltage 13.3 Win32 Application Programming Interface 13.3.1 API Functions - Overview Feature Implementation Summary: The DIAG-H physical interface supports the 92 Hm/2 diagnostic communication protocol that is a UART-based protocol operating at 9600 baud. The SAE J2534-2 support of this protocol is based on the existing SAE J2534-1 definitions for ISO9141. ISO9141 timing parameters are used. No support for 5 baud or fast initialization is required. The interface is not required to perform any message transmission retries. Retries shall be handled by the application. Support for the DIAG-H interface and 92 Hm/2 protocol is achieved by the addition of a new physical layer interface in the interface hardware and a new ProtocolID. SAE INTERNATIONAL J2534™-2 DEC2020 Page 55 of 146 API Change List: Table 46 summarizes the changes to the SAE J2534-1 API functions. Table 46 - SAE J2534 API functions Function PassThruConnect Description of Change Added new ProtocolID values 13.3.2 API Functions - Detailed Information 13.3.2.1 PassThruConnect When PassThruConnect is called with the HONDA_DIAGH_PS Protocol ID, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG is made to select the desired cable and pins. 13.3.2.1.1 C/C++ Prototype There are no changes defined for the function prototype. 13.3.2.1.2 Parameters There are no changes to the parameters. 13.3.2.1.3 Connect Flag Values There are no changes to the connect flags. 13.3.2.1.4 ProtocolID Values Only the definition and description of the ProtocolID value is defined in Table 47. The actual value is defined in Section 24. Table 47 - Protocol ID values Definition HONDA_DIAGH_PS HONDA_DIAGH_CHx Description Honda DIAG-H protocol with pin selection Additional channels of Honda DIAG-H protocol 13.3.2.1.5 Return Values There are no changes defined for the Return Values. 13.3.3 IOCTL Section 13.3.3.1 SET_CONFIG and GET_CONFIG Supported Parameters The LOOPBACK, P1_MAX, P3_MIN, P4_MIN, J1962_PINS configuration parameters shall be supported for the protocol HONDA DIAG-H protocol. Attempts to access any other parameters shall result in return of the ERR_INVALID_IOCTL_PARAM_ID error code. P1_MAX expiry shall be used to detect the end of an ECU response message. The interface shall not check for P2_MAX violations. All received messages shall be queued to the application regardless of the time since the end of the last transmission by the interface. Transmissions from the interface shall not be allowed within P3_MIN since the end of a received message. SAE INTERNATIONAL J2534™-2 DEC2020 Page 56 of 146 13.4 Message Structure 13.4.1 C/C++ Definition There is no change to the C/C++ definition. 13.4.2 Elements There is no change to any of the elements. 13.4.3 Message Data Formats When using HONDA_DIAGH_PS, all message bytes are defined by the application. Honda DIAG-H Protocol IDs and message limitations have been defined in Table 48. Table 48 - Allowed message sizes per protocol Protocol ID HONDA_DIAGH_PS or HONDA_DIAGH_CHx 3 Min Tx Max Tx 255 1 Min Rx Max Rx 255 Notes Data[0 - n] = Data bytes The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_MSG_PROTOCOL_ID. 13.4.4 Format Checks for Messages Passed to the API The vendor DLL shall validate all PASSTHRU_MSG structures, and return an error, ERR_INVALID_MSG if DataSize violates Min Tx or Max Tx columns in “Message Data Formats” section. 13.4.5 Message Flag and Status Definitions Only the TX_MSG_TYPE RxStatus bit shall be used by this protocol. No TxFlags or Indications are supported for this protocol. These flags are undefined for this protocol. 13.5 Discovery Support The device shall report support for HONDA DiagH Protocol and associated parameters through the discovery mechanism defined in Section 25. 14. REPEAT MESSAGING 14.1 Scope of the Repeat Messaging Protocol Optional Feature This section details the extensions to an SAE J2534-1 interface that will allow support of the Repeat Messaging feature. This section details only the changes from SAE J2534-1. Items not specifically detailed in this section are assumed not to have changed from SAE J2534-1. 14.2 Win32 Application Programming Interface 14.2.1 API Functions - Overview Feature Implementation Summary: Some operations on ECUs require a message to be transmitted repeatedly at a rapid and predictable rate until the operation is completed. Completion of the operation is indicated by a change in a byte value in the response message to the repeated request. SAE INTERNATIONAL J2534™-2 DEC2020 Page 57 of 146 This optional feature defines an extension to the API that allows the interface to perform autonomous transmissions based on the content of messages received from a vehicle bus. The configuration of this behavior is performed by the application using new IOCTLs. In this way, the feature provides a general purpose, protocol-independent method of achieving high performance repeated transmissions while certain conditions persist on a vehicle. Support of this feature is achieved by three additional PassThruIoctl IoctlID values. The first is used to set-up and start the repeat transmission, the second is used to query the status of a transmission, and the third is used to stop the transmission and release resources. The device shall support a minimum of ten repeat messages per channel. Additionally, this feature shall be supported on all protocols unless explicitly excluded by the description of the protocol. The operation of the feature is in three stages: 1. Specifying the message to transmit, transmission rate and stop criteria via PassThruIoctl START_REPEAT_MESSAGE. 2. Querying to see if the transmission has been stopped automatically via PassThruIoctl QUERY_REPEAT_MESSAGE. 3. Stopping an in-progress transmission and releasing resources via PassThruIoctl STOP_REPEAT_MESSAGE. In general, repeat messages are almost identical to periodic messages. Repeat messages shall have the same DataSize and TxFlags limitations as periodic messages. Repeat messages shall generate loopback messages, if enabled on the channel. Additionally, repeat messages shall have the same priority as periodic messages. The queueing mechanism used by periodic messages shall be extended to include repeat messages. Finally, repeat messages shall not violate bus idle timing parameters (like P3_MIN) or other protocol specific requirements. Responses to the repeat messages, including the response that caused termination of the repeat transmission, shall be treated in the same way as other received data and shall be queued to the application, subject to any filters configured on the channel. Incoming messages will be evaluated against the repeat mask/pattern before being processed by the standard Pass or Block filtering. API Change List: Table 49 summarizes the changes to the SAE J2534-1 API functions. Table 49 - SAE J2534 API functions Function PassThruIoctl Description of Change New IOCTL IDs are added: START_REPEAT_MESSAGE QUERY_REPEAT_MESSAGE STOP_REPEAT_MESSAGE 14.2.2 IOCTL Section Table 50 - IOCTL details Value of IoctlID START_REPEAT_MESSAGE InputPtr Represents Pointer to REPEAT_MSG_SETUP QUERY_REPEAT_MESSAGE Pointer to unsigned long STOP_REPEAT_MESSAGE Pointer to unsigned long OutputPtr Represents Pointer to unsigned long Pointer to unsigned long NULL pointer Purpose Sets up and starts a repeat message transmission. Reports the status of a repeat message transmission. Terminates an existing repeat message transmission. SAE INTERNATIONAL J2534™-2 DEC2020 Page 58 of 146 14.2.2.1 START_REPEAT_MESSAGE This function is used to specify and initiate a repeat message. The parameters are specified in Table 51. Table 51 - START_REPEAT_MESSAGE details Parameter ChannelID IoctlID InputPtr Description Channel ID assigned by DLL during PassThruConnect. Is set to the define START_REPEAT_MESSAGE. Is a pointer to the structure REPEAT_MSG_SETUP which is defined as follows: typedef struct { unsigned long TimeInterval; /* Repeat transmission rate */ unsigned long Condition; PASSTHRU_MSG RepeatMsgData[3]; } REPEAT_MSG_SETUP; where: TimeInterval is the time interval between the end of a message transmission and the start of the next time this message is sent, in milliseconds. The valid range is 5 to 65535 ms. Condition specifies whether the repeat transmission should: 0 = continue until a message is received that matches the pattern 1 = continue while every received message matches the pattern RepeatMsgData[0] Is a PASSTHRU_MSG structure that specifies the message to be repeatedly transmitted. The Data, DataSize, and TxFlags elements of the PASSTHRU_MSG structure shall be populated and appropriate for the designated channel. RepeatMsgData[1] is a PASSTHRU_MSG structure that specifies the mask message that will be ANDed with each incoming message to mask any unimportant bits. The Data, DataSize, and TxFlags elements of the PASSTHRU_MSG structure shall be populated and appropriate for the designated channel. OutputPtr RepeatMsgData[2] is a PASSTHRU_MSG structure that specifies the pattern message that will be compared to the incoming message after the mask message has been applied. If the result matches this pattern message, the designated action shall be taken. The Data, DataSize, and TxFlags elements of the PASSTHRU_MSG structure shall be populated and appropriate for the designated channel. Additionally, the DataSize and TxFlags elements shall match that of the mask message. Is a pointer to an unsigned long, MsgId, the message ID that is assigned by the DLL. If this function call is successful, the return value shall be STATUS_NOERROR and the associated repeat message shall have been created (even if it duplicates an existing repeat message) and one copy shall be placed in the repeat message transmit queue. If Condition = 0 (REPEAT_MESSAGE_UNTIL_MATCH), the repeat message transmissions shall continue until a message is received that, after ANDing with the mask message, matches the pattern message exactly. Additionally, repeat message transmissions shall continue if the TimeInterval expires without receiving any message. SAE INTERNATIONAL J2534™-2 DEC2020 Page 59 of 146 If Condition = 1 (REPEAT_MESSAGE_WHILE_MATCH), the repeat message transmissions shall continue while every received message that, after ANDing with the mask message, matches the pattern message exactly. The repeat message transmissions shall cease when a message is received that, after ANDing the with the mask message, doesn’t match the pattern exactly. Additionally, repeat message transmissions shall terminate if the TimeInterval expires without receiving any message. ERR_EXCEEDED_LIMIT shall be returned if more than the maximum number of repeat messages supported by the interface is requested. ERR_INVALID_MSG shall be returned if the data size of an individual message exceeds that defined in SAE J2534-1 for periodic messages. ERR_INVALID_MSG shall also be returned if the TxFlags do not match those specified in SAE J2534-1 for periodic messages. If this IOCTL is not supported by the interface an ERR_NOT_SUPPORTED shall be returned. NOTE: Only the first RepeatMsgData[1].DataSize bytes of each incoming message shall be evaluated (i.e., additional bytes in a message longer than DataSize shall be ignored and treated as “don’t care”). Incoming messages whose DataSize is less than that of the pattern message shall be considered not to match (even if the mask bytes indicated “don’t care”). Examples: Application sets up a repeat message: 0x64 0x28 0xF5 0x22 0x02 0x00 Normal ECU response is: 0x74 0xF5 0x28 0x62 0x02 0x00 0x00 The application requires the transmission to terminate when the following is received: 0x74 0xF5 0x28 0x62 0x02 0x00 0x01 Example #1: The filtering arrays could be set up as: Condition Mask Pattern 0 (REPEAT_MESSAGE_UNTIL_MATCH) 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x74 0xF5 0x28 0x62 0x02 0x00 0x01 This would require all bytes in the received message to match the pattern specified above for transmission to stop. If there were a sequence number that changed in the first byte every time, the following could be used to ignore the value of the changing sequence number byte: Condition Mask Pattern 0 (REPEAT_MESSAGE_UNTIL_MATCH) 0x00 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x00 0xF5 0x28 0x62 0x02 0x00 0x01 Example #2: If there are several responses that are required to cause the transmission to terminate, for example: 0x74 0xF5 0x28 0x62 0x02 0x00 0x01 0x74 0xF5 0x28 0x62 0x02 0x00 0x52 0x74 0xF5 0x28 0x62 0x02 0x00 0x81 SAE INTERNATIONAL J2534™-2 DEC2020 Page 60 of 146 Then the following setup could be used to continue transmission while the Normal ECU response alone continues to be received: Condition Mask Pattern 1 (REPEAT_MESSAGE_WHILE_MATCH) 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x74 0xF5 0x28 0x62 0x02 0x00 0x00 14.2.2.2 QUERY_REPEAT_MESSAGE This function is used to check the status of the designated repeat message. The parameters are specified in Table 52. Table 52 - QUERY_REPEAT_MESSAGE details Parameter ChannelID IoctlID InputPtr OutputPtr Description Channel ID assigned by DLL during PassThruConnect Is set to the define QUERY_REPEAT_MESSAGE Is a pointer to an unsigned long, MsgId, the message ID of the repeat message transmission to be queried Is a pointer to an unsigned long status, the current status of the specified repeat message transmission If this function call is successful, the return value shall be STATUS_NOERROR and the value of the status parameter shall be set as shown in Table 53. Table 53 - Status parameter values Condition Repeat message transmission in progress, filter criteria not yet met Filter criteria met and repeat transmission ceased Status Value TRUE (1) FALSE (0) If this function is called with an invalid MsgID, ERR_INVALID_MSG_ID shall be returned. 14.2.2.3 STOP_REPEAT_MESSAGE This function is used to terminate a defined repeat transmission and release the specified MsgID. The parameters are specified in Table 54. Table 54 - STOP_REPEAT_MESSAGE details Parameter ChannelID IoctlID InputPtr OutputPtr Description Channel ID assigned by DLL during PassThruConnect Is set to the define STOP_REPEAT_MESSAGE Is a pointer to an unsigned long, MsgId, the message ID of the repeat message transmission to be stopped Is a NULL pointer, as this parameter is not used If this function call is successful the return value shall be STATUS_NOERROR, the MsgID shall be invalid, the interval timers shall be stopped, and the associated repeat message shall be removed from the transmit queue (if one is present). This function will not terminate the associated repeat message if it is currently being sent. It should be noted that the MsgID shall not be released automatically on termination of the repeat transmission due to receipt of a message matching the filter conditions. Therefore, a call to STOP_REPEAT_MESSAGE shall always be required. If this function is called with an invalid MsgID, ERR_INVALID_MSG_ID shall be returned. SAE INTERNATIONAL J2534™-2 DEC2020 Page 61 of 146 14.3 Discovery Support The device shall report support for Repeat Messaging and associated parameters through the discovery mechanism defined in Section 25. 15. EXTENDED PROGRAMMING VOLTAGE SUPPORT 15.1 Scope of the Extended Programming Voltage Feature This section details the additional programming voltage features supported by SAE J2534-2. 15.2 Pass-Thru System Requirements 15.3 Win32 Application Programming Interface 15.3.1 API Functions - Overview Table 55 summarizes the changes to the SAE J2534-1 API function. Table 55 - SAE J2534 API functions Function PassThruSetProgrammingVoltage Description Support Short-to-Ground feature on pin 9 15.3.2 API Functions - Detailed Information 15.3.2.1 PassThruSetProgrammingVoltage In addition to pin 15 supported in SAE J2534-1, Short-to-Ground will also be allowed on pin 9. Pin 9 Short-to-Ground feature is not mutually exclusive with the other programming pins and can be used while supplying programming voltage through other supported pins. Short-to-Ground feature shall be supported on only one pin at a time. ERR_PIN_IN_USE shall be returned if: • An attempt is made to set a programming voltage on pin 9 while it is at ground. • An attempt is made to ground pin 9 while it has a programming voltage applied. ERR_VOLTAGE_IN_USE shall be returned if: • An attempt is made to ground pin 9 while pin 15 is grounded. • An attempt is made to ground pin 15 while pin 9 is grounded. ERR_NOT_SUPPORTED shall be returned if: • The device does not support pin 9 Short-to-Ground feature. 15.4 Discovery Support The device shall report Extended Programming Voltage Support and associated parameters through the discovery mechanism defined in Section 25. SAE INTERNATIONAL J2534™-2 DEC2020 Page 62 of 146 16. SAE J1939 PROTOCOL 16.1 Scope of the SAE J1939 Protocol Optional Feature This section details the extensions to SAE J2534-1 that will allow support of the SAE J1939 protocol. This section details only the changes from SAE J2534-1. Items not specifically detailed in this section are assumed not to have changed. This section specifically defines the common method of supporting the SAE J1939 heavy-duty vehicle protocol as defined in SAE J1939. The SAE J2534-2 implementation will implement single frame messages and multiple frame messages using both the SAE J1939 BAM process and the Connection Management message process. Refer to SAE J1939-21 for details on multi-frame messages. In addition, the SAE J2534-2 device will support the Claim SAE J1939 Address Process outlined in SAE J1939-81. The BAM message process will be used when the SAE J2534-2 device has a claimed address and a message to be transmitted or received has more than 8-data bytes and is being sent to or received from the Global Address (0xFF). To send a message using the BAM process, fill in the Destination Address field with the Global Address. The Connection Management message process will be used when the SAE J2534-2 device has a claimed address and a message with more than 8-data bytes is being sent to a specific destination address or a message is being sent from the vehicle to the SAE J2534-2 device’s claimed address. To send a message using the Connection Management process, fill in the Destination Address field with a specific address. 16.2 Pass-Thru System Requirements 16.2.1 Connection to Vehicle Vendors will have to provide a custom cable to connect to an SAE J1939 vehicle. NOTE: Some vehicles that use SAE J1939 operate with 24-V electrical systems. This SAE J2534-2 optional feature does not specify changes to the SAE J2534-1 device, thus it is up to the customer and SAE J2534-2 device supplier to insure no damage is done to the SAE J2534-2 device when used with 24-V systems. 16.2.2 Communication Protocol The following features of SAE J1939 must be supported by the PassThru device: a. 250 kbps b. 29-bit identifiers c. BAM and Connection Management message transfers d. Protection of ten source addresses and the name associated with each source address 16.2.3 Simultaneous Communication on Multiple Protocols The SAE J1939 implementation will have the same simultaneous communication on multiple protocol requirements as the CAN protocol (SAE J1850 and ISO9141 must be able to run simultaneously). 16.3 Win32 Application Programming Interface 16.3.1 API Functions - Overview Feature Implementation Summary: SAE INTERNATIONAL J2534™-2 DEC2020 Page 63 of 146 At a high level, a new ProtocolID has been defined to indicate the use of the SAE J1939 physical layer. The protocol defines a communication link between the tester and the electronic control unit (ECU). If the feature is not supported, an error code, ERR_NOT_SUPPORTED, will be returned by the call to PassThruConnect. The calling application will be required to notify the user that this optional feature may not be supported by interface. When the SAE J1939 protocol is opened, the application must use the CAN_29BIT_ID connect flag and set the baud rate to 250K. API Change List: Table 56 summarizes the changes to the SAE J2534-1 API functions. Table 56 - SAE J2534 API functions Function PassThruConnect PassThruWriteMsgs PassThruIoctl Description of Change Added new ProtocolID values. Added a new return value. New IO control sub-function and 5 configuration parameters. 16.3.2 API Functions - Detailed Information 16.3.2.1 PassThruConnect When PassThruConnect is called with the J1939_PS Protocol ID, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG is made to select the desired cable and pins. 16.3.2.1.1 Connect Flag Values There are no changes to the connect flag values. Only CAN_29BIT_ID shall be supported. 16.3.2.1.2 ProtocolID Values Only the definition and description of the ProtocolID value is defined Table 57. The actual value is defined in Section 24. Table 57 - Protocol ID values Definition J1939_PS J1939_CHx Description SAE J1939 protocol with pin selection Additional channels of SAE J1939 protocol 16.3.2.2 PassThruWriteMsgs Added a new return value. 16.3.2.2.1 Return Values Table 58 shows the new return value for PassThruWriteMsgs. Table 58 - Return values Definition ERR_ADDRESS_NOT_CLAIMED Description Returned when a write message has a data payload larger than 8-data bytes and the source address in the message does not match a current claimed address SAE INTERNATIONAL J2534™-2 DEC2020 Page 64 of 146 16.3.2.3 PassThruIoctl 16.3.2.3.1 IOCTL ID Values The new IOCTL value PROTECT_J1939_ADDR is added to support the claiming of an SAE J1939 CAN address for the tester (SAE J2534 device). 16.3.3 IOCTL Section The details on the new IOCTLs available through the PassThruIoctl function are shown in Table 59. Table 59 - IOCTL details Value of IoctlID PROTECT_J1939_ADDR InputPtr Represents Points to SBYTE_ARRAY OutputPtr Represents NULL pointer Purpose To direct the pass-thru device to claim and defend the specified address 16.3.3.1 Configuration Parameters 16.3.3.1.1 SET_CONFIG and GET_CONFIG Supported Parameters The DATA_RATE, LOOPBACK, BIT_SAMPLE_POINT, and SYNC_JUMP_WIDTH configuration parameters will be supported for the SAE J1939 protocol. The default values for SAE J1939 are LOOPBACK = 0, BIT_SAMPLE_POINT = 87.5%, and SYNC_JUMP_WIDTH = 6.25% (1Tq). 16.3.3.1.2 Additional SET_CONFIG and GET_CONFIG Parameters Table 60 shows the five new configuration parameters will be added to support the SAE J1939 protocol. Table 60 - IOCTL GET_CONFIG/SET_CONFIG parameters details Parameter J1939_T1 Valid Values for Parameter 0X0 - 0X0000FFFF (1 ms per bit) 750 Default Value (decimal) J1939_T2 0X0 - 0X0000FFFF (1 ms per bit) 1250 J1939_T3 0X0 - 0X0000FFFF (1 ms per bit) 1250 J1939_T4 0X0 - 0X0000FFFF (1 ms per bit) 1050 J1939_BRDCST_MIN_DELAY 0X0 - 0X0000FFFF (1 ms per bit) 50 Description For protocol SAE J1939, this sets the maximum time the device waits for the next data frame in a multi-frame transfer. For protocol SAE J1939, this sets the maximum time a receiver will wait for the next data frame after sending a CTS in a multi-frame transfer. For protocol SAE J1939, this sets the maximum time the device waits for CTS in a multiframe transfer. For protocol SAE J1939, this sets the maximum time the device waits for the next CTS after receiving a CTS with a request for zero frames in a multi-frame transfer. For protocol SAE J1939, this sets the minimum time between data frames in a multi-frame broadcast transmission. SAE INTERNATIONAL J2534™-2 DEC2020 Page 65 of 146 16.3.3.2 PROTECT_J1939_ADDR The IoctlID parameter of PROTECT_J1939_ADDR is used to set the SAE J1939 source address to defend and to assign the PassThru device’s SAE J1939 NAME as defined in SAE J1939-81. The PassThru device must be able to protect ten source addresses. Table 61 - Protect_J1939_addr details Parameter ChannelID IoctlID InputPtr Description Channel ID assigned by DLL during PassThruConnect Is set to PROTECT_J1939_ADDR Points to the structure SBYTE_ARRAY, which is defined as follows: Typedef struct { unsigned long NumOfBytes; /* number of bytes in array */ unsigned char *BytePtr; /* array of bytes */ } where: NumOfBytes is an input that indicates the number of bytes in the array BytePtr. It should always be 9 for PROTECT_J1939_ADDR. BytePtr[0] is the source address to claim (0 - 253), 254 is NOT allowed, 255 = is the default and means no address is claimed. OutputPtr BytePtr[1] - BytePtr[8] is the SAE J1939 defined name. BytePtr[1] is the LSB as defined in SAE J1939-81 (the LSB of the Identity Number). NULL pointer This call is non-blocking. When an address claim is successful a J1939_ADDRESS_CLAIMED indication will be received. A J1939_ADDRESS_LOST indication will be received if the address claim was unsuccessful. If BytePrt[0] equals 254 or 255, the function will return ERR_INVALID_IOCTL_VALUE. To cancel a protected address, BytePrt[0] equals the source address you want canceled and all the name values (BytePrt1 through BytePtr[8]) shall all be zero. 16.4 Message Structure 16.4.1 C/C++ Definition There is no change to the C/C++ definition. 16.4.2 Elements There is no change to any of the elements. 16.4.3 Message Data Formats When using the SAE J1939 protocol, the first 5 bytes of data contain the 29-bit CAN ID used in SAE J1939 and the destination address. Data[0] contains CAN ID bits 28-24 (the three most significant bits will be zero), Data[1] contains bits 23-16, Data[2] contains bits 15-8, Data[3] contains bits 7-0, and Data[4] contains the destination address. It is up the application to pack this data correctly (as specified in SAE J1939-21). Additional Protocol IDs and message limitations have been defined in Table 62. SAE INTERNATIONAL J2534™-2 DEC2020 Page 66 of 146 Table 62 - Allowed message sizes per protocol Protocol ID J1939_PS or J1939_CHx Min Tx 5 Max Tx 1790 Min Rx 5 Max Rx 1790 Notes 4 bytes of CAN ID, 1-byte destination address followed by up to 1785 data bytes The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_MSG_PROTOCOL_ID. 16.4.4 Format Checks for Messages Passed to the API For messages with less than 9-data bytes, the destination address (Data[4]) is a “don’t care” and is not used in sending the message. For messages with more than 8-data bytes, if the SAE J2534-2 device has a claimed address and the destination address (Data[4]) is the global address (0xFF), the BAM message process will be used to send the message. For messages with more than 8-data bytes, if the SAE J2534-2 device has a claimed address and the message is being sent to a specific destination address (Data[4]), the Connection Management message process will be used to send the message. 16.4.5 Conventions for Returning Messages from the API Received messages with less than 9-data bytes, the destination address (Data[4]) will be filled in with the specific destination address of the message or the global address. Received messages greater than 8 bytes will be returned to the API when the SAE J2534-2 device has a claimed address and a BAM message is received. Data[4] will contain the global address. Received messages greater than 8 bytes will be returned to the API when the SAE J2534-2 device has a claimed address and a Connection Managed message was sent to the SAE J2534-2 device’s claimed address. Data[4] will contain the claimed address that the message was received on. 16.4.6 Message Flag and Status Definitions Supported Message Status (RxStatus) Definitions. The TX_MSG_TYPE and CAN_29BIT_ID RxStatus bits will be supported. For SAE J1939, loopback messages returned by the API will have TX_MSG_TYPE set in RxStatus. Messages with a 29-bit ID field will have CAN_29BIT_ID set. There are two additions to the Message Status (RxStatus) definitions to be used as indications. SAE INTERNATIONAL J2534™-2 DEC2020 Page 67 of 146 Table 63 - RxStatus bit definitions Definition J1939_ADDRESS_LOST J1939_ADDRESS_CLAIMED RxStatus Bit(s) 17 16 Description Address lost status indication will be sent when a claimed address and name has been lost or when an attempt to claim an address and name fails. The source address lost will be in Data[0] of the message. ExtraDataIndex = 0, DataSize = 1. SAE J1939 only. Address claimed status indication will be sent when an address and name is successfully claimed. The source address claimed will be in Data[0] of the message. ExtraDataIndex = 0, DataSize = 1. SAE J1939 only. Value 0 = no address lost indication 1 = address lost or claim attempt failed 0 = no address claimed indication 1 = address claimed was successful The CAN_29BIT_ID TxFlags bit is the only TxFlags bit supported. When sending a message with a 29-bit ID field, set the TxFlags bit CAN_29BIT_ID. 16.5 Return Value Error Codes ERR_ADDRESS_NOT_CLAIMED will be returned from PassThruWriteMsgs when a message has a data payload larger than 8-data bytes and the source address in the message does not match a current claimed address. 16.6 Discovery Support The device shall report support for the SAE J1939 protocol and associated parameters through the discovery mechanism defined in Section 25. 17. SAE J1708 PROTOCOL 17.1 Scope of the SAE J1708 Protocol Optional Feature This section details the extensions to SAE J2534-1 that will allow support of the SAE J1708 protocol. This section details only the changes from SAE J2534-1. Items not specifically detailed in this section are assumed not to have changed. 17.2 Pass-Thru System Requirements 17.2.1 Connection to Vehicle Vendors will have to provide a custom cable to connect to an SAE J1708 vehicle. NOTE: Some vehicles that use SAE J1708 operate with 24-V electrical systems. This SAE J2534-2 optional feature does not specify changes to the SAE J2534-1 device, thus it is up to the customer and the SAE J2534-2 device supplier to ensure no damage is done to the SAE J2534-2 device when used with 24-V systems. SAE INTERNATIONAL J2534™-2 DEC2020 Page 68 of 146 17.2.2 Communication Protocol The following features of SAE J1708 must be supported by the PassThru device: • 9600 bps • Priority message delay 17.2.3 Simultaneous Communication on Multiple Protocols The SAE J1708 protocol implementation will have the same simultaneous communication on multiple protocol requirements as the ISO9141 protocol (SAE J1850 and CAN must be able to run simultaneously with SAE J1708). 17.3 Win32 Application Programming Interface 17.3.1 API Functions - Overview Feature Implementation Summary: Support for the SAE J1708 protocol is achieved by the addition of a new physical layer interface and a new ProtocolID. In addition, the SAE J2534-2 device vendor may provide a heavy truck cable or adapter. The protocol feature of calculating and appending the message checksum is required. The protocol feature of priority message delay for transmitted messages will be implemented by passing the priority message delay to the PassThru device in the PassThru message TxFlags. Refer to SAE J1708 for details of communication interface byte encoding and the electrical interface design and characteristics. API Change List: Table 64 summarizes the changes to the SAE J2534-1 API functions. Table 64 - SAE J2534 API functions Function PassThruConnect Description of Change Added new ProtocolID values 17.3.2 API Functions - Detailed Information 17.3.2.1 PassThruConnect When PassThruConnect is called with the J1708_PS Protocol ID, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG is made to select the desired cable and pins. 17.3.2.1.1 Connect Flag Values The SAE J1708 protocol uses the SAE J2534-1 connect flag shown in Table 65. SAE INTERNATIONAL J2534™-2 DEC2020 Page 69 of 146 Table 65 - Connect flag values Definition CHECKSUM_DISABLED Description 0 = The interface will generate and append the checksum as defined in SAE J1708 for transmitted messages. The interface will verify the checksum for received messages and place it in the data section pointed to by ExtraDataIndex. 1 = The interface will not generate and verify the checksum. The entire message will be treated as data by the interface. 17.3.2.1.2 ProtocolID Values Only the definition and description of the ProtocolID value is defined in Table 66. The actual value is defined in Section 24. Table 66 - Protocol ID values Definition J1708_PS J1708_CHx Description SAE J1708 protocol with pin selection Additional channels of SAE J1708 protocol 17.3.2.2 Configuration Parameters 17.3.2.2.1 SET_CONFIG and GET_CONFIG Supported Parameters The DATA_RATE and LOOPBACK configuration parameters will be supported for the SAE J1708 protocol. The default value for LOOPBACK will be zero. 17.4 Message Structure 17.4.1 C/C++ Definition There is no change to the C/C++ definition. 17.4.2 Elements There are no changes to any of the elements. 17.4.3 Message Data Formats When transmitting messages, the Transmit Message Priority will be encoded in four TxFlags bits. The SAE J2534-2 device will calculate the check sum and send it after the last data byte of the message unless the CHECKSUM_DISABLED connect flag was set on the PassThruConnect, in which case the application is responsible for calculating the check sum and placing it as the last data byte of the message. (Refer to SAE J1708 for instructions on how to calculate the check sum.) For received messages, when the CHECKSUM_DISABLED flag is not set, the check sum will be calculated as per SAE J1708 and compared to the last byte in the data stream. If the check sum is correct, the message will be place in the receive queue with ExtraDataIndex pointing to the check sum. If the check sum does not verify, the message will be discarded. If CHECKSUM_DISABLED was set on the PassThruConnect, all the data received on the bus will be treated as message data. Table 67 - Allowed message sizes per protocol Protocol J1708_PS or J1708_CHx Min Tx 1 Max Tx 4095 Min Rx 1 Max Rx 4095 Notes SAE INTERNATIONAL J2534™-2 DEC2020 Page 70 of 146 The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_MSG_PROTOCOL_ID. 17.4.4 Conventions for Returning Messages from the API For the SAE J1708 protocol, loopback messages returned by the API will have TX_MSG_TYPE set in RxStatus. 17.4.5 Message Flag and Status Definitions Changes to TxFlags bits: Table 68 - TxFlags bit definitions Definition MSG_PRIORITY_VALUE TxFlags Bit(s) 16 -19 Description Message priority Value Valid values 1 thru 8 Value of 0 or greater than 8 will be treated as priority 8 If the TX message is looped back to the application MSG_PRIORITY_VALUE must be preserved in the looped back message. If MSG_PRIORITY_VALUE is not valid the device will use the lowest priority (a value of 8) for that message. The TX_MSG_TYPE is the only RxStatus flag supported in SAE J1708. It will be set on all loop back TX messages. 17.5 Discovery Support The device shall report support for the SAE J1708 protocol and associated parameters through the discovery mechanism defined in Section 25. 18. EXTENDED PASSTHRUIOCTL FOR DEVICE CONFIGURATION PARAMETERS 18.1 Scope of the Extended PassThruIoctl Optional Feature This section details the extensions to an SAE J2534-1 interface that will allow setting and retrieval of device-wide configuration parameters. Currently, this feature is limited to support of ten non-volatile and re-writable data storage parameters. However, the feature may be extended in future to support additional non-protocol-specific parameters. This section details only the changes from SAE J2534-1. Items not specifically detailed in this section are assumed not to have changed from SAE J2534-1. 18.2 Pass-Thru Concept This optional feature defines an extension to the pass-thru concept that allows device-wide parameters to be specified. More specifically, the current definition is for ten data items to be stored on the PassThru interface in a non-volatile storage area (i.e., an area in which data survives disconnection from a power source). Each data item will be 4-bytes long. 18.3 Win32 Application Programming Interface 18.3.1 API Functions - Overview The PassThruIoctl called with GET_DEVICE_CONFIG and SET_DEVICE_CONFIG IoctlIDs are used to set device parameters and require the DeviceID to be passed as the first PassThruIoctl parameter. Table 69 summarizes the changes to the SAE J2534-1 API function. SAE INTERNATIONAL J2534™-2 DEC2020 Page 71 of 146 Table 69 - SAE J2534 API functions Function PassThruIoctl Description GET_DEVICE_CONFIG and SET_DEVICE_CONFIG are added. Parameters NON_VOLATILE_STORE_1 to NON_VOLATILE_STORE_10 are added. 18.4 IOCTL Section Table 70 provides details of the additional IoctlIDs that support this feature. Table 70 - IOCTL details Value of IoctlID GET_DEVICE_C ONFIG InputPtr Represents Pointer to SCONFIG_LIST OutputPtr Represents NULL pointer SET_DEVICE_CO NFIG Pointer to SCONFIG_LIST NULL pointer Purpose To get the configuration or status of the pass-thru device. To set the configuration or status of the pass-thru device. 18.4.1 GET_DEVICE_CONFIG The IoctlID value of GET_DEVICE_CONFIG is used to obtain the configuration or status of the pass-thru device. The calling application is responsible for allocating and initializing the associated parameters described in Table 71. When the function is successfully completed, the corresponding parameter value(s) indicated in Table 73 will be placed in each value. SAE INTERNATIONAL J2534™-2 DEC2020 Page 72 of 146 Table 71 - GET_DEVICE_CONFIG details Parameter Description DevicelID Device ID assigned by DLL during PassThruOpen. IoctlID Is set to the define GET_DEVICE_CONFIG. InputPtr Points to the structure SCONFIG_LIST, which is defined as follows: typedef struct { unsigned long NumOfParams; /* number of SCONFIG elements */ SCONFIG *ConfigPtr; /* array of SCONFIG */ } SCONFIG_LIST where: NumOfParms is an INPUT, which contains the number of SCONFIG elements in the array pointed to by ConfigPtr. ConfigPtr is a pointer to an array of SCONFIG structures. The structure SCONFIG is defined as follows: typedef struct { unsigned long Parameter; /* name of parameter */ unsigned long Value; /* value of the parameter */ } SCONFIG where: Parameter is an INPUT that represents the parameter to be obtained (see Table 73 for a list of valid parameters). Value is an OUTPUT that represents the value of that parameter (see Table 73 for a list of valid values). OutputPtr Is a NULL pointer, as this parameter is not used. Requesting other parameters shall result in the Return Value ERR_INVALID_IOCTL_PARAM_ID. 18.4.2 SET_DEVICE_CONFIG The IoctlID value of SET_DEVICE_CONFIG is used to set the configuration or status of the pass-thru device. The calling application is responsible for allocating and initializing the associated parameters described in Table 72. When the function is successfully completed the corresponding parameter(s) and value(s) indicated in Table 73 will be in effect. SAE INTERNATIONAL J2534™-2 DEC2020 Table 72 - SET_DEVICE_CONFIG details Parameter Description DevicelID Device ID assigned by DLL during PassThruOpen. IoctlID Is set to the define SET_DEVICE_CONFIG. InputPtr Points to the structure SCONFIG_LIST, which is defined as follows: typedef struct { unsigned long NumOfParams;/* number of SCONFIG elements */ SCONFIG *ConfigPtr; /* array of SCONFIG */ } SCONFIG_LIST where: NumOfParms is an INPUT, which contains the number of SCONFIG elements in the array pointed to by ConfigPtr. ConfigPtr is a pointer to an array of SCONFIG structures. The structure SCONFIG is defined as follows: typedef struct { unsigned long Parameter; /* name of parameter */ unsigned long Value; /* value of the parameter */ } SCONFIG where: Parameter is an INPUT that represents the parameter to be set (see Table 73 for a list of valid parameters). Value is an INPUT that represents the value of that parameter (see Table 73 for a list of valid values). OutputPtr Is a NULL pointer, as this parameter is not used. Setting other parameters shall result in the Return Value ERR_INVALID_IOCTL_PARAM_ID. Page 73 of 146 SAE INTERNATIONAL J2534™-2 DEC2020 Page 74 of 146 Table 73 - IOCTL GET_DEVICE_CONFIG/SET_DEVICE_CONFIG parameter details Parameter NON_VOLATILE_STORE_1 Valid Values for Parameter 0x00000000 0xFFFFFFFF Default Value (decimal) 0 Description First 4-byte non-volatile data storage location. NON_VOLATILE_STORE_2 0x00000000 0xFFFFFFFF 0 Second 4-byte non-volatile data storage location. NON_VOLATILE_STORE_# 0x00000000 0xFFFFFFFF 0 Third 4-byte non-volatile data storage location. NON_VOLATILE_STORE_4 0x00000000 0xFFFFFFFF 0x00000000 0xFFFFFFFF 0 Fourth 4-byte non-volatile data storage location. Fifth 4-byte non-volatile data storage location. NON_VOLATILE_STORE_6 0x00000000 0xFFFFFFFF 0 Sixth 4-byte non-volatile data storage location. NON_VOLATILE_STORE_7 0x00000000 0xFFFFFFFF 0 Seventh 4-byte non-volatile data storage location. NON_VOLATILE_STORE_8 0x00000000 0xFFFFFFFF 0 Eighth 4-byte non-volatile data storage location. NON_VOLATILE_STORE_9 0x00000000 0xFFFFFFFF 0 Ninth 4-byte non-volatile data storage location. NON_VOLATILE_STORE_10 0x00000000 0xFFFFFFFF 0 Tenth 4-byte non-volatile data storage location. NON_VOLATILE_STORE_5 0 Notes for NON_VOLATILE_STORE parameters: 1. The SET_DEVICE_CONFIG operation shall complete, and the DLL shall return from the PassThruIoctl call within 10 seconds. 2. Parameter values shall survive disconnection from all power sources. 3. Parameter values shall not be affected by an interface device firmware programming operation. 4. Parameter values shall persist for a minimum of 6 months after each write operation. Usage Guideline A typical SAE J2534 interface may have a limit on the number of writes to non-volatile memory. These parameters are intended to be SET infrequently. The number of write cycles can be minimized by writing as many parameters as possible in one SET_DEVICE_CONFIG call. 18.5 Discovery Support The device shall report support for Extended PassThruIoctl for Device Configuration through the discovery mechanism defined in Section 25. 19. TP2.0 PROTOCOL 19.1 Scope of the TP2.0 Protocol Optional Feature This section details the extensions to an SAE J2534-1 interface that will allow support of the TP2.0 protocol. This section details only the changes from SAE J2534-1. Items not specifically detailed in this section are assumed not to have changed from SAE J2534-1. SAE INTERNATIONAL J2534™-2 DEC2020 Page 75 of 146 19.2 Pass-Thru System Requirements 19.2.1 Simultaneous Communication on Multiple Protocols Support for simultaneous communication of TP2.0 with other protocols shall be equivalent to the definition for CAN in SAE J2534-1. 19.2.2 Pin Usage TP2.0 uses SAE J1962 pins 6 and pin 14. As with all SAE J2534-2 optional protocols, no default pin is identified. Therefore, the application developer will be required to set the pin to be used. Refer to the SAE J1962 pin selection section of SAE J2534-2 for details of the method used to switch SAE J1962 pins. 19.3 Win32 Application Programming Interface 19.3.1 API Functions - Overview Feature Implementation Summary: Some ECUs support the TP2.0 protocol that uses the CAN physical layer interface ISO11898-1:2015 (Classic CAN only). Refer to SAE J2819 for the detailed protocol information. Key features of the TP2.0 protocol are the establishment and maintenance of a channel between two nodes. The maintenance of a connection on an established channel and the ability to send broadcast messages that repeat five times at a configurable time spacing. The guidelines to implement this communication capability to SAE J2534-2 API are shown below: • The interface shall be able to connect a 500K baud CAN physical layer interface on pins 6 and 14 of the SAE J1962 connector. • Send a broadcast message repeated five times with the last 2 bytes alternating between 0x55 and 0xAA, with a configurable time spacing between the messages. • Send a re-trigger broadcast message which starts out as stated above with additional messages sent at a slower configured rate. • The ability to stop the re-triggered broadcast message. • The ability to establish and maintain four channels with connections simultaneously. • Send indication messages to the application when a connection is established or disconnected. • The interface must fragment and reassemble messages. • The interface must be able to delay the transmission of the transport packets as specified by T1 and T3 in the TP2.0 protocol. The interface must support a minimum time resolution of 500 µs. NOTE: Even though the TP2.0 specification can specify a time delay of 100 µs, the PassThru device need only support a minimum delay of 500 µs. The PassThru device should always extend a requested delay time to the nearest 500 µs time interval. • Buffer one outgoing and one incoming messages as they are being fragmented or reassembled on each channel. • Handle the Acknowledge with retry and break events. SAE INTERNATIONAL J2534™-2 DEC2020 Page 76 of 146 • The interface shall automatically transmit the Connection Test telegram to keep a connection active. • The device shall maintain the sequence number as part of the data telegram and data acknowledge telegram for each connection. • The interface shall pass up to the application any messages received unexpectedly that passes any filter criteria, i.e., outside the bounds of an established connection. • The interface shall support one connection as a passive device (a module on the network requests a connection with the interface). This passive connection is configurable meaning it can be disabled. A passive connection counts as one of the four connections supported by the interface. Messages passed to PassThruWriteMsgs by the application will include all message address and data bytes, including the proper CAN address for the device or connection. All received messages shall be queued by the interface for retrieval by calls to PassThruReadMsgs. Data telegrams received on an established connection will be reassembled into a PASSTHRU_MSG that is stored in the receive message queue. The application will be able to retrieve this message with a call to PassThruReadMsgs. Support for the TP2.0 protocol is achieved by the addition of a new ProtocolID, modified behavior of PassThruStartPeriodicMsg, new PassThruIoctl IoctlIDs, and a new low-level implementation for transmission and reception of sequenced messages. This protocol requires additional API and device software support, but no additional hardware compared with a standard SAE J2534-1 device. If the TP2.0 protocol is not supported, ERR_NOT_SUPPORTED will be returned by the call PassThruConnect. The calling application will be required to notify the user that this optional feature may not be supported by the interface. API Change List: Table 74 summarizes the changes to the SAE J2534-1 API functions. Table 74 - SAE J2534 API functions Function PassThruConnect PassThruWriteMsgs PassThruStartPeriodicMsg PassThruIoctl Description of Change Added new ProtocolID values. Added new functionality to this function. Added new functionality to this function. New configuration parameters are added. 19.3.2 API Functions - Detailed Information 19.3.2.1 PassThruConnect When PassThruConnect is called with the TP2_0_PS Protocol ID, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG is made to select the desired cable and pins. 19.3.2.1.1 C/C++ Prototype There are no changes defined for the function prototype. 19.3.2.1.2 Parameters There are no changes to the parameters. 19.3.2.1.3 Connect Flag Values There are no changes to the connect flags. SAE INTERNATIONAL J2534™-2 DEC2020 Page 77 of 146 19.3.2.1.4 ProtocolID Values Only the definition and description of the ProtocolID value is defined in Table 75. The actual value is defined in Section 24. Table 75 - Protocol ID values Definition TP2_0_PS TP2_0_CHx Description TP2.0 protocol with pin selection. Additional channels of TP2.0 protocol. 19.3.2.2 PassThruWriteMsgs When used with the TP2.0 protocol, the PassThruWriteMsgs function will perform the following additional functions. • If the write message’s address matches an established connection address, the message will be sent using the TP2.0 protocol. • If the write message’s address does not match an established connection address and the message size fits in a single CAN message, the message will be sent on the bus. • If the write message’s address does not match an established connection address and the message size is larger than a single CAN message, the error ERR_NO_CONNECTION_ESTABLISHED will be returned. • If the TxFlag “TP2_0_BROADCAST_MSG” is set in the message and the message contains a valid broadcast address in Data[0] (Data[0] value between 0xF0 and 0xFF), the message will be sent five times using TP2_0_ T_BR_INT as the rate, with the last 2 bytes of the message alternating between 0xAA and 0x55. If Data[0] does not contain a valid broadcast address, the function will return ERR_INVALID_MSG. 19.3.2.3 PassThruStartPeriodicMsg This function is used to send the re-triggered broadcast messages as well as normal periodic messages. To send the TP2.0 re-triggered broadcast message, populate the message data with the broadcast message, set the TxFlag “TP2_0_BROADCAST_MSG” bit and set the periodic rate to the re-trigger rate desired. This function will immediately send out the message five times using TP2_0_T_BR_INT as the rate, and then send the message at the periodic rate (alternating the last two bytes of the message between 0xAA and 0x55). 19.3.3 IOCTL Section Table 76 provides the details on the new IOCTL IDs available through the PassThruIoctl function. Table 76 - IOCTL details Value of IoctlID REQUEST_CONNECTION TEARDOWN_CONNECTION InputPtr Represents Points to SBYTE_ARRAY Points to SBYTE_ARRAY OutputPtr NULL pointer Purpose To establish a channel and connection. NULL pointer To tear down an established connection. 19.3.3.1 SET_CONFIG and GET_CONFIG Additional Parameters The DATA_RATE, LOOPBACK, BIT_SAMPLE_POINT, and SYNC_JUMP_WIDTH configuration parameters will be supported for the TP2.0 protocol. The default values for TP2.0 are LOOPBACK = 0, BIT_SAMPLE_POINT = 80%, and SYNC_JUMP_WIDTH = 15%. Ten new configuration parameters will be added to support TP2.0 protocol. SAE INTERNATIONAL J2534™-2 DEC2020 Page 78 of 146 Table 77 - TP2.0 configuration parameters Parameter TP2_0_T_BR_INT TP2_0_T_E TP2_0_MNTC TP2_0_T_CTA TP2_0_MNCT TP2_0_MNTB TP2_0_MNT TP2_0_T_WAIT TP2_0_T1 TP2_0_T3 TP2_0_IDENTIFER TP2_0_RXIDPASSIVE Valid Values 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 count per bit) 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 count per bit) 0X0 - 0XFFFF (1 count per bit) 0X0 - 0XFFFF (1 count per bit) 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 ms per bit) 0X0 - 0XFFFF (1 ms per bit) 0X0 or 0X200 0X2EF 0X0 or 0X300 0X7FF Default Values 20 100 10 1000 5 5 2 100 100 0 0 0 Description Broadcast interval: time interval between the five messages of a single broadcast message. Maximum time-out waiting for a Channel Acknowledge or Connection Acknowledge telegram. Retry count for connection management messages. Connection test time out for the active device. Retry count for sending connection test messages. Maximum number of Not Ready Acknowledge received in on block. Maximum repeats of acknowledge requests. Time to wait before the next transmission when a Not Ready Acknowledge is received. Time out used when waiting for a response. Minimum time the SAE J2534 device needs between telegrams sent to it. The passive identifier CAN ID is used by the interface to receive requests for a connection. The value of zero disables this feature. The passive RX CAN ID used in a passive connection. The value of zero disables this feature. No other SAE J2534-1 defined configuration parameters are supported with the exception of J1962_PINS. The TP2_0_IDENTIFIER is used by application to give the interface a CAN ID which will be used to compare with the destination field in the TP2.0 messages. An implicit PASS filter will be started when this value is set between the range of 0x200 and 0x2EF. The implicit PASS filter will be cleared when the address is changed to zero. If a value that is not zero or in the range of 0x200 through 0x2EF is requested, the PassThruIoctl will return ERR_INVALID_IOCTL_VALUE. If the TP2_0_IDENTIFIER has been set to a valid value and the request for a connection is received from the network, it will be rejected with a 0xD8 “Temporarily no resources are free” response if all four connections are in use, or the TP2_0_RXIDPASSIVE is zero. If the request for connection is received and a connection is available and TP2_0_RXIDPASSIVE is set to a valid value, the connection will be established and the CONNECTION_ESTABLISHED Indication message will be sent to the application. The TP2_0_RXIDPASSIVE will be the first four data bytes Data[0] through Data[3] of the indication message and the TX-ID-P address from the network device will be the next four data bytes Data[4] through Data[7], Data[4] is MSB. 19.3.3.2 REQUEST_CONNECTION The IoctlID parameter of REQUEST_CONNECTION is used to request the establishment of a channel and connection between the SAE J2534 device and an ECU. SAE INTERNATIONAL J2534™-2 DEC2020 Page 79 of 146 Table 78 - REQUEST_CONNECTION details Parameter ChannelID IoctlID InputPtr Description Channel ID assigned by DLL during PASSTHRUCONNECT Is set to REQUEST_CONNECTION Points to the structure SBYTE_ARRAY, which is defined as follows: Typedef struct { unsigned long NumOfBytes; /* number of bytes in array */ unsigned char *BytePtr; /* array of bytes */ } where: NumOfBytes is an input that indicates the number of bytes in the array BytePtr. It should always be 11 for REQUEST_CONNECTION. BytePtr[0] through BytePtr[3] is the CAN address (identifier). BytePtr[0] is MSB. BytePtr[4] is the destination. BytePtr[5] is the opcode (0xC0). BytePtr[6] through BytePtr[7] is the TX-ID-A information. BytePtr[8] through BytePtr[9] is the RX-ID-A information. OutputPtr BytePtr[10] is the application type. NULL pointer The data contained in the BytePtr array is the equivalent of the CAN message sent to Request the Channel. The BytePtr data will be sent on the network to try and start a connection. If the RX-ID-A is already in use by another established channel, the error ERR_NOT_UNIQUE will be returned. When a connection is successfully established, an implicit PASS filter will be created such that all messages received on the channel from CAN ID RX-ID-A will be available to the application. The implicit PASS filter will consume one of the minimum of ten filters required by SAE J2534-1. NOTE: With four open channels, a total of four filters will be consumed as implicit PASS filters. The REQUEST_CONNECTION IOCTL call is non-blocking which means the API will not wait for the connection to be made. A CONNECTION_ESTABLISHED indication will be placed in the RX queue indicating a successful Connection Request. A CONNECTION_LOST indication will be placed in the RX queue to indicate a failed Connection Request. The RX-ID-A specified in the REQUEST_CONNECTION will be the CAN address of the indication message. If the Data in the BytePtr array is ill-formatted, or the NumOfBytes is not 11, the function will return with the error ERR_INVALID_IOCTL_VALUE. SAE INTERNATIONAL J2534™-2 DEC2020 Page 80 of 146 19.3.3.3 TEARDOWN_CONNECTION The IoctlID parameter of TEARDOWN_CONNECTION is used to tear down an established channel and connection between the SAE J2534 device and an ECU. Table 79 - TEARDOWN_CONNECTION details Parameter ChannelID IoctlID InputPtr Description Channel ID assigned by DLL during PassThruConnect Is set to TEARDOWN_CONNECTION Points to the structure SBYTE_ARRAY, which is defined as follows: Typedef struct { unsigned long NumOfBytes; /* number of bytes in array */ unsigned char *BytePtr; /* array of bytes */ } where: NumOfBytes is an input that indicates the number of bytes in the array BytePtr. It must always be 4 for TEARDOWN_CONNECTION. OutputPtr BytePtr[0] through BytePtr[3] is the receiving CAN address, BytePtr[0] is MSB. NULL pointer The data contained in the BytePtr array is the CAN address that the SAE J2534-2 device is receiving CAN messages for this connection. This is the same address as the RX-ID-A in the REQUEST_CONNECTION call. The implicit pass filter for this connection will be removed once the connection has been torn down. NOTE: All filters set up with PassThruStartMsgFilter will remain even if they match the ID used in the connection. The TEARDOWN_CONNECTION IOCTL call is non-blocking which means the API will not wait for the connection to be torn down. A CONNECTION_LOST indication will be placed in the RX queue indicating the success of the connection tear down and the implicit PASS filter will be removed. If the data in the BytePtr array does not match an established connection or the NumOfBytes is not four, then the function will return with the error ERR_INVALID_IOCTL_VALUE. 19.4 Message Structure 19.4.1 C/C++ Definition There is no change to the C/C++ definition. 19.4.2 Message Data Formats All received messages that comply with the timing and message structure requirements shall be queued to the application. Additional Protocol IDs and message limitations have been defined in Table 80. Table 80 - Allowed message sizes per protocol Protocol ID TP2_0_PS or TP2_0_CHx Min Tx 4 Max Tx 4096 Min Rx 4 Max Rx 4096 Notes 4 bytes of CAN ID followed by 4092 bytes of data SAE INTERNATIONAL J2534™-2 DEC2020 Page 81 of 146 The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_ MSG_PROTOCOL_ID. 19.4.3 Format Checks for Messages Passed to the API If DataSize violates Min Tx or Max Tx columns the vendor DLL shall return, ERR_INVALID_MSG. 19.4.4 Message Flag and Status Definitions Supported Message Status (RxStatus) Definitions: The TX_MSG_TYPE and CAN_29BIT_ID RxStatus bits will be supported. For the TP2.0 protocol, loopback messages returned by the API will have TX_MSG_TYPE set in RxStatus. Messages with a 29-bit ID field will have CAN_29BIT_ID set. There are two additions to the Message Status (RxStatus) definitions to be used as indications. Table 81 - RxStatus bit definitions Definition CONNECTION_LOST CONNECTION_ESTABLISHED RxStatus Bit(s) 17 16 Description Connection lost status indication will be sent when an established connection has been lost, or when an attempt to establish a connection fails. The receiving CAN address RX-ID-A or RX-ID-P will be in Data[0] through Data[3] of the message, Data[0] is MSB. Data[4] will indicated why the connection failed: 0 = teardown, 1= timeout, 0xD6 = not supported, 0xD7 = temporarily not supported, 0xD8 = no resources free, ExtraDataIndex = 0, and DataSize = 5. TP2.0 only. The implicit PASS filter is removed. Connection established status indication will be sent when a connection is successfully established. The receiving CAN address RX-ID-A or RX-ID-P will be in Data[0] through Data[3] of the message Data[0] is MSB. The sending CAN address TX-ID-A or TX-ID-P will be in Data[4] through Data[7], Data[4] is MSB. ExtraDataIndex = 0, DataSize = 8. TP2.0 only Value 0 = no connection lost indication 1 = connection lost or establish attempt failed 0 = no connection indication 1 = connection was successful Supported TxFlags Definitions: The TxFlag CAN_29BIT_ID will be supported if the TP2.0 connection was established with CAN_ID_BOTH and a 29-bit CAN message needs to be sent. SAE INTERNATIONAL J2534™-2 DEC2020 Page 82 of 146 The One Additional TxFlags Definition: Table 82 - TxFlag bit definition Definition TP2_0_BROADCAST_MSG TxFlags Bit(s) 16 Description Send this message as a broadcast, which means it will be sent five times with an interval of TP2_0_ T_BR_INT. The last two data bytes will alternate between 0x55 and 0xAA. Value 0 = normal message 1 = TP2.0 broadcast message 19.5 Return Values A new Return Value has been defined and shown in Table 83. Table 83 - Additional return values for the TP2.0 protocol Definition ERR_NO_CONNECTION_ESTABLISHED Description TP2.0 connection has been lost or was never established 19.6 Discovery Support The device shall report support for the TP2.0 protocol and associated parameters through the discovery mechanism defined in Section 25. 20. FAULT-TOLERANT CAN 20.1 Scope of the Fault-Tolerant CAN Optional Feature Information contained in this section will define extensions to a compliant SAE J2534-1 interface to support Fault-Tolerant CAN. 20.2 Pass-Thru System Requirements 20.2.1 Pin Usage Fault-Tolerant CAN (FTCAN) may be connected to either of these sets of pins on the SAE J1962 connector: • Pin 1 - CAN-high, pin 9 - CAN-low • Pin 3 - CAN-high, pin 11 - CAN-low As with all SAE J2534-2 optional protocols, no default pin is identified, therefore, the application developer will be required to set the pin to be used. See the SAE J1962 pin selection section for discussion of pin usage. 20.3 Win32 Application Programming Interface 20.3.1 API Functions - Overview Information contained in this section is intended to define the API resources required to incorporate an optional protocol channel. This channel, identified as Fault-Tolerant CAN (FTCAN), will require hardware and software API support to fully implement this feature. From the SAE J2534 API perspective, FT_CAN_PS and FT_CAN_CHx are equivalent to CAN_PS and CAN_CHx except as specifically mentioned in this section. Likewise, FT_ISO15765_PS and FT_ISO15765_CHx are equivalent to ISO15765_PS and ISO15765_CHx except as specifically mentioned in this section. SAE INTERNATIONAL J2534™-2 DEC2020 Page 83 of 146 The details on the physical implementation of FTCAN are defined in ISO11898-3. If this feature is not supported an error code, ERR_NOT_SUPPORTED, will be returned by the call PassThruConnect. Table 84 summarizes the changes to the SAE J2534-1 API functions. Table 84 - SAE J2534 API functions Function PassThruConnect Description of Change Added new ProtocolID values. 20.3.2 API Functions - Detailed Information 20.3.2.1 PassThruConnect When PassThruConnect is called with either the FT_CAN_PS or FT_ISO15765_PS Protocol IDs, the physical layer remains disconnected until a call to PassThruIoctl, SET_CONFIG is made to select the desired cable and pins. 20.3.2.2 ProtocolID Values Only the definition and description of the ProtocolID value is defined in Table 85. The actual value is defined Section 24. Table 85 - ProtocolID descriptions Definition FT_CAN_PS FT_ISO15765_PS FT_CAN_CHx FT_ISO15765_CHx Description Raw fault-tolerant CAN messages with pin selection Fault-tolerant CAN adhering to ISO15765-2 flow control with pin selection Additional channels of raw fault-tolerant CAN messages Additional channels of fault-tolerant CAN adhering to ISO15765-2 flow control 20.4 Message Structure 20.4.1 Elements The ProtocolID field of the pass-thru message structure shall always contain the ProtocolID that was passed into PassThruConnect function. All other ProtocolIDs will result in ERR_MSG_PROTOCOL_ID. (The only exception to this is the mixed format frames feature on a CAN network.) SAE J2534-1 definitions of requirements, restrictions, and error conditions for CAN and ISO15765 protocols will apply to single wire CAN channels discussed above. 20.4.2 Message Flag and Status Definitions There is one addition to the Message Status (RxStatus) definitions. Table 86 - New RxStatus definitions Definition LINK_FAULT RxStatus Bit(s) 17 Description Status bit in a received message that is set when the transceiver has detected a network fault, but the device was still able to correctly receive the message. Value 0 = no fault 1 = fault detected SAE INTERNATIONAL J2534™-2 DEC2020 Page 84 of 146 20.5 Discovery Support The device shall report support for Fault Tolerant CAN and associated parameters through the discovery mechanism defined in Section 25. 21. CAN FD PROTOCOL 21.1 Scope of the CAN FD Optional Feature Information contained in this section will define extensions to a compliant SAE J2534-1 interface to support CAN FD. 21.2 Pass-Thru System Requirements 21.2.1 Pin Usage As with all SAE J2534-2 optional protocols, no default pin is identified See Section 6 for details of the method used to switch cable and pins. CAN FD is typically connected to the following pins on the SAE J1962 connector: Option # 1 2 3 4 CAN High 6 3 12 1 CAN Low 14 11 13 9 Note that when PassThruConnect is called, the physical layer remains disconnected until the data phase data rate has been set and a call to PassThruIoctl, SET_CONFIG, J1962_PINS is made. The cable used to connect the pass-thru device to the vehicle’s SAE J1962 connector must meet the wiring requirements for CAN FD. 21.2.2 Communication Protocol The following features of CAN FD must be supported by the pass-thru device: a. 125, 250, 500, and 1000 kbps arbitration data rates. b. 125, 250, 500, 1000, 2000, 4000, and 5000 kbps data phase data rates. c. 11- and 29-bit identifiers for both CAN 2.0 and CAN FD messages. d. Transmitting and receiving both CAN 2.0 or CAN FD messages. e. Support all the frame sizes as defined by CAN FD. f. Shall support a switchable 120-Ω termination resistor between CAN high and CAN low. Refer to ISO11898-1:2015 for resistor specifications. g. Filters shall ignore the CAN message format; the message will be filtered on the address and data regardless of whether the message was received as a CAN 2.0 or CAN FD message. h. Periodic messages are limited to a maximum <DataSize> of 12 bytes, which includes the 4-byte CAN ID. SAE INTERNATIONAL J2534™-2 DEC2020 Page 85 of 146 21.2.3 Simultaneous Communication on Multiple Protocols The CAN FD implementation will have the same simultaneous communication on multiple protocol requirements as the CAN ProtocolID (either J1850VPW or J1850PWM, and either ISO9141 or ISO14230 must be able to run simultaneously). 21.3 Win32 Application Programming Interface 21.3.1 API Functions - Overview CAN FD will require hardware and software API support to fully implement this feature. The details on the physical implementation of CAN FD are defined in ISO11898-1:2015. A new <ProtocolID> has been defined for the CAN FD physical layer. This section details the API resources required to enable use of the SAE J2534 API as applied to CAN FD. NOTE: There are no remote frames in CAN FD format. CAN FD controllers are able to handle remote frames in CAN 2.0 format. If this feature is not supported an error code, ERR_NOT_SUPPORTED, will be returned by the call PassThruConnect. The calling application will be required to notify the user that this optional feature may not be supported by the interface. Table 87 summarizes the changes to the SAE J2534-1 API functions. Table 87 - SAE J2534 API functions Function PassThruConnect PassThruReadMsgs PassThruWriteMsgs PassThruIoctl Description of Change Added new <ProtocolID> values. Added <RxStatus> bits to indicate how a CAN FD message was received. Added <TxFlags> to control how a CAN FD message is transmitted. Added GET_CONFIG and SET_CONFIG parameters. Added new IOCTL IDs to support CAN FD capability. 21.3.2 API Functions - Detailed Information 21.3.2.1 PassThruConnect PassThruConnect sets up the pass-thru resources required for CAN FD communication. After a successful call to PassThruConnect, the physical layer shall remain disconnected, and no communication shall be possible until the data phase baud rate has been set, and subsequent to that the communications pins have been selected. It is critical that the data phase baud rate is set before the pins have been configured in order to ensure that the network is not corrupted. 21.3.2.1.1 C/C++ Prototype There are no changes defined for the function prototype. 21.3.2.1.2 Parameters There are no changes to the parameters. SAE INTERNATIONAL J2534™-2 DEC2020 Page 86 of 146 21.3.2.1.3 Connect Flag Values There are two connect flags defined for CAN FD: Table 88 - Connect flag values Definition CAN_29BIT_ID Description 0 = receive standard CAN ID (11 bit) 1 = receive extended CAN ID (29 bit) 0 = either standard or extended CAN ID used (defined by CAN_29BIT_ID) 1 = both standard and extended CAN ID used - if the CAN controller allows prioritizing either standard (11 bit) or extended (29 bit) CAN ID, then CAN_29BIT_ID will determine the higher priority ID CAN_ID_BOTH 21.3.2.1.4 <ProtocolID> Values The definition, description, and value of the <ProtocolID> value is defined in Table 89. Table 89 - <ProtocolID> descriptions Definition FD_CAN_PS FD_CAN_CHx Description CAN FD protocol with pin selection Additional channels of CAN FD 21.3.2.1.5 Return Values There are no changes defined for the return values. 21.3.2.2 PassThruReadMsgs 21.3.2.2.1 RxStatus Table 92 defines the <RxStatus> bits for CAN FD messages. 21.3.2.3 PassThruWriteMsgs 21.3.2.3.1 TxFlags Table 93 defines the <TxFlags> bits for CAN FD messages. 21.3.2.4 PassThruIoctl 21.3.2.4.1 IOCTL ID Values There are no new IOCTL ID values for CAN FD. 21.3.2.5 Configuration Parameters 21.3.2.5.1 SET_CONFIG and GET_CONFIG Supported Parameters The DATA_RATE and LOOPBACK configuration parameters defined for CAN in SAE 2534-1 will be supported. The BIT_SAMPLE_POINT and SYNC_JUMP_WIDTH configuration parameters are not changeable for CAN FD. The device must set these parameters to the values defined in SAE J2284. If SET_CONFIG is called with these parameters, the error ERR_NOT_SUPPORTED will be returned. GET_CONFIG can be used to read the arbitration phase BIT_SAMPLE_POINT and SYNC_JUMP_WIDTH set by the device. In addition, Table 90 shows the two new configuration parameters to support CAN FD. SAE INTERNATIONAL J2534™-2 DEC2020 Page 87 of 146 Table 90 - IOCTL GET_CONFIG/SET_CONFIG parameters details Parameter FD_CAN_DATA_PHASE_RATE HS_CAN_TERMINATION Valid Values for Parameter 125000, 250000, 500000, 1000000, 2000000, 4000000, and 5000000 0, 3 N/A Default Value (decimal) 0 Description The data rate used for the data section of a CAN FD message. The data phase rate cannot be less than the arbitration data rate. 0 = no termination 3 = 120-Ω termination For the Protocol ID FD_CAN_PS, the IoctlID SET_CONFIG configuration parameter FD_CAN_DATA_PHASE_RATE must be set before the pins are selected, otherwise the return value shall be ERR_FAILED. If setting of the data phase rate and pin selection are done in a single call, the application shall place the data phase rate configuration ahead of the pin selection in the configuration array, otherwise the return value shall be ERR_FAILED. For the Protocol IDs FD_CAN_CHx, the channel must remain at high-impedance until the IoctlID SET_CONFIG configuration parameter FD_CAN_DATA_PHASE_RATE is set, at which time the channel will be connected to the associated pins. ERR_PIN_INVALID shall be returned from PassThruReadMsgs, PassThruWriteMsgs, PassThruStartPeriodicMsg, or PassThruStartMsgFilter if the FD_CAN_DATA_PHASE_RATE has not been successfully set. 21.4 Message Structure 21.4.1 C/C++ Definition There is no change to the C/C++ definition. 21.4.2 Elements There is no change to any of the elements. 21.4.3 Message Data Formats When using FD_CAN_PS or FD_CAN_CHx the first four bytes of <Data> contain the 11-bit CAN ID or the 29-bit CAN ID: Table 91 - Allowed message sizes per protocol Protocol FD_CAN_PS or FD_CAN_CHx Min Tx 4 Max Tx 68 Min Rx 4 Max Rx 68 Notes 4 bytes of CAN ID plus 0 to 64 bytes of CAN data. Note: The CAN data is limited to 0 to 8, 12, 16, 20, 24, 32, 48, or 64 bytes. The <ProtocolID> field of the pass-thru message structure shall always contain the <ProtocolID> that was passed into PassThruConnect function. All other <ProtocolID>s will result in ERR_MSG_PROTOCOL_ID. 21.4.4 Format Checks for Messages Passed to the API The <ProtocolID> field of the pass-thru message structure shall always contain the <ProtocolID> that was passed into PassThruConnect function. If the <TxFlag> FD_CAN_FORMAT is set to 0 then ERR_INVALID_MSG shall be returned when the value of <DataSize> in the PASSTHRU_MSG structure is not between 4 bytes and 12 bytes. SAE INTERNATIONAL J2534™-2 DEC2020 Page 88 of 146 If the <TxFlag> FD_CAN_FORMAT is set to one, then ERR_INVALID_MSG shall be returned when the value of <DataSize> in the PASSTHRU_MSG structure is not as defined in Table 91. If CAN_ID_BOTH bit was not set during PassThruConnect then the <TxFlag> CAN_29_BIT flag of the message must match CAN_29_BIT flag passed to the PassThruConnect, otherwise ERR_INVALID_MSG is returned. 21.4.5 Conventions for Returning Messages from the API There are no changes to this section. 21.4.6 Conventions for Returning Indications from the API There are no changes to this section. 21.4.7 Message Flag and Status Definitions 21.4.7.1 RxStatus Supported <RxStatus> bits: Table 92 - <RxStatus> bit definitions Definition TX_MSG_TYPE Description Receive indication/transmit loopback CAN_29BIT_ID Indicates the CAN ID size for the CAN FD and CAN message For CAN FD frames this flag reflects the value of the BRS bit in the received frame FD_CAN_BRS FD_CAN_FORMAT Indicates the frame was received in the CAN 2.0 format FD_CAN_ESI Indicates the ERROR STATE of the node that sent the frame Value 0 = received, i.e., this message was transmitted on the bus by another node 1 = transmitted, i.e., this is the echo of the message transmitted by the PassThru device 0 = 11-bit identifier 1 = 29-bit identifier 0 = the CAN FD controller did not switch baud rate during the data phase (all bits at the arbitration speed) 1 = the CAN FD controller switched to the alternate baud rate during the data phase NOTE: The value shall be zero for CAN 2.0 frames 0 = the message was received using the CAN 2.0 format 1 = the message was received in the CAN FD format 0 = error active node 1 = error passive node NOTE: This flag is not used for CAN 2.0 frames and shall be set to 0 SAE INTERNATIONAL J2534™-2 DEC2020 Page 89 of 146 21.4.7.2 TxFlags Supported <TxFlags> bits: Table 93 - <TxFlags> bit definitions Definition CAN_29BIT_ID FD_CAN_BRS FD_CAN_FORMAT Description Indicates the CAN ID size for the CAN FD and CAN message For CAN FD frames, this flag reflects the value of the BRS bit when sending a frame Indicates the format in which the frame will be transmitted 0 = 11 bit 1 = 29 bit Value 0 = the CAN FD controller will not switch baud rate during the data phase (all bits at the arbitration speed) 1 = the CAN FD controller will switch to the alternate baud rate during the data phase NOTE: The value shall be zero for CAN 2.0 frames 0 = the message will be transmitted using the CAN 2.0 format 1 = the message will be transmitted in the CAN FD format 21.5 Discovery Support The device shall report support for CAN FD Network and associated parameters through the discovery mechanism defined in Section 25. 22. ISO15765 ON CAN FD 22.1 Scope of the ISO15765 on CAN FD Optional Feature Information contained in this section will define extensions to a compliant SAE J2534-1 interface to support ISO15765 on CAN FD. 22.2 Pass-Thru System Requirements 22.2.1 Pin Usage Refer to pin usage section for CAN FD. 22.2.2 Communication Protocol Refer to CAN FD section for CAN FD related communication protocol requirements. In addition, the following shall be supported by the pass-thru device: a. Shall be capable of sending and receiving ISO15765-2:2016 messages in both CAN 2.0 and CAN FD formats. b. Shall be capable of sending ISO15765-2 messages with data lengths up to 4124 bytes, or 4123 bytes for extended addressed frames. c. Shall be capable of receiving ISO15765-2 messages with data lengths up to 4124 bytes, or 4123 bytes for extended addressed frames. SAE INTERNATIONAL J2534™-2 DEC2020 Page 90 of 146 d. Shall support the CAN_MIXED_FORMAT as described in Section 8. Additionally, filters shall ignore the CAN message format (messages will be filtered on the address and data regardless of whether the message was received as a CAN 2.0 or CAN FD message). e. For ISO15765 in CAN 2.0 format, single frames and the last consecutive frames are padded when data size is less than eight and padding is enabled. f. For ISO15765 in CAN FD format, single frames and the last consecutive frames are padded when data sizes greater than eight but less than the CAN FD frame size when padding is enabled as defined in ISO15765-2. g. The pass-thru device will send all flow control frames using the same CAN message format as the first frame. Thus, a first frame received in CAN 2.0 format will generate a flow control frame using the CAN 2.0 format, a first frame received in CAN FD format will generate a flow control frame using the CAN FD format. h. Periodic messages for ISO15765 on CAN FD are limited to a maximum <DataSize> of 11 bytes, which includes 4 bytes of CAN ID. i. When the pass-thru device is transmitting a segmented ISO15765 on CAN FD message, the ISO15765 state machine shall accept flow control messages from the receiver in CAN FD format or CAN 2.0 format. j. If the sender (pass-thru device is receiving) sends a first frame with a message size larger than 4124 bytes, 4123 bytes with extended addressing, the pass-thru device shall NACK the first frame with a flow control frame containing the flow status overflow value. 22.2.3 Simultaneous Communication on Multiple Protocols See “Simultaneous Communication on Multiple Protocols” section for CAN FD. 22.3 Win32 Application Programming Interface 22.3.1 API Functions - Overview ISO15765 on CAN FD will require hardware and software to support CAN FD. The details on the physical implementation of CAN FD are defined in ISO11898-1:2015. A new <ProtocolID> has been defined for ISO15765 on a CAN FD network. This section details the API resources required to enable use of the SAE J2534 API as applied to ISO15765 on CAN FD. If this feature is not supported an error code, ERR_NOT_SUPPORTED, will be returned by the call PassThruConnect. The calling application will be required to notify the user that this optional feature may not be supported by the interface. Table 94 summarizes the changes to the SAE J2534-1 API functions. Table 94 - SAE J2534 API functions Function PassThruConnect PassThruReadMsgs PassThruWriteMsgs PassThruIoctl Description of Change Added new <ProtocolID> values. Added <RxStatus> bits to indicate how an ISO15765 on CAN FD message was received. Added <TxFlags> to control how an ISO15765 on CAN FD message is transmitted. Added GET_CONFIG and SET_CONFIG parameters. Added new IOCTL IDs to support ISO15765 on CAN FD capability. SAE INTERNATIONAL J2534™-2 DEC2020 Page 91 of 146 22.3.2 API Functions - Detailed Information 22.3.2.1 PassThruConnect PassThruConnect sets up the pass-thru resources required for CAN FD communication. After a successful call to PassThruConnect, the physical layer shall remain disconnected, and no communication shall be possible until the data phase baud rate has been set, and subsequent to that the communications pins have been selected. It is critical that the data phase baud rate is set before the pins have been configured in order to ensure that the network is not corrupted. 22.3.2.2 Connect Flag Values There are two connect flags defined for ISO15765 on CAN FD. Table 95 - Connect flag values Definition CAN_29BIT_ID Description 0 = receive standard CAN ID (11 bit) 1 = receive extended CAN ID (29 bit) 0 = either standard or extended CAN ID types used - CAN ID type defined by bit 8 1 = both standard and extended CAN ID types used - if the CAN controller allows prioritizing either standard (11 bit) or extended (29 bit) CAN ID’s then bit 8 will determine the higher priority ID type CAN_ID_BOTH Bit Use the SAE J2534-1 bit Use the SAE J2534-1 bit 22.3.2.2.1 <ProtocolID> Values The definition, description and value of the <ProtocolID> value is defined in Table 96. Table 96 - <ProtocolID> descriptions Definition FD_ISO15765_PS FD_ISO15765_CHx Description CAN FD adhering to ISO15765-2 flow control Additional channels of ISO15765 on CAN FD 22.3.2.2.2 Return Values There are no changes defined for the return values. 22.3.2.3 PassThruReadMsgs 22.3.2.3.1 RxStatus <RxStatus> identified in Table 99 will apply to all ISO15765 on CAN FD messages. 22.3.2.4 PassThruWriteMsgs 22.3.2.4.1 TxFlags <TxFlags> identified in Table 100 will apply to all ISO15765 on CAN FD messages. SAE INTERNATIONAL J2534™-2 DEC2020 Page 92 of 146 22.3.2.5 PassThruIoctl 22.3.2.5.1 IOCTL ID Values There are no new IOCTL ID values for ISO15765 on CAN FD. 22.3.2.6 Configuration Parameters 22.3.2.6.1 SET_CONFIG and GET_CONFIG supported parameters All configuration parameters defined for ISO15765 in SAE J2534-1 (except the parameter excluded below) shall be supported. The BIT_SAMPLE_POINT and SYNC_JUMP_WIDTH configuration parameters are not changeable for CAN FD. The device must set these parameters to the values defined in SAE J2284. If SET_CONFIG is called with these parameters, the error ERR_NOT_SUPPORTED will be returned. GET_CONFIG can be used to read the arbitration phase BIT_SAMPLE_POINT and SYNC_JUMP_WIDTH set by the device. In addition, Table 97 shows the five new configuration parameters to support CAN FD. Table 97 - IOCTL GET_CONFIG/SET_CONFIG parameters details Parameter FD_CAN_DATA_PHASE_RATE Valid Values for Parameter 250000, 500000, 1000000, 2000000, 4000000, and 5000000 FD_ISO15765_TX_DATA_LENGTH 8, 12, 16, 20, 24, 32, 48, 64 Default Value (decimal) N/A 64 HS_CAN_TERMINATION 0, 3 0 N_CR_MAX $0001 -$FFFF (1 ms per bit) 1000 ISO15765_PAD_VALUE $00 - $FF 0 Description The data rate used for the data section of a CAN FD message. The data phase rate cannot be less than the arbitration data rate. The data phase data size used for ISO15765 single frames, first frames, and consecutive frames. Note: The last frame shall always use the smallest data length possible. 0 = no termination 3 = 120-Ωtermination Consecutive frame timeout. Pad byte used to pad frames. For the Protocol ID FD_ISO15765_PS, the IoctlID SET_CONFIG configuration parameter FD_CAN_DATA_PHASE_RATE must be set before the pins are selected, otherwise the return value shall be ERR_FAILED. If setting of the data phase rate and pin selection are done in a single call, the application shall place the data phase rate configuration ahead of the pin selection in the configuration array, otherwise the return value shall be ERR_FAILED. For the Protocol IDs FD_ISO15765_CHx, the channel must remain at high-impedance until the IoctlID SET_CONFIG configuration parameter FD_CAN_DATA_PHASE_RATE is set, at which time the channel will be connected to the associated pins. ERR_PIN_INVALID shall be returned from PassThruReadMsgs, PassThruWriteMsgs, PassThruStartPeriodicMsg, or PassThruStartMsgFilter if the FD_CAN_DATA_PHASE_RATE has not been successfully set. SAE INTERNATIONAL J2534™-2 DEC2020 Page 93 of 146 22.4 Message Structure 22.4.1 C/C++ Definition There is no change to the C/C++ definition. 22.4.2 Elements There is no change to any of the elements. 22.4.3 Message Data Formats When using FD_ISO15765_PS or FD_ISO15765_Chx the first 4 bytes of data contain the 11-bit or 29-bit CAN ID: Table 98 - Allowed message sizes per protocol Protocol FD_ISO15765_PS or FD_ISO15765_CHx FD_ISO15765_PS or FD_ISO15765_CHx using Extended addressing Min Tx 4 Max Tx 4128 Min Rx 4 Max Rx 4128 5 4128 5 4128 Notes 4 bytes of CAN ID, 0 to 4124 bytes of ISO15765 data. 4 bytes of CAN ID, 1 byte extended address, 0 to 4123 bytes of ISO15765 data. 22.4.4 Format Checks for Messages Passed to the API The <ProtocolID> field of the pass-thru message structure shall always contain the <ProtocolID> that was passed into PassThruConnect function or a <ProtocolID> allowed by mixed format. If the <DataSize> in the PASSTHRU_MSG structure is not as defined in Table 98, then ERR_INVALID_MSG shall be returned. If CAN_ID_BOTH bit was not set during PassThruConnect, then the <TxFlag> CAN_29_BIT flag of the message must match CAN_29_BIT flag passed to the PassThruConnect, otherwise ERR_INVALID_MSG is returned. 22.4.5 Conventions for Returning Messages from the API There are no changes to this section. 22.4.6 Conventions for Returning Indications from the API There are no changes to this section. SAE INTERNATIONAL J2534™-2 DEC2020 Page 94 of 146 22.4.7 Message Flag and Status Definitions 22.4.7.1 RxStatus Supported <RxStatus> bits: Table 99 - <RxStatus> bit definitions Definition TX_MSG_TYPE Description Receive indication/transmit loopback START_OF_MESSAGE Indicates the reception of the first frame of an ISO15765 multi-frame message - CAN ID and extended address, if present, shall be included in the message structure ISO15765 TxDone indication - CAN ID and extended address, if present, shall be included in the message structure For <ProtocolID> ISO15765 a CAN frame was received with less than 8-data bytes ISO15765-2 addressing method TX_INDICATION ISO15765_ PADDING_ERROR ISO15765_ADDR_TYPE CAN_29BIT_ID FD_CAN_BRS Indicates the CAN ID type for the ISO15765 on CAN FD message For ISO15765 on CAN FD frames, this flag reflects the value of the BRS bit in the received frame FD_CAN_FORMAT Indicates the format in which the frame was received FD_CAN_ESI Indicates the ERROR STATE of the node that sent the frame Value 0 = received, i.e., this message was transmitted on the bus by another node 1 = transmitted, i.e., this is the echo of the message transmitted by the PassThru device 0 = not a start of message indication 1 = first frame received 0 = no TxDone 1 = TxDone 0 = no error 1 = padding error 0 = no extended address 1 = extended address is first byte after the CAN ID 0 = 11-bit identifier 1 = 29-bit identifier 0 = the CAN FD controller did not switch baud rate during the data phase (all bits at the arbitration speed) 1 = the CAN FD controller switched to the alternate baud rate during the data phase NOTE: The value shall be zero for CAN 2.0 frames 0 = the message was received using the CAN 2.0 format 1 = the message was received in the CAN FD format 0 = error active node 1 = error passive node NOTE: This flag is not used for CAN 2.0 frames and shall be set to zero SAE INTERNATIONAL J2534™-2 DEC2020 Page 95 of 146 22.4.7.2 TxFlags Supported <TxFlags> bits: Table 100 - <TxFlags> bit definitions Definition ISO15765_FRAME_PAD Description ISO15765-2 frame padding ISO15765_ADDR_TYPE ISO15765-2 addressing method CAN_29BIT_ID CAN ID type for CAN and ISO15765 For CAN FD frames, this flag reflects the value of the BRS bit when sending a frame FD_CAN_BRS FD_CAN_FORMAT Indicates the format in which the frame will be transmitted Value 0 = no padding 1 = pad all flow-controlled messages to a full frame size using the PAD value 0 = no extended address 1 = extended address is first byte after the CAN ID 0 = 11 bit 1 = 29 bit 0 = the CAN FD controller will not switch baud rate during the data phase (all bits at the arbitration speed) 1 = the CAN FD controller will switch to the alternate baud rate during the data phase NOTE: The value shall be zero for CAN 2.0 frames 0 = the message will be transmitted using the CAN 2.0 format 1 = the message will be transmitted in the CAN FD format 22.5 Discovery Support The device shall report support for ISO15765 on CAN FD Network and associated parameters through the discovery mechanism defined Section 25. 23. READING THE VOLTAGE ON AN SAE J1962 PIN 23.1 Scope of the Pin Voltage Read Optional Feature This section details the extensions to SAE J2534-1 that allow reading the voltage on a specified J1962 pin. A new IOCTL ID is defined for this purpose. 23.2 Win32 Application Programming Interface The PassThruIoctl function is used with the following IOCTL ID: READ_J1962PIN_VOLTAGE. The <IoctlID> value of READ_J1962PIN_VOLTAGE is used to obtain the voltage on the specified SAE J1962 pin measured at the time of the function call. Table 101 describes the parameters for this function call. When the function is successfully completed, voltage read on the designated pin shall be placed in the variable pointed to by <OutputPtr>. The measurable voltage range shall be minimum of 0 to 24 VDC with an accuracy of at least ±500 mV and a resolution of at least 200 mV. A larger range is allowed; typical regulated voltage range on 12 VDC systems is 0 to 16 V, while regulated voltage on 24 VDC systems is 0 to 32 V. When a voltage greater than the maximum range is sampled, the device should report its maximum range value. The units shall be in millivolts. The ground reference shall be signal ground, defined as pin 5 on the SAE J1962 connector. Attempting to reading voltages on pins 4 or 5 shall not be supported and shall result in the return value ERR_PIN_INVALID. SAE INTERNATIONAL J2534™-2 DEC2020 Page 96 of 146 Device shall return STATUS_NOERROR for pins it supports and ERR_PIN_INVALID for pins it does not support. A voltage reading on pin 16 should report the same voltage as a call to READ_VBATT. NOTE: The pass-thru device is not required to provide high sample rate voltage measurements. The pass-thru device must update the voltage measurement for the specified pin at a minimum 10 Hz rate. If an application is calling the READ_J1962PIN_VOLTAGE PassThruIoctl at a rate faster than the specified minimum rate, the pass-thru device may return the same reading for multiple function calls. Differences Between API Function Calls that Read Voltage: The voltage on pin 16 can be read using READ_VBATT or, if supported, READ_J1962PIN_VOLTAGE pin 16. An application should use the READ_VBATT function call to read the voltage on pin 16 since this method is the standard SAE J2534-1 way to read the voltage and must be supported on all devices. READ_J1962PIN_VOLTAGE shall be used when there is an application feature need to read voltage from any one of the supported connector pins to accomplish a diagnostic process supported by the diagnostic application. Table 101 - READ_J1962PIN_VOLTAGE details Parameter ChannelID IoctlID InputPtr OutputPtr Description Device ID assigned by DLL during PassThruOpen. Is set to READ_J1962PIN_VOLTAGE. Is a pointer to an unsigned long containing the pin number (1 to 16). Is a pointer to an unsigned long where the pin voltage is returned. The following is a code example to read the voltage on a pin: unsigned long ulPin = 1; unsigned long ulPinVoltage; long RetVal; RetVal = PassThruIoctl(DeviceID, READ_J1962PIN_VOLTAGE, &ulPin, &ulPinVoltage); if(RetVal == STATUS_NOERROR) { if(ulPinVoltage > 6000) printf(“Key is ON\n”); else printf(“Key is OFF”); } 23.3 Discovery Support The device shall report support for reading the SAE J1962 pin voltage through the discovery mechanism defined in Section 25. 24. ETHERNET_NDIS 24.1 Scope of the Ethernet Optional Feature This implementation of Ethernet is different from all other protocols because all message traffic shall be routed through an application interface for Ethernet as defined by the Microsoft’s Network Driver Interface Specification (NDIS). The actual implementation may use the PC’s internal network adapters or a remote NDIS miniport driver (RNDIS). The SAE J2534 API’s primary responsibility shall be to assert the activation signal, and configure routing for physical Ethernet connection to the DLC. The NDIS driver may be pre-loaded on the PC or loaded when PassThruConnect() is called. The installed NDIS driver shall be compatible with current and future versions of the Windows operating system. Figure 14 shows how the ETHERNET_NDIS implementation is divided between the pass-thru device and the Windows Ethernet system. SAE INTERNATIONAL J2534™-2 DEC2020 Page 97 of 146 Figure 14 - ETHERNET_NDIS implementation Session Layer ISO 14229-2 (UDS-DoIP) Ethernet NDIS Manufacturer Specific DoIP API DoIP Transport Layer DoIP UDP J2534 API Transport Layer WIN SOCK TCP/ IP TCP Network Layer Data Link Layer Physical Layer DoIP TCP ICMP UDP ARP IP Windows NDIS Adapter Activation Line ISO 13400-3 IEEE 802.3 24.2 Pass-Thru System Requirements Application developers should consult ISO13400-2 and Windows Socket Services examples when implementing communications with the vehicle that will take place after the Pass-Thru NDIS Connection is established. 24.2.1 Connection to Vehicle The Pass-Thru Interface shall support the following features to meet the Ethernet communication protocol requirements: a. Pass-thru Device attachment cable shall meet the wiring requirements for Ethernet pin specified for the vehicle DLC (reference ISO13400-4 and Table 104 of this document) b. Meet the test equipment activation line requirements specified in ISO13400-3:2016. c. Support the activation line process as defined in ISO13400-3:2016. d. Support data rates of 10M bps or 100M bps as defined in IEEE 802.3. SAE INTERNATIONAL J2534™-2 DEC2020 Page 98 of 146 e. Support the 100Base-TX and 10Base-T standards as defined in IEEE 802.3. f. Support the auto-MDI(X) feature as defined in IEEE 802.3. 24.2.2 Protocol Details 24.2.2.1 Link Activation The full requirements for the activation line shall be met. The activation line needs to be pulled high to a threshold greater than 5V and kept there for the Ethernet connection to be activated. The activation line shall be asserted whenever an SAE J2534 ETHERNET_NDIS protocol connection is created. Refer to ISO13400-3:2016 for guidance on Ethernet activation. 24.2.3 Simultaneous Communication on Multiple Protocols The ETHERNET_NDIS implementation will operate simultaneous with CAN or CAN-FD. Table 102 indicates which combinations of protocols shall be supported simultaneously. Table 102 - Simultaneous communication options Data Link Set 1 CAN CAN FD ISO15765 ISO15765 FD Data Link Set 2 Ethernet NDIS 24.2.4 Pin Usage ETHERNET_NDIS is connected to the following pins on the SAE J1962 connector: Table 103 - ETHERNET_NDIS pin usage details SAE J1962 PIN Option 1 Configuration 1 Option 2 Configuration Ethernet Tx (+) 3 Ethernet Tx (+) 8 Activation Line 9 Activation Line Ethernet Tx (-) 11 Ethernet Tx (-) 12 Ethernet Rx (+) Ethernet Rx (+) 13 Ethernet Rx (-) Ethernet Rx (-) 24.2.5 API Functions - Overview Information contained in this Section defines the API resources required to support an optional protocol channel. This channel, identified as ETHERNET_NDIS, will require hardware and software API support to fully implement this feature. SAE INTERNATIONAL J2534™-2 DEC2020 Page 99 of 146 If this feature is not supported, an error code—ERR_NOT_SUPPORTED—will be returned by the call PassThruConnect. Table 104 summarizes the changes to the SAE J2534-1 API functions. Table 104 - SAE J2534 API functions Function PassThruConnect PassThruReadMsgs PassThruWriteMsgs PassThruStartPeriodicMsg PassThruStartMsgFilter PassThruIoctl Description of Change Added new <ProtocolID> values. Always returns an error because this feature is not supported for ETHERNET_NDIS. Always returns an error because this feature is not supported for ETHERNET_NDIS. Always returns an error because this feature is not supported for ETHERNET_NDIS. Always returns an error because this feature is not supported for ETHERNET_NDIS. Added new IOCTL ID. 24.2.5.1 PassThruConnect Calling PassThruConnect with the <ProtocolID> set to ETHERNET_NDIS shall command the pass-thru interface to do one of the following: a. If a specific J1962 pin configuration is selected by the application, the Pass-Thru Interface shall connect to the designated pin configuration and then enable the activation pull-up that wakes the vehicle’s Ethernet network. b. Automatically determine Option 1 or Option 2 pin configuration by performing the activation process (per ISO13400), followed by enabling the activation pull-up that wakes the vehicle’s Ethernet network. PassThruConnect shall return ERR_NO_CONNECTION_ESTABLISHED if the activation line process fails. 24.2.5.1.1 <Flags> Values Table 105 outlines how the various <Flags> values will impact the Ethernet pins used. Table 105 - <Flags> descriptions Flags Description NDIS_PINS_OPTI ON2 State 0 NDIS_PINS_OPTI ON1 State 0 0 1 1 1 0 1 Automatically determine if the pin configuration is Option 1 or Option 2 by reading activation line per ISO13400 Force Option 1 pin configuration Force Option 2 pin configuration Automatically determine if the pin configuration is Option 1 or Option 2 by reading activation line per ISO13400 24.2.5.1.2 <BaudRate> Values The baud rate shall be auto negotiated by the NDIS device. The value of <BaudRate> is not evaluated by the API. SAE INTERNATIONAL J2534™-2 DEC2020 Page 100 of 146 24.2.5.1.3 <ProtocolID> Values The definition, description, and value of the <ProtocolID> value is defined in Table 106. Table 106 - <ProtocolID> descriptions Definition ETHERNET_NDIS Description Raw Ethernet messages. 24.2.5.2 PassThruReadMsgs The ETHERNET_NDIS protocol does not support receiving messages with the pass-thru device. Thus, a call to PassThruReadMsgs will return the error ERR_NOT_SUPPORTED. 24.2.5.3 PassThruWriteMsgs The ETHERNET_NDIS protocol does not support transmitting messages with the pass-thru device. Thus, a call to PassThruWriteMsgs will return the error ERR_NOT_SUPPORTED. 24.2.5.4 PassThruStartPeriodicMsg The ETHERNET_NDIS protocol does not support periodic messages. Thus, a call to PassThruStartPeriodicMsg will return the error ERR_NOT_SUPPORTED. 24.2.5.5 PassThruStartMsgFilter The ETHERNET_NDIS protocol does not support message filters. Thus, a call to PassThruStartMsgFilter will return the error ERR_NOT_SUPPORTED. 24.2.5.6 PassThruIoctl 24.2.5.6.1 IOCTL ID Values 24.2.5.6.1.1 GET_NDIS_ADAPTER_INFO The IOCTL ID, GET_NDIS_ADAPTER_INFO shall return information pertaining to the PC’s internal network adapter as defined by NDIS_ADAPTER_INFORMATION structure. This IOCTL ID assists an application in binding to a specific network interface adapter. When an application binds to a network interface adapter, it can filter which inbound and outbound messages to the configured adapter IP address will be forwarded to the application. Details of the GET_NDIS_ADAPTER_INFO are shown in Table 107. This information is read-only and cannot be set by an application. SAE INTERNATIONAL J2534™-2 DEC2020 Page 101 of 146 Table 107 - GET_NDIS_ADAPTER_INFO details Parameter ChannelID IoctlID InputPtr OutputPtr Description Channel ID assigned by DLL during PassThruConnect. Is set to the define GET_NDIS_ADAPTER_INFO. Is a NULL pointer, as this parameter is not used. Points to the structure, NDIS_ADAPTER_INFORMATION, which is defined as follows: typedef struct { char AdapterUniqueID[128]; char AdapterName[64]; unsigned long Status; unsigned char MAC_Address[6] unsigned char IPV6_Address[16]; unsigned char IPV4_Address[4]; unsigned long EthernetPinConfig; } NDIS_ADAPTER_INFORMATION; where: AdapterUniqueID is the Operating System unique registry key for the adapter, which is an ASCII string that is NULL terminated. (For example, “{269623C9-C702-499E-90A4E371092FC76A}”.) AdapterName is the Adapter Display Name, which is an ASCII string that is NULL terminated. (For example, “Acme Pass-Thru NDIS Adapter”.) Status is the adapter status; 0=disabled, 1=enabled. MAC_Address is the Media Access Control (MAC) Address of the NDIS adapter that is connected to the vehicle. IPV6_Address is the IPv6 address assigned to the NDIS adapter. There shall be no compressed or short form notation. The bytes shall be in network order big endian format. If the address is not available, all bytes shall be set to zero. IPV4_Address is the IPv4 address assigned to the NDIS adapter. The bytes shall be in network order big endian format. If the address is not available, all bytes shall be set to zero. EthernetPinConfig is the current Ethernet pin configuration for the NDIS adapter; 1=Option 1, 2=Option 2 (see Table 104 for more details). 24.3 Discovery Support The device shall report support for ETHERNET_NDIS protocol and associated parameters through the discovery mechanism defined in Section 25. 24.4 DLL Installation and Registration Upon device installation, a key will be set in the appropriate registry folder to indicate the support for the Ethernet protocol. In the case of devices which contain dynamic hardware architecture, an application will be able to determine the lack of runtime support when an error is returned from a PassThruConnect(). SAE INTERNATIONAL J2534™-2 DEC2020 Page 102 of 146 The registry entries are retained for support of legacy applications. New applications shall use the discovery mechanism defined in Section 25. 25. DISCOVERY MECHANISM 25.1 Scope of the Discovery Mechanism Feature This section details the extensions to SAE J2534-1 to support a mechanism to programmatically determine/confirm the capabilities of a specific SAE J2534 device. This section details only the changes from SAE J2534-1. Items not specifically detailed in this section are assumed not to have changed. 25.2 Pass-Thru System Requirements The Discovery Mechanism imposes no additional hardware requirements. 25.3 Win32 Application Programming Interface 25.3.1 API Functions - Overview The purpose of this feature is to provide a mechanism to programmatically determine/confirm the capabilities of a specific SAE J2534 device. These capabilities are static and shall not change based on the current state of the device. (For example, the identification of which pins ISO15765 can be switched to shall not be altered if some of those pins are currently in use by another protocol.) To access the capabilities, an application must successfully call PassThruOpen. Then, the application must call PassThruIoctl with a list of parameters it is interested in. Upon return, the device will indicate if the parameter is supported and its associate value. Two new IoctlIDs have been defined to support this feature, they are: GET_DEVICE_INFO - Used to acquire the general capabilities of the device. GET_PROTOCOL_INFO - Used to acquire the protocol specific capabilities of the device. To obtain the general capabilities of the device, the application shall call PassThruIoctl with the ChannelID set to the DeviceID returned from PassThruOpen, IoctlID set to GET_DEVICE_INFO, and OutputPtr pointing to a list of parameter/value pairs of interest to the user on the specified device. To obtain the protocol specific capabilities of the device, the application shall call PassThruIoctl with the ChannelID set to the DeviceID returned from PassThruOpen, IoctlID set to GET_PROTOCOL_INFO, the InputPtr pointing to a Protocol ID, and OutputPtr pointing to a list of parameter/value pairs of interest to the user for the associated protocol on the specified device. It is expected that the application would repeat this step for each protocol it is interested in. Table 108 summarizes the changes to the SAE J2534-1 API functions. Table 108 - SAE J2534 API functions Function PassThruIoctl Description of Change Add new IoctlID values SAE INTERNATIONAL J2534™-2 DEC2020 Page 103 of 146 25.3.2 API Functions - Detailed Information 25.3.2.1 IOCTL Section There are two additional IoctlIDs, as follows: Table 109 - IOCTL details Value of IoctlID GET_DEVICE_INFO GET_PROTOCOL_INFO InputPtr Represents NULL pointer Pointer to Protocol ID OututPtr Represents Pointer to SPARAM_LIST Pointer to SPARAM_LIST Purpose To acquire the general capabilities of the device. To acquire the protocol specific capabilities of the device. 25.3.2.2 GET_DEVICE_INFO The IoctlID value of GET_DEVICE_INFO shall be used to request the general capabilities of an SAE J2534 device. The calling application is responsible for allocating and initializing the inputs described in Table 110. Upon successful completion (a return code of STATUS_NOERROR), the corresponding supported and/or value elements shall have been updated. Requests for parameters that are not supported by the device shall cause the corresponding supported element to be set to NOT_SUPPORTED and the corresponding value to remain unaltered. In this case, the interface shall continue processing the rest of the parameters in the list and the return code shall be STATUS_NOERROR (as long as no other errors conditions exist). Valid device parameters and their associated descriptions are detailed in Table 111. SAE INTERNATIONAL J2534™-2 DEC2020 Page 104 of 146 Table 110 - GET_DEVICE_INFO details Parameter ChannelID IoctlID InputPtr OutputPtr Description Device ID assigned by DLL during PassThruOpen. Is set to the define GET_DEVICE_INFO. Is set to NULL, as this parameter is not used. Points to the structure SPARAM_LIST, which is defined as follows: typedef struct { unsigned long NumOfParams;/* number of SPARAM elements */ SPARAM *ParamPtr;/* array of SPARAM */ } SPARAM_LIST where: NumOfParms is an INPUT, set by the application, which contains the number of SPARAM elements in the array pointed to by ParamPtr. ParamPtr is an INPUT, set by the application, which points to an array of SPARAM structures allocated by the application. The structure SPARAM is defined as follows: typedef struct { unsigned long Parameter;/* name of parameter */ unsigned long Value;/* value of the parameter */ unsigned long Supported;/* support for parameter */ } SPARAM where: Parameter is an INPUT, set by the application, which represents the ID of the parameter requested (see Table 111 for a list of valid parameters). Value is typically an OUTPUT, set by the interface, which represents the parameter’s value. However, for certain parameters Value may also be an INPUT set by the application (see Table 111 for more details). Supported is an OUTPUT, set by the interface to 0 (indicating the associated parameter is NOT_SUPPORTED) or 1 (indicating the associated parameter is SUPPORTED). The contents of Value shall remain unchanged if the parameter is NOT_SUPPORTED. SAE INTERNATIONAL J2534™-2 DEC2020 Page 105 of 146 Table 111 - GET_DEVICE_INFO parameter details Parameter SERIAL_NUMBER Description Represents the device serial number. PART_NUMBER Represents the part number of the device. J1850PWM_SUPPORTED Represents support for SAE J1850PWM related Protocol IDs. J1850VPW_SUPPORTED Represents support for SAE J1850VPW related Protocol IDs. ISO9141_SUPPORTED Represents support for ISO9141 related Protocol IDs. ISO14230_SUPPORTED Represents support for ISO14230 related Protocol IDs. Associated Value Value is an OUTPUT that, upon return, contains an unsigned long that is the device serial number. Value is an OUTPUT that, upon return, contains an unsigned long that is the device part number. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J1850PWM_CHx Protocol IDs that are available. RR is the number of channels for the J1850PWM_PS Protocol ID that are available. SS is 1 if the J1850PWM Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J1850VPW_CHx Protocol IDs that are available. RR is the number of channels for the J1850VPW_PS Protocol ID that are available. SS is 1 if the J1850VPW Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of ISO9141_CHx Protocol IDs that are available. RR is the number of channels for the ISO9141_PS Protocol ID that are available. SS is 1 if the ISO9141 Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of ISO14230_CHx Protocol IDs that are available. RR is the number of channels for the ISO14230_PS Protocol ID that are available. SS is 1 if the ISO14230 Protocol ID is supported; otherwise it must be 0. SAE INTERNATIONAL J2534™-2 DEC2020 Parameter CAN_SUPPORTED Description Represents support for CAN related Protocol IDs. ISO15765_SUPPORTED Represents support for ISO15765 related Protocol IDs. FT_CAN_SUPPORTED Represents support for FT_CAN related Protocol IDs. FT_ISO15765_SUPPORTED Represents support for FT_ISO15765 related Protocol IDs. SCI_A_ENGINE_SUPPORTED Represents support for the SCI_A_ENGINE Protocol ID. Page 106 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of CAN_CHx Protocol IDs that are available. RR is the number of channels for the CAN_PS Protocol ID that are available. SS is 1 if the CAN Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of ISO15765_CHx Protocol IDs that are available. RR is the number of channels for the ISO15765_PS Protocol ID that are available. SS is 1 if ISO15765 is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of FT_CAN_CHx Protocol IDs that are available. RR is the number of channels for the FT_CAN_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of FT_ISO15765_CHx Protocol IDs that are available. RR is the number of channels for the FT_ISO15765_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ must be 0. RR must be 0. SS is 1 if the SCI_A_ENGINE Protocol ID is supported; otherwise it must be 0. SAE INTERNATIONAL J2534™-2 DEC2020 Parameter SCI_A_TRANS_SUPPORTED Description Represents support for the SCI_A_TRANS Protocol ID. SCI_B_ENGINE_SUPPORTED Represents support for the SCI_B_ENGINE Protocol ID. SCI_B_TRANS_SUPPORTED Represents support for the SCI_B_TRANS Protocol ID. SW_ISO15765_SUPPORTED Represents support for SW_ISO15765 related Protocol IDs. SW_CAN_SUPPORTED Represents support for SW_CAN related Protocol IDs. Page 107 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ must be 0. RR must be 0. SS is 1 if the SCI_A_TRANS Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ must be 0. RR must be 0. SS is 1 if the SCI_B_ENGINE Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ must be 0. RR must be 0. SS is 1 if the SCI_B_TRANS Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of SW_ISO15765_CHx Protocol IDs that are available. RR is the number of channels for the SW_ISO15765_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of SW_CAN_CHx Protocol IDs that are available. RR is the number of channels for the SW_CAN_PS Protocol ID that are available. SS must be 0. SAE INTERNATIONAL J2534™-2 DEC2020 Parameter GM_UART_SUPPORTED Description Represents support for GM_UART related Protocol IDs. UART_ECHO_BYTE_SUPPORTE D Represents support for UART_ECHO_BYTE related Protocol IDs. HONDA_DIAGH_SUPPORTED Represents support for HONDA_DIAGH related Protocol IDs. J1939_SUPPORTED Represents support for SAE J1939 related Protocol IDs. J1708_SUPPORTED Represents support for SAE J1708 related Protocol IDs. Page 108 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of GM_UART_CHx Protocol IDs that are available. RR is the number of channels for the GM_UART_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of UART_ECHO_BYTE_CHx Protocol IDs that are available. RR is the number of channels for the UART_ECHO_BYTE_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of HONDA_DIAGH_CHx Protocol IDs that are available. RR is the number of channels for the HONDA_DIAGH_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J1939_CHx Protocol IDs that are available. RR is the number of channels for the J1939_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J1708_CHx Protocol IDs that are available. RR is the number of channels for the J1708M_PS Protocol ID that are available. SS must be 0. SAE INTERNATIONAL J2534™-2 DEC2020 Parameter TP2_0_SUPPORTED Description Represents support for TP2_0 related Protocol IDs. J2610_SUPPORTED Represents support for SAE J2610 related Protocol IDs. ANALOG_IN_SUPPORTED Represents support for ANALOG_IN_xxx related Protocol IDs. FD_CAN_SUPPORTED Represents support for CAN FD related Protocol IDs. FD_ISO15765_SUPPORTED Represents support for ISO15765 on CAN FD related Protocol IDs. Page 109 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of TP2_0_CHx Protocol IDs that are available. RR is the number of channels for the TP2_0_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J2610_CHx Protocol IDs that are available. RR is the number of channels for the J2610_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of ANALOG_IN_x Protocol IDs that are available. RR must be 0. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of FD_CAN_CHx Protocol IDs that are available. RR is the number of channels for the FD_CAN_PS Protocol ID that are available. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of FD_ISO15765_CHx Protocol IDs that are available. RR is the number of channels for the FD_ISO15765_PS Protocol ID that are available. SS must be 0. SAE INTERNATIONAL J2534™-2 DEC2020 Parameter J1850PWM_SIMULTANEOUS Description Represents support for SAE J1850PWM related Protocol IDs. J1850VPW_SIMULTANEOUS Represents support for SAE J1850VPW related Protocol IDs. ISO9141_SIMULTANEOUS Represents support for ISO9141 related Protocol IDs. ISO14230_SIMULTANEOUS Represents support for ISO14230 related Protocol IDs. Page 110 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J1850PWM_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the J1850PWM_PS Protocol ID that can operate simultaneously. SS is 1 if the J1850PWM Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J1850VPW_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the J1850VPW_PS Protocol ID that can operate simultaneously. SS is 1 if the J1850VPW Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of ISO9141_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the ISO9141_PS Protocol ID that can operate simultaneously. SS is 1 if the ISO9141 Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of ISO14230_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the ISO14230_PS Protocol ID that can operate simultaneously. SS is 1 if the ISO14230 Protocol ID is supported; otherwise it must be 0. SAE INTERNATIONAL J2534™-2 DEC2020 Parameter CAN_SIMULTANEOUS Description Represents support for CAN related Protocol IDs. ISO15765_SIMULTANEOUS Represents support for ISO15765 related Protocol IDs. FT_CAN_SIMULTANEOUS Represents support for FT_CAN related Protocol IDs. FT_ISO15765_SIMULTANEOUS Represents support for FT_ISO15765 related Protocol IDs. SCI_A_ENGINE_SIMULTANEOUS Represents support for the SCI_A_ENGINE Protocol ID. Page 111 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of CAN_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the CAN_PS Protocol ID that can operate simultaneously. SS is 1 if the CAN Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of ISO15765_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the ISO15765_PS Protocol ID that can operate simultaneously. SS is 1 if ISO15765 is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of FT_CAN_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the FT_CAN_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of FT_ISO15765_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the FT_ISO15765_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ must be 0. RR must be 0. SS is 1 if the SCI_A_ENGINE Protocol ID is supported; otherwise it must be 0. SAE INTERNATIONAL J2534™-2 DEC2020 Parameter SCI_A_TRANS_SIMULTANEOUS Description Represents support for the SCI_A_TRANS Protocol ID. SCI_B_ENGINE_SIMULTANEOUS Represents support for the SCI_B_ENGINE Protocol ID. SCI_B_TRANS_SIMULTANEOUS Represents support for the SCI_B_TRANS Protocol ID. SW_ISO15765_SIMULTANEOUS Represents support for SW_ISO15765 related Protocol IDs. SW_CAN_SIMULTANEOUS Represents support for SW_CAN related Protocol IDs. Page 112 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ must be 0. RR must be 0. SS is 1 if the SCI_A_TRANS Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ must be 0. RR must be 0. SS is 1 if the SCI_B_ENGINE Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ must be 0. RR must be 0. SS is 1 if the SCI_B_TRANS Protocol ID is supported; otherwise it must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of SW_ISO15765_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the SW_ISO15765_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of SW_CAN_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the SW_CAN_PS Protocol ID that can operate simultaneously. SS must be 0. SAE INTERNATIONAL J2534™-2 DEC2020 Parameter GM_UART_SIMULTANEOUS Description Represents support for GM_UART related Protocol IDs. UART_ECHO_BYTE_SIMULTANE OUS Represents support for UART_ECHO_BYTE related Protocol IDs. HONDA_DIAGH_SIMULTANEOUS Represents support for HONDA_DIAGH related Protocol IDs. J1939_SIMULTANEOUS Represents support for SAE J1939 related Protocol IDs. J1708_SIMULTANEOUS Represents support for SAE J1708 related Protocol IDs. Page 113 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of GM_UART_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the GM_UART_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of UART_ECHO_BYTE_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the UART_ECHO_BYTE_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of HONDA_DIAGH_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the HONDA_DIAGH_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J1939_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the J1939_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J1708_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the J1708M_PS Protocol ID that can operate simultaneously. SS must be 0. SAE INTERNATIONAL J2534™-2 DEC2020 Parameter TP2_0_SIMULTANEOUS Description Represents support for TP2_0 related Protocol IDs. J2610_SIMULTANEOUS Represents support for SAE J2610 related Protocol IDs. ANALOG_IN_SIMULTANEOUS Represents support for ANALOG_IN_xxx related Protocol IDs. FD_CAN_SIMULTANEOUS Represents support for FD_CAN_xxx related Protocol IDs. FD_ISO15765_SIMULTANEOUS Represents support for FD_ISO765_xxx related Protocol IDs. Page 114 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of TP2_0_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the TP2_0_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of J2610_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the J2610_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of ANALOG_IN_x Protocol IDs that can operate simultaneously. RR must be 0. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of FD_CAN_CHx Protocol IDs that can operate simultaneously. RR is the number of channels for the FD_CAN_PS Protocol ID that can operate simultaneously. SS must be 0. Value is an OUTPUT that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ is the number of FD_ISO15765_CHx Protocol IDs that can operate simultaneously. RR is the number of FD_ISO15765_PS Protocol IDs that can operate simultaneously. SS must be 0. SAE INTERNATIONAL Parameter MAX_NON_VOLATILE_STORAGE SHORT_TO_GND_J1962 PGM_VOLTAGE_J1962 J2534™-2 DEC2020 Description Represents the total number of Non-Volatile Memory Storage Locations supported. Represents a query from the application to see if the pin identified in Value is valid for short to ground line on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pin on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pin identified in Value is valid for programming voltage on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pin on the device. NOTE: The application may include this parameter one or more of times in the list. Page 115 of 146 Associated Value Represents the total number of Non-Volatile Memory Storage Locations supported. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH must be 0. LLLL is the short to ground line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is the programming voltage line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL must be 0. SAE INTERNATIONAL Parameter J1850PWM_PS_J1962 J1850VPW_PS_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the pins identified in Value are valid for the J1850PWM_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pin identified in Value is valid for the J1850VPW_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pin on the device. NOTE: The application may include this parameter one or more of times in the list. Page 116 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is BUS - line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL must be 0. SAE INTERNATIONAL Parameter ISO9141_PS_K_LINE_J1962 ISO9141_PS_L_LINE_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the K line pin identified in Value is valid for the ISO9141_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the L line pin identified in Value is valid for the ISO9141_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 117 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is K line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL indicates where the L line would be if it is supported. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. NOTE: L line is included for reference ONLY and shall not be considered when indicating SUPPORTED or NOT_SUPPORTED. Support for L line in this pair of pins shall be conveyed via ISO9141_PS_L_LINE_J1962. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH indicates where the K line would be if it is supported. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is L line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. NOTE: K line is included for reference ONLY and shall not be considered when indicating SUPPORTED or NOT_SUPPORTED. Support for K line in this pair of pins shall be conveyed via ISO9141_PS_K_LINE_J1962. SAE INTERNATIONAL Parameter ISO14230_PS_K_LINE_J1962 ISO14230_PS_L_LINE_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the K line pin identified in Value is valid for the ISO14230_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the L line pin identified in Value is valid for the ISO14230_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 118 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is K line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL indicates where the L line would be if it is supported. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. NOTE: L line is included for reference ONLY and shall not be considered when indicating SUPPORTED or NOT_SUPPORTED. Support for L line in this pair of pins shall be conveyed via ISO14230_PS_L_LINE_J1962. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH indicates where the K line would be if it is supported. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is L line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. NOTE: K line is included for reference ONLY and shall not be considered when indicating SUPPORTED or NOT_SUPPORTED. Support for K line in this pair of pins shall be conveyed via ISO14230_PS_K_LINE_J1962. SAE INTERNATIONAL Parameter CAN_PS_J1962 ISO15765_PS_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the pins identified in Value are valid for the CAN_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pins identified in Value are valid for the ISO15765_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 119 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is CAN H line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is CAN L line Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is CAN H line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is CAN L line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. SAE INTERNATIONAL Parameter FT_CAN_PS_J1962 FT_ISO15765_PS_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the pins identified in Value are valid for the FT_CAN_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pins identified in Value are valid for the FT_ISO15765_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 120 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is CAN H line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is CAN L line Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is CAN H line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is CAN L line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. SAE INTERNATIONAL Parameter SW_CAN_PS_J1962 SW_ISO15765_PS_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the pin identified in Value is valid for the SW_CAN_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pin on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pin identified in Value is valid for the SW_ISO15765_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pin on the device. NOTE: The application may include this parameter one or more of times in the list. Page 121 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL must be 0. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL must be 0. SAE INTERNATIONAL Parameter GM_UART_PS_J1962 UART_ECHO_BYTE_PS_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the pin identified in Value is valid for the GM_UART_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pin on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pin identified in Value is valid for the UART_EHO_BYTE_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pin on the device. NOTE: The application may include this parameter one or more of times in the list. Page 122 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL must be 0. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL must be 0. SAE INTERNATIONAL Parameter HONDA_DIAGH_PS_J1962 J1939_PS_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the pin identified in Value is valid for the HONDA_DIAGH_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pin on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pins identified in Value are valid for the J1939_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 123 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL must be 0. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is CAN H line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is CAN L line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. SAE INTERNATIONAL Parameter J1708_PS_J1962 TP2_0_PS_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the pins identified in Value are valid for the J1708_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pins identified in Value are valid for the TP2_0_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 124 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is BUS - line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is CAN H line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is CAN L line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. SAE INTERNATIONAL Parameter J2610_PS_J1962 FD_CAN_PS_J1962 J2534™-2 DEC2020 Description Represents a query from the application to see if the pins identified in Value are valid for the J2610_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pins identified in Value are valid for the FD_CAN_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 125 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is the Tx line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is the Rx line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is FD_CAN H line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is FD_CAN L line Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. SAE INTERNATIONAL Parameter FD_ISO15765_PS_J1962 J1939_PS_J1939 J2534™-2 DEC2020 Description Represents a query from the application to see if the pins identified in Value are valid for the FD_ISO15765_PS Protocol ID on the SAE J1962 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pins identified in Value are valid for the J1939_PS Protocol ID on the SAE J1939-13 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 126 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is CAN FD H line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is CAN FD L line Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is CAN H line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is CAN L line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. SAE INTERNATIONAL Parameter J1708_PS_J1939 ISO9141_PS_K_LINE_J1939 J2534™-2 DEC2020 Description Represents a query from the application to see if the pins identified in Value are valid for the J1708_PS Protocol ID on the SAE J1939-13 connector. Upon return, Supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the K line pin identified in Value is valid for the ISO9141_PS Protocol ID on the SAE J1939 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 127 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is BUS - line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is K line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL indicates where the L line would be if it is supported. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. NOTE: L line is included for reference ONLY and shall not be considered when indicating SUPPORTED or NOT_SUPPORTED. Support for L line in this pair of pins shall be conveyed via ISO9141_PS_L_LINE_J1939. SAE INTERNATIONAL Parameter ISO9141_PS_L_LINE_J1939 ISO14230_PS_K_LINE_J1939 J2534™-2 DEC2020 Description Represents a query from the application to see if the L line pin identified in Value is valid for the ISO9141_PS Protocol ID on the SAE J1939 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the K line pin identified in Value is valid for the ISO14230_PS Protocol ID on the SAE J1939 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 128 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH indicates where the K line would be if it is supported. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is L line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. NOTE: K line is included for reference ONLY and shall not be considered when indicating SUPPORTED or NOT_SUPPORTED. Support for K line in this pair of pins shall be conveyed via ISO9141_PS_K_LINE_J1939. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is K line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL indicates where the L line would be if it is supported. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. NOTE: L line is included for reference ONLY and shall not be considered when indicating SUPPORTED or NOT_SUPPORTED. Support for L line in this pair of pins shall be conveyed via ISO14230_PS_L_LINE_J1939. SAE INTERNATIONAL Parameter ISO14230_PS_L_LINE_J1939 J1708_PS_J1708 J2534™-2 DEC2020 Description Represents a query from the application to see if the L line pin identified in Value is valid for the ISO14230_PS Protocol ID on the SAE J1939 connector. Upon return, Supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Represents a query from the application to see if the pins identified in value are valid for the J1708_PS Protocol ID on the SAE J1708 connector. Upon return, supported indicates if the desired pins are SUPPORTED or NOT_SUPPORTED; the contents of value shall remain un-altered. This query shall not change the state of the associated pins on the device. NOTE: The application may include this parameter one or more of times in the list. Page 129 of 146 Associated Value Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH indicates where the K line would be if it is supported. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is L line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. NOTE: K line is included for reference ONLY and shall not be considered when indicating SUPPORTED or NOT_SUPPORTED. Support for K line in this pair of pins shall be conveyed via ISO14230_PS_K_LINE_J1939. Value is an INPUT that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH is BUS + line. Bit 16 corresponds to pin 1, bit 17 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. LLLL is BUS - line. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. SAE INTERNATIONAL Parameter READ_J1962PIN_VOLTAGE_SUP PORTED READ_J1962PIN_VOLTAGE_MAX ETHERNET_NDIS_SUPPORTED J2534™-2 DEC2020 Description Represents a query from the application to see if the pin identified in value is valid for read SAE J1962 pin voltage on the SAE J1962 connector. Upon return, supported indicates if the desired pin is SUPPORTED or NOT_SUPPORTED; the contents of value shall remain un-altered. This query shall not change the state of the associated pin on the device. NOTE: The application may include this parameter one or more of times in the list. Represents the maximum possible read SAE J1962 pin voltage that will be returned by the device. Represents support for ETHERNET_NDIS related Protocol IDs. Page 130 of 146 Associated Value Value is an input that contains a bit mapped unsigned long (with the format 0xHHHHLLLL) where the bit that corresponds to the desired pin location is set to 1. All other bits shall be set to 0. HHHH must be 0. LLLL is the bit mapped pin number. Bit 0 corresponds to pin 1, bit 1 corresponds to pin 2, etc. For this field, it is invalid to set more than 1 bit at a time. Value is an output that, upon return, contains an unsigned long that is the maximum possible read SAE J1962 pin voltage. Value is an output that, upon return, contains an unsigned long (with the format 0xPPQQRRSS) where each byte represents the following: PP must be 0. QQ must be 0. RR must be 0. SS is 1 if the ETHERNET_NDIS Protocol ID is supported; otherwise it must be 0.. 25.3.2.3 GET_PROTOCOL_INFO The IoctlID value of GET_PROTOCOL_INFO is used to request the protocol specific capabilities of an SAE J2534 device. It is expected that the application will call this function for each protocol it is interested in. The calling application is responsible for allocating and initializing the inputs described in Table 112. Upon successful completion (a return code of STATUS_NOERROR), the corresponding supported and/or value elements shall have been updated. Requests for parameters that are not supported by the device shall cause the corresponding supported element to be set to NOT_SUPPORTED and the corresponding value to remain unaltered. In this case, the interface shall continue processing the rest of the parameters in the list and the return code shall be STATUS_NOERROR (as long as no other errors conditions exist). If the device does not support the requested Protocol ID, the return value shall be ERR_INVALID_PROTOCOL_ID. SAE INTERNATIONAL J2534™-2 DEC2020 Page 131 of 146 Table 112 - GET_PROTOCOL_INFO details Parameter ChannelID IoctlID InputPtr OutputPtr Description Device ID assigned by DLL during PassThruOpen. Is set to the define GET_PROTOCOL_INFO. Points to an unsigned long that contains the Protocol ID. Points to the structure SPARAM_LIST, which is defined as follows: typedef struct { unsigned long NumOfParams;/* number of SPARAM elements */ SPARAM *ParamPtr;/* array of SPARAM */ } SPARAM_LIST where: NumOfParms is an INPUT, set by the application, which contains the number of SPARAM elements in the array pointed to by ParamPtr ParamPtr is an INPUT, set by the application, which points to an array of SPARAM structures allocated by the application The structure SPARAM is defined as follows: typedef struct { unsigned long Parameter;/* name of parameter */ unsigned long Value;/* value of the parameter */ unsigned long Supported;/* support for parameter */ } SPARAM where: Parameter is an INPUT, set by the application, which represents the ID of the parameter requested (see Table 114 for a list of valid parameters). Value is typically an OUTPUT, set by the interface, which represents the parameter’s value. However, for certain parameters Value may also be an INPUT set by the application (see Table 114 for more details). Supported is an OUTPUT, set by the interface to 0 (indicating the associated parameter is NOT_SUPPORTED) or 1 (indicating the associated parameter is SUPPORTED). The contents of Value shall remain unchanged if the parameter is NOT_SUPPORTED. Table 113 groups the Protocol IDs so that the parameter/description in Table 114 can also indicate the applicable Protocol IDs. SAE INTERNATIONAL J2534™-2 DEC2020 Page 132 of 146 Table 113 - Protocol groups Group Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 List of Protocol IDs in the Group J1850PWM, J1850PWM_PS, and J1850PWM_CHx J1850VPW, J1850VPW_PS, and J1850VPW_CHx ISO9141 and ISO9141_CHx ISO9141_PS ISO14230 and ISO14230_CHx ISO14230_PS CAN, CAN_PS, CAN_CHx, FT_CAN_PS, FT_CAN_CHx, FD_CAN_PS, and FD_CAN_CHx ISO15765, ISO15765_PS, ISO15765_CHx, FT_ISO15765_PS, FT_ISO15765_CHx, FD_ISO15765_PS, and FD_ISO15765_CHx SCI_A_ENGINE, SCI_A_TRANS, SCI_B_ENGINE, SCI_B_TRANS, J2610_PS, and J2610_CHx SW_CAN_PS and SW_CAN_CHx SW_ISO15765_PS and SW_ISO15765_CHx GM_UART_PS and GM_UART_CHx UART_ECHO_BYTE_PS and UART_ECHO_BYTE_CHx HONDA_DIAGH_PS and HONDA_DIAGH_CHx J1939_PS and J1939_CHx J1708_PS and J1708_CHx TP2_0_PS and TP2_0_CHx ANALOG_IN_x ETHERNET_NDIS Table 114 - GET_PROTOCOL_INFO parameter details Parameter RESOURCE_GROUP TIMESTAMP_RESOLUTION MAX_RX_BUFFER_SIZE MAX_PASS_FILTER Description Represents the resource group that this protocol belongs to. Protocols that have the same group number share a common resource, so their operation is mutually exclusive (that is, only one member of the group may operate at a time). Represents the resolution of the message timestamp. Represents the maximum size of the Receive Buffer Pool for the given protocol. Represents the maximum number of PASS_FILTERs that can be defined for the given protocol. Associated Value Value is an OUTPUT that, upon return, contains an unsigned long that represent the associated group number. The value 0 indicates no resource multiplexing. (Other than 0, the values are arbitrary and may not be consistent across manufacturers.) Applicable Protocol Groups All Value is an OUTPUT that, upon return, contains the resolution of the Timestamp element in the PASSTHRU_MSG structure (in micro-seconds). Value is an OUTPUT that, upon return, contains an unsigned long that is the maximum size in bytes. All Value is an OUTPUT that, upon return, contains an unsigned long. 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 14, 15, 16, 17 All SAE INTERNATIONAL Parameter MAX_BLOCK_FILTER MAX_FILTER_MSG_LENGTH MAX_PERIODIC_MSGS MAX_PERIODIC_MSG_LENGTH DESIRED_DATA_RATE MAX_REPEAT_MESSAGING MAX_REPEAT_MESSAGING_ LENGTH J2534™-2 DEC2020 Page 133 of 146 Description Represents the maximum number of BLOCK_FILTERs that can be defined for the given protocol. Represents the maximum filter message size for the given protocol. Associated Value Value is an OUTPUT that, upon return, contains an unsigned long. Represents the maximum number of periodic messages that can be defined for the given protocol. Represents the maximum periodic message size for a message for the given protocol. Value is an OUTPUT that, upon return, contains an unsigned long. Represents a query from the application to see if the DATA_RATE identified in Value is supported (within ±2%) for the given protocol. Upon return, Supported indicates if the desired DATA_RATE is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. This query shall not change the current DATA_RATE on the device. Value is an INPUT that contains the desired DATA_RATE. The application is allowed to request any value. The interface shall never return ERR_INVALID_IOCTL_VALUE for this parameter (even if the requested value is invalid for the given Protocol ID). NOTE: The application may include this parameter one or more of times in the list. Represents the maximum number of repeat messages that can be defined for the given protocol. Represents the maximum repeat message size for the given protocol. Value is an OUTPUT that, upon return, contains an unsigned long that is the maximum size in bytes. Value is an OUTPUT that, upon return, contains an unsigned long that is the maximum size in bytes. Value is an OUTPUT that, upon return, contains an unsigned long. (A value of 0 indicates that Repeat Messaging is not supported for this protocol.) Value is an OUTPUT that, upon return, contains an unsigned long that is the maximum size in bytes. (A value of 0 indicates that Repeat Messaging is not supported for this protocol.) Applicable Protocol Groups 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 14, 15, 16, 17 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 14, 15, 16, 17 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17 SAE INTERNATIONAL J2534™-2 DEC2020 Parameter NETWORK_LINE_SUPPORTED Description Represents the possible NETWORK_LINE selections for the given protocol. MAX_FUNCT_MSG_LOOKUP Represents the maximum number of entries in the Functional Message Look Up Table for the given protocol. Represents the possible PARITY selections for the given protocol. PARITY_SUPPORTED DATA_BITS_SUPPORTED Represents the possible DATA_BITS selections for the given protocol. FIVE_BAUD_MOD_SUPPORTED Represents the possible FIVE_BAUD_MOD selections for the given protocol. Page 134 of 146 Associated Value Value is an OUTPUT that, upon return, contains a bit mapped unsigned long where 1 indicates supported and 0 indicates not supported. Bit 0 corresponds to BUS +. Bit 1 corresponds to BUS -. All other bits shall be 0. Value is an OUTPUT that, upon return, contains an unsigned long. Value is an OUTPUT that, upon return, contains a bit mapped unsigned long where 1 indicates supported and 0 indicates not supported. Bit 0 corresponds to no parity. Bit 1 corresponds to odd parity. Bit 2 corresponds to even parity. All other bits shall be 0. Value is an OUTPUT that, upon return, contains a bit mapped unsigned long where 1 indicates supported and 0 indicates not supported. Bit 0 corresponds to 8 data bits. Bit 1 corresponds to 7 data bits. All other bits shall be 0. Value is an OUTPUT that, upon return, contains a bit mapped unsigned long where 1 indicates supported and 0 indicates not supported. Bit 0 corresponds to FIVE_BAUD_MOD = 0. Bit 1 corresponds to FIVE_BAUD_MOD = 1. Bit 2 corresponds to FIVE_BAUD_MOD = 2. Bit 3 corresponds to FIVE_BAUD_MOD = 3. All other bits shall be 0. Applicable Protocol Groups 1 1 3, 4, 5, 6, 12 3, 4, 5, 6, 12 3, 4, 5, 6 SAE INTERNATIONAL Parameter L_LINE_SUPPORTED CAN_11_29_IDS_SUPPORTED CAN_MIXED_FORMAT_ SUPPORTED MAX_FLOW_CONTROL_FILTER MAX_ISO15765_WFT_MAX MAX_AD_ACTIVE_CHANNELS MAX_AD_SAMPLE_RATE J2534™-2 DEC2020 Description Represents support for the ISO9141/ISO14230 L line for the given protocol. Upon return, Supported indicates if L line is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. NOTE: L Line support for the ISO9141_PS and ISO14230_PS Protocol IDs is obtained using GET_DEVICE_INFO. Represent support of simultaneous 11 bit and 29 bit CAN IDs for the given protocol. Upon return, Supported indicates if simultaneous 11 bit and 29 bit CAN IDs is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. Represents support of CAN_MIXED_FORMAT for the given protocol. Upon return, Supported indicates if CAN_MIXED_FORMAT is SUPPORTED or NOT_SUPPORTED; the contents of Value shall remain un-altered. Represents the maximum number of FLOW_CONTROL_FILT ERs that can be defined for the given protocol. Represents the maximum value of ISO15765_WFT_MAX for the given protocol. Represents which channels are capable of being sampled, matching the format of ACTIVE_CHANNELS for the given protocol. Represents the maximum value of SAMPLE_RATE for the given protocol. Page 135 of 146 Associated Value Value shall be not be used. Applicable Protocol Groups 3, 5 Value shall be not be used. 7, 8, 10, 11 Value shall be not be used. 8, 11 Value is an OUTPUT that, upon return, contains an unsigned long. 8, 11 Value is an OUTPUT that, upon return, contains an unsigned long. 8, 11 Value is an OUTPUT that, upon return, contains a bit mapped unsigned long (matching the format of ACTIVE_CHANNELS) where 1 indicates supported and 0 indicates not supported. Value is an OUTPUT that, upon return, contains an unsigned long. 18 18 SAE INTERNATIONAL Parameter MAX_AD_SAMPLES_PER_ READING AD_SAMPLE_RESOLUTION AD_INPUT_RANGE_LOW AD_INPUT_RANGE_HIGH J2534™-2 DEC2020 Description Represents the maximum value of SAMPLES_PER_READI NG for the given protocol. Represents the value of SAMPLE_RESOLUTION for the given protocol. Represents the value of INPUT_RANGE_LOW for the given protocol. Represents the value of INPUT_RANGE_HIGH for the given protocol. Page 136 of 146 Associated Value Value is an OUTPUT that, upon return, contains an unsigned long. Applicable Protocol Groups 18 Value is an OUTPUT that, upon return, contains an unsigned long. 18 Value is an OUTPUT that, upon return, contains a signed long. 18 Value is an OUTPUT that, upon return, contains a signed long. 18 Examples: 1. A device that supports the SAE J2534-1 Protocol ID of ISO9141. Then re-uses that hardware resource for the SAE J2534-2 Protocol ID of ISO9141_PS (supporting K line on pin 7 and L line on pin 15, or K line on pin 1 and L line on pin 9; only one channel at a time, no simultaneous operation) and provides two additional independent channels that can operate simultaneously using the Protocol IDs ISO9141_CH1 and ISO9141_CH2. In this case, the device shall return the value of 0x00020101 for ISO9141_SIMULTANEOUS and the value of 0x00020201 for ISO9141_SUPPORTED. Additionally, ISO9141 and ISO9141_PS would have the same non-zero value for RESOURCE_GROUP, but ISO9141_CH1 and ISO9141_CH2 would both have the value 0x0 for RESOURCE_GROUP. 2. A device that supports the SAE J2534-1 Protocol ID of ISO15765, does not support ISO15765_PS, and provides four additional independent channels that can operate simultaneously using the Protocol IDs ISO15765_CH1, ISO15765_CH2, ISO15765_CH3, and ISO15765_CH4 shall return the value of 0x00040001 for ISO15765_SIMULTANEOUS and the value of 0x00040001 for ISO15765_SUPPORTED. Additionally, each Protocol ID (ISO15765, ISO15765_CH1, ISO15765_CH2, ISO15765_CH3, and ISO15765_CH4) would have the value 0x0 for RESOURCE_GROUP. 3. A device that supports the SAE J2534-1 Protocol ID of ISO14230, does not support ISO14230_PS, and provides two additional channels using the Protocol IDs ISO14230_CH1 and ISO14230_CH2. ISO14230 and ISO14230_CH1 share the same hardware resource and cannot operate simultaneously, but ISO14230_CH2 is independent. In this case, the device shall return the value of 0x00020001 for ISO14230_SIMULTANEOUS and the value of 0x00020001 for ISO14230_SUPPORTED. Additionally, ISO14230 and ISO14230_CH1 would have the same non-zero value for RESOURCE_GROUP and ISO14230_CH2 would have the value 0x0 for RESOURCE_GROUP. 4. A device that supports the SAE J2534-1 Protocol ID of J1850PWM and J1850VPW (which share the same pins on the J1962 connector), does not support J1850PWM_PS or J1850VPW_PS, and provides two additional independent J1850PWM channels that can operate simultaneously using the Protocol IDs J1850PWM_CH1, and J1850PWM_CH2. In this case, the device shall return the value of 0x00020001 for J1850PWM_SIMULTANEOUS, the value of 0x00020001 for J1850PWM_SUPPORTED, the value of 0x00000001 for J1850VPW_SIMULTANEOUS, and the value of 0x00000001 for J1850VPW_SUPPORTED. Additionally, J1850PWM and J1850VPW would have the same non-zero value for RESOURCE_GROUP while J1850PWM_CH1, and J1850PWM_CH2 would both have the value 0x0 for RESOURCE_GROUP. 26. SAE J2534-2 RESOURCE This section defines and manages the common resources reserved for SAE J2534-2. The RxStatus and TxFlags are specified in each optional feature section, as the values may be reused. 26.1 Connect Flag Values Table 115 identifies the connect flag values (for the function PassThruConnect) assigned by SAE J2534-2. SAE INTERNATIONAL J2534™-2 DEC2020 Page 137 of 146 Table 115 - Connect flag values Definition CHECKSUM_DISABLED Reserved NDIS_PINS_OPTION1 NDIS_PINS_OPTION2 Reserved Flag Bit(s) Description 0 = For transmission, the interface shall generate and appends the checksum. For reception, the interface shall verify and remove the checksum. Messages with invalid checksums will be discarded. 9 16 23 16 17 24 31 Value Reserved for SAE J2534-2 Determines the J1962 pins used by the NDIS Adapter Tool Manufacturer Specific 1 = The interface shall not generate or verify the checksum; the entire message shall be treated as data by the interface. Unused bits shall be set to 0. NDIS_PINS_OPTION1 = 0 NDIS_PINS_OPTION2 = 0 Shall automatically determine the Option 1 or Option 2 pin configuration by reading the activation line per ISO13400. NDIS_PINS_OPTION1 = 0 NDIS_PINS_OPTION2 = 1 Shall force Option 2 pin configuration. NDIS_PINS_OPTION1 = 1 NDIS_PINS_OPTION2 = 0 Shall force Option 1 pin configuration. NDIS_PINS_OPTION1 = 1 NDIS_PINS_OPTION2 = 1 Shall automatically determine the Option 1 or Option 2 pin configuration by reading the activation line per ISO13400. Unused bits shall be set to 0. SAE INTERNATIONAL J2534™-2 DEC2020 Page 138 of 146 26.2 ProtocolID Values SAE J2534-1 reserved ProtocolID values for SAE. Table 116 defines the value assignment for each ProtocolID definition identified in this document. Table 116 - ProtocolID values Definition J1850VPW_PS J1850PWM_PS ISO9141_PS ISO14230_PS CAN_PS ISO15765_PS J2610_PS SW_ISO15765_PS SW_CAN_PS GM_UART_PS UART_ECHO_BYTE_PS HONDA_DIAGH_PS J1939_PS J1708_PS TP2_0_PS FT_CAN_PS FT_ISO15765_PS FD_CAN_PS FD_ISO15765_PS ETHERNET_NDIS Reserved for SAE J2534-2 Value(s) 0x00008000 0x00008001 0x00008002 0x00008003 0x00008004 0x00008005 0x00008006 0x00008007 0x00008008 0x00008009 0x0000800A 0x0000800B 0x0000800C 0x0000800D 0x0000800E 0x0000800F 0x00008010 0x00008011 0x00008012 0x00008013 0x00008014 - 0x00008FFF CAN_CH1 CAN_CH2 ……. CAN_CH128 0x00009000 CAN_CH1 + 1 J1850VPW_CH1 J1850VPW_CH2 ……. J1850VPW_CH128 0x00009080 J1850VPW_CH1 + 1 J1850PWM_CH1 J1850PWM_CH2 ……. J1850PWM_CH128 0x00009100 J1850PWM_CH1 + 1 ISO9141 _CH1 ISO9141 _CH2 ……. ISO9141 _CH128 0x00009180 ISO9141 _CH1 + 1 ISO14230_CH1 ISO14230_CH2 ……. ISO14230_CH128 0x00009200 ISO14230_CH1 + 1 ISO15765_CH1 ISO15765_CH2 0x00009280 ISO15765_CH1 + 1 CAN_CH1 + 127 J1850VPW_CH1 + 127 J1850PWM_CH1 + 127 ISO9141 _CH1 + 127 ISO14230_CH1 + 127 SAE INTERNATIONAL J2534™-2 DEC2020 Definition ……. ISO15765_CH128 Page 139 of 146 Value(s) ISO15765_CH1 + 127 SW_CAN_CAN_CH1 SW_CAN_CAN_CH2 ……. SW_CAN_CAN_CH128 0x00009300 SW_CAN_CAN_CH1 + 1 SW_CAN_ISO15765_CH1 SW_CAN_ISO15765_CH2 ……. SW_CAN_ISO15765_CH128 0x00009380 SW_CAN_ISO15765_CH1 + 1 J2610_CH1 J2610_CH2 ……. J2610_CH128 0x00009400 J2610_CH1 + 1 FT_CAN_CH1 FT_CAN _CH2 ……. FT_CAN _CH128 0x00009480 FT_CAN _CH1 + 1 FT_ISO15765_CH1 FT_ISO15765_CH2 ……. FT_ISO15765_CH128 0x00009500 FT_ISO15765_CH1 + 1 GM_UART_CH1 GM_UART_CH2 … GM_UART_CH128 0x00009580 GM_UART_CH1 + 1 ECHO_BYTE_CH1 ECHO_BYTE_CH2 … ECHO_BYTE_CH128 0x00009600 ECHO_BYTE _CH1 + 1 HONDA_DIAGH__CH1 HONDA_DIAGH__CH2 … HONDA_DIAGH__CH128 0x00009680 HONDA_DIAGH__CH1 + 1 J1939_CH1 J1939_CH2 … J1939_CH128 0x00009700 J1939_CH1 + 1 J1708_CH1 J1708_CH2 … J1708_CH128 0x00009780 J1708_CH1 + 1 TP2_0_CH1 TP2_0_CH2 … 0x00009800 TP2_0_CH1 + 1 SW_CAN_CAN_CH1 + 127 SW_CAN_ISO15765_CH1 + 127 J2610_CH1 + 127 FT_CAN _CH1 + 127 FT_ISO15765 _CH1 + 127 GM_UART_CH1 +127 ECHO_BYTE_CH1 +127 HONDA_DIAGH__CH1 +127 J1939_CH1 +127 J1708_CH1 +127 SAE INTERNATIONAL J2534™-2 DEC2020 Definition TP2_0_CH128 Value(s) TP2_0_CH1 +127 FD_CAN_CH1 FD_CAN_CH2 … FD_CAN_CH128 0x00009880 FD_CAN_CH1 + 1 FD_ISO15765_CH1 FD_ISO15765_CH2 … FD_ISO15765_CH128 0x00009900 FD_ISO15765_CH1 + 1 Reserved for SAE J2534-2 0x00009980 - 0x0000BFFF ANALOG_IN_1 ANALOG_IN_2 … ANALOG_IN_32 Reserved for SAE J2534-2 Tool Manufacturer Specific 0x0000C000 ANALOG_IN_1 + 1 FD_CAN_CH1 +127 FD_ISO15765_CH1 +127 ANALOG_IN_1 + 31 0x0000C020 - 0x0000FFFF 0x00010000 - 0xFFFFFFFF 26.3 Filter Type Values Table 117 - Filter type values Definition Reserved for SAE J2534-2 Tool Manufacturer Specific Value(s) 0x00008000 - 0x0000FFFF 0x00010000 - 0xFFFFFFFF 26.4 IOCTL ID Values Table 118 - IOCTL ID values Definition SW_CAN_HS SW_CAN_NS SET_POLL_RESPONSE BECOME_MASTER START_REPEAT_MESSAGE QUERY_REPEAT_MESSAGE STOP_REPEAT_MESSAGE GET_DEVICE_CONFIG SET_DEVICE_CONFIG PROTECT_J1939_ADDR REQUEST_CONNECTION TEARDOWN_CONNECTION GET_DEVICE_INFO GET_PROTOCOL_INFO READ_J1962PIN_VOLTAGE GET_NDIS_ADAPTER_INFO Reserved for SAE J2534-2 Tool Manufacturer Specific Value(s) 0x00008000 0x00008001 0x00008002 0x00008003 0x00008004 0x00008005 0x00008006 0x00008007 0x00008008 0x00008009 0x0000800A 0x0000800B 0x0000800C 0x0000800D 0x0000800E 0x0000800F 0x00008010 - 0x0000FFFF 0x00010000 - 0xFFFFFFFF Page 140 of 146 SAE INTERNATIONAL J2534™-2 DEC2020 Page 141 of 146 26.5 IOCTL GET/SET CONFIG Parameter Details SAE J2534-1 reserved ID values for SAE J2534-2. Table 119 defines the value assignment for each parameter identified in this document. Table 119 - IOCTL GET_CONFIG/SET_CONFIG ID values Parameter CAN_MIXED_FORMAT J1962_PINS Reserved for SAE J2534-2 SW_CAN_HS_DATA_RATE SW_CAN_SPEEDCHANGE_ENABLE SW_CAN_RES_SWITCH Reserved for SAE J2534-2 ACTIVE_CHANNELS SAMPLE_RATE SAMPLES_PER_ READING READINGS_PER_ MSG AVERAGING_ METHOD SAMPLE_ RESOLUTION INPUT_RANGE_LOW INPUT_RANGE_HIGH UEB_T0_MIN UEB_T1_MAX UEB_T2_MAX UEB_T3_MAX UEB_T4_MIN UEB_T5_MAX UEB_T6_MAX UEB_T7_MIN UEB_T7_MAX UEB_T9_MIN Reserved for SAE J2534-2 J1939_PINS J1708_PINS J1939_T1 J1939_T2 J1939_T3 J1939_T4 J1939_BRDCST_MIN_DELAY TP2_0_ T_BR_INT TP2_0_ T_E TP2_0_ MNTC TP2_0_T_CTA TP2_0_ MNCT TP2_0_ MNTB TP2_0_ MNT TP2_0_T_Wait TP2_0_T1 TP2_0_T3 TP2_0_IDENTIFER TP2_0_RXIDPASSIVE Reserved for SAE J2534-2 FD_CAN_DATA_PHASE_RATE FD_ISO15765_TX_DATA_LENGTH HS_CAN_TERMINATION ID Value 0x00008000 0x00008001 0x00008002 - 0x0000800F 0x00008010 0x00008011 0x00008012 0x00008013 - 0x0000801F 0x00008020 0x00008021 0x00008022 0x00008023 0x00008024 0x00008025 0x00008026 0x00008027 0x00008028 0x00008029 0x0000802A 0x0000802B 0x0000802C 0x0000802D 0x0000802E 0x0000802F 0x00008030 0x00008031 0x00008032 - 0x0000803C 0x0000803D 0x0000803E 0x0000803F 0x00008040 0x00008041 0x00008042 0x00008043 0x00008044 0x00008045 0x00008046 0x00008047 0x00008048 0x00008049 0x0000804A 0x0000804B 0x0000804C 0x0000804D 0x0000804E 0x0000804F 0x00008050 to 0x0000805B 0x0000805C 0x0000805D 0x0000805E SAE INTERNATIONAL J2534™-2 DEC2020 Parameter N_CR_MAX ISO15765_PAD_VALUE Reserved for SAE J2534-2 Reserved for SAE J2534-2 (Device Configurations) Tool Manufacturer Specific Page 142 of 146 ID Value 0x0000805F 0x00008060 0X00008061 - 0X0000C000 0X0000C001 - 0X0000FFFF 0X00010000 - 0XFFFFFFFF 26.6 IOCTL GET/SET DEVICE_CONFIG Parameter Details Table 120 defines the value assignment for each Device Configuration parameter identified in this document. Table 120 - IOCTL GET_DEVICE_CONFIG/SET_DEVICE_CONFIG details Definition NON_VOLATILE_STORE_1 NON_VOLATILE_STORE_2 NON_VOLATILE_STORE_3 NON_VOLATILE_STORE_4 NON_VOLATILE_STORE_5 NON_VOLATILE_STORE_6 NON_VOLATILE_STORE_7 NON_VOLATILE_STORE_8 NON_VOLATILE_STORE_9 NON_VOLATILE_STORE_10 Reserved for SAE J2534-2 Value(s) 0x0000C001 0x0000C002 0x0000C003 0x0000C004 0x0000C005 0x0000C006 0x0000C007 0x0000C008 0x0000C009 0x0000C00A 0x0000C00B - 0x0000FFFF 26.7 GET_DEVICE_INFO Defines Table 121 - GET_DEVICE_INFO defines values Definition SERIAL_NUMBER J1850PWM_SUPPORTED J1850VPW_SUPPORTED ISO9141_SUPPORTED ISO14230_SUPPORTED CAN_SUPPORTED ISO15765_SUPPORTED SCI_A_ENGINE_SUPPORTED SCI_A_TRANS_SUPPORTED SCI_B_ENGINE_SUPPORTED SCI_B_TRANS_SUPPORTED SW_ISO15765_SUPPORTED SW_CAN_SUPPORTED GM_UART_SUPPORTED UART_ECHO_BYTE_SUPPORTED HONDA_DIAGH_SUPPORTED J1939_SUPPORTED J1708_SUPPORTED TP2_0_SUPPORTED J2610_SUPPORTED ANALOG_IN_SUPPORTED MAX_NON_VOLATILE_STORAGE SHORT_TO_GND_J1962 PGM_VOLTAGE_J1962 J1850PWM_PS_J1962 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008 0x00000009 0x0000000A 0x0000000B 0x0000000C 0x0000000D 0x0000000E 0x0000000F 0x00000010 0x00000011 0x00000012 0x00000013 0x00000014 0x00000015 0x00000016 0x00000017 0x00000018 0x00000019 Value(s) SAE INTERNATIONAL J2534™-2 DEC2020 Definition J1850VPW_PS_J1962 ISO9141_PS_K_LINE_J1962 ISO9141_PS_L_LINE_J1962 ISO14230_PS_K_LINE_J1962 ISO14230_PS_L_LINE_J1962 CAN_PS_J1962 ISO15765_PS_J1962 SW_CAN_PS_J1962 SW_ISO15765_PS_J1962 GM_UART_PS_J1962 UART_ECHO_BYTE_PS_J1962 HONDA_DIAGH_PS_J1962 J1939_PS_J1962 J1708_PS_J1962 TP2_0_PS_J1962 J2610_PS_J1962 J1939_PS_J1939 J1708_PS_J1939 ISO9141_PS_K_LINE_J1939 ISO9141_PS_L_LINE_J1939 ISO14230_PS_K_LINE_J1939 ISO14230_PS_L_LINE_J1939 J1708_PS_J1708 FT_CAN_SUPPORTED FT_ISO15765_SUPPORTED FT_CAN_PS_J1962 FT_ISO15765_PS_J1962 J1850PWM_SIMULTANEOUS J1850VPW_SIMULTANEOUS ISO9141_SIMULTANEOUS ISO14230_SIMULTANEOUS CAN_SIMULTANEOUS ISO15765_SIMULTANEOUS SCI_A_ENGINE_SIMULTANEOUS SCI_A_TRANS_SIMULTANEOUS SCI_B_ENGINE_SIMULTANEOUS SCI_B_TRANS_SIMULTANEOUS SW_ISO15765_SIMULTANEOUS SW_CAN_SIMULTANEOUS GM_UART_SIMULTANEOUS UART_ECHO_BYTE_SIMULTANEOUS HONDA_DIAGH_SIMULTANEOUS J1939_SIMULTANEOUS J1708_SIMULTANEOUS TP2_0_SIMULTANEOUS J2610_SIMULTANEOUS ANALOG_IN_SIMULTANEOUS PART_NUMBER FT_CAN_SIMULTANEOUS FT_ISO15765_SIMULTANEOUS FD_CAN_SUPPORTED FD_ISO15765_SUPPORTED FD_CAN_SIMULTANEOUS FD_ISO15765_SIMULTANEOUS FD_CAN_PS_J1962 0x0000001A 0x0000001B 0x0000001C 0x0000001D 0x0000001E 0x0000001F 0x00000020 0x00000021 0x00000022 0x00000023 0x00000024 0x00000025 0x00000026 0x00000027 0x00000028 0x00000029 0x0000002A 0x0000002B 0x0000002C 0x0000002D 0x0000002E 0x0000002F 0x00000030 0x00000031 0x00000032 0x00000033 0x00000034 0x00000035 0x00000036 0x00000037 0x00000038 0x00000039 0x0000003A 0x0000003B 0x0000003C 0x0000003D 0x0000003E 0x0000003F 0x00000040 0x00000041 0x00000042 0x00000043 0x00000044 0x00000045 0x00000046 0x00000047 0x00000048 0x00000049 0x0000004A 0x0000004B 0x0000004C 0x0000004D 0x0000004E 0x0000004F 0x00000050 Page 143 of 146 Value(s) SAE INTERNATIONAL J2534™-2 DEC2020 Definition FD_ISO15765_PS_J1962 READ_J1962PIN_VOLTAGE_SUPPORTED READ_J1962PIN_VOLTAGE_MAX ETHERNET_NDIS_SUPPORTED Reserved for SAE J2534-2 Page 144 of 146 Value(s) 0x00000051 0x00000052 0x00000053 0x00000054 0x00000055 - 0xFFFFFFFF 26.8 GET_PROTOCOL_INFO Defines Table 122 - GET_PROTOCOL_INFO defines values Definition MAX_RX_BUFFER_SIZE MAX_PASS_FILTER MAX_BLOCK_FILTER MAX_FILTER_MSG_LENGTH MAX_PERIODIC_MSGS MAX_PERIODIC_MSG_LENGTH DESIRED_DATA_RATE MAX_REPEAT_MESSAGING MAX_REPEAT_MESSAGING_LENGTH NETWORK_LINE_SUPPORTED MAX_FUNCT_MSG_LOOKUP PARITY_SUPPORTED DATA_BITS_SUPPORTED FIVE_BAUD_MOD_SUPPORTED L_LINE_SUPPORTED CAN_11_29_IDS_SUPPORTED CAN_MIXED_FORMAT_SUPPORTED MAX_FLOW_CONTROL_FILTER MAX_ISO15765_WFT_MAX MAX_AD_ACTIVE_CHANNELS MAX_AD_SAMPLE_RATE MAX_AD_SAMPLES_PER_READING AD_SAMPLE_RESOLUTION AD_INPUT_RANGE_LOW AD_INPUT_RANGE_HIGH RESOURCE_GROUP TIMESTAMP_RESOLUTION Reserved for SAE J2534-2 FD_CAN_DATA_PHASE_DATA_RATE_ SUPPORTED Reserved for SAE J2534-2 Value(s) 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008 0x00000009 0x0000000A 0x0000000B 0x0000000C 0x0000000D 0x0000000E 0x0000000F 0x00000010 0x00000011 0x00000012 0x00000013 0x00000014 0x00000015 0x00000016 0x00000017 0x00000018 0x00000019 0x0000001A 0x0000001B 0x0000001C - 0x0000006B 0x0000006C 0x0000006D - 0xFFFFFFFF 26.9 Error Return Values Table 123 - Error return values Definition ERR_ADDRESS_NOT_CLAIMED ERR_NO_CONNECTION_ESTABLISHED ERR_RESOURCE_IN_USE Reserved for SAE J2534-2 Value 0x00010000 0x00010001 0x00010002 0x00010003-0xFFFFFFFF In addition to the above this document uses the return values that are in the process of being defined in the next revision of the SAE J2534-1 specification. SAE INTERNATIONAL J2534™-2 DEC2020 Page 145 of 146 Table 124 - New SAE J2534-1 return values Name ERR_INVALID_IOCTL_PARAM_ID Value 0x1E Description Invalid IOCTL Parameter ID (either in the reserved range or not appropriate for the current channel) ERR_VOLTAGE_IN_USE 0x1F Programming voltage is currently being applied to another pin ERR_PIN_IN_USE 0x20 Pin number specified is currently in use (another protocol is using the pin) 26.10 TxFlags Bits Table 125 identifies the TxFlags bits (defined by SAE J2534-2) that can be used in the PASSTHRU_MSG structure. Table 125 - TxFlags values Name SW_CAN_HV_TX MSG_PRIORITY_VALUE TP2_0_BROADCAST_MSG FD_CAN_BRS FD_CAN_FORMAT Bit(s) 10 16-19 16 19 20 26.11 RxStatus Bits Table 126 identifies the RxStatus bits (defined by SAE J2534-2) that can be used in the PASSTHRU_MSG structure. Table 126 - RxStatus bits Name OVERFLOW LINK_FAULT SW_CAN_NS_RX SW_CAN_HS_RX SW_CAN_HV_RX J1939_ADDRESS_LOST J1939_ADDRESS_CLAIMED CONNECTION_LOST CONNECTION_ESTABLISHED FD_CAN_BRS FD_CAN_FORMAT FD_CAN_ESI 16 17 18 17 16 17 16 17 16 19 20 21 Bit(s) SAE INTERNATIONAL J2534™-2 DEC2020 Page 146 of 146 27. NOTES 27.1 Revision Indicator A change bar (l) located in the left margin is for the convenience of the user in locating areas where technical revisions, not editorial changes, have been made to the previous issue of this document. An (R) symbol to the left of the document title indicates a complete revision of the document, including technical revisions. Change bars and (R) are not used in original publications, nor in documents that contain editorial changes only. PREPARED BY THE SAE VEHICLE EE SYSTEM DIAGNOSTIC STANDARDS COMMITTEE