click below
click below
Normal Size Small Size show me how
Diagnostics
| Question | Answer |
|---|---|
| UDS, what is it? | es un protocolo de diagnóstico estándar en la industria automotriz, utilizado para que una herramienta de diagnóstico (ej. scanner o software) se comunique con las ECUs de un vehículo para leer información, borrar errores, programar, etc. |
| UDS Frame | | PCI | SID | PARAMETROS / DATOS/subfunc | |
| PCI | Protocol Control Information (control ISO-TP, si el mensaje es largo) |
| SID | Service Identifier (dice QUÉ servicio UDS quieres usar) |
| Parámetros/Datos | Datos o subfunción, depende del servicio |
| 0x10 | Diagnostic Session Control |
| 0x10 subf | 0x01: Default 0x02: Programming 0x03: Extended |
| Diagnostic Session Control meaning | Initiate/Change diagnostic session modes |
| ECU Reset | 0x11 |
| ECU Reset meaning | Command ECU to perform a reset |
| Security Access | 0x27 |
| Security Access meaning | Grant secured access for programming/unlock features |
| Communication Control meaning | Enable/Disable ECU communication |
| Communication Control | 0x28 |
| Tester Present meaning | Keep session alive (prevents ECU timeout), service 3E, Su función es decirle a la ECU:"Oye, sigo aquí. No cierres la sesión de diagnóstico." |
| Tester Present | 0x3E |
| Read Data By Identifier, Leer datos (sensores, VIN, etc.) | 0x22 |
| Read Data By Identifier meaning | Read values of variables or data objects |
| Write Data By Identifier | 0x2E |
| Write Data By Identifier meaning | Write values to variables or data objects |
| Read DTC Information | 0x19 |
| Read DTC Information meaning | Read Diagnostic Trouble Codes |
| Steps for diagnostics | 1. Connect a diagnostic tester to the vehicle’s OBD-II port 2. Set CAN parameters (baudrate, usually 500 kbit/s) 3. Send: “Diagnostic Session Control” 4. (Optional) Security Access |
| UDS ISO number | ISO 14229 |
| who iniciate the communication? | El tester (cliente) → ECU responde (servidor) |
| What happen if something goes wrong? | ECU responde con: 👉 Negative Response (0x7F) |
| UDS could be applied in which comunication protocols? | CAN, LIN, FlexRay, Ethernet (pero más común CAN) |
| Responce Frame | 06 62 F1 90 12 34 56 │ │ │ │ │ │ │ └── Data │ │ └──────── DID │ └──────────── SID Positivo └─────────────── PCI |
| Responce SID | SID + 40 |
| DID | Data Identifier, Identifica qué dato se está leyendo. |
| Meaning of first nibble in PCI | 0 = Single Frame 1 = First Frame 2 = Consecutive Frame 3 = Flow Control |
| Meaning of the second nibble in PCI | longitud, is the bytes number in a frame |
| Example of the complete frame | 03 | 22 | F1 | 90 PCI SID DID DID 03 ││ │└── Longitud = 3 bytes └── Tipo = 0 (Single Frame) 22 = ReadDataByIdentifier F190 = VIN |
| DID number of bytes | Normally 2 Bytes |
| DATA number of bytes | Depende del DID, could be up to 50 Bytes |
| Negative Response frame and lenght | PCI | 7F | SID | NRC 1B 1B 1B 1B |
| NRC meaning | Negative Response Code, explains what failed |
| NRC = 11 | Service Not Supported, "No conozco ese servicio." Supongamos que envías: 99 como servicio UDS. Pero la ECU solo conoce: 10 11 22 27 2E 31 |
| NRC = 12 | Subfunction Not Supported, "Conozco la pregunta, pero esa opción no." (Diagnostic Session Control) Subfunciones típicas: 01 = Default Session 02 = Programming Session 03 = Extended Session Pero tú envías: 10 99 |
| NRC = 13 | Incorrect Message Length Or Invalid Format, "Tu pregunta está mal escrita." Quieres leer el VIN. La petición correcta sería: 22 F1 90 Pero envías: 22 F1 |
| NRC = 22 | Conditions Not Correct, "Ahorita no puedo hacerlo." Quieres entrar a programación: 10 02 (Programming Session) Pero el voltaje de batería es demasiado bajo. |
| NRC = 31 | Request Out Of Range, Quieres programar una ECU. Pero el encendido está apagado. La ECU dice: "Primero prende el coche." |
| Wake up ECU using Harware | ✅ Abrir una puerta. ✅ Girar la llave. ✅Presionar Start/Stop. ✅ Abrir la cajuela. |
| ¿Cómo entra en Sleep una ECU? | Falta de actividad CAN durante cierto tiempo. |
| ¿Cómo despierta una ECU? | Actividad en el bus CAN o una señal física. |
| Disable communication using UDS | 28 = Communication Control 03 = No transmitas ni recibas 03 = Para comunicación normal y de red La ECU puede seguir encendida internamente. |
| ¿Cómo se genera un Wake-Up Signal en LIN? | Se genera colocando la línea LIN en estado dominante (LOW) durante al menos 250 µs. 12V ──────── ─────── | 0V |____ |
| ¿Qué pruebas harías sobre un mensaje CAN? | Validaría el CAN ID, periodicidad, contenido de datos, bits de señal, checksum, alive counter, timeout, wake-up, sleep, latencia, pérdida de comunicación, DTCs, escalamiento, endianness, manejo de valores fuera de rango y respuestas de diagnóstico UDS |
| Que es Alive Counter? | es un contador que se incrementa en cada mensaje CAN transmitido para demostrar que la ECU sigue funcionando correctamente y que el mensaje es nuevo. |
| Who send the Tester Present? | Es enviado periódicamente por el tester(tool), despues de haber entrado a Extended Session o Programming Session |
| What happen if the tester present is not sent | La ECU vuelve a: Default Session |
| Request example: | 03 22 F1 90 03 → PCI 0 = Single Frame 3 = Longitud (3 bytes UDS) 22 → SID (ReadDataByIdentifier) F1 90 → DID (VIN) |
| Response example | 10 14 62 F1 90 31 48 47 10 → PCI 1 = First Frame 14 → Longitud total de la respuesta 0x14 = 20 bytes 62 → Positive Response SID 22 + 40 = 62 F1 90 → DID (VIN) 31 48 47 → Primeros bytes del VIN |
| ¿Quién activa el Alive Counter? | es generado automáticamente por la ECU transmisora. |