Skip to content

Add support for PCAN_HARD_RESET_STATUS in SetValue #18

Description

@dafri92

The PEAK PCAN-USB FD adapter is connected to custom electronics with no other nodes on the bus.
Sometimes the firmware resets especially during testing. If a message is sent to this single node while it reboots, the internal error counter of the PEAK adapter triggers the heavy limit and the adapter switches to passive mode.

The only reliable way to recover, without unplugging the USB cable, is setting PCAN_HARD_RESET_STATUS to PCAN_PARAMETER_ON, calling .reset() and waiting for the PEAK adapter becoming ready again.
This works on Windows 11.

Unfortunately re-initializing (without unplugging the USB cable, call .shutdown() and create a new instance of the Python CAN object) still keeps the error code 0x8 set.

For this reason support for PCAN_HARD_RESET_STATUS would be great.

Using Python 3.12.5 with python-can 4.4.2 and PCBUSB 0.13 running on MacBook Air M1 (Sonoma 14.6.1).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions