PCAN driver rx issue on linux [ ubuntu 14.04]

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
parai
Posts: 4
Joined: Tue 10. Nov 2015, 04:03

PCAN driver rx issue on linux [ ubuntu 14.04]

Post by parai » Fri 13. Nov 2015, 09:49

Hello:
I have built and installed the pcan linux driver with version 7.15.2, I can use the pcanbasic library to transmit messages but I can't receive any message by the API Can_Read.
so can you tell me what's wrong and how to fix?

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN driver rx issue on linux [ ubuntu 14.04]

Post by M.Maidhof » Fri 13. Nov 2015, 11:06

Hi,

please post the output of cat /proc/pcan

could be a typical chardev/netdev issue like:

http://www.peak-system.com/forum/viewto ... rdev#p4092
or
http://www.peak-system.com/forum/viewto ... rdev#p3270

PCANBasic will only work on a chardev driver.

regards

Michael

parai
Posts: 4
Joined: Tue 10. Nov 2015, 04:03

Re: PCAN driver rx issue on linux [ ubuntu 14.04]

Post by parai » Mon 16. Nov 2015, 02:33

Here is the cat /proc/pcan result
*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20150729_n (7.15.2) Nov 13 2015 16:22:52 --------------
*---------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net] -----------
*--------------------- 1 interfaces @ major 248 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb can0 ffffffff 255 0x001c 00000000 00000000 00000000 00000000 0x0000

so according to your reply, should I build the driver as chardev? or there is other way to fix this issue, can you give any sample code use the netdev to send and receive message?

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN driver rx issue on linux [ ubuntu 14.04]

Post by M.Maidhof » Mon 16. Nov 2015, 10:38

Hi,

PCANBasic API will only work with the chardev driver. When you want to work with the NetDev/SocketCAN driver, you can use the can-utils tools.

See:
http://www.peak-system.com/forum/viewto ... t=256#p723
http://www.peak-system.com/forum/viewto ... 3673#p3673

regards

Michael

Post Reply