汽车诊断协议中应用层应发送和接收的数据.docx

上传人:b****3 文档编号:5416331 上传时间:2022-12-16 格式:DOCX 页数:20 大小:119.22KB
下载 相关 举报
汽车诊断协议中应用层应发送和接收的数据.docx_第1页
第1页 / 共20页
汽车诊断协议中应用层应发送和接收的数据.docx_第2页
第2页 / 共20页
汽车诊断协议中应用层应发送和接收的数据.docx_第3页
第3页 / 共20页
汽车诊断协议中应用层应发送和接收的数据.docx_第4页
第4页 / 共20页
汽车诊断协议中应用层应发送和接收的数据.docx_第5页
第5页 / 共20页
点击查看更多>>
下载资源
资源描述

汽车诊断协议中应用层应发送和接收的数据.docx

《汽车诊断协议中应用层应发送和接收的数据.docx》由会员分享,可在线阅读,更多相关《汽车诊断协议中应用层应发送和接收的数据.docx(20页珍藏版)》请在冰豆网上搜索。

汽车诊断协议中应用层应发送和接收的数据.docx

汽车诊断协议中应用层应发送和接收的数据

单帧:

请求报文:

第一字节:

4-7位=03-0位=SF-DL单一框架数据长度

第二字节:

sid

第三字节:

0-6位diagnosticsessiontype:

defauleSession=01

ECUProgrammingSession=02

ExtendedDiagnosticSession=03

7位:

0不镇压响应报文

1镇压响应报文

多帧:

首帧:

第一字节4-7位=13-0位+第二字节=FF-DLFF-DL第一框架数据长度范围8-fff

第三字节:

sid

流控制帧:

第一字节4-7位=3

0-3位=FS流动状态0:

继续发送

1:

等待

2:

超出流控制范围

3-F保留

第二字节=BS块大小00-无FC

01-FF除流控制帧外最多的连续帧

第三字节=STmin两个数据包之间最小等待时间

连续帧:

第一字节:

4-7位=20-3位=SN序列号范围0-F

第二字节数据

1DiagnosticSessionControl(sid=10)

Sid后的数据

请求报文:

第一字节:

0-6位diagnosticsessiontype:

defauleSession=01

ECUProgrammingSession=02

ExtendedDiagnosticSession=03

7位:

0不镇压响应报文

1镇压响应报文

主要完成:

确定相应的模式,对时间参数进行相应的设定

正确响应报文:

sid=50

第一字节:

0-6位diagnosticsessiontype:

defauleSession=01

ECUProgrammingSession=02

ExtendedDiagnosticSession=03

第二字节:

