Skip to content

PCAN fails when PCAN_ERROR_ILLDATA is read via ReadFD #1849

@bures

Description

@bures

Describe the bug

When there is an invalid frame on CAN bus (in our case CAN FD), PCAN first reports result PCAN_ERROR_ILLDATA and then it send the error frame. If the PCAN_ERROR_ILLDATA is not ignored, python-can throws an exception.

To Reproduce

A packet like the one in this screenshot has to be received.
image

Expected behavior

python-can should ignore the PCAN_ERROR_ILLDATA because it carries no useful information. The error can be then detected by the error frame which PCAN generates right after.

Additional context

OS and version: Windows 11
Python version: Python 3.12
python-can version: Latest commit in main - c712131
python-can interface/s (if applicable): PCAN-USB FD (using pcan interface)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions