Automotive can bus has powertrain Pcan, chassis control ccan, vehicle control bcan, entertainment Ecan, diagnostic dcan five kinds.
Can diagnosis, that is, can network in the nodes, each can bus, gateway fault check and repair.
The Unified Diagnostic Service (UDS), the ISO-14229 standard, is the diagnostic service used by most automotive manufacturers.
10: Diagnostic Session Request Service
The input format for general diagnostic Requests is: 710 02 10 01
The frame ID is 710, the frame data length is 8, the data length is 02, the data content is 10 01, where 10 represents the diagnostic Session Initiation Service, and 01 indicates the default session
You must first initiate a diagnostic session, similar to building a handshake first.
2 e: Write Configuration Request Service
Write the configuration item data to an ECU, i.e. re-calibrate
Popular frame formats: 710 2E C0
Data length 07,c0 01 is an did data identifier that represents multiple parameters for an ECU node, and the FF represents the values that should be set for multiple parameters in the ECU
11: Gateway Reset Refresh Request Service
Generally if the ECU configuration value is written with 2E, the gateway refresh must be reset, otherwise this value may not be immediately effective.
Commonly used such as: 710 02 11 01 (Represents a hard reset request to all ECUs)
27: Secure Access authentication request Service
Generally if you need to involve 2E write ECU configuration items such as services, must pass the security authentication of the gateway, or no permissions to modify, you can understand, did not successfully apply to 27 secure access, your can network permissions are read-only, not writable.
Commonly used such as: 710 02 27 03 (Represents a request to initiate a security authentication to the gateway)
22: Read Configuration Request Service
Simply put: Read an ECU configuration item information
Commonly used as: 710 C0 01 (for reading C0 01 multiple parameter values in the data identifier)
19: Read the fault code request service
Read the fault information of normal can network, the ECU node is usually lost (such as the ECU node loose or burned out, etc.), the voltage is too low, can bus abnormal (ie bus Off), etc... These failures are recorded in a string of super-long fault code (DTC) lists.
Commonly used as: 710 0C (represents the current effective fault code for reading the entire can network)
14: Clear Fault Code request service
Clears the diagnostic fault codes for all ECUs, including the snapshot associated with the fault code, etc.
If the can network is faulty, it will continuously feedback the above fault,
It will be sent out immediately even after it is cleared.
Commonly used for example: the 710 FF FF FF (which represents the removal of diagnostic fault codes on all ECUs (including snapshots related to fault codes, etc.))
Diagnostic response
Affirmative response: 718 F4 00
In the ISO-14229, the diagnostic response of the ECU ID=ECU the diagnostic request id+0x008; id= request service for the response service id+0x40
Denial of service: 718 7F 10 22 00 00 00 00
Where 7F is negative code 22 is expressed as a negative cause condition does not meet
Other reasons: 11 Service not supported, 12 sub-function not supported, 13 message length error, 31 request out of range
Example:
Diagnostic Read fault code:
7E1 Geneva FF 00 00 00 00
Response:
7E9 Geneva FF C1 DB
Read fault Code 19 service has 01,02,04,06,0a and other sub-services, in 01 sub-services, the fourth data byte represents the DTC that needs to read which state, where FF means read all bit 1 bit DTC
In response to service 59, C1 21 20 is the content of the DTC, which is divided into high byte C1, median byte 21, and low byte 20,db representing the state of this DTC.
In the high byte 8Bit, it is divided into three encoding sets, first code set: Bit7-bit6;second:bit5-bit4;third:bit3-bit0
First coded set with 00 Power system P,01 Chassis system c,10 body system b,11 Network system U
Analyze DTC Information C1 DB:
decomposed into binary: 1100 0001 0010 0001 0010 0000 1101 1011
It is known that the network has a problem, that is, communication failure, and the loss of ABS communication.
The DTC state represented by DB can be described according to the status bit: DTC has an error and is confirmed under the current driving cycle
Bit 0 Test Failed DTC The most recent diagnostic result was failed
Bit 1 Test Failed This operation cycle is in a faulted state in the current driving cycle
Bit 2 Pending DTC in the current or previous driving cycle DTC is in a faulted state
Bit 3 confirmed DTC DTC has been confirmed
Bit 4 test not completed Since last clear the test did not complete since the previous cleanup of the fault code
Bit 5 test Failed Since Last clear tests result failed since previous cleanup of fault code
Bit 6 Test not completed this operation cycle is not completed in the current driving cycle
Bit 7 Warning Indicator requested alarm indication request related to DTC
Can diagnostic learning