Link Control (0x87) Service in UDS Protocol

UDS Protocol 0x87 Service: Understanding Link Control in Automotive Diagnostics

Hello, fellow automotive diagnostics enthusiasts! In this blog post, we’re going to explore UDS Protocol Link Control 0x87 Service – one of the key services in the UDS (U

nified Diagnostic Services) protocol: Link Control Service (0x87). This service allows dynamic switching between different communication speeds during a diagnostic session, ensuring faster and more efficient data exchange. It plays a critical role in optimizing communication between a tester and an ECU, especially when handling large volumes of diagnostic data. In this post, I’ll explain what Link Control is, how it functions, and the scenarios where it’s most useful. We’ll also break down the types of control modes and timing involved. By the end, you’ll understand how this service helps modern vehicles communicate smarter and faster. Let’s dive into the mechanics of UDS Service 0x87!

Table of contents

The Link Control (0x87) Service in the UDS (Unified Diagnostic Services) protocol enables the tester to request a temporary change in the communication speed between the diagnostic tool and the ECU. This service is particularly useful during diagnostic sessions where faster data transfer is needed after a secure connection is established. It ensures efficient handling of high data loads while maintaining compatibility with default settings for initial communication. By using Link Control, modern automotive systems can optimize diagnostic performance without compromising safety or stability. This service is mainly used in environments where real-time data exchange and speed flexibility are essential.

The Link Control (0x87) Service in the UDS protocol allows the diagnostic tester to request a change in the communication parameters, primarily the baud rate, during an active diagnostic session. This service is designed to temporarily switch the communication speed between the tester and the ECU (Electronic Control Unit) for faster data transfer, especially when handling large volumes of diagnostic data. It supports various control types, such as verifying the new communication settings before applying them or switching instantly. By utilizing this service, diagnostic tools can enhance performance without rebooting or resetting the ECU, making it a powerful feature for real-time, high-efficiency diagnostics.

Here’s a detailed explanation of why we need Link Control (0x87) Service in UDS Protocol:

1. To Enable High-Speed Data Communication

The Link Control service allows the tester to switch from a default low-speed communication rate to a higher baud rate during an ongoing diagnostic session. This is especially useful when transferring large amounts of data, such as memory dumps or parameter records. Higher speeds significantly reduce transfer time. This enhances diagnostic efficiency and ensures smoother operation. Without Link Control, such performance improvements would not be possible. It provides the speed flexibility required in modern vehicles.

2. To Maintain Compatibility During Initialization

During the initial handshake, communication starts at a default safe speed supported by all ECUs. Link Control allows switching to a faster baud rate after secure communication has been established. This ensures backward compatibility with older devices while still supporting performance upgrades. It eliminates the need for separate setups or different configurations for each ECU. This flexibility makes diagnostics more standardized and user-friendly. It maintains a balance between compatibility and performance.

3. To Improve ECU Flashing Performance

Flashing an ECU involves transferring a large amount of firmware or calibration data to the vehicle’s control unit. Performing this at a low baud rate can be time-consuming and inefficient. Link Control helps speed up this process by temporarily increasing the communication speed. This significantly reduces the total flashing time, which is especially important in production lines or service centers. It makes ECU programming faster, more reliable, and cost-effective. Faster flashing also reduces vehicle downtime.

4. To Ensure Secure and Verified Transitions

Link Control supports a mode that verifies the new baud rate before fully switching. This two-step process ensures that both the tester and ECU are synchronized and ready. If either side cannot support the new speed, the switch is aborted to prevent miscommunication. This verification adds an extra layer of safety and avoids session breakdowns. It also provides feedback to the tester about successful or failed transitions. This makes communication more robust and fault-tolerant.

5. To Avoid Permanent Configuration Changes

One of the key advantages of Link Control is that the baud rate change is temporary and session-based. This means once the session ends or the ECU is reset, the original settings are restored. It prevents accidental or unauthorized long-term changes to communication parameters. Permanent misconfigurations can cause future connection issues. Link Control helps maintain system integrity while still offering flexibility. It’s ideal for diagnostic sessions that demand speed without permanent alterations.

6. To Reduce Session Downtime

Without Link Control, switching speeds would require ending the session and starting a new one at the desired speed. This interrupts the workflow and may require additional authentication or security unlocks. Link Control eliminates this downtime by allowing the change to happen mid-session. This saves time, increases technician productivity, and streamlines diagnostics. It supports smoother transitions and uninterrupted communication. This is critical in environments where time is a key factor.

