跳转到内容

统一诊断服务:修订间差异

维基百科,自由的百科全书
删除的内容 添加的内容
Cewbot留言 | 贡献
bot: 清理跨語言連結KWP2000成為內部連結:編輯摘要的red link經繁簡轉換後存在
第59行: 第59行:
| Style = "text-align: center" | 0x83
| Style = "text-align: center" | 0x83
| Style = "text-align: center" | 0xC3
| Style = "text-align: center" | 0xC3
| Access Timing Parameters
| 存取時序參數<br/>Access Timing Parameters
| 在控制器及從機的通訊中,需要觀察一定的時間,若時間超過此限制,仍沒有送出訊息,就會假設連接已有問題。可以讀取及修改此時間。
| In the communication between the controllers and the client certain times must be observed. If these are exceeded, without a message being sent, it must be assumed that the connection was interrupted. These times can be called up and changed.
|-
|-
| Style = "text-align: center" | 0x84
| Style = "text-align: center" | 0x84
| Style = "text-align: center" | 0xC4
| Style = "text-align: center" | 0xC4
| Secured Data Transmission
| 安全資料傳輸<br/>Secured Data Transmission
|
|
|-
|-
| Style = "text-align: center" | 0x85
| Style = "text-align: center" | 0x85
| Style = "text-align: center" | 0xC5
| Style = "text-align: center" | 0xC5
| Control DTC Settings
| 控制DTC設定<br/>Control DTC Settings
| 啟動或關閉部份(或所有)錯誤的偵測。若診斷工作是在車內進行的,這個機能格外重要,因為診斷工作有可能造成部份零件的異常行為。
| Enable or disable the detection of any or all errors. This is important when diagnostic work is performed in the car, which can cause an anomalous behavior of individual devices.
|-
|-
| Style = "text-align: center" | 0x86
| Style = "text-align: center" | 0x86
| Style = "text-align: center" | 0xC6
| Style = "text-align: center" | 0xC6
| Response On Event
| 事件回覆<br/>Response On Event
|
|
|-
|-
| Style = "text-align: center" | 0x87
| Style = "text-align: center" | 0x87
| Style = "text-align: center" | 0xC7
| Style = "text-align: center" | 0xC7
| Link Control
| 鏈結控制<br/>Link Control
| 服務鏈結控制是用來設定診斷存取的位元率。多半只在中間閘道器上實現此一機能。
| The Service Link Control is used to set the baud rate of the diagnostic access. It is usually implemented only at the central gateway.
|-
|-
| Rowspan = 7 | Data Transmission
| Rowspan = 7 | 資料傳輸
| Style = "text-align: center" | 0x22
| Style = "text-align: center" | 0x22
| Style = "text-align: center" | 0x62
| Style = "text-align: center" | 0x62

2020年7月16日 (四) 04:35的版本

统一诊断服务(英語:Unified Diagnostic Services,簡稱UDS)是車用電子的通訊協定,是电子控制器(ECU)中設備診斷用的网络传输协议,對應的標準是ISO 14229-1[1]。此標準是衍生自ISO 14230-3(KWP2000)以及目前已不使用的ISO 15765-3 (控制器區域網路上的診斷通訊,DoCAN[2])。「统一诊断服务」中的「统一」是指此標準是國際性標準,不是特定公司的專用標準。目前所有一階供應商新生產的ECU都已支援此通訊協定,也已整合到其他標準中,例如AUTOSAR。現代汽車中的电子控制器控制了非常多的機能,包括燃料噴射裝置(EFI)、发动机控制器、傳動、防鎖死剎車系統(ABS)、門鎖、剎車、窗戶動作等。

診斷工具可以連接車上所有支援统一诊断服务功能的电子控制器。車上常用的控制器區域網路只用到OSI模型的第一層及第二層,而统一诊断服务整合了OSI模型的第五層及第七層。服務識別碼(Service ID、SID)及服務相關的參數都放在8個位元組的訊息框內。

