Page 1 of 1

PCAN-USB interface setup

Posted: Wed 29. Sep 2021, 13:58
by nishad-ovgu
I have manually installed the pcan driver (peak-linux-driver-8.12.0) on a linux system -- Linux version 4.15.0-142-generic (buildd@lgw01-amd64-039) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12).
After the installation /proc/pcan command output is as follows:

Code: Select all

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20210505_n (8.12.0) Sep 29 2021 12:40:35 --------------
*---------------------- [mod] [isa] [pci] [pec] [usb] -----------------------
*--------------------- 1 interfaces @ major 241 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb   -NA- ffffffff 000 0x001c 00000000 00000000 00000000 00000000 0x0000
The receive test does not print any received message as mentioned in the manual until interrupted using ctrl+C. The receive test output is as follows:

Code: Select all

receivetest Version "Release_20150611_n"  (www.peak-system.com)
------- Copyright (C) 2004-2009 PEAK System-Technik GmbH ------
receivetest comes with ABSOLUTELY NO WARRANTY.     This is free
software  and you are welcome  to redistribute it under certain
conditions.   For   details   see    attached   COPYING   file.

receivetest: device node="/dev/pcan32"
             Only standard frames are accepted, init with 500 kbit/sec.
receivetest: driver version = Release_20210505_n
826962911.323 receivetest: x - 0x00000001 4 00 00 00 00 
receivetest: pending CAN status 0x0020 read.
^Creceivetest: type            = usb
             Serial Number   = 0xffffffff
             Device Number   = 0
             count of reads  = 1
             count of writes = 0
             count of errors = 0
             count of irqs   = 144
             last CAN status = 0x0000
             last error      = 0
             open paths      = 1
             driver version  = Release_20210505_n
receivetest: finished (0): 1 message(s) received
As it can be seen that there is not error received and so does the /proc/pcan command show. The ouput after running the transmit test is as follows:

Code: Select all

transmitest Version "Release_20150610_n"  (www.peak-system.com)
------- Copyright (C) 2004-2009 PEAK System-Technik GmbH ------
transmitest comes with ABSOLUTELY NO WARRANTY.     This is free
software  and you are welcome  to redistribute it under certain
conditions.   For   details   see    attached   COPYING   file.

transmitest: device node="/dev/pcanusb32"
             Only standard frames are sent, init with 500 kbit/sec.
             Data will be read from "transmit.txt".
transmitest: driver version = Release_20210505_n
^Ctransmitest: type            = usb
             Serial Number   = 0xffffffff
             Device Number   = 0
             count of reads  = 2
             count of writes = 579
             count of errors = 150544
             count of irqs   = 26267
             last CAN status = 0x0009
             last error      = 0
             open paths      = 1
             driver version  = Release_20210505_n
transmitest: finished (0).
Now the/ proc/pcan shows some 27000 errors. I am not sure if my driver installation is incomplete or there is something to be changed. Any help will be appreciated.

Thank You.

Re: PCAN-USB interface setup

Posted: Wed 29. Sep 2021, 17:29
by M.Maidhof
Hi,

please check that you have termination resistors in your CAN cables. Are you sure your connected CAN bus uses 500kBit/s and only standard 11bit CAN IDs?

regards

Michael

Re: PCAN-USB interface setup

Posted: Thu 30. Sep 2021, 14:03
by nishad-ovgu
Hi,

Yes, the termination resistors are connected. You are right the CAN bus uses 1MBit/s. Now the sent message is printed on the Receive test result.

Thanks

Re: PCAN-USB interface setup

Posted: Thu 30. Sep 2021, 15:34
by M.Maidhof
Hi,

yes, the bitrate must be set to the needed value of your connected CAN system.

regards

Michael