iso14229 0.9.0
ISO14229-1 (UDS) C Library
|
This page documents the services supported by iso14229.
Service ID | Service Name | Server | Client | Standard Responses* |
---|---|---|---|---|
0x10 | Diagnostic Session Control | Y | Y | NRCs |
0x11 | ECU Reset | Y | Y | NRCs |
0x14 | Clear Diagnostic Information | Y | N | NRCs |
0x19 | Read DTC Information | N | N | |
0x22 | Read Data By Identifier | Y | Y | NRCs |
0x23 | Read Memory By Address | N | N | |
0x24 | Read Scaling Data By Identifier | N | N | |
0x27 | Security Access | Y | Y | NRCs |
0x28 | Communication Control | Y | Y | NRCs |
0x2A | Read Periodic Data By Identifier | N | N | |
0x2C | Dynamically Define Data Identifier | N | N | |
0x2E | Write Data By Identifier | Y | Y | NRCs |
0x2F | Input/Output Control By Identifier | Y | N | |
0x31 | Routine Control | Y | Y | NRCs |
0x34 | Request Download | Y | Y | NRCs |
0x35 | Request Upload | Y | Y | |
0x36 | Transfer Data | Y | Y | NRCs |
0x37 | Request Transfer Exit | Y | Y | NRCs |
0x38 | Request File Transfer | Y | Y | |
0x3D | Write Memory By Address | Y | N | |
0x3E | Tester Present | Y | Y | |
0x83 | Access Timing Parameter | N | N | |
0x84 | Secured Data Transmission | N | N | |
0x85 | Control DTC Setting | Y | Y | |
0x86 | Response On Event | N | N | |
0x87 | Link Control | Y | N |
The standard lists a set of supported NRCs for each service. In your server implementation, it is recommended to use to these whenever possible.
Change the diagnostic session type.
UDS_EVT_DiagSessCtrl
Value | Define | Description |
---|---|---|
0x01 | UDS_LEV_DS_DS | Default Session |
0x02 | UDS_LEV_DS_PRGS | Programming Session |
0x03 | UDS_LEV_DS_EXTDS | Extended Diagnostic Session |
0x04 | UDS_LEV_DS_SSDS | Safety System Diagnostic Session |
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Request accepted |
0x12 | UDS_NRC_SubFunctionNotSupported | Requested session type not supported |
0x22 | UDS_NRC_ConditionsNotCorrect | Conditions not correct |
UDSSendDiagSessCtrl
Request ECU reset.
UDS_EVT_EcuReset
Value | Define | Description |
---|---|---|
0x01 | UDS_LEV_RT_HR | Hard Reset |
0x02 | UDS_LEV_RT_KOFFONR | Key Off On Reset |
0x03 | UDS_LEV_RT_SR | Soft Reset |
0x04 | UDS_LEV_RT_ERPSD | Enable Rapid Power Shutdown |
0x05 | UDS_LEV_RT_DRPSD | Disable Rapid Power Shutdown |
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Reset will occur |
0x12 | UDS_NRC_SubFunctionNotSupported | Reset type not supported |
0x22 | UDS_NRC_ConditionsNotCorrect | Conditions not correct for reset |
0x33 | UDS_NRC_SecurityAccessDenied | Security access required |
UDSSendECUReset
Clear diagnostic trouble codes.
UDS_EVT_ClearDiagnosticInfo
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | DTCs cleared |
0x22 | UDS_NRC_ConditionsNotCorrect | Cannot clear DTCs now |
0x31 | UDS_NRC_RequestOutOfRange | Invalid DTC group |
Read data identified by a 16-bit identifier.
UDS_EVT_ReadDataByIdent
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Data returned successfully |
0x14 | UDS_NRC_ResponseTooLong | Response exceeds buffer |
0x22 | UDS_NRC_ConditionsNotCorrect | Cannot read data now |
0x31 | UDS_NRC_RequestOutOfRange | Data identifier not supported |
0x33 | UDS_NRC_SecurityAccessDenied | Security access required |
UDSSendRDBI, UDSUnpackRDBIResponse
See Read/Write Data By Identifier Example
Unlock security-protected diagnostic services.
UDS_EVT_SecAccessRequestSeed
- Client requests seedUDS_EVT_SecAccessValidateKey
- Client sends key for validationRequest Seed:
Validate Key:
Odd levels (0x01, 0x03, ...) request seed, even levels (0x02, 0x04, ...) send key.
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Seed provided or key accepted |
0x12 | UDS_NRC_SubFunctionNotSupported | Security level not supported |
0x22 | UDS_NRC_ConditionsNotCorrect | Wrong sequence |
0x24 | UDS_NRC_RequestSequenceError | Request out of sequence |
0x35 | UDS_NRC_InvalidKey | Key verification failed |
0x36 | UDS_NRC_ExceedNumberOfAttempts | Too many failed attempts |
0x37 | UDS_NRC_RequiredTimeDelayNotExpired | Must wait before retry |
UDSSendSecurityAccess, UDSUnpackSecurityAccessResponse
See Security Access Example (0x27)
Control communication messages.
UDS_EVT_CommCtrl
Value | Define | Description |
---|---|---|
0x00 | UDS_LEV_CTRLTP_ERXTX | Enable RX and TX |
0x01 | UDS_LEV_CTRLTP_ERXDTX | Enable RX, Disable TX |
0x02 | UDS_LEV_CTRLTP_DRXETX | Disable RX, Enable TX |
0x03 | UDS_LEV_CTRLTP_DRXTX | Disable RX and TX |
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Control accepted |
0x12 | UDS_NRC_SubFunctionNotSupported | Control type not supported |
0x22 | UDS_NRC_ConditionsNotCorrect | Cannot apply control |
0x31 | UDS_NRC_RequestOutOfRange | Invalid parameters |
UDSSendCommCtrl
Write data identified by a 16-bit identifier.
UDS_EVT_WriteDataByIdent
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Data written successfully |
0x13 | UDS_NRC_IncorrectMessageLengthOrInvalidFormat | Invalid data length |
0x22 | UDS_NRC_ConditionsNotCorrect | Cannot write now |
0x31 | UDS_NRC_RequestOutOfRange | Data identifier not supported |
0x33 | UDS_NRC_SecurityAccessDenied | Security access required |
UDSSendWDBI
See Read/Write Data By Identifier Example
Start, stop, or request results from server-side routines.
UDS_EVT_RoutineCtrl
Value | Define | Description |
---|---|---|
0x01 | UDS_LEV_RCTP_STR | Start Routine |
0x02 | UDS_LEV_RCTP_STPR | Stop Routine |
0x03 | UDS_LEV_RCTP_RRR | Request Routine Results |
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Routine control accepted |
0x12 | UDS_NRC_SubFunctionNotSupported | Control type not supported |
0x22 | UDS_NRC_ConditionsNotCorrect | Cannot execute routine |
0x24 | UDS_NRC_RequestSequenceError | Wrong sequence |
0x31 | UDS_NRC_RequestOutOfRange | Routine ID not supported |
0x33 | UDS_NRC_SecurityAccessDenied | Security access required |
UDSSendRoutineCtrl, UDSUnpackRoutineControlResponse
Initiate data download to server (flash programming, calibration update).
UDS_EVT_RequestDownload
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Download accepted |
0x22 | UDS_NRC_ConditionsNotCorrect | Cannot download now |
0x31 | UDS_NRC_RequestOutOfRange | Invalid address/size |
0x33 | UDS_NRC_SecurityAccessDenied | Security access required |
0x70 | UDS_NRC_UploadDownloadNotAccepted | Download rejected |
UDSSendRequestDownload, UDSUnpackRequestDownloadResponse
Transfer data blocks after Request Download/Upload.
UDS_EVT_TransferData
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Data transferred |
0x24 | UDS_NRC_RequestSequenceError | No active transfer |
0x71 | UDS_NRC_TransferDataSuspended | Transfer suspended |
0x72 | UDS_NRC_GeneralProgrammingFailure | Programming failed |
0x73 | UDS_NRC_WrongBlockSequenceCounter | Block sequence error |
UDSSendTransferData
Terminate data transfer.
UDS_EVT_RequestTransferExit
Value | Enum | Meaning |
---|---|---|
0x00 | UDS_PositiveResponse | Transfer exited successfully |
0x24 | UDS_NRC_RequestSequenceError | No active transfer |
0x72 | UDS_NRC_GeneralProgrammingFailure | Exit processing failed |
UDSSendRequestTransferExit