7. To Support Multi-Speed Diagnostic Tools

Modern diagnostic tools often support a variety of baud rates and protocols. Link Control allows these tools to dynamically adapt the speed based on ECU capabilities and the nature of diagnostics. It helps ensure the best performance regardless of vehicle model or manufacturer. This makes tools more versatile and powerful. Service centers don’t need separate configurations for each vehicle. Link Control enables universal compatibility with flexible performance tuning.

8. To Enhance Real-Time Data Monitoring

Certain diagnostic tasks, like live data streaming from sensors, require fast and consistent data transfer. A low-speed connection may cause delays, lag, or even data loss. Link Control enables switching to a higher speed for accurate, real-time monitoring. This is essential in emissions testing, safety system diagnostics, and high-speed data logging. It ensures the tester receives timely and reliable data. Real-time accuracy is crucial in both development and field diagnostics.

9. To Increase Flexibility in Diagnostics

Different test scenarios demand different communication speeds. Link Control gives engineers the flexibility to choose the most appropriate speed based on task requirements. For instance, initial parameter reading may be fine at a low speed, while DTC analysis or memory dumps may require high speed. This service enables dynamic adjustment without losing session context. It brings adaptability to the diagnostic process. Flexible communication is key in evolving automotive systems.

10. To Meet OEM and Compliance Standards

Many automotive manufacturers and industry standards now require diagnostics to be fast, reliable, and secure. Link Control helps meet these demands by offering a standardized method to change baud rates without violating protocol rules. It is widely supported in OEM testing tools and compliant with ISO 14229. This ensures interoperability across multiple platforms. Meeting these standards is essential for global vehicle diagnostics and production readiness.

Syntax of 0x87 SID Request Message Frame Format

Data byteDescription (all values are in hexadecimal)Byte Value
#1Link Control Request SID0x87
#2Sub-Function = [ Link Control Type]0x01
#3linkControlModeIdentifier0x00 – 0xFF

Request message definition (linkControlType= verifyModeTransitionWithSpecificParameter)

Data byteDescription (all values are in hexadecimal)Byte Value
#1Link Control Request SID0x87
#2Sub-Function = [ Link Control Type]0x02

#3
#4
#5
LinkRecord[] = [                              
modeParameterHighByte                              
modeParameterMiddleByte                              
modeParameterLowByte ]

0x00 – 0xFF
0x00 – 0xFF
0x00 – 0xFF

Request Message Data-Parameter

LinkControlModeIdentifier:

This conditional parameter references a fixed, predefined mode parameter for transitioning.

LinkRecord:

This conditional parameter record contains a specific mode parameter when the sub-function parameter indicates that a particular parameter is used. The format of the linkRecord is defined in the individual data links of the specific diagnostic specification.

Syntax of 0x87 SID Request Message Frame Format

Request message definition (linkControlType = transitionMode)

Data byteDescription (all values are in hexadecimal)Byte Value
#1Link Control Request SID0x87
#2Sub-Function = [ Link Control Type]0x03

Syntax of SID – 0x87 Positive Response Frame Format

Data byteDescription (all values are in hexadecimal)Byte Value
#1Link Control +Ve Response SID0xC7
#2Link Control Type00-7F

Response Message Data-Parameter

LinkControlType:

This parameter echoes bits 6 through 0 of the linkControlType sub-function parameter from the request message.

Syntax of SID – 0x87 Negative Response Frame Format

Data byteDescription (all values are in hexadecimal)Byte Value
#1Link Control –Ve Response SID [ byte#1 ]0x7F
#2Requested SID [ byte#1 ]0x87
#3Negative Response Code [ byte#1 ]NRC

Sub-Function ID of (0x87) SID in UDS Protocol

Bits
6 – 0
Parameter NameDescription
0x00ISO / SAE ReservedThis value is reserved according to the specifications outlined in this document.
0x01Verify Mode Transition With Fixed ParameterThis parameter is utilized to validate whether a transition with a predefined parameter, specified by the link Control Mode Identifier data-parameter, can be executed.
0x02Verify Mode Transition With Specific ParameterThis parameter is employed to confirm whether a transition to a specifically defined parameter, such as a particular baud rate, as specified by the link Record data-parameter, can be enacted.
0x03Transition ModeThis sub-function parameter instructs the servers to transition the data link into the mode that was requested in the preceding verification message.
0x04 – 0x3FISO / SAE ReservedThis range of values is set aside by this document for potential future definition or use.
0x40 – 0x5FVehicle Manufacturer SpecificThis range of values is designated for use by specific vehicle manufacturers for their proprietary purposes.
0x60 – 0x7ESystem Supplier SpecificThis range of values is set aside for use by specific system suppliers for their proprietary purposes.
0x7FISO / SAE ReservedThis value is held in reserve by this document for potential definition in the future.

