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