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

UDS-Scanner - Add packet delay #3942

Closed
Loris1123 opened this issue Mar 16, 2023 · 4 comments · Fixed by #4362
Closed

UDS-Scanner - Add packet delay #3942

Loris1123 opened this issue Mar 16, 2023 · 4 comments · Fixed by #4362
Assignees

Comments

@Loris1123
Copy link
Contributor

Hi all,

currently, I'm investigating an ECU, which has some issues when too many packets are being sent. Maybe some buffers are running full. The ECU stops responding, a restart is required.
This also happens when using UDS_Scanner.

I solved this by adding a small sleep in /scapy/contrib/automotive/scanner/enumerator.py

def execute(self, socket, state, **kwargs):
    [...]
    for req in it:
        time.sleep(0.05)
        res = self.sr1_with_retry_on_error(req, socket, state, timeout)
    [...]

I don't know if this is a widespread issue, but maybe it's useful adding a configurable packet delay to UDS_Scanner

@polybassa
Copy link
Contributor

Thanks for the feedback. Could you please submit a PR? I think a proper name for such an argument would be inter to follow the naming of Scapys sr1 function. Also, the sleep should be after the sr1 function inside the execute.

However, I'm wondering why your ECU is not slowing down the communication with the FlowControl options on ISOTP. Are your sure, the bug in your ECU is related to UDS and not to ISOTP?

@polydroi
Copy link

Another question,

have you tried to use the argument

:param frame_txtime: Separation time between two CAN frames during send

on your ISOTPSocket?

@polybassa
Copy link
Contributor

Closed because of inactivity

@polybassa polybassa reopened this Apr 10, 2024
@polybassa
Copy link
Contributor

Actually, I will provide a pr soon

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

Successfully merging a pull request may close this issue.

3 participants