Supported Negative Response Codes (NRCs) of 0x87 SID in UDS Protocol

NRCParameter NameDescription
0x12Sub-Function Not SupportedThis Negative Response Code (NRC) shall be sent if the sub-function parameter is not supported.
0x13Incorrect Message Length Or Invalid FormatThis Negative Response Code (NRC) shall be sent if the length of the message is incorrect.
0x22Conditions Not CorrectThis Negative Response Code (NRC) shall be returned if the criteria for the requested Link Control are not satisfied.
0x24Request Sequence ErrorThis Negative Response Code (NRC) shall be returned if the client requests the transition of the mode of operation without a preceding verification step that specifies the mode to transition to.
0x31Request Out Of RangeThis Negative Response Code (NRC) shall be returned if:
• The requested link Control Mode Identifier is invalid.
• The specific mode Parameter (link Record) is invalid.

Here are the Examples of Link Control (0x87) Service in UDS Protocol:

Example #1 – Transition Baudrate to Fixed Baudrate (PC Baudrate 115200 kBit/s)

Step#1: Verify if all Criteria are met for a Baud Rate Switch

Example of Request Message Flow:

Message DirectionClient → Server
Message TypeRequest
Data byteDescription (all values are in hexadecimal)Byte Value
#1Link Control Request SID0x87
#2Link Control Type = verify Mode Transition With Fixed Parameter,                                    
Suppress Pos Rsp Msg Indication Bit = FALSE
0x01
#3Link Control Mode Identifier = PC115200Baud0x05

Example of Positive Response Message Flow:

Message DirectionServer → Client
Message TypeResponse
Data byteDescription (all values are in hexadecimal)Byte Value
#1Link Control +Ve Request SID0xC7
#2Link Control Type = verify Mode Transition With Fixed Parameter,0x01

Example of Negative Response Message Flow:

Message DirectionServer → Client
Message TypeResponse
Data byteDescription (all values are in hexadecimal)Byte Value
#1Link Control –Ve Request SID [ byte#1 ]0x7F
#2Requested SID [ byte#1 ]0x87
#3Negative Response Code [ byte#1 ]NRC
// Below example shows how to use the UDS commands over the CAN data field as per the DoCAN
// Example for Positive Response for SID-0x87
Request: Client --> Server
02 87 01
Positive Response: Server --> Client
02 C7 01
// Example for Negative Response for SID-0x87
Request: Client --> Server
01 87 01
Negative Response: Server --> Client
03 7F 87 13

The Link Control (Service ID: 0x87) in UDS allows a diagnostic tester to change the communication baud rate with the ECU during an active diagnostic session. Here’s a breakdown of how the communication looks on the CAN bus, including both positive and negative responses.

Link Control 0x87 UDS Service request and positive response message over CAN protocol

✅ Positive Response Example for SID 0x87

Request:
Client → Server  
02 87 01
  • 02: This is the PCI (Protocol Control Information) indicating that 2 bytes of data follow.
  • 87: The Service ID for Link Control.
  • 01: Sub-function “01” represents “Verify Baudrate Transition” (used to verify that both tester and ECU support the new baud rate before applying it).
Positive Response:
Server → Client  
02 C7 01
  • 02: PCI again (2 bytes of data follow).
  • C7: Positive response code for 0x87 (C7 = 0x87 + 0x40 as per UDS protocol).
  • 01: Echo of the sub-function to confirm successful verification.

This means the ECU has successfully verified the new baud rate setting and communication can safely switch speeds if needed.

❌ Negative Response Example for SID 0x87

Request:
Client → Server  
01 87 01
  • 01: PCI (1 byte of data follows).
  • 87: Service ID.
  • 01: Sub-function “Verify Baudrate Transition”.
Negative Response:
Server → Client  
03 7F 87 13
  • 03: PCI (3 bytes of data follow).
  • 7F: Negative response indicator.
  • 87: The service ID that caused the error (Link Control).
  • 13: NRC (Negative Response Code) 0x13 means “Invalid Format”.

In this case, the ECU rejected the request due to a formatting error or unsupported condition, meaning the baud rate transition will not occur.

