View Single Post
Old 10-27-2010, 10:54 PM   #5 (permalink)
braines
EcoModding Lurker
 
Join Date: Oct 2010
Location: Chicago
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
maybe.

based my experience with my particular car, for my Volvo 850 manufactured in Sept. 1995, ATSH 686AF0 worked. ATSH 686AF1 did not. AT 6C10F1 did not. Other people's millage may vary for other cars.

part of what put me onto this is if you examine the non-ELM portion of obduino32k on or about lines 1146-1151 you can see that they use "68 6A F1":

#ifdef ISO_9141
// ISO header
buf[0]=0x68;
buf[1]=0x6A; // 0x68 0x6A is an OBD-II request
buf[2]=0xF1; // our requester’s address (off-board tool)
which is different from what is used in the elm_init version on or about line 1060:
elm_command(str, PSTR("ATDPN\r"));
// str[0] should be 'A' for automatic
// set header to talk directly to ECU#1
if(str[1]=='1') // PWM
elm_command(str, PSTR("ATSHE410F1\r"));
else if(str[1]=='2') // VPW
elm_command(str, PSTR("ATSHA810F1\r"));
else if(str[1]=='3') // ISO 9141
elm_command(str, PSTR("ATSH6C10F1\r"));
else if(str[1]=='6') // CAN 11 bits
elm_command(str, PSTR("ATSH7E0\r"));
else if(str[1]=='7') // CAN 29 bits
elm_command(str, PSTR("ATSHDA10F1\r"));
Also I searched and found this article which may shed some more authoritative light on the issue, I think on some protocols developed after ISO 9141-2 these things were more standardized:

(I'm too new to post a link, so you'll need to copy/edit/paste
http colon //www dot obdclearinghouse dot com/index.php?body=get_file&id=1343
Address Bytes
Physical address values for modules within vehicles have not been assigned by either ISO 9141 or ISO 14230. This is especially true of modules using either of the 5-baud initialization protocols. Annex A.1 of ISO 14230-2 “Physical Addresses” which states that “Addresses are controlled by vehicle manufacturers” along with the ISO 9141 definition of the how the address byte is constructed. For ISO 14230 fast init addresses, Annex B of the same document states “Addresses...may be the same as used for 5 baud initialization or be in accordance with SAE J2178, Part 1”. Note that SAE J2178 is a standard for J1850 Class B network communications. Accordingly, as with J1850, testers should not ‘expect’ particular vehicle ECU addresses or make assumptions about the role of a vehicle ECU based on its address. For example, engine ECUs commonly use 10 as an address but there are many vehicles that do not use 10 for the engine ECU or may use 10 for another vehicle ECU.

Based on the fact that different cars may require different header values, perhaps rather than 'if ISO-9141 then XX XX XX' we want to do something like:
'if ISO-9141 then try xx xx xx. Then test, if success then proceed, else test failed, then try xx xx xx, if success then proceed ... we could start with the most common 'right answer' and work our way onto more obscure ones.

I think, Magister, you are correct that 6C10F1 is likely to be the most common correct answer.
I believe that 686AF1 is the 2nd most common correct answer.
I found that in my case 686AF0 was the correct answer.

I will attempt to write a version of the code that does this testing (should be pretty easy) However, once I do that, how would I go about getting that change accepted into the trunk version, or even tested by other people on other cars first?
  Reply With Quote