Manual Serial Connection Tutorial

Abstract

Describes how to use free open source Drew Tech Tool for J2534 in order to setup a SSM2 via Serial connection to the engine control unit (ECU). Diesel or petrol ECU model does not matter. Once set up, one can send and receive messages without any additional software, no programming skills necessary.

IMPORTANT: Interface hardware that comes with J2534 driver is required!
Unfortunately, many cheap devices don’t come with J2534 drivers.

I am using Tactrix OpenPort 2.0 in this example.

Drew Technologies has good infos regarding J2534 on their site: http://www.drewtech.com/support/passthru.html

Content

Drew Tech Tool Software installation

Basically it is a generic tool, uses J2534 API under the hood, supports many protocols.

Visit http://www.drewtech.com/downloads/index.html
In category “SUPPORT APPLICATIONS” look for “J2534-1 Bus Analysis Tool” (not sure why they chose this link text), download and install Windows installer file:
Drew Technologies Tool for J2534-1 API v1.07.msi (9 MB)
License is GPLv2+, besides executable binaries the msi also includes Visual Basic source code.

Step 1: Select Device, Open

Tab “Connect”, top left frame.
Note: If you see text like “No information found in the registry” and buttons are disabled, close the app and use “Run as administrator” method!
Select desired hardware interface, should be recognized if your J2534-device had been installed correctly.
Path to DLL is just for info, lists the J2534 driver DLL location.
Click button “Load DLL”

Top right frame. Click button “Open” (API call PassThruOpen)

After “Open” the tool automatically does a PassThruReadVersion to retrieve version information, displays the results in bottom left frame.

Step 2: Protocol Properties

Bottom right frame.

Select ISO9141, ISO14230 would also work, they use the same physical layer (K-Line, OBDII pin 7).
Check baudrate and connect flags. Screenshot shows needed values which are defaults.
We need 4,800 baud which is Subaru SSM2 specific.
Connect Flags, right click for helper dialog.

Setting flag ISO9141_NO_CHECKSUM is important (0x200, bit 9). Since SSM2 is not a standard protocol, we have to turn off automatic checksumming by the device.

ISO9141_K_LINE_ONLY (0x1000, bit 12) can also be set, it’s not required though. I have tested Connect Flags 0x200 and 0x1200 working.

Click button “Connect” (PassThruConnect).
By the way, the statusbar shows latest command result, should be OK. You can also look into tab “Results” which displays a full log of all commands done so far.

Step 3: Config

Tab “Config”. Entries show current settings, the tool has already requested this info (PassThruIoctl GET_CONFIG).
Not important, but I usually work with LOOPBACK=OFF, don’t want to receive loopback messages from the interface device, I know what data I have sent anyway. Might be useful for debugging in case of troubles though.
LOOPBACK: 0 = OFF, 1 = ON
Click button “Set”
Tool does PassThruIoctl SET_CONFIG, then GET_CONFIG to display actual values.

Step 4: Filters

Tab “Filters”.
Very important – without a filter set up you won’t receive any response, the device would ignore anything received from the control unit.
Fasted way is clicking button Create “Pass All” Filter which fills in the needed data automatically.

Mask: 00
Pattern: 00
Filter: Pass

This filter instructs the interface device to let all incoming messages pass through. Without a pass filter, J2534 specs require blocking everything by default.

Don’t forget to click “Apply”, to acually set the filter (PassThruStartMsgFilter).

Step 5: Messages

Tab “Messages”. Now that everything has been set up we can try to communicate with the control unit.
Top right button column.
“Rate” entry: Specifies delay time in milliseconds for automatic read-message (PassThruReadMsgs) polling. Since we type and send messages manually, fast polling makes no sense. I recommend 1000 = 1 second or more. Otherwise the log in tab “Results” will grow fast, making it harder to use.
Click “Start” (toggles to “Stop”) button to run or stop the automatic read loop. Must be started in order to display received messages. Can be started later, the interface device will store (a limited amount of) incoming messages anyway.

Message content

Scratch Pad entry: type message to be sent as hex bytes in here.
IMPORTANT: You must provide valid checksum (last byte) or ECU won’t respond!

Tx flags: None (0)

Once ready, click button “Send” (PassThruWriteMsgs). On Openport 2.0 device there should be green (send) and red LEDs (receive) flashing shortly.

SSM2 via Serial examples

For protocol details see page SSM2 via Serial.
SSM2Init-Request to ECU usually is: 80 10 F0 01 BF 40
SSM2Init-Request to TCU usually is: 80 18 F0 01 BF 48

SSM2-Init response from a diesel ECU:

Step 6: Disconnect protocol

Tab “Connect”
Bottom right frame, click button “Disconnect” (PassThruDisconnect, current channel). You could set up a new/different protocol.

Step 7: Close connection

Tab “Connect”
Inside top right frame, press button “Close” (PassThruClose). PassThruClose also disconnects all open channels in case you did not do this already. Now you can quit the application or select a different J2534-device and start all over.

Advertisements

One response to “Manual Serial Connection Tutorial

  1. Hi,

    Thanks a lot for this. I’ve been banging my head against the wall trying to figure this out.

    John

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s