richClubb / python-uds

A uds library for python
MIT License
99 stars 55 forks source link

P2_CAN_Client implementation is not correct #52

Closed kaizh102 closed 2 years ago

kaizh102 commented 4 years ago

per ISO 15765-3, the P2_CAN_Client is the time between below two events:

Current implementation seems to be the between tester sent out diagnostic request and ECU sent out all the responses (first frame and all the consecutive frames).

This is causing the module raise timeout error when ECU is responding with multiple frames for one diagnostic request.

mamert commented 3 years ago

Hi, @leo102, please check if this helps: https://github.com/mamert/python-uds/tree/P2_CAN_Client_fix Every matched frame received resets the timer - so we can still legitimately time out between consecutive frames.

kaizh102 commented 2 years ago

Hi, @leo102, please check if this helps: https://github.com/mamert/python-uds/tree/P2_CAN_Client_fix Every matched frame received resets the timer - so we can still legitimately time out between consecutive frames.

It worked. Can you help commit this change to the main branch?

mamert commented 2 years ago

Can you help commit this change to the main branch?

Sure, PR created

Can I interest you in callbacks for the 0x78 PENDING response, as well?