DG J2534 SDK Manual 20050711
DG J2534 SDK Manual 20050711
com
This document describes Dearborn Group’s (DG) SAE J2534 compliant System
Development Kit (SDK). The purpose of this application is to facilitate the use of the
J2534 API functions using the DG Hardware.
This implementation is based on Version 04.04 of SAE J2534. Of the fourteen (14)
functions, only one function is not supported: PassThruSetProgrammingVoltage. This is
due to the DG hardware not having this capability at this time.
The Protocols supported are: CAN, ISO15765, ISO14230, ISO9141, J1850PWM, and J1850VPW.
This document is copyrighted by the Dearborn Group, Inc. Permission is granted to copy any or all
portions of this manual, provided such copies are for use with the product provided by the Dearborn
Group, and that the name “Dearborn Group, Inc.” remains on all copies as on the original.
1 of 8
www.dgtech.com
1 The Main Display area
When the “About” Menu Item is selected the Version of the 2534 SDK is displayed as
the following (For the Gryphon):
Note: Any text in the display area that is highlighted then the “Copy Highlighted Lines” button will become
enabled. If this button is selected then the text is sent to the clipboard so other applications can use it.
When the “File” Menu Item is selected three selectable menu items are available:
1. Save to File
2. Reset Capture
3. Exit
2 of 8
www.dgtech.com
Selecting “Saveto file” will display a standard Windows “Save As” Dialog. This allows the
user to save the contents of the Display area to a text file.
Selecting “Reset Capture” will allow the user to clear any entries in the display area.
The “J2534 Commands” section when selected displays the following items:
Note: PassThruSetProgrammingVoltage function is not supported. This is due to the Gryphon and Python hardware not having this
capability.
3 of 8
www.dgtech.com
2 J2534 Commands
1. PassThruConnect has a dialog that allows the user to configure which protocol. The following lists
the supported protocols that can be configured. The Cancel button closes the dialog.
PassThruConnect(CAN, 0, &ulChannelID);
PassThruConnect(ISO15765, 0, &ulChannelID);
PassThruConnect(ISO14230, 0, &ulChannelID);
PassThruConnect(ISO9141, 0, &ulChannelID);
PassThruConnect(J1850PWM, 0, &ulChannelID);
PassThruConnect(J1850VPW, 0, &ulChannelID);
2. PassThruDisconnect ends a connection to a protocol channel. The Cancel button closes the
dialog.
PassThruDisconnect(ulChannelID);
3. PassThruReadMsgs has a dialog that allows the user to configure the number of messages
placed in the display area. The number of messages or a Timeout period in milliseconds,
whichever occurs first, will end the Read to the display area. After configuring, select the Read
Msgs button to display the messages read from the vehicle/ECU. The Cancel button closes the
dialog.
4 of 8
www.dgtech.com
4. PassThruWriteMsgs has a dialog with a Message drop-down box that allows the user to add
messages to the “Messages to Write” list. This is done by either directly entering the message, or
selecting a previously entered message from the drop-down box. This drop-down box retains the
last ten unique messages entered. The list can be edited with the “Remove From List” button.
While there are messages in the List the” Write Msgs” button shall be enabled. The messages in
the “Messages to Write” list are sent out to the vehicle/ECU when the “Write Msgs” button is
selected. The Cancel button closes the dialog.
ptrMsg=new PASSTHRU_MSG[ulNumMsgs];
for(unsigned int count=0; count<ulNumMsgs; count++)
{
memset(ptrMsg+count, 0, sizeof(PASSTHRU_MSG));
5. PassThruStartPeriodicMsg has a dialog that allows the user to enter the message to be sent out
periodically and its time interval. The Cancel button closes the dialog.
memset(&ptrMsg, 0, sizeof(PASSTHRU_MSG));
memcpy(ptrMsg.Data, ptrTempMsg, size);
ptrMsg.DataSize=ulSize;
ptrMsg.ExtraDataIndex=0;
ptrMsg.ProtocolID=iCurProtocol;
5 of 8
www.dgtech.com
6. PassThruStopPeriodicMsg has a dialog that allows the user to enter the periodic message
number, which will identify and stop the periodic message when the “Stop Periodic” button is
selected. The Cancel button closes the dialog.
PassThruStopPeriodicMsg(ulChannelID, 1);
7. PassThruStarMsgFilter has a dialog that allows the user to select a filter type (Pass, Block, or
Flow Control), and then enter a Pattern, a Mask, or a Flow Control Message. The Cancel button
closes the dialog.
memset(&ptrMask, 0, sizeof(PASSTHRU_MSG));
memcpy(ptrMask.Data, ptrTempMsg, size);
ptrMask.DataSize=ulSize;
ptrMask.ExtraDataIndex=0;
ptrMask.ProtocolID=iCurProtocol;
memset(&ptrPattern, 0, sizeof(PASSTHRU_MSG));
memcpy(ptrPattern.Data, ptrTempMsg, size);
ptrPattern.DataSize=ulSize;
ptrPattern.ExtraDataIndex=0;
ptrPattern.ProtocolID=iCurProtocol;
6 of 8
www.dgtech.com
8. PassThruStopMsgFilter has a dialog that allows the user to enter the filter message number,
which will identify and stop the filter message when the “Stop Filter Msg” button is selected. The
Cancel button closes the dialog.
PassThruStopMsgFilter(ulChannelID, 1);
9. PassThruReadVersion will display the firmware version, DLL version, and the API version in the
display area.
10. PassThruGetLastError will display the last error, if no error a “Function call successful” comment
will be displayed.
Or
7 of 8
www.dgtech.com
11. PassThruIoctl a dialog that allows the user to select from a list of IO controls (IOCTLS), and
Set/Get their configuration parameter. The Cancel button closes the dialog.
ConfigList.NumOfParams=1;
ConfigList.ConfigPtr=&Config;
Config.Parameter=1;
PassThruIoctl(ulChannelID, GET_CONFIG, &ConfigList, NULL);
Or
ConfigList.NumOfParams=1;
ConfigList.ConfigPtr=&Config;
Config.Parameter=3;
Config.Value=0;
PassThruIoctl(ulChannelID, SET_CONFIG, &ConfigList, NULL);
12. PassThruOpen is the initial function to issue which opens the link to the hardware (Gryphon or
Python).
PassThruOpen();
PassThruClose();
3 Known issues:
1. The Read Messages dialog shows the Timeout as Msecs, it should be msecs –
milliseconds.
3. The function GetLastError is not shown in the display area, only the return value.
8 of 8