OBD适配器的初始化 [英] Initialization of obd adapter

查看:1172
本文介绍了OBD适配器的初始化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一款Android应用程序,它通过蓝牙汽车的OBD适配器读取数据OBD ......我现在面临的问题,同时初始化适配器。我发出以下顺序OBD命令初始化OBD:

I am developing a android application which reads Obd data from vehicle's Obd adapter via bluetooth... I am facing issue while initializing the adapter. I have sent following Obd commands in sequence to initialize the obd :


  1. ATZ(收到OK)

  2. atsp0(收稿OK)

  3. ATE0(收稿OK)

  4. 0100(这是发生问题的部分)...

有些时候,这个命令我收到BUSINIT:错误..然后重复,每车指令(除AT命令)同样的错误后..

Some times for this command i receive BUSINIT:ERROR.. And after that for every vehicle command (except AT commands) same error is repeated..

我想知道确切的初始化序列?

I want to know the Exact initialization sequence ?

推荐答案

看来你OBD的初始化和OBD协议选择失败。您应该按照下列步骤操作:

It seems your obd initialization and obd protocol selection failed. You should follow these steps:

AT D
AT Z
AT E0
AT L0
AT S0
AT H0
AT SP 0

当没有像下面列出的任何错误协议选择命令响应,您是否连接好,你可以要求像'0100'命令新的命令。

When protocol selection command response without any error like listed below, your connection is OK and you can request new commands like '0100' command.

错误:


  • 无法连接

  • BUS INIT ...错误


  • NO DATA

  • 已停止

  • 错误

命令解释:

在d - >设置所有默认值

AT D -> Set all to defaults

位于z - >重置OBD

AT Z -> Reset Obd

AT E0 - >关闭回声

AT E0 -> Echo off

AT L0 - >换行了

AT L0 -> Line feed off

AT S0 - >关闭空格

AT S0 -> Spaces off

AT H0 - >关闭标题

AT H0 -> Headers off

AT SP 0 - >将协议设置为0自动,搜索所有协议,并与适当的协议连接为OBD

AT SP 0 -> Set Protocol to 0 "Auto", search all protocols and connect it with proper protocol for that obd

有关AT命令的SP,如果你知道你的车的OBD接口协议,可以选择比作汽车等特定协议和搜索所有可能的协议。您可以使用不同的输入:

For AT SP command, if you know your vehicle's obd interface protocol, you can choose that specific protocol other than make Auto and search all possible protocols. You can use different inputs:

协议参数:六角[0,1,2,...,B,C]

自动选择协议和保存。
AUTO - > 0

Auto select protocol and save. AUTO -> 0

41.6千波特
SAE_J1850_PWM - > 1

41.6 kbaud SAE_J1850_PWM -> 1

10.4千波特
SAE_J1850_VPW - > 2

10.4 kbaud SAE_J1850_VPW -> 2

5波特初始化
ISO_9141_2 - > 3

5 baud init ISO_9141_2 -> 3

5波特初始化
ISO_14230_4_KWP - > 4

5 baud init ISO_14230_4_KWP -> 4

快速初始化
ISO_14230_4_KWP_FAST - > 5

Fast init ISO_14230_4_KWP_FAST -> 5

11位ID,500千波特
ISO_15765_4_CAN - > 6

11 bit ID, 500 kbaud ISO_15765_4_CAN -> 6

29位ID,500千波特
ISO_15765_4_CAN_B - > 7

29 bit ID, 500 kbaud ISO_15765_4_CAN_B -> 7

11位ID,250千波特
ISO_15765_4_CAN_C - > 8

11 bit ID, 250 kbaud ISO_15765_4_CAN_C -> 8

29位ID,250千波特
ISO_15765_4_CAN_D - > 9

29 bit ID, 250 kbaud ISO_15765_4_CAN_D -> 9

29位ID,250 kbps的(用户可调)
SAE_J1939_CAN - > A

29 bit ID, 250 kbaud (user adjustable) SAE_J1939_CAN -> A

11位ID(用户可调),125 kbps的(用户可调)
USER1_CAN - 乙

11 bit ID (user adjustable), 125 kbaud (user adjustable) USER1_CAN -> B

11位ID(用户可调),50 kbps的(用户可调)
USER2_CAN - > C

11 bit ID (user adjustable), 50 kbaud (user adjustable) USER2_CAN -> C

这篇关于OBD适配器的初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