Communication message control 28 service

Communication message control (28 service) is a service defined in the OBD-II standard, which is used to control the communication mode and parameters of the OBD-II system. The communication message control service can be used for the following operations:

  1. Change the communication rate between the diagnostic instrument and the vehicle to ensure correct data transmission during high-speed communication.
  2. Change the format of data transmission to improve data transmission efficiency.
  3. Changes the operating mode of the OBD-II system to allow special functions and test operations.

The Communication Message Control service communicates using a diagnostic communication protocol based on the ISO 15765-2 standard. The diagnostic instrument can communicate with the OBD-II system by using the communication message control service, and instruct the OBD-II system to adopt a specific communication rate, format and working mode. The OBD-II system responds to the diagnostic tool's request with the appropriate parameters.

The communication message control service is very useful for some special functions and test operations, such as switching the OBD-II system to a special monitoring mode or test mode for more detailed fault diagnosis.

Communication message control (28 service) is a UDS service implemented in the automotive electronic control unit (ECU) to control the transmission of UDS communication messages. By using this service, the ECU can control the transmission rate of communication messages, filter received messages, and enable and disable different UDS services. In this way, the ECU can flexibly manage the UDS communication process to improve communication efficiency and safety.

Specifically, communication message control (28 service) can use the following sub-function codes:

  • Sub-function code 01: Set the transmission rate and protocol parameters of communication messages
  • Sub-function code 02: Set the filter and mask of communication messages to filter unnecessary messages
  • Sub-function code 03: Set the receiving status of communication messages to enable or disable different UDS services

The following is a sample code showing how to use the sub-function code 01 in the communication message control (28 service) to set the transmission rate and protocol parameters of the communication message:

// 初始化 UDS 通信协议参数
uint8_t protocol[4] = {0x01, 0x00, 0x00, 0x00};
uint8_t response[8];

// 发送通讯报文控制 (28 服务),子功能码 01
sendUDSRequest(0x28, 0x01, protocol, 4, response);

// 检查 UDS 响应是否成功
if (response[0] == 0x67) {
    // 成功,可以继续使用 UDS 服务
} else {
    // 失败,需要处理错误情况
}

Guess you like

Origin blog.csdn.net/qq_44732869/article/details/129682083