Skip to content

USB2CAN interface: Incomplete initialization #465

Closed
@acolomb

Description

@acolomb

I just tried to use the USB2CAN interface under Windows (the same device works fine with SocketCAN on Linux). It took some fiddling with the usb2can.dll available from 8devices, which is apparently 32-bit only and therefore only works in a 32-bit Python. I've mailed them about that issue.

However, after getting that it to work under 32-bit Python, the bus usage in my application fails. I traced it down to the can.interfaces.usb2can.Usb2canBus constructor not having a _filters member. That should be set in the base class constructor, can.BusABC.__init__(). In contrast to the other interfaces modules, the call to the parent class constructor is missing.

I adapted the code from the pcan interface, but I'm not sure whether the call should happen at the beginning or at the end of the Usb2canBus constructor. Let me know if you'd like a PR with the hacked version I am currently running.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions