pyXCP Quickstart Guide ====================== Get started with pyXCP in 15 minutes: installation, first connection, parameter read/write, and basic DAQ recording. Prerequisites ------------- - Python 3.8+ (64-bit recommended) - XCP slave device (ECU, simulator, or test tool) - Transport interface: CAN adapter, Ethernet, USB, or serial - Optional: A2L file (ASAM MCD-2 MC) for symbolic access Safety: XCP is for development/testing—avoid safety-critical systems without proper analysis. Installation ------------ Basic installation:: pip install pyxcp python -c "import pyxcp; print(pyxcp.__version__)" Optional dependencies:: # A2L support pip install pyxcp pya2ldb # CAN drivers pip install pyxcp python-can[pcan] pip install pyxcp python-can[vector] pip install pyxcp python-can[ixxat] Your First XCP Connection ------------------------- Minimal CAN example:: from pyxcp import Master with Master("can") as xcp: xcp.connect() ecu_id = xcp.getId(0x01) print(f"Connected to ECU: {ecu_id}") xcp.disconnect() Run with CLI args:: python your_script.py --transport CAN --device socketcan --channel can0 --bitrate 500000 Ethernet example (TCP):: from pyxcp import Master with Master("eth") as xcp: xcp.connect() props = xcp.slaveProperties print(f"Protocol Layer: {props.protocolLayerVersion}") print(f"Max CTO/DTO: {props.maxCto}/{props.maxDto}") xcp.disconnect() No config file required (programmatic):: from pyxcp import Master from pyxcp.config import create_application_from_config, set_application config = {"Transport": {"CAN": {"device": "socketcan", "channel": "can0", "bitrate": 500000, "max_dlc": 8}}} app = create_application_from_config(config) set_application(app) with Master("can") as xcp: xcp.connect() print(f"ECU ID: {xcp.getId(0x01)}") xcp.disconnect() Reading and Writing Parameters ------------------------------ Upload (read):: from pyxcp import Master import struct with Master("can") as xcp: xcp.connect() data = xcp.upload(address=0x1A2000, length=4) value = struct.unpack("