UDS differs from the CAN protocol in a crucial way. The CAN protocol specifies the first and second layer of the OSI Model – that is the Physical Layer (ISO 11898-2) and the Data Link Layer (ISO 11898-2). UDS, however, also specifies the fifth (Session Layer) and seventh (Application Layer) layers of the OSI Model.
3 Answers. In UDS the first byte of a positive response is always SID + 40 hex (SID = Service Identifier, the first byte of the request) and the first byte of a negative response is always 7F hex : simply because it is defined like this in the international standards ISO14229-1 (former ISO 15765-3).
The main purpose of the CAN TP module is to segment and reassemble CAN I-PDUs longer than 8 bytes. The PDU Router deploys AUTOSAR COM and DCM I-PDUs onto different communication protocols. The routing through a network system type (e.g. CAN, LIN and FlexRay) depends on the I-PDU identifier.
So to make it possible, the CAN-TP also having 4-types frames like CAN protocol is:
- Single Frame.
- First Frame.
- Consecutive Frame.
- Flow Control Frame.
A diagnostic protocol defines a set of conventions used for diagnostic communication between a diagnostic device and an ECU in the vehicle. 1) KWP2000 - Keyword Protocol 2000 2) Diagnostics on CAN Protocol 3) UDS - Unified Diagnostic Services.
But, there is a key difference between the two protocols in the way these measurement values are exchanged between the tester and ECU: UDS uses the 2-byte dataIdentifiers (DID), whereas the KWP uses a 1-byte recordLocalIdentifier and 2-byte commonIdentifier.
AUTOSAR ensures standardized interfaces for software components in the application layer and application software components help in generating simple applications to support the vehicle functions. The communication between software components is enabled via specific ports using a virtual Function Bus.
Session layer timings in the UDS-standard:The P2 specifies the default timing which should be used, the ECU has, however, the option to send an NRC 0x78, then the P2 extended timing value will be maximum time, which is the server (ECU) has to respond?
As per CAN generation Improvement, CAN is categorized as:
- Classical CAN: Normal CAN protocol having speed up to 1 Mbps with a maximum of 8-bytes of Payload in a single data packet.
- Advanced CAN: CAN-FD(Flexible Data Rate) having speed up to 8 Mbps with a maximum of 64-bytes of payload in a single data packet.
CAN protocol is a message-based protocol, not an address based protocol. This means that messages are not transmitted from one node to another node based on addresses. Embedded in the CAN message itself is the priority and the contents of the data being transmitted.
Routines can be used to allow a diagnostic tool to perform a custom function within the ECU. For example, a function of the ECU can be started and stopped from the diagnostic tool, or a set of values can be written to or read from ECU memory. The actual routine is defined by the application software.
How CAN Communication Protocol works? Every CAN mechanism consists of a CAN device. This CAN device sends data across CAN network in the form of packets and these packets are called CAN frame. Every CAN frame consists of arbitration ID, a data field, a remote frame, an over load frame and an error frame.
status mask defines the status of DTCs to be read. The values are application specific. error in is a cluster that describes error conditions occurring before the VI executes. If an error has already occurred, the VI returns the value of the error in cluster to error out. status is TRUE if an error occurred.
Answer: Functional addressing is an addressing scheme that labels messages based upon their operation code or content. Physical addressing is an addressing scheme that labels messages based upon the physical address location of their source and/or destination(s).
Data identifiers are algorithms that combine pattern matching with data validators to detect content. Patterns are similar to regular expressions but more efficient because they are tuned to match the data precisely. Validators are accuracy checks that focus the scope of detection and ensure compliance.
The Controller Area Network protocol (CAN or CAN Bus) ia a two-wire (twisted-pair), bidirectional serial bus communication method that allows electronic subsystems to be linked together and interact in a network.
Transport protocol is mostly used for peer-to-peer communication in CAN. Lets go through the basic Network Layer Protocol functions as specified by ISO 15765-2. Network Layer Protocol performs transmission/reception of data of up to 4095 bytes and reporting of transmission/reception completion.
CAN bus, of the in-vehicle network, supports transfer of data of only up to 8 bytes. But SAE J1939 software standard allows messages of more than 8 bytes to be sent between the devices/ECU. The CAN based J1939/21 Transport Layer sends messages of more than 8 bytes through multiple packets.
Use lookup tables / compress /reduce the resolution of the signal to be sent so data worth more than eight bytes is compressed to eight bytes.
The CAN protocol supports two message frame formats, the only essential difference being in the length of the identifier (ID). In the standard format the length of the ID is 11 bits and in the extended format the length is 29 bits. The “ACK field” comprises the ACK slot (1 bit) and the ACK delimiter (1 recessive bit).
Message addressingCommunication in the CAN network is based on content-related addressing. It is not the CAN nodes that have identifiers, but rather the data and remote frames are identified (identifier — ID). So, all CAN messages can be received by every CAN node (broadcasting).
The primary difference between the classical CAN (Controller Area Network) and CAN FD is the Flexible Data (FD). The message payload size has been increased to 64 bytes of data in each CAN-frame / message, compared to only 8-bytes in the classic CAN frame. CAN FD can handle CAN frames/messages with 11-bit ID as well.
Negative response codes. 0x01 – 0x7F: communication related negative response codes, 0x80 – 0xFF: negative response codes for specific conditions that are not correct at the point in time the request is received by the server.
Used as a means of intercommunication between ECUs, the CAN Bus has provided a simple means of connecting diagnostic tools to the vehicle via the standardised On Board Diagnostic (OBD) connector. An OBD connector can be specially fabricated for this purpose.