elm327

Send header and payload to ELM327 in non-CAN


I have an ELM327 connected to a (non-CAN) bus on an older GM vehicle. I realize I can send an OBD command (mode 09 and PID 02) by just sending the payload like "0902".

However, is it possible to send a complete frame (assuming the final checksum byte is added by the ELM327)? So if I wanted to send header 00 11 22 and then the payload 09 02, how would I do that?

Something similar was asked in this question but not really answered.


Solution

  • Yes. You can control most of the aspects.

    1. You can set the header via the AT SH command. That allows you control over the header bytes of the message. There are different formats to the parameter for this depending on which protocol you are using.
    2. You can also turn off automatic formatting via AT CAF 0 which then means you have to provide the first byte after the header which is the number of bytes being transmitted. This might be useful if you want to transmit your own messages like flow control etc. So you would need to send 020902, the ELM chip no longer inserts the number of bytes for you.

    The ELM327 data sheet from Elm Electronics covers all of this: https://www.elmelectronics.com/wp-content/uploads/2016/07/ELM327DS.pdf