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

Getting dlc not set to 8 as expected when using client.session(1) #139

Open
Nishanth-cts opened this issue Mar 24, 2025 · 5 comments
Open

Comments

@Nishanth-cts
Copy link

Hello Pylessard, after setting isotp parameters for vn1640a, and trying to enter into default session using client.session(1) in my canalyzer trace I see I get dlc is not set to 8 as expected and hence response to my 10 01 request I am unable to see. Could you kindly let me know where I am going wrong?

@Nishanth-cts
Copy link
Author

Attached above are the isotp, client configuration as well as uds request sent.

@pylessard
Copy link
Owner

@Nishanth-cts
First of all stop sending pictures of your screen. Just copy paste the relevant piece of code.

Second, DLC of 8 is not required. If you want a dlc of 8 bytes, you can set a tx_data_min_length parameter.

Also, you are making very reckless usage of threads. Running a thread that reads you can box may deplete the internal buffer and stop messages from reaching the isotp stack. You can add a listener that prints instead of using a thread.

You should also read about threading.Event object. Instead of using a global variable and doing sleep(1). You can just do event.wait() in your isotp thread and event.set() in your tkinter thread. It will react in microseconds and avoid bloating your cpu.

@Nishanth-cts
Copy link
Author

Hello Pysellard,
Thanks for the valuable input it seems that now i am able to send the diagnostic request. But, when

Image

i am trying to send 22 40 B5 request using client.read_data_by_identifier(0x40B5) I get a config error saying that 40B5 DID is not found. Could you kindly let me know how to handle read data by identifier such that I can send my own DID's to be read?. Attached below is the code snippet:

@Nishanth-cts
Copy link
Author

Nishanth-cts commented Mar 27, 2025

Image

Hello Pylessard,
Thanks very much it works. I just have one last question. When i try to First enter into default session using client.change_session(1) followed by client.change_session(3) I only see response for 10 01 but not for 10 03.
Could you kindly let me know how to handle such scenarios where consecutive UDS requests have to be sent.

Image
Image

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