sessionparameterRecord[][SessionParameterRecord[]#1=[

P2CAN-SERVER-MAX高字节

P2CAN-SERVER-MAX低字节

P2*CAN-SERVER-MAX高字节

P2*CAN-SERVER-MAX高字节

错误响应报文:

pci之后的数据:

第一字节:

NR-SI=7f第二字节:

ID=50

第三字节同上面的第二字节

第五字节是错误响应代码:

12-subfunctionnotsupported

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

主要完成:

确定相应的模式,对时间参数进行相应的设定

2.ECUResetsid=11

单帧:

请求报文:

第一字节:

0-6位resettype:

hardreset=01

keyoffonreset=02

softreset=03

enablerapidpowershutdown=04

disablerapidpowershutdown=05

7位:

0不镇压响应报文

1镇压响应报文

正确响应报文:

sid=51

第一字节:

0-6位resettype:

hardreset=01

keyoffonreset=02

softreset=03

enablerapidpowershutdown=04

disablerapidpowershutdown=05

第二字节:

powerdowntime

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=51

第三字节同上面的第二字节

第四字节是错误响应代码:

12-subfunctionnotsupported

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

33-securityaccessdenied(拒绝安全进入)

主要完成:

进行相应的复位模式

3.SecurityAccesssid=27

单帧:

请求报文:

第一字节:

0-6位SecurityAccessType:

requestSeed=01,03,05,07-5Fsendkey=02,04,06,08-60

7位:

0不镇压响应报文

1镇压响应报文

第二字节:

securityAccessDataRecord[]/securitykey[]

正确响应报文:

sid=67

第三字节:

0-6位SecurityAccessType

第四字节:

SecuritySeed[]

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=67

第三字节同上面的第二字节

第五字节是错误响应代码:

12-subfunctionnotsupported

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

24-requestSequenceEerror//请求序列错误

31-requestOutOfRange

35-invalidKey//密码无效

36-exceededNumberOfAttempts//超出所允许的输入密码次数

37-requiredTimerDelayNotExoired//要求的时间延时已到

municationControlsid=28

单帧:

请求报文:

第一字节:

0-6位Controltype:

Enablerxandtx=00

Enablerxanddisabletx=01

Disablerxandenabletx=02

Disablerxandtx=03

7位:

0不镇压响应报文

1镇压响应报文

第二字节:

CommunicationtypeApplication=01b

Networkmanagement=10b

正确响应报文:

sid=68

第一字节:

0-6位Controltype:

Enablerxandtx=00

Enablerxanddisabletx=01

Disablerxandenabletx=02

Disablerxandtx=03

第二字节:

CommunicationtypeApplication=01b

Networkmanagement=10b

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=68

第三字节同上面的第二字节

第四字节同上第三字节

第五字节是错误响应代码:

12-subfunctionnotsupported

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

31-requestOutOfRange

主要完成:

确定相应的模式,对时间参数进行相应的设定

5.testerPresentsid=3E

单帧:

请求报文:

第三字节:

0-6位Zerosubfunction=007位:

0不镇压响应报文

1镇压响应报文

正确响应报文:

sid=7E

第一字节:

0-6位Zerosubfunction=00

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=7E

第三字节同上面的第二字节

第四字节是错误响应代码:

12-subfunctionnotsupported

13-incorrectmessagelengthorinvalidformat

主要完成:

确定相应的模式,对时间参数进行相应的设定

6.Secureddatatrasmissionsid=84

单帧:

请求报文:

第一字节:

0-6位securityDataRequestRecord[]

7位:

0不镇压响应报文

1镇压响应报文

正确响应报文:

sid=C4

第一字节:

0-6位0-6位securityDataRequestRecord[]

7位:

0不镇压响应报文

1镇压响应报文

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=C4

第三字节同上面的第二字节securityDataRequestRecord[]

第四字节是错误响应代码:

13-incorrectmessagelengthorinvalidformat

7.controlDTCsettingsid=85

单帧:

请求报文:

第一字节:

7位:

0不镇压响应报文

1镇压响应报文

0-6位DTCsettingtypeon=01off=02

第二字节:

DTCsettingcontroloptionrecord[]

正确响应报文:

sid=c5

第一字节:

DTCsettingtypeon=01off=02

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=c5

第三字节同上面的第二字节

第四字节同上第三字节

8.ResponseOnEventsid=86

单帧:

请求报文:

第一字节:

7位:

0不镇压响应报文

1镇压响应报文

6位donotstoreevent=0

Storeevent=1

0-5位stopresponseonevent=00

Ondtcstatuschange=01

Ontimerinterrupt=02

Onchangeofdataidentifier=03

Reportactivateevents=04

Startresponseonevent=05

Clearresponseonevent=06

Oncomparisionofvalues=07

第二字节:

eventwindowtime

第三字节;eventTypeRecord[]

….字节:

servicetorespondtorecord[]=[sesviceid

Serviceparameter..]

Servicetoresondtorecord[readdatabyidentifierreqsid=22ressid=62

Readdtcinformation1959

Routinecontrol3171

Inputoutoutcontrolbyidentifier2F6F

正确响应报文:

sid=c6

第一字节:

7位:

0不镇压响应报文

1镇压响应报文

6位donotstoreevent=0

Storeevent=1

0-5位stopresponseonevent=00

Ondtcstatuschange=01

Ontimerinterrupt=02

Onchangeofdataidentifier=03

Reportactivateevents=04

Startresponseonevent=05

Clearresponseonevent=06

Oncomparisionofvalues=07

第二字节;numberofidentifiedevents

第三字节:

eventwindowtime

第四即以后:

eventtyperecord[]

….字节:

servicetorespondtorecord[]=[sesviceid

Serviceparameter..]

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=c6

第三字节同上面的第二字节

第四字节同上第三字节。

错误代码;12-subfunctionnotsupported

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

31-requestOutOfRange

 

9.linkcontrolsid=87

单帧:

请求报文

第一字节

0-6位linkcontroltype:

verifybaudratetransitionwithfixedbaudrate=01

verifybaudratetransitionwithspecificbaudrate=02

transitionbaudrate=03

7位:

0不镇压响应报文

1镇压响应报文

第二字节:

baudrateidentifier(如果linkcontroltype=01)

第三字节及以后:

baudraterecord[](如果linkcontroltype=02)

正确响应报文:

sid=C7

第一字节:

linkcontroltype

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=C7

第三字节同上面的第二字节

第四字节是错误响应代码:

12-subfunctionnotsupported

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

24-requestSequenceEerror//请求序列错误

31-requestOutOfRange

10.readdatabyidentifiersid=22

单帧:

请求报文

第三字节及以后:

dataidentifier[]:

正确响应报文:

sid=62

第一二字节:

dataidentifier[](包含两个字节)

第三四…字节:

datarecord[]

第。

字节:

dataidentifier[]

第。

字节datarecord[]

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=C7

第三字节同上面的第二字节

第四字节是错误响应代码:

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

31-requestOutOfRange

33-securityaccessdenied

11.readmemorybyaddresssid=23

单帧:

请求报文

第一字节:

addressandlengthformatidentifier7-4位memorysize[]的长度

3-0位memoryaddress[]长度

第二字节级以后:

memoryaddress[]

…..:

memorysize[]

正确响应报文:

sid=63

第一字节及以后:

datarecord[]

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=63

第三字节是错误响应代码:

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

31-requestOutOfRange

33-securityaccessdenied

12.readscalingdatabyidentifiersid=24

单帧:

请求报文

第一字节:

dataidentifier[]

第二字节:

dataidentifier[]

正确响应报文:

sid=64

第一二字节:

dataidentifier[]

第三字节:

scalingbyte[]

第四….Scalingbyteextension[]

……:

scalingbyte[]

……:

Scalingbyteextension[]

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=64

第三字节是错误响应代码:

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

31-requestOutOfRange

33-securityaccessdenied

13.readdatabyperiodicidentifiersid=2A

单帧:

请求报文

第一字节:

transmissionModesendatslowrate=01

Sendatmediumrate=02

Sendatfastrate=03

Stopsending=04

第二字节:

periodicdataidentifier[]

……….periodicdataidentifier[]

正确响应报文:

sid=6A

第一字节:

periodicdataidentifier[]

第二….字节:

datarecord[]

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=6A

第三字节是错误响应代码:

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

31-requestOutOfRange

33-securityaccessdenied

14.dynamicallydefinedataidentifiersid=2C

请求报文第一字节:

第一字节:

subfuction01-definebyidentifier

第二三字节:

dynamicallydataidentifier[]

第四五字节:

sourcedataidentifier[]

第六字节:

positioninsorcedatarecord

第七字节:

memorysize#1

….sourcedataidentifier[]

Positioninsorcedatarecordmemorysize

sid=2C

第一字节:

02-definebymemoryaddress

第二三字节:

dynamicallydataidentifier[]

第四字节:

addressandlengthformateidentifier

第五…字节:

memoryaddress[]

…..memorysize[]

…..memoryaddress[]

….memorysize[]

sid=2C

第一字节:

03-cleardynamicallydefineddataidentifier

第二三字节:

dynamicallydataidentifier[]

正确响应报文:

si=6c

第一字节:

definitiontype

第二三字节:

dynamicallydataidentifier[]

错误代码:

12-subfunctionnotsupported

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

31-requestOutOfRange

33-securityaccessdenied

15.writedatabyidentifier

单帧:

请求报文第一字节:

4-7位=03-0位=SF-DL单一框架数据长度

第二字节:

sid=2E

第三四字节:

dataidentifier[]:

第五…字节:

datarecord[]

正确响应报文:

范围:

1-6

第一字节:

4-7位=03-0位=SF-DL单一框架数据长度

第二字节:

sid=6E

第三四字节:

dataidentifier[](包含两个字节)

错误响应报文:

第二字节:

NR-SI=7f第三字节:

ID=C7

第四字节同上面的第三字节

第五字节是错误响应代码:

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

31-requestOutOfRange

33-securityaccessdenied

72-generalprogrammingfaiure

16.writememorybyaddresssid=3D

单帧:

请求报文

第一字节:

addressandlengthformateidentifier

第二…字节:

memoryaddress[]

…….memorysize[]

……datarecord[]

正确响应报文:

sid=7D

第一字节:

addressandlengthformateidentifier

第二…字节:

memoryaddress[]

…….memorysize[]

错误响应报文:

第一字节:

NR-SI=7f第二字节:

ID=7D

第三字节同上面的第二字节

第四字节是错误响应代码:

13-incorrectmessagelengthorinvalidformat

22-conditionsnotcorrect

31-requestOutOfRange

33-securityaccessdenied

72-generalprogrammingfaiure

17.readDTCinformationsid=19

单帧:

请求报文

第一字节:

sub-function

reportnumberofdtcbystatusmask=01

Reportdtcbystatusmask=02

Reportmirrormemorydtcbystatusmask=0F

Reportnumberofmirrormemorydtcbystatusmask=11

Reportnumberofemissionrelatedobddtcbystatusmask=12

Reportemissionrelatedobddtcbystatusmask=13

第二字节:

DTCstatusmask

请求报文:

请求报文

第一字节:

sub-function

Reportdtcsnapshotidentification=03

Reportdtcsnapshotrecordbydtcnumber=04

第二三四字节:

DTCmaskrecord

第五字节:

dtcsnapshotrecordnumber

请求报文:

第一字节:

sub-function

Reportdtcsnapshotrecordbyrecordnumber=05

第二三四字节:

DTCmaskrecord

第五字节:

dtcsnapshotrecordnumber

请求报文:

第一字节:

sub-function

Reportdtcextendeddatarecordbydtcnumber=06

Reportmirrormemorydtcextendeddatarecordbydtcnumber=10

第二三四字节:

DTCmaskrercord

第五字节:

dtcsnapshotrecordnumber

请求报文:

第一字节:

sub-function

Re

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1