Here are the Advantages of Link Control (0x87) Service in UDS Protocol:

  1. Enables Baud Rate Transition: This service allows seamless switching between different communication speeds during an active diagnostic session. It eliminates the need to restart the session or reset the ECU, which is particularly useful when moving from a slower default speed to a faster one. This ensures smoother diagnostics and efficient communication handling in real time. It helps when high-speed communication is required for operations like flashing or memory read/write. Such dynamic transitions are essential for modern vehicles that support multi-speed CAN networks.
  2. Improves Diagnostic Efficiency: Faster communication achieved through this service leads to quicker data exchange between the tester and ECU. This directly reduces the time required for diagnostics, firmware updates, and system checks. Technicians can perform high-volume data tasks more efficiently without delays. It’s especially valuable in production lines or service centers where time is critical. Improved efficiency results in reduced vehicle downtime and better service quality.
  3. Supports Flexible Testing Environments: Link Control provides the adaptability to work across different ECUs and network setups that may have varying baud rates. This makes it convenient for OEMs and service engineers who need to test multiple modules without changing core settings. Such flexibility reduces the dependency on specific configurations or test equipment. It allows testing tools to adjust on-the-fly, maintaining compatibility across vehicle platforms. This reduces errors and increases productivity during development and diagnostics.
  4. Enhances Communication Control: It enables the tester to decide when to initiate the communication speed change based on predefined conditions. This control ensures that transitions happen only when the system is ready, maintaining session stability. Engineers can coordinate these changes to avoid data loss or synchronization issues. This results in a smoother communication experience between the ECU and tester. Controlled transitions help prevent failed diagnostics and improve reliability.
  5. Reduces ECU Reset Requirements: Traditionally, changing the baud rate would require resetting the ECU and restarting the diagnostic session. With Link Control, transitions happen dynamically within the same session. This means no loss of diagnostic context or interruption in communication flow. It helps save time and preserves valuable session information. Engineers can carry on diagnostics or flashing without restarting the tool or ECU.
  6. Facilitates Secure Communication Setups: Many secure operations like unlocking ECUs or performing protected memory writes benefit from faster communication. Link Control allows the session to begin at a safe default speed and switch to a higher speed after authentication. This keeps the system secure while improving efficiency post-authentication. It supports encrypted diagnostics or protected command execution smoothly. This balance between security and speed is vital in modern vehicle systems.
  7. Complies with ISO 14229 Standards: As part of the official UDS protocol, this service follows well-defined rules and structure. It ensures compatibility across various OEMs, ECUs, and diagnostic tools. Standardization makes it easier for tool developers and engineers to implement and debug this feature. It also simplifies training and support for automotive teams. Compliance with ISO standards ensures future readiness and global acceptance.
  8. Minimizes Communication Errors: The service follows a handshake mechanism where both the tester and ECU agree on the new speed before switching. This coordination reduces the chances of mismatched speed configurations. It prevents loss of messages or failure in establishing sessions post-switch. Such precision is crucial during sensitive operations like ECU reprogramming. It helps maintain communication integrity and consistency throughout diagnostics.
  9. Supports Partial Network Communication: Link Control is designed to work efficiently even when only a subset of the network is active. It helps perform diagnostics without needing to wake up all ECUs or subsystems. This saves vehicle battery and avoids unnecessary power consumption. Technicians can perform targeted operations on specific modules in isolation. It’s especially helpful in energy-conscious or electric vehicles with selective wake-up strategies.
  10. Enables Dynamic Configuration: Depending on the current system load or operating conditions, the tester can request communication settings that better match the situation. This dynamic behavior makes diagnostics smarter and more adaptive. It helps tailor the session for optimal performance in real-time. The ECU can handle changes without interrupting ongoing services. This dynamic adaptation is a step towards intelligent, responsive diagnostics in automotive systems.

