Page 1 of 1

pcanread not printing CAN messages

Posted: Wed 10. Aug 2016, 15:59
by remgev
I have installed the PEAK Linux driver for the NetDev interface and have been able to successfully capture the heartbeat of one of our current drives through the PCAN-USB hardware (as is evident in the candump output). Unfortunately, the example c++ pcanread file does not seem to display the same heartbeat, and it returns a status of 0, which according to PCANBasic.h means:

#define PCAN_ERROR_OK 0x00000 // No error

My /proc/pcan file looks like this:

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20150729_n (7.15.2) Aug 10 2016 15:28:58 --------------
*---------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net] -----------
*--------------------- 1 interfaces @ major 244 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb can0 ffffffff 001 0x001c 00000003 00000000 000004b7 00000000 0x0000

Attached is a picture of the pcanread and candump output. Any idea how to fix this?

Re: pcanread not printing CAN messages

Posted: Wed 10. Aug 2016, 17:29
by M.Maidhof
Hi,

PCANbasic API will only work with the chardev driver. See also:

http://www.peak-system.com/forum/viewto ... =41&t=1514

regards

Michael