8 of 51
ELM327DSC Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
AT Commands (continued)
BRT hh [ set Baud Rate Timeout to hh ]
This command allows the timeout used for the
Baud Rate handshake (AT BRD) to be varied. The
time delay is given by hh x 5.0 msec, where hh is a
hexadecimal value. The default value for this setting is
0F, providing 75msec. Note that a value of 00 does not
result in 0 msec - it provides the maximum time of 256
x 5.0 msec.
CAF0 and CAF1 [ CAN Auto Formatting off or on ]
These commands determine whether the ELM327
assists you with the formatting of the CAN data that is
sent and received. With CAN Automatic Formatting
enabled (CAF1), the IC will automatically generate
formatting (PCI) bytes for you when sending, and will
remove them when receiving. This means that you can
continue to issue OBD requests (01 00, etc.) as usual,
without regard to these extra bytes that the CAN
diagnostics systems require. With formatting on, the
trailing (unused) data bytes that are received in a
frame will be removed as well, and only the relevant
ones will be shown. Beginning with v1.2 of the
ELM327, lines with invalid PCI bytes are now ignored,
rather than showing them as ‘<DATA ERROR’s.
Occasionally, long (multi-frame) responses are
returned by the vehicle. To help you analyze these, the
Auto Formatting mode will extract the total data length
and print it on one line. Following this will be each
segment of the message, with the segment number (a
single hexadecimal digit) shown at the beginning of the
line with a colon (':') as a separator.
You may also see the characters 'FC: ' at the
beginning of a line (if you are experimenting). This
represents a Flow Control message that is sent in
response to a multi-line message. Flow Control
messages are automatically generated by the ELM327
in response to a “First Frame” reply, as long as the
CFC setting is on (it does not matter whether you have
selected the CAF1 or the CAF0 modes).
Another type of message – the RTR (or ‘Remote
Transfer Request’) – will be automatically hidden for
you when in the CAF1 mode, since they contain no
data. When auto formatting is off (CAF0), you will see
the characters 'RTR' printed when a remote transfer
request frame has been received.
Turning the CAN Automatic Formatting off (CAF0),
will cause the ELM327 to print all of the received data
bytes. No bytes will be hidden from you, and none will
be inserted for you. Similarly, when sending a data
request with formatting off, you must provide all of the
required data bytes exactly as they are to be sent –
the ELM327 will not perform any formatting for you
other than to add some trailing 'padding' bytes to
ensure that the required eight data bytes are sent. This
allows operation in systems that do not use PCI bytes
as ISO 15765-4 does.
Note that turning the display of headers on (with
AT H1) will override some of the CAF1 formatting of
the received data frames, so that the received bytes
will appear much like in the CAF0 mode (ie. as
received). It is only the printing of the received data
that will be affected when both CAF1 and H1 modes
are enabled, though; when sending data, the PCI byte
will still be created for you and padding bytes will still
be added. Auto Formatting on (CAF1) is the default
setting for the ELM327.
CF hhh [ set the CAN ID Filter to hhh ]
The CAN Filter works in conjunction with the CAN
Mask to determine what information is to be accepted
by the receiver. As each message is received, the
incoming CAN ID bits are compared to the CAN Filter
bits (when the mask bit is a ‘1’). If all of the relevant
bits match, the message will be accepted, and
processed by the ELM327, otherwise it will be
discarded. This three nibble version of the CAN Filter
command makes it a little easier to set filters with 11
bit ID CAN systems. Only the rightmost 11 bits of the
provided nibbles are used, and the most significant bit
is ignored. The data is actually stored as four bytes
internally however, with this command adding leading
zeros for the other bytes. See the CM command(s) for
more details.
CF hh hh hh hh [ set the CAN ID Filter to hhhhhhhh ]
This command allows all four bytes (actually 29
bits) of the CAN Filter to be set at once. The 3 most
significant bits will always be ignored, and can be
given any value. Note that this command can be used
to enter 11 bit ID filters as well, since they are stored in
the same locations internally (entering AT CF 00 00 0h
hh is exactly the same as entering the shorter AT CF
hhh command).
Soiseek.cn看中文数据手册