PCBUSB-Library icon indicating copy to clipboard operation
PCBUSB-Library copied to clipboard

PCAN-USB FD (IPEH-004022) cannot be initialized

Open mac-can opened this issue 2 years ago • 5 comments

Peak-System GmbH has released a new product variant of its PCAN-USB FD interfaces (item no. IPEH-004002). These interfaces cannot be operated with the PCBUSB library for macOS. The initialization of such an interface - in CAN 2.0 mode as well as in CAN FD mode - fails with error code 0x4000000 (PCAN_ERROR_INITIALIZE).

mac-can avatar Nov 05 '22 20:11 mac-can

Peak-System GmbH has released a new product variant of its PCAN-USB FD interfaces (item no. IPEH-004002). These interfaces cannot be operated with the PCBUSB library for macOS. The initialization of such an interface - in CAN 2.0 mode as well as in CAN FD mode - fails with error code 0x4000000 (PCAN_ERROR_INITIALIZE).

Hot fix*: macOS_Library_for_PCANUSB_v0.11.3.pre1.tar.gz

*) can only be used with the new product variant of PCAN-USB FD interfaces!

mac-can avatar Nov 06 '22 19:11 mac-can

Device: PCAN-USB FD IPEH-004002 (Firmware: v3.4.3 latest) Host: M1 Ventura 13.5.2 library version: v0.12.1 (latest)

Hello, I cannot initialize the device correctly using the latest version of the library, I tried python example, Monitor and python-can, same error: Error 4000000: A PCAN Channel has not been initialized yet or the initialization process has failed

➜  can_test ./can_test -T
CAN Tester for PCAN-USB Interfaces, Version 0.5.7.1791 (macOS)
Copyright (C) 2007,2012-2023 by UV Software, Berlin

This software is freeware without any warranty or support!

Hardware=PCAN-USB1...available (DeviceId=0xffffffff)
Number of present CAN interfaces=1
➜  can_test cd -                                                  
~/PCBUSB/Examples/Python
➜  Python python3 pcbusb_recv.py
PCBUSB 0.12.1.1768
(IOUSBKit, arm64)
Copyright (C) 2012-2023 by
UV Software, Berlin, Germany
Error: (0, b'A PCAN Channel has not been initialized yet or the initialization process has failed')

firmianay avatar Sep 14 '23 09:09 firmianay

Question: Did you get the same error when calling the CAN Tester utility program can_test with a device channel argument?

makemake@uv-pc014mac can_test % ./can_test PCAN-USB1 -v

Then the rootcause could be that Apple removed /usr/local/lib from the library search path; see issue 737920 in the Developer Forum.

If not, then I guess something went wrong when taking over the hot fix (see above) into the main branch. But I cannot test this, because I didn`t have a "new" PCAN-USB FD device.

mac-can avatar Oct 21 '23 10:10 mac-can

Yes, it works fine with the hotfix version above, but not the mainline version.

If not, then I guess something went wrong when taking over the hot fix (see above) into the main branch. But I cannot test this, because I didn`t have a "new" PCAN-USB FD device.

firmianay avatar Oct 23 '23 01:10 firmianay

Thanks for confirming the issue. A "new" PCAN-USB FD device for debugging and fixing will arrive to me soon.

mac-can avatar Oct 23 '23 13:10 mac-can

Fixed with version 0.12.2

mac-can avatar Aug 23 '24 20:08 mac-can