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

Cannnot receive can-fd message with PCAN #1859

Open
tsukasa19910921 opened this issue Sep 13, 2024 · 1 comment
Open

Cannnot receive can-fd message with PCAN #1859

tsukasa19910921 opened this issue Sep 13, 2024 · 1 comment
Labels

Comments

@tsukasa19910921
Copy link

Describe the bug

I am trying to receive CAN-FD messages using the PCAN interface. However, an error occurs during initialization, and I cannot proceed with receiving messages in CAN-FD mode.

To Reproduce

import can
self.can_bus0 = can.interface.Bus(channel='PCAN_USBBUS1', bustype='pcan', bitrate=500000, data_bitrate=2000000, fd=True)

Upon running this initialization, the following error occurs:
raise PcanError(self._get_formatted_error(result))
can.interfaces.pcan.pcan.PcanError: An unknown error has occurred

Expected behavior

The CAN interface should initialize correctly in CAN-FD mode and allow message reception.

Additional context

OS and version: Windows 10
Python version: 3.6.8
python-can version: 3.3.4
python-can interface: PCAN (PCAN-USB)

Traceback and logs import can self.can_bus0 = can.interface.Bus(channel='PCAN_USBBUS1', bustype='pcan', bitrate=500000, data_bitrate=2000000, fd=True)

Traceback:
raise PcanError(self._get_formatted_error(result))
can.interfaces.pcan.pcan.PcanError: An unknown error has occurred

@tsukasa19910921
Copy link
Author

I am experiencing an additional issue when initializing the CAN bus using the following command:

bus = can.interface.Bus(bustype='pcan', channel='PCAN_USBBUS1’, bitrate=500000, state=can.bus.BusState.ACTIVE)

When this command is executed, the following error occurs:

Bus error: an error counter reached the 'heavy'/'warning' limit

This seems to be related to a bus error, and I would like to report this as an additional problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant