Sure but we will need to edit your source as well:
I dont have my code handy (anyway, I am using 2 serial LCD, a RTC clock (will use the subaru stock clock location) and a SD module as well for logging so the code is not much like the one in the svn tree) but it is something like that:
/* ISO 9141 FAST init */
byte iso_fastinit()
{
byte b;byte kw1, kw2;
// 1) Wait for 300ms with K line high.
digitalWrite(K_OUT, HIGH);
delay(300);
// 2) Pull K line low for 25 +/- 1 ms
digitalWrite(K_OUT, LOW);
delay(25);
//3) Let K line rise high and wait 25ms
digitalWrite(K_OUT, HIGH);
delay(25);
//4) init serial connection to 10400 baud, 8N1, 1=0Volt 0=12Volt, least significant bit first
// switch now to 10400 bauds
Serial.begin(10400);
//5) send package c1 33 f1 81 66 33=dest, f1=our tester id, 81=start comms
iso_write_byte(0xc1);
iso_write_byte(0x33);
iso_write_byte(0xF1);
iso_write_byte(0x81);
iso_write_byte(0x66);
//6) wait for response 83 f1 01 c1 e9 8f ae 01=physical address,
// you can read data byte by byte to validate using iso_read_byte to validate ECU response.
return 0;
}
Keep it mind that the rest of the code does not work for some reason. If you have a message on your LCD like "127 code(s) blabla", you are at the same step as I am right now.
Quote:
Originally Posted by cmags
Hey I've been following the discussion recently, Mart, since you mentioned the STi. Looking at your link it seems that only the STi out of the Subaru line uses the KWP2000 protocol, correct?
I ask because I'm building one of these for my buddy (well, I have built it already) but I couldn't get it to init in my Impreza (non-STi). I was figuring I could use my car as a testbed and then plug into his - from your information it seems I cannot.
I haven't had much time for this project lately, and since it seems I don't have the proper vehicle to test on anyway, I'll be looking forward to reading about your progress. Would you be willing to share your code once you get something working? I'd really appreciate it.
|