tags: UDS
Data Transmission functional unit
The second type of diagnostic service of UDS: data transmission. This type of service includes the SID as follows:
ReadDataByIdentifier (0x22)
ReadMemoryByAddress (0x23)
ReadScalingDataByIdentifier (0x24)
ReadDataByPeriodicIdentifier (0x2A)
DynamicallyDefineDataIdentifier (0x2C)
WriteDataByIdentifier (0x2E)
WriteMemoryByAddress (0x3D)
Usually, 0x22 and 0x2E are used in pairs, and 0x23 and 0x3D are used in pairs. These services are used for basic read and write operations of diagnostic data. 0x24, 0x2A, 0x2C are some special operations. I have only used SIDs: 0x22 and 0x2E. At present, this chapter only introduces these two services. If there are other SIDs in the future, they will be added.
1. ReadDataByIdentifier (0x22) service
This service reads ECU data through identifiers.
1.1 Request format:

From the above figure, it can be seen that the request format is divided into two parts:
The first part: request SID: 0x22, occupy one word
The second part: dataIdentifier (DID), which occupies two bytes. The value of DID is defined by the manufacturer, which represents what data is read. For example, 0x0123 means to read the ECU version number. One request can read multiple DID data. The DID range is shown in the figure below:

1.2 Response format:

From the above figure, the response format can be divided into three parts:
The first part: response SID: 0x62
The second part: dataIdentifier (DID), the DID value requested to be read
The third part: dataRecord, to read the data corresponding to the DID.
Note: According to the number of DIDs requested by the diagnostic tool at one time, the ECU will respond to the diagnostic tool with the data of the number of DIDs. Format: response SID + n (dataIdentifier + dataRecore). Generally request to read one DID data at a time
1.3 Examples
Read the ECU version number, assuming DID: 0x0123 is the identifier of the ECU version number

2. WriteDataByIdentifier (0x2E) service
This service writes data to the ECU through an identifier.
2.1 Request format

As can be seen from the above figure, the request format is divided into three parts
The first part: request SID: 0x2E, occupying one byte
The second part: dataIdentifier (DID), need to write the corresponding DID identifier value of the data. Occupies two bytes
The third part: dataRecord, the data to be written
2.2 Response format

As can be seen from the above figure, the response format is divided into two parts
The first part: response SID: 0x6E
The second part: dataIdentifier (DID), request echo of DID
2.3 Examples
Write the ECU version number, assuming DID: 0x0123 is the identifier of the ECU version number

Know the parameters: https://zhuanlan.zhihu.com/p/33995635
0x00 Overview UDS (University Diagnostics System Universal Diagnostic System) is a maintenance protocol commonly used in the vehicle system. The main regulations as follows: ISO-15765, ISO-14229, whic...
I am a software engineer in the automotive application layer and joined a new company last year. In the middle of the year, we must use the computer to realize the interactive functions of quantitativ...
The UDS diagnostic service is located at the application layer, and the network layer is below the application layer, so the diagnostic data is pushed down from the application layer to the network la...
The application layer of TCP/IP covers all the functions of the 5th, 6th and 7th layers in the OSI reference model. It not only includes the session layer function for managing communication connectio...
What ISO15765-3 that? What is included? Specific timing parameters described By default physical communication session The following figure depicts the physical address of the server and the cl...
The network layer defines six time parameters: N_Ar, N_As, N_Br, N_Bs, N_Cr, N_Cs。 The network layer transmits to the upper user at the time the error is detected 1. When the N_As expires, that is, th...
Article Directory 1 Session layer and addressing method of diagnostic service Portal ==>> AutoSAR Practical Series 300 Lectures "Candy Autosar" General Directory 1 Session layer and ad...
This article is an interpretation of the ISO 15765-2-2011 protocol. It should be pointed out that the latest version of the agreement is the 2016 version. The existence of TP layer UDS network layer, ...
The realization of UDS in the network transport layer I-the protocol of the network transport layer UDS timing at the application layer and session layer (enhanced diag) Overview Frame format PDU Data...
This article framework Preface 1. Module introduction 1.1 CANTP State Machine 1.2 Concepts involved 2. Function description 2.1 PDU sending 2.1.1 Single-frame PDU send 2.1.2 Multi-frame PDU sending 2....