Sending and receiving messages does not work on Ubuntu 18.04

CAN FD Interface for PCI Express
Post Reply
peak_can_user
Posts: 1
Joined: Thu 28. Nov 2019, 11:54

Sending and receiving messages does not work on Ubuntu 18.04

Post by peak_can_user » Thu 28. Nov 2019, 12:18

My Cancard-PCI Exrpess FD does not send or receive messages on any of the 4 CANs on Ubuntu 18.04.3 LTS

I installed the driver version 8.9.3 like this:

Code: Select all

sudo rmmod pcan
make clean
make NET=NETDEV_SUPPORT
sudo make install
sudo modprobe pcan
if I setup the any of the interfaces with:

Code: Select all

ip link set can1 type can bitrate 500000
ip link set can1 up
A message sent with:

Code: Select all

cansend can1 123#
apears in

Code: Select all

candump can1 
     can1  123   [0] 
but does not show up on the physical bus.

This is what I get form /proc/pcan

Code: Select all

*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20191029_n (8.9.3) Nov 27 2019 13:39:45 --------------
*---------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net] -----------
*--------------------- 5 interfaces @ major 240 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
 0  pcifd   can1 82441000 016 0x001c 00000000 00000002 00000001 00000000 0x0000
 1  pcifd   can2 82442000 016 0x001c 00000000 00000006 00000001 00000000 0x0000
 2  pcifd   can3 82443000 016 0x001c 00000000 00000002 00000001 00000000 0x0000
 3  pcifd   can4 82444000 016 0x001c 00000000 00000002 00000001 00000000 0x0000
When sending messages via the USB interface everything works.


Is there something that I do worng with the PCI-Exress card?

Thanks for your help

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Sending and receiving messages does not work on Ubuntu 1

Post by S.Grosjean » Thu 28. Nov 2019, 13:39

Hi,

Could you connect another CAN channel (for example "can2") to the same bus than "can1", configure it like "can1", then do "candump can2" please?

Other suggestion: could your rebuild pcan but not in netdev mode, that is:

Code: Select all

$ cd peak-linux-driver-8.9.3
$ sudo make uninstall
$ make clean
$ make
$ sudo make install
Then write the same frame to the bus but with:

Code: Select all

$ pcanfdtst tx -b 500k -i 0x123 -l 0 -n 1 /dev/pcanpcifd0
If the 2nd channel is always connected to the same bus, from another window, you can check if the above frame has been written with:

Code: Select all

$ pcanfdtst rx -b 500k -n 1 /dev/pcanpcifd1
Regards,
— Stéphane

Post Reply