Specifications

15 of 19ELM323DSD Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
Advanced Data Retrieval – Setting the Headers
Prior to v2.0, the ELM323 used a fixed format for
the message headers, so that only one type of data
(the mandated emissions-related information) could be
retrieved. Starting with v2.0, the header bytes can be
specified by the user, allowing for the direct retrieval of
a great deal more data. Note that only the OBDII
diagnostic codes have been mandated, so there is no
requirement for all vehicles to support these extra
capabilities, and some do not.
The emissions related diagnostic trouble codes
that most people are familiar with are described in the
SAE J1979 standard (ISO15031-5), and are really a
specific instance of the modes allowed by the J2178-4
standard, which provides for information transfer by
what is known as ‘functional addressing’. For the
OBDII mandated diagnostics, requests are actually
made to the functional addresses 6A (for ISO9141) or
33 (for ISO14230), with whatever processor that is
responsible for that function answering the request.
Theoretically, many different processors can respond
to a single functional request, each contributing their
own data.
To retrieve information beyond that of the OBDII
requirements, either the functional or the ECU
physical ‘address’ needs to be known. For example,
consider that you want to request that the processor
responsible for Engine Coolant provide the current
Fluid Temperature, and you do not know its address.
You consult the J2178 standards and determine that
Engine Coolant is functional address 48. Combining
this with the knowledge that the ELM323 does not
support in-frame responses (so it only allows message
types 8 to 15), and a scan tool is normally address F1,
you may decide to set the three header bytes to A8 48
and F1. This is done with the Set Header command,
which is used as follows:
>AT SH A8 48 F1
The three header bytes assigned in this manner
will stay in effect until changed by the next AT SH
command, a reset, or an AT D. If the default Auto
Receive mode is in effect when the header bytes are
set, the ELM323 will also adjust the receive address
as appropriate – since the first byte tells us that this is
a functional address, then for ISO9141 systems, the
receive address will automatically be set to the
functional address plus one (49). For ISO14230
systems, the physical address of the sender (F1) will
be used for the receive address. If you decide that this
is not appropriate for your case, you can always set
another receive address, using the AT SR command.
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 turned off, the
conversation could look like this:
>10
10 2E
The response to ID 10 is the byte 2E in this case.
You may find that some requests, being of a low
priority, may not be 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 that you want to
speak to (it is always the third byte of any message
sent by that device), rather than the functional
address. One caution to note with physical addressing
is that there are modes which can initiate the constant
sending of data, and if the ELM323’s timeout is set
longer than the time between responses, the ELM323
may send responses forever. In these cases, just like
in the Monitoring All mode, a single character will have
to be sent to interrupt the stream of data.
Advanced experimenters will be aware that the
ISO14230 standard also specifies that the first header
byte must always include the length of the data field.
The ELM323 will calculate and insert these six bits
automatically for each message, no matter what you
provided for them in your header definition. It does not
however, alter the two most significant bits of that first
header byte.
Finally, please note that the headers that are in
effect when the bus is initiated will remain locked-in for
all of the following ‘keep-alive’ messages, no matter
what is issued afterwards using AT SH. These same
header bytes will also be the ones used for the ‘start
communications’ message that is generated by the
ELM323 during a fast initiation. This is provided as a
feature to allow experimentation with the header bytes
once a connection is established, but it may cause
confusion if you first try to set the headers, then initiate
the bus, only to find that the initiation fails. Until you
are familiar with your vehicle, it is recommended that
you send a simple command (01 00 or such) to first
start bus activity, then try changing the header bytes.
ELM323