XCP (Universal Measurement and Calibration Protocol) driver for Jumpstarter
Project description
XCP Driver
jumpstarter-driver-xcp provides XCP (Universal Measurement and Calibration Protocol) support
for Jumpstarter, enabling remote measurement, calibration, DAQ (data acquisition), and
programming of XCP-enabled ECUs.
It wraps the pyXCP library and supports Ethernet (TCP/UDP), CAN, USB, and Serial (SxI) transports.
Installation
pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple/ jumpstarter-driver-xcp
Configuration
Ethernet (TCP)
export:
xcp:
type: jumpstarter_driver_xcp.driver.Xcp
config:
transport: ETH
host: "192.168.1.100"
port: 5555
protocol: TCP
Ethernet (UDP)
export:
xcp:
type: jumpstarter_driver_xcp.driver.Xcp
config:
transport: ETH
host: "192.168.1.100"
port: 5555
protocol: UDP
CAN
export:
xcp:
type: jumpstarter_driver_xcp.driver.Xcp
config:
transport: CAN
can_interface: vector
channel: 0
bitrate: 500000
can_id_master: 0x7E0
can_id_slave: 0x7E1
Using a pyXCP Config File
For advanced configuration (seed & key, DAQ policies, etc.), provide a pyXCP configuration file:
export:
xcp:
type: jumpstarter_driver_xcp.driver.Xcp
config:
transport: ETH
config_file: /path/to/xcp_config.py
Configuration Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
transport |
str |
ETH |
Transport layer: ETH, CAN, USB, SXI |
host |
str |
localhost |
IP address or hostname (Ethernet only) |
port |
int |
5555 |
Port number (Ethernet only) |
protocol |
str |
TCP |
TCP or UDP (Ethernet only) |
can_interface |
str |
None |
python-can interface name (CAN only) |
channel |
str|int |
None |
CAN channel (CAN only) |
bitrate |
int |
None |
CAN bitrate in bits/s (CAN only) |
can_id_master |
int |
None |
CAN ID for master -> slave (CAN only) |
can_id_slave |
int |
None |
CAN ID for slave -> master (CAN only) |
config_file |
str |
None |
Path to a pyXCP config file (overrides individual params) |
API Reference
Session Management
connect(mode=0)- Connect to the XCP slave, returns negotiated propertiesdisconnect()- Disconnect from the XCP slaveget_id(id_type=1)- Get the slave identifierget_status()- Get session status and resource protection
Security
unlock(resources=None)- Perform seed & key unlock for protected resources
Memory Access (Measurement / Calibration)
upload(length, address, ext=0)- Read memory from the slavedownload(address, data, ext=0)- Write data to the slave memoryset_mta(address, ext=0)- Set the Memory Transfer Addressbuild_checksum(block_size)- Compute checksum over a memory block
DAQ (Data Acquisition)
get_daq_info()- Get DAQ processor, resolution, and event channel infofree_daq()- Free all DAQ listsalloc_daq(daq_count)- Allocate DAQ listsalloc_odt(daq_list_number, odt_count)- Allocate ODTsalloc_odt_entry(daq_list_number, odt_number, odt_entries_count)- Allocate ODT entriesset_daq_ptr(daq_list, odt, entry)- Set DAQ list pointerwrite_daq(bit_offset, size, ext, address)- Configure what to measureset_daq_list_mode(mode, daq_list, event, prescaler, priority)- Set DAQ list modestart_stop_daq_list(mode, daq_list)- Start/stop a single DAQ liststart_stop_synch(mode)- Start/stop all DAQ lists synchronously
Programming (Flashing)
program_start()- Begin programming sequenceprogram_clear(clear_range, mode=0)- Erase memory rangeprogram(data, block_length=0)- Download program dataprogram_reset()- Reset slave after programming
Example Usage
from jumpstarter.common.utils import env
with env() as client:
xcp = client.xcp
info = xcp.connect()
print(f"Max CTO: {info.max_cto}, Max DTO: {info.max_dto}")
xcp.unlock()
data = xcp.upload(4, 0x1000)
print(f"Memory at 0x1000: {data.hex()}")
xcp.download(0x2000, b"\x42\x00\x00\x00")
xcp.disconnect()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jumpstarter_driver_xcp-0.8.1.tar.gz.
File metadata
- Download URL: jumpstarter_driver_xcp-0.8.1.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f34db4110b6cbc86cb85eb0d57aa0f28a9403b870209d8cc9618f221429a1ec
|
|
| MD5 |
a8de2e9d66b05b904651889ca6bf49cb
|
|
| BLAKE2b-256 |
2f9d5fac17a7c0fb4b4fcb8ba1719854059b00910004c1722f203ae83a4e97f1
|
File details
Details for the file jumpstarter_driver_xcp-0.8.1-py3-none-any.whl.
File metadata
- Download URL: jumpstarter_driver_xcp-0.8.1-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c419609e1a12cf256d4ba6e0f60e589f5728b7ae37e9590fb86167b5ac48994
|
|
| MD5 |
98112f6ab95421d8ccaa5ad8901786db
|
|
| BLAKE2b-256 |
54b1ae704c17a1cfcb42087bebcb712d10eb0aa256b68415be723f94a8e83454
|