Skip to content

gs_usb does not support set_bitrate() for some Candlelight devices #1747

Closed
@tuwuhs

Description

@tuwuhs

Describe the bug

Cannot set bitrate for some Candlelight devices. I'm using MKS CANable V2.0 Pro board with Candlelight firmware.

To Reproduce

Demonstrated here on an interactive session:

>>> import usb
>>> import can
>>> dev = usb.core.find(idVendor=0x1d50, idProduct=0x606f)
>>> bus = can.Bus(interface='gs_usb', channel=dev.product, bus=dev.bus, address=dev.address, bitrate=1000000)
>>> bus.gs_usb.set_bitrate(1000000)
False

Expected behavior

bus.gs_usb.set_bitrate(1000000) returns True.

Additional context

OS and version: Windows 10
Python version: 3.9.15
python-can version: main (@d40915ca)
python-can interface/s (if applicable):

The board works perfectly fine in Linux / SocketCAN, bitrate can be set through ip link command as is usual with native SocketCAN devices.

Traceback and logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions