Originally Posted by
Scorp1us
Found it, chewed on it. It is very close to what I need. The only part missing is the packet format. There was some talk given, but not enough. Like it specified a length, say 0x57, but no packet format to tell me how to lay it out.
that depends entirely on the vehicle, you'll have to tell us what ecm and mask you're working with. there's no standard.
It only gave a handful of values... Not enogh to fill 0x57 (87) bytes worth.
probably an incomplete list. again, what mask are you working with?
I also need to know the codes to request things like RPM, MAP, etc.
there's likely no way to accomplish that in your mask. usually you request an entire packet of data. that is unless it's a 160 baud ecm. 160 baud ecms do not recieve data, only send it. but since you mention checksumming, it's probably 8192, it seems most 160 baud ecms didnt even use a checksum.
And how to calc the checksum.
here's what i wrote in c to do it, you can easily translate to whatever language
Code:
unsigned char checksum_generate(unsigned char *buf, int len) {
int x = 0;
unsigned int sum = 0;
for(x=0;x<len;x++) sum += buf[x];
return ( 256 - ( sum % 256 ) );
};
int checksum_test(unsigned char *buf, int len) {
int x = 0;
unsigned int sum = 0;
for(x=0;x<len;x++) sum += buf[x];
if(( sum & 0xFF ) == 0) return 1;
return 0;
};
Bookmarks