ELM329
AT Command Descriptions (continued)
ELM327 SP 0 command - it is the only one that does
not cause an immediate write to EEPROM (which is an
unnecessary step if the IC is only to begin searching
for another protocol immediately after). If you feel for
some reason that you must store a ‘0’ for the protocol,
you may send AT SP 00, but it is not necessary.
which gives a time of approximately 100 msec (this
value can be adjusted by changing PP 03). Note that
a value of 00 does not result in a time of 0 msec – it
will restore the timer to the default value.
SW hh [ Set Wakeup to hh ]
Protocols 1 to 5 in the above list are only included
for compatibility with ELM327 software, and have only
very limited functionality. If you use them to try to send
a request, nothing is sent, and the ELM329 will return
reporting ‘NO DATA’. Similarly, if trying to monitor with
protocols 1 to 5 (using AT MA), they report no data.
Once a data connection has been established,
some protocols require that there be data flow every
few seconds, just so that the ECU knows to maintain
the communications path open. If the messages do
not appear, the ECU will assume that you are
finished, and will close the channel. If this happens,
the connection will need to be initialized again in
order to re-establish communications. The ELM329 is
able to automatically generate wakeup (periodic CAN)
messages, in order to maintain a connection.
The time interval between these periodic
‘wakeup’ messages can be adjusted in 20 msec
increments using the AT SW hh command, where hh
is any hexadecimal value from 00 to FF. The
maximum possible time delay of just over 5 seconds
results when a value of FF (decimal 255) is used. The
default setting provides a nominal delay of 2 seconds
between messages. The replies to these messages
are always ignored, and are not visible to the user.
Note that the value 00 (zero) is treated as a very
special case, and must be used with caution, as it will
stop all periodic messages. This way of stopping the
messages while keeping the rest of the protocol
functioning normally, is for experimenters, and is not
intended to be used regularly. Issuing AT SW 00 will
not change a prior setting for the time between
wakeup messages, if the protocol is reinitialised.
SP Ah
[ Set Protocol to Auto, h ]
This variation of the SP command allows you to
choose a starting (default) protocol, while still retaining
the ability to automatically search for a valid protocol
on a failure to connect. For example, if you think that
your vehicle is ISO 15765-4, 11 bit ID and 250 kbaud,
you may send the AT SP A8 command to tell the
ELM329 to try protocol 8 first, then automatically
search for another if that fails.
There is one problem with using this command -
the message that you provide is sent using the
protocol that you specify, without regard to what baud
rate the bus is actually operating at. If you are
mistaken about the baud rate, you will cause errors on
the bus, resulting in a momentary disruption, which is
not desirable. The much preferred method with CAN
protocols is to use the AT SP 0 command.
ST hh
[ Set Timeout to hh ]
After sending a request, the ELM329 waits a
preset time for a response before it can declare that
there was ‘NO DATA’ received from the vehicle. The
same timer setting is also used after a response has
been received, while waiting to see if more are
coming. The AT ST command allows this timer to be
adjusted, in increments of 4 msec (or 20 msec if in the
J1939 protocol, with JTM5 selected).
TA hh [ set the Tester Address to hh ]
This command is used to change the current
tester (ie. scan tool) address that is used in the
headers, periodic messages, filters, etc. The ELM329
normally uses the value that is stored in PP 06 for
this, but the TA command allows you to temporarily
override that value.
When Adaptive Timing is enabled, the AT ST time
sets the maximum time that is to be allowed, even if
the adaptive algorithm determines that the setting
should be longer. In most circumstances, it is best to
simply leave the AT ST time at the default setting, and
let the adaptive timing algorithm determine what to use
for the timeout.
Sending AT TA will affect all protocols, including
J1939. This provides a convenient means to change
the J1939 address from the default value of F9,
without affecting other settings.
Although this command may appear to work ‘on
the fly’, it is not recommended that you try to change
this address after a protocol is active, as the results
may be unpredictable.
The ST timer is set to 19 (25 decimal) by default
ELM329DSB
Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
22 of 76