Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flow control message while receiving CAN message with ELM327

I am trying to make software, which runs under Windows and communicates with an ELM327 device. I created the first version, and I went in my Smart Fortwo (Smart 451) vehicle. I managed to connect with the Instrument Cluster (the transmit CAN ID is 782, and receive CAN ID is 783). However, I have a huge problem with Flow Control. Here is the log:

TX: ATI
RX: ELM327 v1.5a

TX: ATE0
RX: ATE0 OK

TX: ATSP6
RX: OK

TX: ATH1
RX: OK

TX: ATL1
RX: OK

TX: ATCFC1
RX: OK

TX: ATFCSM0
RX: OK

TX: ATAL
RX: OK

TX: ATSH782
RX: OK

TX: ATCRA783
RX: ?

TX: ATST64
RX: OK

TX: 1092
RX: **783 02 1A 87**

TX: 1A87
RX: **783 10 16 5A 87 05 6E 00 08**

I used another tool, and I saw that the ELM327 device sends the Flow Control Frame, immediately. It is like this:

891.438 782 02 1A 87

891.444 783 10 16 5A 87 05 6E 00 08

891.444 782 30 00 00 00 00 00 00 00

As you can see, the Flow Control frame is sent at exactly the same time as the First Frame, that is sent from the other device. I am sure that the other device has a problem to receive the "Flow Control" frame.

I studied the ELM327 documentation, but I did not find any information about how to delay the Flow Control frame. How should I correctly send the request "1A 87" and receive the response?

like image 758
user3650225 Avatar asked Feb 24 '26 06:02

user3650225


1 Answers

This is my experience with the First Frame (FF) and Flow Control (FC) on MCP2515 connected with SPI.

First of all, you should always send the FC message after the FF message and not at the same time.

Secondly, the diagnostic reader can use the ID in the ECU response frame to continue communication with a specific ECU. In particular, multi-frame communication requires a response to the specific ECU ID rather than to ID 7DF. In the easy language, you should not send your FF message with ID 7DF, and you should address the exact ECU that you want to receive the consecutive frames. For instance, requesting car VIN (based on real information from Golf Mk7):

7DF 02 09 00 00 00 00 00 00 // Sending the request

7E8 10 14 49 02 01 57 56 57 // Receiving from the main ECU

7E0 30 00 00 00 00 00 00 00 // Addressing the main ECU and not 7DF any more!!

7E8 21 5A 5A 5A 41 55 5A 45 // Consecutive messages are sending by 7E0!!

7E8 22 50 35 33 30 36 38 35
like image 162
mohsen_og Avatar answered Feb 25 '26 19:02

mohsen_og