Skip to main content

What is a "Diagnostic Session"


 

What is a session  ?


Before we move to any service in the UDS we need to know a concept called Session.
  
The literal meaning of session in English is “A period devoted for particular activity’.

It perfectly matches with the meaning of session in diagnostic functionality as well.
Along with this, there are many more aspects which make session very important.


We have multiple use cases of diagnostics and to serve these purposes we exchange multiple diagnostic services.

It is important to consider below factors while performing a Diagnostics Communication:

  • ü Maintain Connection-oriented Communication: Opening and closure of Diagnostic Link for communication. Time out and extension of diagnostic communication.
  • ü Support Session layer requirements of OSI layer.
  • ü Security and authorization of the user – Use of Seed and Key for authenticating user
  • ü Safeguard the easy access ECUs memory, IO or SW, Purpose of Communication – Permission of executing critical services if authorized to do so.
  • ü Function oriented access to Services – Permission to execute grouping of services as per the generalization or specialization purposes.
  • ü Synchronize Diagnostic processes with  ECU’s primary functionalities. e.g when ECU is in Programming Activity it does not set DTCs.


To address all these factors many services work together in UDS. The basic one is Diagnostic Session Control -SID 0x10    

A Session can be defined as a diagnostic connection existing between the sender and receiver for defined time period (until extended) and providing access to defined services of UDS as per the type of session.

          So, to simplify the definition, 
  • Session is time bound connection
  • Session provided access to different services.
  • Session can be changed
  • Session can be extended
  • Session ends if not extended
  • Session can be terminated
  • Session can be of multiple types
Let me clarify more :
  • Session is time bound connection of S3 time 
  • Session provided access to different services - refer ISO 14229-1 Services allowed in each session
  • Session can be initiated and changed with the help of a Diagnostic service $10 - Diagnostic Session Control
  • Session can be extended and terminated by sending or stopping a Diagnostic Service $ 3E   Tester Present
  • Session can be of multiple types :  
                      1. Default Session
                       2. Extended Session
                       3. Programming Session

  On top of this, each OEM provides support of different sessions to serve different functionalities.

 Session does not effect ECUs Primry Funcrtionality :

 So ECUs operating cycle will revolve around above mentioned three sessions. The word “operating cycle” instead of “Diagnostic communication cycle” is used deliberately because ECU can enter these sessions while it performing its basic functions. So ECUs normal functionality shall not be impacted due to session change until; it is forced to change by a diagnostic service itself.e.g Service $ 28 can stop normal application message transmission of ECU and has a huge impact on the ECUs primary function. But reading a DID in any of the session doews not impact ECUs any primary function.

We will see how the "Maintain Connection-oriented Communication " is are handled my Diagnostic Session Control Service in next write - up.


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 3 - Security and authorization of the user – Use of Seed and Key for authenticating -

 Let us see how the function of Security Access is served by Diagnostic Session.   Security is an important aspect of an UDS implementation. It is required to avoid unauthorized access to ECU. As one can control ECU functionality through usage of UDS services, it becomes vital to secure ECU from unintended or vulnerable access.  Hence UDS has provisioned a special service called Security Access SID 0x27 to authorize a user.It works on the principle of Seed and key mechanism. You can get lot many websites explaining how security service works. The intention of this write up is to know how session is important for the implementation of security of an ECU. As mentioned in the blog (https://thevehiclediagnostics.blogspot.com/2020/01/what-is-diagnostic-session.html )  a diagnostic session of an ECU is a timed window. Session management helps in following manner for security 1 . Limit a secured access for timed window i.e session. 2 . End se...

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 ...