본문 바로가기
Study/CAN+UDS

UDS(Unified Diagnostic Services)(ISO 142291)

by Answer Choi 2025. 3. 28.
반응형

UDS는 자동차 진단 프로토콜입니다.

초기 자동차 회사들이 자사의 진단 프로토콜을 만들었었지만, 정비소에서 각기 다른 자동차회사들의 자동차를 진단하기 어려워 국제적으로 프로토콜을 만들게 됩니다.

 

기본적으로 UDS 프로토콜을 공통적으로 사용하고 있으며, 내용은 자동차 회사들마다 추가된 것들이 있습니다.

 

우선 기본적인 UDS 프로토콜은 CAN통신은 8byte를 기본으로 하므로 바이트 별로 구분하면 아래와 같습니다.

 

Length SID sub Funtion DID        

 

Length는 보내는 데이터의 크기(byte)이며,

SID는 Service ID로 보내는 데이터가 어떤 데이터인지를 알려줍니다.

 

데이터는 Request와 Response로 구성되어 있으며, Response는 positive response(긍정 응답)와 negative response(부정 응답)으로 구성됩니다.

 

SID는 0x0~0x0F는 OBD용으로 미사용이며, 나머지 영역을 사용합니다.

SID의 리스트는 하기와 같습니다.

SID Group SID Service Sub Fn
Dignostic and Communications management 0x10 Diagnostic Session Control 0x01 : Default Session
0x02 : Programming Session
0x03 : Extended Diagnostic Session
0x04 : Safety System Diagnostic Session
0x11 ECU Reset 0x01 : Hard Reset
0x02 : Key off-On Reset
0x03 : Soft Reset
0x14 Clear Diagnostic Information 00 00 00~FF FF FF : Powertrain DTC
40 00 00~7F FF FF : Chassis DTC
80 00 00~BF FF FF : Body DTC
C0 00 00~FF FF FF : network related DTC
FF FF 33 : all emissions related DTC
FF FF FF : all DTC
0x27 Security Access seed-key
0x28 Communication Control  
0x29 Authentication  
0x3E Tester Present  
0x83 Access Timing Parameters  
0x84 Secured Data Transmission  
0x85 Control DTC Setting 0x01 : On
0x02 : Off
0x86 Response On Event  
0x87 Link Control  
Data Transmission 0x22 Read Data By Identifier  
0x23 Read Memor By Address  
0x24 Read Scaling Data By Identifier  
0x2A Read Data By Identifier Periodic  
0x2C Dynamically Define Data Identifier  
0x2E Write Data By Identifier  
0x3D Write Memory By Address  
Stored Data Transmission 0x14 Clear Dignostic Information  
0x19 Read DTC Information  
Input / Output Control 0x2F Input Output Control By Identifier  
Remote Activation of Routine 0x31 Routine Control  
Upload / Download 0x34 Request Download  
0x35 Request Upload  
0x36 Transfer Data  
0x37 Request Transfer Exit  
0x38 Request File Transfer  

 

Positive response는 Request SID에 +0x40으로 SID를 응답합니다.

반대로 Negative response는 Request SID의 SID를 그대로 응답하며 sub fn은 0x7F 그리고 뒤에 이유를 응답하게 되며 아래와 같습니다.

NRC Description NRC Description
0x10 General reject 0x5A Setting access right failed
0x11 Service not supported 0x5B Session key creation/derivation failed
0x12 Subfunction not supported 0x5C Configuration data usage failed
0x13 Incorrect message length or invalid format 0x5D Deauthentication failed
0x14 Response too long 0x70 Upload download not accepted
0x21 Busy, repeat request 0x71 Transfer data suspended
0x22 Conditions not correct 0x72 General programming failure
0x24 Request sequence error 0x73 Wrong block sequence number
0x25 No response from subnet component 0x78 Request correctly received, response pending
0x26 Failure prevents execution of requested action 0x7E Subfunction not supported in active session
0x31 Request out of range 0x7F Service not supported in active session
0x33 Security access denied 0x81 RPM too high
0x34 Authentication failed 0x82 RPM too low
0x35 Invalid key 0x83 Engine is running
0x36 Exceeded number of attempts 0x84 Engine is not running
0x37 Required time delay not expired 0x85 Engine run time too low
0x38 Secure data transmission required 0x86 Temperature too high
0x39 Secure data transmission not allowed 0x87 Temperature too low
0x3A Secure data verification failed 0x88 Vehicle speed too high
0x50 Certificate validation failed, invalid time period 0x89 Vehicle speed too low
0x51 Certificate validation failed, invalid signature 0x8A Throttle/pedal too high
0x52 Certificate validation failed, invalid chain of trust 0x8B Throttle/pedal too low
0x53 Certificate validation failed, invalid type 0x8C Transmission range not in neutral
0x54 Certificate validation failed, invalid format 0x8D Transmission range not in gear
0x55 Certificate validation failed, invalid content 0x8F Brake switch not closed
0x56 Certificate validation failed, invalid scope 0x90 Shifter lever not in park
0x57 Certificate validation failed, invalid certificate 0x91 Torque converter clutch locked
0x58 Ownership verification failed 0x92 Voltage too high
0x59 Challenge calculation failed 0x93 Voltage too low
    0x94 Resource temporary unavailable

 

SID별 내용들은 다음시간에 하겠씁니다.

반응형

인기글