-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
P2 timeout is not checked correctly when response has consecutive frame #42
Comments
Hi, |
Hi pylessard, |
Thank you for your input. Regards |
Hi pylessard, |
according to ISO-15765-3, the P2_can_client is defined as: |
ISO14229-2:2013(E) defines P2Client as
Figure 9 shows the P2Client timer being stopped at
|
Hi all, Is there a standardized timeout/interval specified when performing CAN ISO-TP requests? Specifically, I am thinking of the following intervals to be satisfied by the ECU and tester:
It is unclear to me if Further, if they are "dynamic" and depend on the specific ECU implementation, how is the |
Hi @MatinF |
Thanks for the clarification. So just to verify that I've understood this correctly:
In regards to the Timeout, it looks like this is up to 1000 ms based on the above I guess what I am unsure about is whether one can rely on the 1000 ms as a standard across all ECUs - or if this is implementation specific. If the latter is the case, do you know if there are some general conventions/good practices to follow in terms of what timings to expect? Thanks! |
Hello @MatinF,
|
Thanks for the clarification. So just to verify that I've understood this correctly:
Single frame carries an isotp frame in a single CAN message. First Frame is the begining of an isotp frame that requires multiple CAN message. So they are both the beginning of a transmission. They are unrelated.
On a additional note. If you want to be safe in your implementation, you can leave a 1 or 2 millisecond delay where there is no specification. That will ensure maximum compatibility. Regards |
Hello @pylessard, Concerning the hard-coded delay, I'm not sure to understand. The transport layer also specifies the STMin parameter (minimum separation time between two consecutive frames), which is communicated to the client/tester by the ECU trough the Flow Control frame (byte 3). Wouldn't it be the responsibility of the ECU to tell the client/tester to lower the communication speed? |
Yes, between consecutive frames. (I think) |
Just to clarify: When I mention the time between the Single Frame and First Frame, by Single Frame I refer to the "request" frame to be sent by the testing tool (which will have the same format as a Single Frame in the ISO TP context). Hence, my question was related to what the defined max timeout would be before the ECU must send the First Frame response to the request. My understanding here is that this delay may be 1000 ms in theory, but in practice it will most likely be far less (e.g. 1-10 ms). Similarly, the timeout before the Flow Control must be sent by the tester device should be 1000 ms in practice (i.e. Let me know if I missed something here. |
Hi @pylessard, I have just faced this issue during testing read dtc request. The expected data flow is as below:
Then I got the P2 timeout after 1 second. From my understanding, the lib is waiting for isotp to send receive done notification during waiting for P2 time. However, according to ISO14229-2, the P2 timeout should be the timing between tester request and first response from ECU (which is the first frame). I believe there should be another notification from isotp like start receiving notification to stop the P2 timeout. |
Just to let you know that isotp v2.x will be released soon and the possibility of doing a blocking send has been added. This will allow starting the timer at the right moment. I will see how I can bring that api up to the UDS level so it can be used across connections (that supports it) |
isotp v2.x has been released. and udsoncan 1.21 supports it. using the new parameter from isotp v2.x |
Hi, I believe the problem a still here. I am trying to read DID which is 20b long and get P2Server timeout error.
Python 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)] on win32
pip3 list annotated-types 0.6.0 |
you're not having the same issue here. Check this parameter : https://udsoncan.readthedocs.io/en/latest/udsoncan/client.html#use_server_timing |
In client.py, function send_request wait for entire response with timeout is P2 timeout. But as I know, P2 timeout is timeout to the first response(can be first frame) not entire response. So with long response, timeout error will occur
The text was updated successfully, but these errors were encountered: