ELM329
Periodic (Wakeup) Messages
Some applications require that there be periodic
messages sent by the test equipment (scan tool) in
order to maintain a connection. If these messages do
not arrive in a timely fashion, the ECU will close the
connection and go into a low power ‘sleep’ mode. In
order to stop the ECU from going to sleep, you may
need to send what we term as ‘wakeup’ messages.
Some texts also refer to these as CAN periodic
messages.
The ELM329 does not send wakeup messages by
default - you must enable the sending of them (and
you may also need to define what you wish to have
sent).
There are a few conditions that need to be met
before the ELM329 will send periodic messages. First,
you must be selected for a defined CAN protocol (ie
not set to protocol 0), and the protocol must be in the
‘normal’ mode of operation. That is, it must be in the
mode where you send and receive messages, not in
one of the ‘monitoring’ modes (as entered with AT MA,
DM1, or MP). In addition, either Wakeup Mode 1 or 2
must be chosen, either by command (see below) or by
PP 23.
>AT WD 01 3E
OK
with the 11 bit example from above, will result in the
following being sent by the ELM329:
7DF 01 3E
The difference here is that the data length is no
longer 8 bytes - it has been set to two, as that is the
number of data bytes that you provided (so if you want
the message to use 8 bytes, you need to provide 8
bytes).
Once you have the wakeup header and data set
as you want them, you are ready to begin sending the
messages. To do this, simply set the Wakeup Mode:
>AT WM 1
OK
Enabling Wakeup Mode 1 results in the wakeup
messages being sent at a constant rate, no matter
what information is going back and forth on the CAN
bus. Wakeup Mode 2 is the other option - it causes the
wakeup timer to be reset after every message is sent
by the ELM329, and will only insert a wakeup
message if the normal data messages are not being
sent often enough.
Once enabled, the ELM329 will send the following
message by default:
7DF 01 3E 00 00 00 00 00 00
The time interval between the wakeup messages
can be adjusted in 20.48 msec increments using the
AT SW command. Simply provide the setting that you
require as two hex digits - for example, a setting of:
Note that this default wakeup message uses an 11
bit ID, and sends 8 data bytes. This message will be
sent, even if the current protocol uses a 29 bit ID. If
you wish to send a 29 bit ID, then you will need to
define one with the Wakeup Header command:
>AT SW 92
OK
>AT WH 18 DB 33 F1
OK
will result in a timer setting of about 3 seconds (92 hex
is 146 decimal, giving 2.99 seconds). The default timer
setting is 62 (98 decimal) or 2.0 seconds.
To turn off the wakeup messages at any time,
select Wakeup Mode 0:
and from that point on, the wakeup message will be
sent with the 29 bit header (the ELM329 always uses
the last ID that was defined using AT WH). Of course,
the above header is only an example - you may define
any values that you wish for the ID bits.
Setting the actual content of the Wakeup Message
is accomplished with either the Wakeup Data (AT WD)
or the Wakeup Message (AT WM) commands. They
are exactly the same (we’ve kept the WM that the
ELM327 used, and the WD is new). The ELM329 does
not format the data provided in any way, and it does
not pad it out to 8 bytes. Whatever you provide will be
used exactly as you present it. For example, sending:
>AT WM 0
OK
The sending of wakeup messages will also be
cancelled if you enter into one of the monitoring modes
by using the AT MA, DM1 or MP commands.
ELM329DSB
Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
53 of 76