j2534 Open Source Resources

KerchumA222
Posts: 15
Joined: Sun Oct 20, 2013 3:15 am
cars: 2002 Pontiac Firebird
3800 Series II V6
(Turbo in the nearish future)
Location: Struthers, OH, U.S.A
Contact:

j2534 Open Source Resources

Post by KerchumA222 »

I figured I would post this stuff here. I am starting to work on an open source application to use a j2534 compliant VCI to interface with a GM PCM. These are my inspirations:
J2534-1 is listed as the EPA Mandated (in the USA) spec for reprogramming PCMs from 2004 and up. Even though it was mandated for 2004+ the interface is generally still compatible with older models as it is a pass-thru device that can support a number of protocols. I have one of these units now, so I can test (play around) with it to my hearts desire.

My goal is to create open source software (written in C++) that lets us program custom Tunes (or whole software) to the PCM.

I want to start out just getting familiar with the standard and grabbing some generic OBD-II data with it. My tool cost me about $25USD, so cost of entry is extremely low.

I would appreciate it if anyone can point me in a good direction for standard OBD-II stuff as well as anything ecu-programming specific. Once I have something remotely usable I will create a repository and post that here for anyone to contribute too.

EDIT: As a side note, when my cable is connected I have an extra COM device. I think I will probe this device and see if it is for the cable itself or if it allows commands to be passed to the Bus.
EDIT2: The above mentioned COM device is actually for flashing firmware to the cable itself.
Last edited by KerchumA222 on Tue Dec 02, 2014 7:30 am, edited 3 times in total.
Charlescrown
Posts: 1831
Joined: Sat Aug 06, 2011 7:58 am
cars: V8 VR Commodore BT1
LB Lancer 2L turbo & Delco
Starion TBI with Delco
Mitsubishi Lancer EVO4 track car
NA MX5
3 vintage motor bikes
Location: Padstow NSW

Re: j2534 Open Source Resources

Post by Charlescrown »

I use a Tactrix unit for Mitsu and Subaru and I believe they are working on software for other cars. Very easy to use but it's still developing by the day. Not sure what the protcol is but can find out.
Munchies
Posts: 8
Joined: Thu Jan 23, 2014 10:55 am
cars: 1996 K2500 Burb 454
2001 Suburban 2500 8.1
2001 Saab 9-5 Aero 2.3T
1996 Ford explorer 5.0 V8

Re: j2534 Open Source Resources

Post by Munchies »

I thought it was pretty odd no one took the lead with j2534 and tuning. I wonder if there are things in place to only flash approved config files somehow.
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: j2534 Open Source Resources

Post by antus »

The trick is that J2534 is only a passthrough interface, and most pcms dont natively support flashing. You usually need to pass a manufacturer and model specific security challenge, then upload your own flash program to the ecu. This program has to be able to drive the hardware in the pcm, specifically the flash chip and the communications chip. It also needs to implement some kind of protocol to talk to the pc. To do this you need detailed understanding of the hardware platform and probably some embedded processor development skills. Its certainly possible and has been done (I believe early versions of the subaru/hitachi flash kernel are open source) but its significantly harder than just connecting from a pc and sending the file via a documented standard API.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
KerchumA222
Posts: 15
Joined: Sun Oct 20, 2013 3:15 am
cars: 2002 Pontiac Firebird
3800 Series II V6
(Turbo in the nearish future)
Location: Struthers, OH, U.S.A
Contact:

Re: j2534 Open Source Resources

Post by KerchumA222 »

^Exactly. Anyone know the legalities of reverse engineering the kernel? Or copying the code used in TIS? You can use j2534 for programming with GMs TIS with valid (from GM) bin and license. We could simply log the entire process and have all the steps as well as the bytecode to upload (maybe with a few modifications). Any ideas?

P.S. I am only concerned with GM tuning (particularly the 1996-200X V6s), and I understand the code pulled might not be portable with other PCMs unless they use the same architecture and have the same memory layout.

P.P.S If examining the code would work and isn't too illegal, my vehicle has 2 available update calibrations. One modifies the criteria for setting a fault code, and the other is a general calibration. GM only allows you to flash NEWER software each time.
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: j2534 Open Source Resources

Post by antus »

Reverse engineering legality varies country to country. I believe in Australia reverse engineering for interoperability is legal. As for the TIS code, the whole package has a copyright notice so I would not do that. As far as I am aware everybody whos written flash tools so far have developed their own flash kernel.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
KerchumA222
Posts: 15
Joined: Sun Oct 20, 2013 3:15 am
cars: 2002 Pontiac Firebird
3800 Series II V6
(Turbo in the nearish future)
Location: Struthers, OH, U.S.A
Contact:

Re: j2534 Open Source Resources

Post by KerchumA222 »

okay then. Antus, do you have any recommended readings for me for building a custom upload kernel? Its 8-bit Motorola assembly right?
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: j2534 Open Source Resources

Post by antus »

It depends on the year. It'll be motorola hc11 if its 8 bit or 68332 if its 32 bit. If its hc11 the reset vector is the last word of the bin, at FFFE. If its 68332 then its the first dword at the start of the bin. You'll need to get the data sheet for the flash chip, and the DLC if yu can find it (will be a motorola part as well, and probably integrated in GMs custom silicon) then disassemble factory bins to try to figure out where the documented registers are mapped. I do my assembly in GAS (gnu assembler), can help you with how to create and use a link definition to map out the addressing and load address when you have something to run if you use that assembler (its personal preference, many prefer motorolas assembler and syntax). In Australia they stayed on the HC11 longer while the 68332 was being run in the USA. Here they implemented bank switching and used 128k bins where the bottom 32k was common and contained the calibration and the upper 32 was swapped between a 32k segment for engine code and another for transmission code. There is some old 68332 flash routines around somewhere, that may be similar to the ecu your looking at. I'll see if I can find them.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: j2534 Open Source Resources

Post by antus »

Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: j2534 Open Source Resources

Post by antus »

Also heres the J2534 spec. It looks like it was released in this format (scans) by the society of automotive engineers in to the public domain.
Attachments
sae.j2534.2002.pdf
(3.06 MiB) Downloaded 2842 times
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
Post Reply