Here are the Disadvantages of Link Control (0x87) Service in UDS Protocol:

  1. Requires Precise Timing Synchronization: The service demands that both the tester and ECU change their baud rate at the exact same moment; if one lags even slightly, communication is lost, requiring a reset of the session, which complicates diagnostics and may interrupt active processes.
  2. Not Supported by All ECUs: Some ECUs, especially older models or lower-end systems, do not implement the Link Control service, making it impossible to use in a standardized diagnostic approach and forcing developers to build alternate paths or limit functionality.
  3. Implementation Complexity for Diagnostic Tools: Tools that support Link Control must implement precise timing logic, baud rate control, and fallback handling; this adds layers of code and complexity, increasing development and maintenance efforts significantly.
  4. Risk of Communication Loss During Transition: If either the tester or ECU fails to acknowledge or correctly apply the baud rate switch, all communication is dropped instantly, which can interrupt data transmission, flash procedures, or security access commands.
  5. Lack of Automatic Recovery Mechanism: Once communication is lost during baud rate transition, there is no UDS-standard method to revert or recover the session; manual intervention is needed, which increases the chance of user error and delays diagnosis.
  6. Unnecessary for Low-Traffic Sessions: In diagnostic tasks that involve minimal data transfer, switching to a higher baud rate may provide no real benefit and only adds extra risk and complexity, making the feature redundant in such cases.
  7. Potential ECU Bricking During Flashing: If a baud rate switch is attempted during sensitive operations like ECU reprogramming and fails mid-way, it may corrupt flash memory or leave the ECU in an unstable state, which can render it inoperable.
  8. Extensive Compatibility Testing Needed: Since not all vehicle networks behave the same, especially across manufacturers, using Link Control requires rigorous testing across different CAN setups and ECUs, significantly increasing validation effort and time.
  9. Vulnerable to Electrical Noise: In noisy automotive environments with high electromagnetic interference or CAN bus traffic, the baud rate transition command can be corrupted or lost, causing miscommunication and triggering retry loops or failures.
  10. Steep Learning Curve for Technicians: Understanding how to correctly use Link Control requires in-depth training about timing, communication protocols, and fallback strategies, increasing onboarding time for diagnostic engineers and technicians.

Below are the Future Development and Enhancement of Link Control (0x87) Service in UDS Protocol:

  1. Improved Automatic Error Recovery: Future developments will focus on incorporating more robust automatic error recovery mechanisms within the Link Control service, allowing diagnostic sessions to self-recover from baud rate mismatches or transmission losses, reducing the need for manual intervention.
  2. Greater ECUs Compatibility: As the automotive industry evolves, it is expected that more ECUs will natively support Link Control, ensuring more seamless and uniform diagnostics across diverse vehicle brands and models, streamlining the diagnostic process for multi-vehicle fleets.
  3. Adaptive Baud Rate Switching: The development of adaptive baud rate switching mechanisms could help eliminate the need for manual setup, allowing the system to automatically adjust to the optimal baud rate based on the data being transmitted, thus improving efficiency and reducing setup errors.
  4. Enhanced Security Features: Future versions of the Link Control service will likely incorporate stronger security features, such as encryption during baud rate transitions, to prevent unauthorized interference with diagnostic data, enhancing the overall integrity and safety of the diagnostic sessions.
  5. Integration with 5G Networks: As 5G technology becomes prevalent, Link Control could evolve to work with higher-speed, more reliable communication networks, enabling faster and more efficient diagnostics in real-time, particularly in remote or fleet management scenarios.
  6. Better Support for Wireless Diagnostics: Future versions of UDS and Link Control may be enhanced to support wireless diagnostic protocols, allowing remote testing and reprogramming of ECUs without physical connections, facilitating diagnostics in hard-to-reach or mobile environments.
  7. Reduced Latency in Communication: The ongoing push for lower latency in automotive diagnostics may result in improvements to the Link Control service, allowing for faster baud rate switching and reducing communication delays, which is critical for real-time applications like ECU flashing or active safety systems.
  8. Incorporation of Self-Diagnostics for Link Control: To further enhance diagnostic reliability, Link Control services may include built-in self-diagnostics features that continuously monitor communication status and automatically adjust baud rates or notify technicians of potential issues before they disrupt the session.
  9. Standardization of Cross-Vehicle Communication: With increasing vehicle network complexity, the future may bring standardized protocols for baud rate management across a broader spectrum of manufacturers, ensuring that the Link Control service works seamlessly across all makes and models, reducing friction in multi-manufacturer diagnostic tools.
  10. Extended Diagnostic Session Support: In the future, Link Control could be enhanced to support longer and more intensive diagnostic sessions, providing more robust support for high-volume data transfers without sacrificing diagnostic speed, which is especially beneficial for comprehensive ECU health checks or fleet management diagnostics.

Discover more from PiEmbSysTech

Subscribe to get the latest posts sent to your email.

Leave a Reply

Scroll to Top

Discover more from PiEmbSysTech

Subscribe now to keep reading and get access to the full archive.

Continue reading