現今的車輛有配合離線診斷的診斷介面,讓電腦或是診斷工具(作為測試設備)可以連接到汽車上的通訊系統。因此可以傳送统一诊断服务的請求到控制器,控制器必須回覆(可能是正面或是負面的回覆),這樣可以確認個別控制單元中的故障記憶體、更新控制單元的韌體、和硬體進行低階的互動(例如開啟或關閉特定的輸出)、或是進行特定的機能,目的是了瞭解電子控制器的環境或是操作條件,以診斷故障或是不希望出現的行為。

服務

功能群 請求  SID 回覆  SID 服務 說明
診斷及通訊管理 0x10 0x50 診斷會話控制
Diagnostic Session Control
UDS會使用不同的會話(session),可以用診斷會話控制(Diagnostic Session Control)來切換。可用的服務會依照目前有效的會話而不同。在一開始,控制單元預設是在「預設會話」(Default Session),有定義其他的會話,需要實現的會話會依照設備的種類而不同。
  • 「程式會話」(Programming Session)可以用來上傳韌體到設備,並更新設備的韌體。
  • 「擴充診斷會話」(Extended Diagnostic Session)可解鎖特定的診斷功能,例如調整感測器等。
  • 「安全系統診斷會話」(Safety system diagnostic session)用來測試安全相關的診斷機能,例如安全氣囊的測試。

此外,也有一些保留的會話識別符,為了汽車生產者及供應商的特殊需求而設計。

0x11 0x51 ECU重置
ECU Reset
ECU重置的服務是要重新啟動ECU。依照控制單元硬體以及實現方式的不同,有以下幾種不同的重置:
  • 「硬重置」模擬電源關閉的重置。
  • 「關閉鎖匙重置」模擬用鎖匙將汽車熄火,再開啟汽車的點火開關。
  • 「軟重置」初始化特定程式單元以及儲存結構。

也有一些汽車生產者及供應商定義的特殊數值。

0x27 0x67 安全性存取
Security Access
可以用安全性檢查(Security check)來啟動大部份的安全關鍵性服務(security-critical services)。此情形下控制單元會傳送「密碼種子(seed)」到客戶端(電腦或是診斷工具)。客戶端再用密碼種子計算金鑰(key)送回控制單元,以此來解安全關鍵性服務
0x28 0x68 通訊控制
Communication Control
此服務可以關閉控制單元傳送以及接收訊息的功能。
0x29 0x69 認證
Communication Control
標準在2020年的更新版本,提供一種標準化的方式,可以提供一些安全性存取(0x27)服務無法支援的現代認證方式,包括以PKI為基礎的認證交換,以及雙向的驗證機制。
0x3E 0x7E 測試者存在
Tester Present
若客戶端長時間沒有交換通訊資料,控制單元會自動離開目前的會話,回到「預設會話」,也可能會進入休眠模式。而此一服務的目的就是讓控制單元知道客戶端仍存在。
0x83 0xC3 存取時序參數
Access Timing Parameters
在控制器及從機的通訊中,需要觀察一定的時間,若時間超過此限制,仍沒有送出訊息,就會假設連接已有問題。可以讀取及修改此時間。
0x84 0xC4 安全資料傳輸
Secured Data Transmission
0x85 0xC5 控制DTC設定
Control DTC Settings
啟動或關閉部份(或所有)錯誤的偵測。若診斷工作是在車內進行的,這個機能格外重要,因為診斷工作有可能造成部份零件的異常行為。
0x86 0xC6 事件回覆
Response On Event
0x87 0xC7 鏈結控制
Link Control
服務鏈結控制是用來設定診斷存取的位元率。多半只在中間閘道器上實現此一機能。
資料傳輸 0x22 0x62 Read Data By Identifier With this service it is possible to retrieve one or more values of a control unit. This can be information of all kinds and of different lengths such as Partnumber or the software version. Dynamic values such as the current state of the sensor can be queried. Each value is associated to a Data Identifier (DID) between 0 and 65535. Normal CAN signals are meant for information that some ECU uses in its functionality. DID data is sent on request only, and is for information that no ECU uses, but a service tool or a software tester can benefit from.
0x23 0x63 Read Memory By Address Read data from the physical memory at the provided address. This function can be used by a testing tool, in order to read the internal behaviour of the software.
0x24 0x64 Read Scaling Data By Identifier
0x2A 0x6A Read Data By Identifier Periodic With this service values are sent periodically by a control unit. The values to be sent must be defined to only using the "Dynamically Define Data Identifier".
0x2C 0x6C Dynamically Define Data Identifier This service offers the possibility of a fix for a device specified Data Identifier (DID) pool to configure another Data Identifier. This is usually a combination of parts of different DIDs or simply a concatenation of complete DIDs.

