-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
How to use #129
Comments
Hi, To get the script running, I assume you need to use command like |
Hi Jared, |
I am running from PowerShell using send_one.py Crash without conf file
Crash on Vector
using this TOML file:
I needed to expand the TOML file, otherwise the crash is even more spectacular with python-can complaining about missing Crash on PeakCAN
Then I will get same traceback:
|
Hi Jared,
😨 Note: I was very busy in the last months, but at the end of the last year I started working on a completely new configuration system, based on traitlets -- well-known from IPython and Jupyter, hope I can continue soon on this topic. Note #2: there's some confusion about master-/slave-IDs, fixing this issue would be a breaking change. Following the updated configuration files:
|
Hi Christoph
I needed to add
PeakCAN
Here I can remove all the timing parameters, but channel needs to specify USB as per python-can example.
Than you for your help. |
This is the device I'm trying to read off of with a raspberry pi: https://www.etas.com/en/products/es420_thermo_module_8_ch.php Any help is appreciated. Thanks, aaroniza0 |
Regarding your error message: decode_bytes() is definitly available in the latest repo version. The ETAS user manual is unclear about the configuration, but I'm pretty sure it is predefined. #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pprint import pprint
from pyxcp.cmdline import ArgumentParser
ap = ArgumentParser(description="pyXCP DAQ info")
with ap.run() as x:
x.connect()
if x.slaveProperties.optionalCommMode:
x.getCommModeInfo()
# x.cond_unlock() # DAQ resource may be locked, e.g. Vector examples
# add something like
# SEED_N_KEY_DLL="SeedNKeyXcp.dll"
# to your configuration file.
daq_info = x.getDaqInfo()
pprint(daq_info) # Print DAQ overview.
print("=" * 80)
num_predefined = daq_info["processor"]["minDaq"]
if num_predefined > 0:
print(f"{num_predefined} PREDEFINED DAQ lists:\n")
try:
for idx in range(num_predefined):
list_info = x.getDaqListInfo(idx) # optional command, but makes sense if cfg. is non-dynamic.
print(f"{idx}: {list_info}")
except Exception as e:
print(f'optional command "GET_DAQ_LIST_INFO" not supported: "{repr(e)}"')
else:
print("No PREDEFINED DAQ lists.")
num_predefined=3
x.disconnect() |
Hello, thank you for responding!! I used pip to install pyxcp, should I be cloning the entire master branch to my raspberry pi? Also, to run this script should I just enter Lastly, is there any way I can communicate with you faster on this? Thanks, aaroniza0 |
Hello, Well, there isn't a one and only default configuration file, but it looks like, you're using Linux-CAN communication in most cases works with SocketCAN, in this case install your vendor's drivers and start with The following sequence works identically with Raspberry PI/CAN Hat and BeagleBone Black/Comms Cape A2 sudo modprobe can
sudo modprobe can_raw
sudo ip link set can0 type can bitrate 500000 restart-ms 100
sudo ip link set up can0 |
No worries! We used conf_can_vector.toml because we weren't sure what to use, can we just run the python script you sent and expect an output without adding the configuration file? Also, is there a difference between performing pip install pyxcp and cloning the master branch to the raspberry pi? |
pyXCP has support for various transport-layers (CAN, ETH, USB, SXI) and within such a layer there are parameters without reasonable defaults, e.g. IP address if one is using TCP or UDP. So a configuration file is strictly required. I think it's currently better to clone the repo if you run on Linux. |
Hi!
How do I use this library?
Browsing through source, I also don't understand how it uses an .a2l to set up the client side communication, like INCA and CANoe does.
The text was updated successfully, but these errors were encountered: