UDS (Unified Diagnostic Services) is a diagnostic protocol based on KWP2000 and ISO 15765 (Diagnostic communication over Controller Area Network (DoCAN)). This standardized diagnostic protocol makes it possible to address and maintain all control units installed in a vehicle with the help of UDS. The diagnostic service uses the fifth and seventh layer of the OSI model.
The UDS service is used mainly in the automotive sector. However, it is also used as standard in other industries. The messages defined in UDS are sent to the control units in the vehicle, which must provide the specified UDS services. This makes it possible, for example, to read out the error memory or to update the control units with new firmware.
A UDS message has always a uniform structure and is divided into a SID field (service ID), a parameter field and a data field. The communication is based on the request-response principle. The client starts the service with a request to the control unit and the control unit sends back a positive or negative response after the service is finished. If the execution of the service takes longer than the specified runtime, the control unit must send a preliminary response (request Correctly Received-Response Pending) at regular intervals. This confirms the receipt of the request and informs that the service is still running.
UDS itself allows messages of any length, the maximum size is defined by the transport protocol used. The frequently used ISO-TP (ISO 15765-2) allows messages up to 4095 bytes in length, for example. However, it is also possible to completely dispense with a response from the control unit. For this purpose, an extra bit is provided in each UDS message. If this bit is set, no response is sent back for a successfully executed service. Only in certain error cases there is still a negative response from the control unit. This is mainly used for so-called functional addressing. This is a broadcast to all control units. Services that are only addressed to one control unit, on the other hand, are called physically addressed.