The requested data may be configured or grouped in the following manner:

  • Source DID, position, length (in bytes), Sub-Function Byte: defineByIdentifier
  • Memory address length (in bytes), Sub-Function Byte: defineByMemoryAddress
  • Combinations of the two above methods through multiple requests.
0x2E 0x6E Write Data By Identifier With the same Data Identifier (DID), values can also be changed. In addition to the identifier, the new value is sent along.
0x3D 0x7D Write Memory By Address The “Write Memory By Address” service allows the external diagnostic tool to write information into the ECU at one or more contiguous memory locations.
Stored Data Transmission 0x14 0x54 Clear Diagnostic Information Delete all stored DTC
0x19 0x59 Read DTC Information DTC stands for "Diagnostic Trouble Codes". Each DTC handled by the control unit fault is stored with its own code in the error memory and can be read at any time. In addition to the error, additional information will be stored, which can also be read.
Input / Output Control 0x2F 0x6F Input Output Control By Identifier This service allows an external system intervention on internal / external signals via the diagnostic interface.

By specifying a so-called option bytes additional conditions for a request can be specified, the following values are specified:

ReturnControlToECU: The device must get back controls of the mentioned signals.

ResetToDefault: The tester prompts to reset signals to the system wide default value.

Freeze Current State: The device shall freeze the current signal value.

ShortTermAdjustment: The device shall use the provided value for the signal

Remote Activation of Routine 0x31 0x71 Routine Control The Control service routine services of all kinds can be performed. There are three different message types:
  • With the start-message, a service can be initiated. It can be defined to confirm the beginning of the execution or to notify when the service is completed.
  • With the Stop message, a running service can be interrupted at any time.
  • The third option is a message to query the results of the service.

The start and stop message parameters can be specified. This makes it possible to implement every possible project-specific service.

Upload / Download 0x34 0x74 Request Download Downloading new software or other data into the control unit is introduced using the "Request Download". Here, the location and size of the data is specified. In turn, the controller specifies how large the data packets can be.
0x35 0x75 Request Upload The service "request upload" is almost identical to the service "Request Download". With this service, the software from the control unit is transferred to the tester. The location and size must be specified. Again, the size of the data blocks are specified by the tester.
0x36 0x76 Transfer Data For the actual transmission of data, the service "Transfer Data" is used. This service is used for both uploading and downloading data. The transfer direction is notified in advance by the service "Request Download" or "Upload Request". This service should try to send packets at maximum length, as specified in previous services. If the data set is larger than the maximum, the "Transfer Data" service must be used several times in succession until all data has arrived.
0x37 0x77 Request Transfer Exit A data transmission can be 'completed' when using the "Transfer Exit" service. This service is used for comparison between the control unit and the tester. When it is running, a control unit can answer negatively on this request to stop a data transfer request. This will be used when the amount of data (set in "Request Download" or "Upload Request") has not been transferred.
0x38 0x78 Request File Transfer This service is used to initiate a file download from the client to the server or upload from the server to the client. Additionally information about the file system are available by this service.
0x7F Negative Response This response is given when a service request could not be performed, for example having a not supported Data Identifier. A Negative Response Code will be included.

相關條目

參考資料

外部链接