Skip to main content

Posts

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

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

Support Session layer requirements of OSI layer requirement   specifies the timings related requirements for Client and Server. There are timers called P2 and P2 * for both (client and server) to be followed. Let us see what is P2 timer? A communication is a series of requests and responses. Request is sent by Client and response is sent by Server. So when a client sends a request it needs to wait for a response from server Have we ever thought how much time it shall wait till the response come. What it if waited but never received a response ? These are a few example of scenarios where communication does not go as expected. But definitely these things are taken care while designing the protocol and we need to know how.       So the question is Why server needs to wait and for how much time it needs to wait ? Is there any limit for that ? Yes there is a limit and client will wait as per the defined limit. But this does not answer the question co...

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

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. As I mentioned in my blog : https://thevehiclediagnostics.blogspot.com/p/blog-page_8.html 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...

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

What is a Diagnostic Communication

Diagnostic Communication : Diagnostic Communication is base of Automotive Diagnostics . It is an  exchange of Diagnostic messages between an two entities. Those could be two , ECUs or ECU and  Tester Application.or it could be a group of ECUs and a tester application    The basic components of the diagnostic communication are : A Diagnostic Message :   It could be of these types -  1. A Request 2. A Response  3. A Negative Response Code Diagnostic Address :  1. Functional 2. Physical  Diagnostic Protocol : 1. UDS 2. J1939 3. KWP 2000 etc. Supporting Protocols :  1. CAN 2. Ethernet 3. K-line ,etc What is  Diagnostic Protocols ans supporting Protocols   ?  ECUs and tester communication are connected to each other by physical or wireless media. They exchange messages (requests and responses) over that physical or wireless channel. It is same as we connect to each other over internet or phone...

A 2nd Pebble : What is Endianness ?

Endiness is characteristic of a Digital link or an Electronic System. For a System, Endiness refers to the order in which the data is stored by the system in its memory. The order could be LSB to a lower memory address or MSB to lower memory address. For example : A Data coming to system is  - 0x 00 FF  - '00' : MSB and 'FF' : LSB in the received data.  - System use 2 bytes to store data in its memory. Suppose address bytes 0x0001 and 0x0002 are to be used for storing these 2 data bytes. - Strange thing is , System can utilize these two bytes in two ways to store the data. Method 1  : Little Endian Address  | 0x0001          |   0x0002     | Data        |   LSB - FF    |    MSB - 00 | Method 2 : Big Endian Address  | 0x0001          |   0x0002     | Data        |  ...