本文介绍了使用ELM327接收CAN消息时的流控制消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一个在Windows下运行并与ELM327设备通信的软件.我创建了第一个版本,然后进入SMART ForTwo(SMART 451)车辆,并设法与组合仪表连接(发送CAN ID为782,接收CAN ID为783).但是,我对流程控制有很大的疑问.这是日志:

I am trying to make a 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 and I managed to connect with the Instrument Cluster (Transmit CAN ID is 782, Receive CAN ID is 783). However I have a huge problem with Flow Control. Here is the log:

TX:ATIRX:ELM327 v1.5a

TX: ATIRX: ELM327 v1.5a

TX:ATE0RX:ATE0 OK

TX: ATE0RX: ATE0 OK

TX:ATSP6RX:好

TX: ATSP6RX: OK

TX:ATH1RX:好

TX: ATH1RX: OK

TX:ATL1RX:好

TX: ATL1RX: OK

TX:ATCFC1RX:好

TX: ATCFC1RX: OK

TX:ATFCSM0RX:好

TX: ATFCSM0RX: OK

TX:ATALRX:好

TX: ATALRX: OK

TX:ATSH782RX:好

TX: ATSH782RX: OK

TX:ATCRA783RX:?

TX: ATCRA783RX: ?

TX:ATST64RX:好

TX: ATST64RX: OK

TX:1092RX: 783 02 1A 87

TX: 1092RX: 783 02 1A 87

TX:1A87RX: 783 10 16 5A 87 05 6E 00 08

TX: 1A87RX: 783 10 16 5A 87 05 6E 00 08

我使用了另一个工具,发现ELM327设备立即发送了流控制帧.就像这样:

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.438 782 02 1A 87

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

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

891.444 782 30 00 00 00 00 00 00 00

891.444 782 30 00 00 00 00 00 00 00

如您所见-流控制帧与从其他设备发送的第一帧完全在同一时间发送.我确定其他设备在接收流控制"帧时遇到问题.我研究了ELM327文档,但没有找到有关如何延迟流控制帧的任何信息.我应该如何正确发送请求"1A 87"并接收响应?

As you can see - 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 did not find any info about how to delay the Flow Control frame.How should I correctly send the request "1A 87" and receive the response?

推荐答案

我想这很容易.

使用ATCFC0命令,然后您可以处理控制单元中的所有响应帧,并且需要手动发送流控制帧.

Use the ATCFC0 command, and then you can process all the response frames from the control unit, and you need to manually send the flow control frame.

这篇关于使用ELM327接收CAN消息时的流控制消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 14:23