23 of 83
ELM329DSC Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
AT Command Descriptions (continued)
8 - ISO 15765-4 CAN (11 bit ID, 250 kbaud)
9 - ISO 15765-4 CAN (29 bit ID, 250 kbaud)
A - SAE J1939 CAN (29 bit ID, 250* kbaud)
B - USER1 CAN (11* bit ID, 125* kbaud)
C - USER2 CAN (11* bit ID, 50* kbaud)
D - SAE J1939* CAN (29* bit ID, 500* kbaud)
E - USER4 CAN (11* bit ID, 95.2* kbaud)
F - USER5 CAN (11* bit ID, 33.3* kbaud)
* default settings (user adjustable)
The first protocol shown (0) is a convenient way of
telling the ELM329 that the vehicle’s protocol is not
known, and that it should perform a search for you. It
causes the ELM329 to try all protocols if necessary,
looking for one that can be initiated correctly. When a
valid protocol is found, and the memory function is
enabled, that protocol will then be remembered, and
will become the new default setting. When saved like
this, the automatic mode searching will still be
enabled, and the next time the ELM329 fails to
connect to the saved protocol, it will again search all
protocols for another valid one. Note that some
vehicles respond to more than one protocol - during a
search, you may see more than one type of response.
The AT SP 0 command is a useful way to reset
the search logic when attempting to connect to a
vehicle. The ELM329 SP 0 command works like the
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.
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.
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).
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.
The ST timer is set to 19 (25 decimal) by default
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 ]
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