Diagnostics and calibration guides

Read data and fault codes from ECUs, and measure and calibrate them during development. Covers UDS over CAN, OBD-II and XCP with Python and C++ examples.

9 guides Read them in this order

  1. What Is UDS? Unified Diagnostic Services Explained Learn what UDS diagnostics is, how UDS requests and responses work, and what sessions, DIDs, DTCs, security access, and ISO-TP mean. 8 min read Beginner Guide
  2. CAN Bus Diagnostics Example: Read Engine RPM with OBD-II Send a simple read-only OBD-II request over CAN with Python and decode the engine RPM response step by step. 8 min read Beginner Tutorial
  3. Python UDS Tutorial: Read a VIN with udsoncan Learn Python UDS over CAN with udsoncan. Read a VIN, try a local ECU simulator, understand ISO-TP frames, and troubleshoot common errors. 13 min read Intermediate Tutorial
  4. What Is XCP? ECU Measurement and Calibration Explained Learn what the XCP protocol is, how it connects calibration tools to ECUs, and how XCP, A2L files, CAN, Ethernet, and UDS differ. 8 min read Beginner Guide
  5. XCP Python Example: Connect to an ECU with pyXCP Use pyXCP in a simple Python example to connect to an XCP slave over CAN, read the ECU identifier, and inspect connection properties. 9 min read Intermediate Tutorial
  6. XCP C++ Example: Connect to an ECU over CAN Build a small Linux C++ SocketCAN example that sends an XCP CONNECT command, waits for the ECU response, and checks the response packet. 10 min read Advanced Tutorial
  7. UDS DTCs explained: service 0x19 and the DTC status byte How to read diagnostic trouble codes with UDS ReadDTCInformation (0x19), what each of the 8 status bits means, which status mask to use, how to read 3-byte DTCs, and how to clear them with 0x14. With raw frames and a tested Python parser. 10 min read Intermediate Guide
  8. How ECU flashing works over UDS: the reprogramming sequence step by step The UDS services an ECU reprogramming sequence uses, in order: sessions, security access, erase, RequestDownload, TransferData, RequestTransferExit and the dependency check. With the exact request bytes, block sequence counter rules, transfer time estimates and a tested Python download loop. 12 min read Advanced Guide
  9. DoIP explained: UDS diagnostics over automotive Ethernet How Diagnostics over IP (ISO 13400-2) works: the 8-byte header, vehicle discovery over UDP, routing activation, logical addresses and UDS messages over TCP port 13400. With byte-level examples and a standard-library Python client tested against a simulated vehicle. 11 min read Intermediate Tutorial

Other topics