ELM320
Advanced Data Retrieval – Setting the Headers
Prior to v2.0, the ELM320 used a fixed format for
the message headers, allowing only for the retrieval of
the mandated diagnostic codes, not allowing the user
to change them. The IC is now fully programmable,
however, allowing the headers to be changed and a
great deal more information to be obtained, if your
vehicle supports it. Note that only the OBDII diagnostic
codes have been mandated, so there is no
requirement for all vehicles to support these extra
capabilities.
receive address selected stays in effect until changed
by another AT SR, or reinstatement of the automatic
mode.
Having set the headers, all one needs to do is
issue the secondary ID for fluid temperature (10) at the
prompt. If the display of headers is set to on, the
conversation would typically look like this:
>10
81 49 10 10 2E 41
The diagnostic trouble codes that most people are
familiar with are described by SAE standard J1979
(ISO15031-5). This is really a specific instance of the
many modes allowed by the J2178-4 standard, which
allows for information transfer through what is known
as ‘functional addressing’. For the OBDII mandated
diagnostics, requests are actually made to the
functional address 6A, with whatever processor is
responsible for this function answering the request.
Theoretically many different processors can respond
to a single functional request, each contributing their
insight as to the information requested.
To retrieve some of this extra information, the
function being addressed needs to be known. For
example, consider that you have studied the J2178
standards and want to request that the processor
responsible for Engine Coolant provide the current
Fluid Temperature. You determine that Engine Coolant
is functional address 48, you know that your address
as a scan tool is normally F1, and that since the
ELM320 only supports single IFR responses (type 1),
you choose A1 as the initial priority/type byte.
Ignoring the first three (header) bytes, and the final
check digit, one can see that the response to ID 10 is
the byte 2E. You may find that some requests, being
of a low priority, are not answered immediately,
possibly causing a NO DATA result. In these cases,
you may want to adjust the timeout value, perhaps first
trying the maximum (with AT ST FF).
Using the physical addressing modes described
by the J2190 standard involves an almost identical
process. The main difference is that you must know
the physical address of the device which you want to
speak to. This is always the third byte of a message
sent by any device, so can be determined by
monitoring the headers (for the above response, the
sender’s address is 10). Knowing that you wish to talk
to address 10, that your physical address is F1, and
that for type 1 IFR with physical addressing E4 may be
appropriate for the first byte, you would change the
header bytes using AT SH E4 10 F1. If Auto Receive
is enabled, the receive address will automatically be
set to F1, your physical address (the ELM320 knows
to do this from the first byte). As before, this header
will remain in effect for every message sent until
changed to something else.
One caution to note with physical addressing.
There are modes which initiate the constant sending of
data, and if the ELM320’s timeout is set longer than
the duration between responses, the ELM320 may
return messages forever. In these cases, just like in
the monitoring modes, a single character will have to
be sent to interrupt the process.
Finally, please note that while we have provided
some information on the SAE standards for the
examples, Elm Electronics will only reply to requests
for clarification on our product’s operation, and not on
the standards. It is the customer’s responsibility to
obtain their own information on the relevant standards,
and on their vehicle. Requests to Elm Electronics for
this information will go unanswered.
Combining the above then, it is desirable to set the
three header bytes to A1 48 F1. This is done with the
Set Header command, which would be issued at the
prompt as follows:
>AT SH A1 48 F1
The three header bytes assigned in this manner
will stay in effect until changed with another AT SH
command, a reset, etc. If the default Auto Receive
mode has been selected, the receive address will
automatically be set to 49 (the second byte plus one).
This is consistent with the functional pairs assigned by
J2178-4. If you decide that this is not appropriate for
your case, you can always set the receive address to
what you wish using the AT SR command. For
example, if you wanted to obtain a response that is
being sent to address E2 instead, you would use AT
SR E2 to override the automatic receive mode. Any
ELM320DSC
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
13 of 16