ELM327
AT Command Descriptions (continued)
will be saved no matter what the AT M0/M1 setting is.
The ELM327 supports 12 different protocols (two
can be user-defined). They are:
the default, and will be the only protocol used by the
ELM327. Failure to initiate a connection in this
situation will result in a response such as ‘BUS INIT:
...ERROR’, and no other protocols will be attempted.
This is a useful setting if you know that your vehicle(s)
only require the one protocol, but also one that can
cause a lot of problems if you do not understand it .
0 - Automatic
1 - SAE J1850 PWM (41.6 kbaud)
2 - SAE J1850 VPW (10.4 kbaud)
3 - ISO 9141-2 (5 baud init, 10.4 kbaud)
4 - ISO 14230-4 KWP (5 baud init, 10.4 kbaud)
5 - ISO 14230-4 KWP (fast init, 10.4 kbaud)
6 - ISO 15765-4 CAN (11 bit ID, 500 kbaud)
7 - ISO 15765-4 CAN (29 bit ID, 500 kbaud)
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)
* default settings (user adjustable)
SP 00
[ erase the Stored Protocol ]
To speed up protocol initiation and detection, the
SP 0 command sets the protocol to automatic, but
does not perform a (very time-consuming) write to
EEPROM. Some users felt it was necessary to be able
to actually write to the ELM327's EEPROM, however,
so we provided this command. It should not normally
be used when connecting to a vehicle.
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 your vehicle is
ISO 9141-2, but you want to occasionally use the
ELM327 circuit on other vehicles, you might use the
AT SP A3 command, so that the first protocol tried will
then be yours (3), but it will also automatically search
for other protocols. Don't forget to disable the memory
function if doing this, or each new protocol detected
will become your new default.
SP Ah will save the protocol information even if
the memory option is off (but SP A0 and SP 0A do not-
if you must write 0 to the EEPROM, use command AT
SP 00). Note that the ‘A’ can come before or after the
h, so AT SP A3 can also be entered as AT SP 3A.
The first protocol shown (0) is a convenient way of
telling the ELM327 that the vehicle’s protocol is not
known, and that it should perform a search. It causes
the ELM327 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 ELM327 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.
ELM327 users often use the AT SP 0 command to
reset the search protocol before starting (or restarting)
a connection. This works well, but as with any Set
Protocol command, it involves a write to EEPROM,
and an unnecessary delay (of about 30 msec) while
the write occurs. Beginning with v1.3 of the ELM327, a
write to EEPROM will no longer be performed for an
SP 0 (or an SP A0, or SP 0A) command, but the
command will still reset the protocol to 0 for you. If you
really want to change what is stored in the internal
EEPROM, you must now use the new AT SP 00
command.
SR hh
[Set the Receive address to hh ]
Depending on the application, users may wish to
manually set the address to which the ELM327 will
respond. Issuing this command will turn off the AR
mode, and force the IC to only accept responses
addressed to hh. Use caution with this setting, as
depending on what you set it to, you may accept a
message that was actually meant for another module,
possibly sending an IFR when you should not. To turn
off the SR filtering, simply send AT AR.
This command has limited use with CAN, as it only
monitors one byte of the ID bits, and that is not likely
selective enough for most CAN applications (the CRA
If another protocol (other than 0) is selected with
this command (eg. AT SP 3), that protocol will become
ELM327DSI
Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
25 of 82