UDS-Security Access($27)

本文详细介绍了27服务的安全访问机制,包括使用种子和密钥进行数据诊断,CDD文件的制作流程,以及常见问题如种子不随机、安全等级设置错误和解锁尝试次数管理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档


一、27服务介绍

安全访问27服务的目的是:使用种子和密钥的概念,提供一种安全访问数据/诊断服务的方法。
典型的使用方法是:
Client请求种子
Server发送种子
Client根据种子计算密钥
Server验证密钥的有效性
在这里插入图片描述
request seed 的子函数为奇数,根据安全级别对应的 send key 的子函数为 request seed 子函数加一。
在任何时刻,只有一个安全级别是有效的,比如已经激活了request seed 0x03关联的安全级别,再激活 request seed 0x01后,0x03关联的安全级别将会失效。
注:安全级别的编号是任意的,并没有高低等级之分。

服务请求
服务请求是Client发送给Server的诊断服务指令
Request Seed诊断请求格式
Request message definition - sub-function = requestSeed
在这里插入图片描述
Send key诊断请求格式
Request message definition -

### UDS ISO 14229-1 Diagnostic Service 27 NRC Meaning and Solutions Service $27$ in the Unified Diagnostic Services (UDS) protocol, as defined by ISO 14229-1, is used for Security Access. This service allows a diagnostic tool to gain access to certain security levels within an Electronic Control Unit (ECU). The Negative Response Codes (NRCs) associated with this service provide information about why a request was not successfully processed. #### Common NRCs Related to Service $27$ Some of the common NRCs encountered when using Service $27$ include: - **0x12**: Sub-function Not Supported or Incorrect Format[^1]. This indicates that either the sub-function requested does not exist on the ECU or there has been a formatting error. - **0x13**: Request Out Of Range[^1]. Occurs when parameters provided are outside acceptable limits set by the manufacturer. - **0x22**: Conditions Not Correct/Request Sequence Error[^1]. Indicates improper sequencing during communication; typically seen if commands do not follow expected order. - **0x2E**: Security Access Denied[^1]. Returned when authentication fails due to incorrect key submission or other issues preventing successful verification. - **0x78**: Request Correctly Received – Short Time Delay Required Before Resending[^1]. Suggests temporary unavailability because processing might still be ongoing from previous requests. For resolving these errors effectively, it's important first to verify all data being sent matches specifications outlined by vehicle manufacturers exactly. For instance, ensuring proper seed-and-key exchanges occur without timing discrepancies can prevent many typical failures related specifically to security access procedures. When encountering `Security Access Denied` responses (`0x2E`), double-checking both hardware connections along with software configurations becomes crucial since miscommunication between devices could lead directly back into failed authentications repeatedly until corrected properly. ```python def check_nrc(nrc_code): nrc_meanings = { '0x12': "Sub-function Not Supported or Incorrect Format", '0x13': "Request Out Of Range", '0x22': "Conditions Not Correct/Request Sequence Error", '0x2E': "Security Access Denied", '0x78': "Request Correctly Received – Short Time Delay Required Before Resending" } return nrc_meanings.get(nrc_code, "Unknown NRC Code") print(check_nrc('0x2E')) ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值