Skip to content
This repository has been archived by the owner on Sep 12, 2020. It is now read-only.

What is the proper error response to send during an ISO-TP timeout? #1

Open
brandonros opened this issue Jul 26, 2019 · 1 comment
Open

Comments

@brandonros
Copy link

The question isn't specific to your code base, but I can tell by the high quality of your code and thorough understanding of all of the protocols at play, you probably stand a good chance of helping.

return Err(Error::Timeout);

I have my own version of an ISO-TP/CAN/UDS server in node.js

Sometimes, the device I'm interfacing with fails to properly complete an ISO-TP request. Whether it is taking too long for flow control frame or the consecutive frames themselves not coming across quickly enough, I'm not sure if me acting as the ECU is supposed to send:

a) no response

or b) a 0x7F failure (with what error response code? I can't find one that I would expect to exist for "general failure/please retry")

Are CAN interfaces not supposed to be so generally unreliable? Do I maybe have a bigger problem with my drivers?

@jcmnn
Copy link
Member

jcmnn commented Jul 26, 2019

Are you getting no response when sending multi-frame packets? When sending frames too quickly with certain interfaces, some of them might get dropped.

When sending the flow control frame, zero all the fields for the shortest delay (so the frame will be 03 00 00.

Some ECUs drop frames that aren't padded to 8 bytes (pad it with 0s).
So instead of sending e.g. 40 13 32 45 65, send 40 13 32 45 65 00 00 00.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants