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

help me about DID scanning #19

Closed
daytona675 opened this issue Aug 25, 2022 · 2 comments
Closed

help me about DID scanning #19

daytona675 opened this issue Aug 25, 2022 · 2 comments

Comments

@daytona675
Copy link

Hi Jacob,
i don't know how to scan DID with DoiPClient library.
I use this piece of code:
from doipclient.connectors import DoIPClientUDSConnector
from udsoncan.client import Client, Request

uds_client = Client(uds_connection)
with Client(uds_connection, request_timeout=2) as client:
try:
client.read_data_by_identifier_first([0xF190])
except NegativeResponseException as e:
print('Server refused our request for service %s with code "%s" (0x%02x)' % (e.response.service.get_name(), e.response.code_name, e.response.code))
except (InvalidResponseException, UnexpectedResponseException) as e:
print('Server sent an invalid payload : %s' % e.response.original_payload)
and when I run this script I 've this error:
[ConfigError] : Actual data identifier configuration contains no definition for data identifier 0xf190
[ConfigError] : Actual data identifier configuration contains no definition for data identifier 0xf190

For me that normal, because I've don't initiate the config dictionnary with right parameters for this record.

But my aim is to discovers services and DID in UDS so how to define something I don't know at the beginning ?

So if you can help me ? many thanks by advance :)

@jacobschaer
Copy link
Owner

This question is better suited to the udsoncan project as DID's are not DoIP related. But from what I recall there is no such service in UDS. You're only options are to:

  1. Know the DIDs because you're the OEM and the define the config struct accordingly
  2. Have access to a definition file like ODX which defines these things in a machine readable format
  3. Fuzz the network and figure out from the errors what ID's are valid in any given session and what their buffer sizes are

@daytona675
Copy link
Author

daytona675 commented Aug 29, 2022 via email

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