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

ERR_CMD_UNKNOWN #146

Open
oleid opened this issue Sep 20, 2023 · 1 comment
Open

ERR_CMD_UNKNOWN #146

oleid opened this issue Sep 20, 2023 · 1 comment

Comments

@oleid
Copy link

oleid commented Sep 20, 2023

Hey,

I'm trying to connect to a device via XCP/TCP and get a crash due to an unknown command:

$ python xcphello.py -c conf_eth.toml  -d -l DEBUG
DEBUG:pyxcp.transport.Base:CONNECT
DEBUG:pyxcp.transport.Base:-> [02 00 00 00 ff 00]
DEBUG:pyxcp.transport.Base:<- L8 C605 [ff 04 81 fe 02 00 01 01]
DEBUG:pyxcp.transport.Base:GET_COMM_MODE_INFO
DEBUG:pyxcp.transport.Base:-> [01 00 01 00 fb]
DEBUG:pyxcp.transport.Base:<- L8 C606 [ff 04 00 fe 00 00 00 15]
DEBUG:pyxcp.transport.Base:GET_ID
DEBUG:pyxcp.transport.Base:-> [02 00 02 00 fa 01]
DEBUG:pyxcp.transport.Base:<- L2 C607 [fe 20]
ERROR:pyxcp.errorhandler:XcpResponseError [ERR_CMD_UNKNOWN]
Try to handle error -- Service: GET_ID Error-Code: ERR_CMD_UNKNOWN
ERROR:pyXCP:Traceback (most recent call last):
  File "/home/user/src/pyxcp/pyxcp/examples/xcphello.py", line 33, in <module>
    identifier = x.identifier(0x01)
                 ^^^^^^^^^^^^^^^^^^
  File "/home/user/venv/lib/python3.11/site-packages/pyxcp/master/master.py", line 1821, in identifier
    gid = self.getId(id_value)
          ^^^^^^^^^^^^^^^^^^^^
  File "/home/user/venv/lib/python3.11/site-packages/pyxcp/master/errorhandler.py", line 398, in inner
    res = executor(inst, func, arguments)

I'm new to the XCP world, so any pointers would be highly appreciated.

Thanks a lot!

@christoph2
Copy link
Owner

Just comment out
# identifier = x.identifier(0x01)
and three lines below
# print(f"ID: '{identifier}'")

While optional, XCP slaves usually ship with a GET_ID implementation -- this is not the case here.
You may also try the --daq-info option.
python xcphello.py -c conf_eth.toml -d -l DEBUG --daq-info
If there is a ERR_ACCESS_LOCKED error, just ask.

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