Skip to main content

Diagnostic Session : Function 2 - Part 2 - Support Session layer requirements of OSI layer

We have seen a concept of P2 Timer and P2 * Timer in the blog –
https://thevehiclediagnostics.blogspot.com/2020/01/diagnostic-session-function-1-maintain.html


So it is time to know how Service $ 10 – Diagnostic Session Control is having on a function related to these timers.


Session Layer requirement Overview of P2 Timer :
  •  P2 timer and P2 * timer are mentioned as a performance parameters
  •   Standard values for these parameters are defined in ISO 14229 Part -2
  •  But an ECU may change these timings in non-default sessions and Client needs to adapt them dynamically (some conditions are applicable).
Explanation:

Though there is defined value of P2 timer, this timing can be still improved. As these are marked as performance requirement, if the ECU can give better performance, then these timings can be reduced. ECU can change these values in non-default session as per the performance.
           So, as we have seen before, a communication relies on these values and hence a client needs to be made aware of these changes if any. Then a question arise, how this is done?
       
For this purpose, Service $10 plays a major role.
Let us see how:

  • Whenever a client requests a session change below communication takes place.
  • A client sends a request with expected session value and waits for a response from server.
  • A server embeds some values in the response of the service $10 and send it back to client.
Refer the diagram below for detailed explanation.

              



So each time a session is change is requested by a client, server embeds values of P2 and P2 * timer applicable for requested session only .

In this way a client is made aware of the timing values for this session. Client needs to adapt these adapt values dynamically in case there is any change.

We need to refer ODX or CDD file to know the conversion of these hex values to values in miliseconds.  

So this is how service $ 10 plays an important role in following Session Layer requirements for a reliable and uninterrupted diagnostic communication between client and server.

    There are some more requirements regarding these. I hope, you to read them thoroughly in and come up to add it up here for better understanding.

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