Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyxcp_conf.py how to config the vector device serial? #204

Open
XuHaobang opened this issue Jan 16, 2025 · 1 comment
Open

pyxcp_conf.py how to config the vector device serial? #204

XuHaobang opened this issue Jan 16, 2025 · 1 comment

Comments

@XuHaobang
Copy link

@christoph2 Hi pyxcp_conf.py how to config the vector device serial? I try to set " c.Transport.Vector.serial = serial" or "c.Transport.Can.serial = serial", but is also NOK, can you help me sure?
image

@christoph2
Copy link
Owner

@XuHaobang
Yes, in your case c.Transport.Can.Vector.serial is the right one -- c.Transport.Can.Serial is a driver for some cheap CAN interfaces.

Note 1: The configuration parameter names are case sensitive!
Note 2: pyXCP uses PythonCAN parameter names unaltered, and in most cases these names correspondend to the resp. APIs.
In case of VectorCAN you may lookup here

Note 3: You may convert an existing TOML configuration with

xcp-profile  convert -c <OLD-TOML-CFG> -o pyxcp_conf.py

pyxcp_conf.py is the default name for pyXCP configuration files; when used, the -c option to scripts can be ommited, e.g.:

python .\xcphello.py -c pyxcp_conf.py

becomes

python .\xcphello.py

Tip: One can use xcp-profile create to create new configurations, but the tool could also be used to lookup parameters, if you run
xcp-profile.exe create | less

For instance, we can now grep for Serial

## Serial number of the hardware to be used.
# If set, the channel parameter refers to the channels ONLY on the specified hardware.
# If set, the `app_name` does not have to be previously defined in
# *Vector Hardware Config*.
#  Type: an int
#  Default: None
#  c.Transport.Can.Vector.serial = None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants