Skip to main content

Diagnostic Session : Function 1 - Maintain Connection-Oriented Communication

Maintain Connection-Oriented Communication
Whenever ECU is awake and ready to process any message on CAN , it can also process a diagnostic message. 

So we do not need any special connection establishment for starting the Diagnostic Communication. But we need to maintain a Diagnostic Communication Link between client and server when we need it for longer time till our purpose is not served. Going ahead , we will see what does it mean. 

There are two use cases of Session Management:

Diagnostic Connection:
When Client is connected to server, the server has to notify the client that it is connected to the server and diagnostic communication is not yet finished.

The need of this feature is in the power management of the Server ECU . Server ECU will be in  wake up state during the diagnostic communication and shall not go to sleep while communication is going on. Also it shall not remain in wake up  state unnecessarily if no more diagnostic communication is going to happen. Otherwise it will drain the ECU battery.

To achieve this, the Client needs to notify the server about opening, maintaining and closing the Diagnostic Communication.

Session Extension and Closure

ECU supports 3 basic sessions and only non-default sessions are time bound, means need to be extended explicitly otherwise will  expire. Hence Server needs to notify the client about this.

This is done through a Service $3E Tester present and $10 Diagnostic Session Control.

It necessary to know that; when ECU is in non-default session, a Service $ 3E Tester Present needs to be sent to server by client to server, so as to extend the current diagnostic session.

 Let us see how these two things are done.

Server and client both are have a Timer called “S3 timer” for session management.

When a client changes a session a timer is started. The timer name is S3 timer.
Server maintains S3 Server and Client maintains S3 Client timer.

Below sequence follows:

1.  S3 timer : Session Extension


2S3 Timer Expiry




Comments

Popular posts from this blog

What is UDS on CAN or Diagnostic on CAN ?

OSI Model and Diagnostics : OSI model has 7 layers and each layer has defined functionality. To understand this you can refer this excellent IEEE  publication. It explains OSI Model for CAN , Ethernet, flexray and MOST.  External reference : http://www.ieee802.org/1/files/public/docs2013/new-tsn-diarra-osi-layers-in-automotive-networks-0313-v01.pdf   So let us understand,  what is this UDS on CAN  ? When a Diagnostic Message formatted  as per ISO 14229 -1 i.e UDS Standard is sent over Controller Network we say Diagnostics Communication is happening as per UDS on CAN. So as per this : Below layers participate in Diagnostic Communication Over CAN :  1. Application Layer :  ISO 14229-1:2013 ROAD VEHICLES — UNIFIED DIAGNOSTIC SERVICES (UDS) — PART 1: SPECIFICATION AND REQUIREMENTS  ISO 14229-3:2012 ROAD VEHICLES — UNIFIED DIAGNOSTIC SERVICES (UDS) — PART 3: UNIFIED DIAGNOSTIC SERVICES ON CAN IMPLEMENTATION (UDSON...

Diagnostic Session : Function 5 - Session Oriented Access to Services

  There are multiple users those need to use UDS protocol for various purposes like Garage person for fault detection, ECU manufacture for Testing activities and development purpose. Also  OEM needs  access to ECU memory for flashing purposes.   UDS services can be categorized in different groups like few services will just read some Data from memory,a few will write or update the data to memory, some will erase/update ECU sw itself , some will control Inputs outs of ECU directly.  So there are chances that any improper usage of UDS service may result in safety issues , security breaches or damage to ECU resources. Hence, it doesn't make sense to give access to all services to everyone. To achieve this UDS has designed some mechanisms like Sessions, Security Authentication, Preconditions. I hope you are aware about what a Diagnostic Session is. Please visit :  https://thevehiclediagnostics.blogspot.com/2020/01/what-is-diagnostic-session.html   if you ...

Diagnostic Session : Function 4 - Synchronize different Diagnostic Processes.

A diagnostic session enables a specific set of diagnostic services and/or functionalities in the server(s). Along with this, we need to focus on the services which are synchronized tightly with the session. Any change in the session is directly interlinked with the functionality of diagnostic services.  As these services are linked to ECU processes (like message transmission, DTC setting and fail safe actions, Security Access) along with session change, these processes need to be aligned. Session change does not have an impact on non-volatile memory.  Lets dive in-depth : Below are the services which are impacted majorly due to session changes in server.  Communication Control - 0x28 Control DTC Setting - 0x85 Response on Event - 0x86 Security Access - 0x27 Let us take an example of Communication Control service (0x28). Communication Control (0x28) service is used for enabling and disabling the normal communication and network management messages of an ECU. It is one...