PCAN-USB stops receiving data on Ubuntu

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
cyrodox
Posts: 1
Joined: Wed 21. Feb 2018, 21:47

PCAN-USB stops receiving data on Ubuntu

Post by cyrodox » Wed 21. Feb 2018, 21:55

Hello,

I've worked the last few weeks with my USBCAN and I've reached the end of my troubleshooting. My experience so far has been hit or miss. I have a kvaser unit that has been my primary. I have not been able to receive data reliably through my PCAN device. I'm using it on a live can bus to read & inject data into vehicular networks. I can do socketcan commands like cangen which work fine, but once plugged into a vehicle it only lasts ~30s.

I've used the built-in drivers with Ubuntu & configured the netdev option as well. Net-dev allows me to send and receive(which was an issue before) but it still times out.

Here is my dmesg output:

Code: Select all

[ 6077.076053] pcan: PCAN-USB channel device number=255
[ 6077.076877] pcan: registered CAN netdevice can0 for usb hw (245,32)
[ 6077.076879] pcan: usb device minor 32 found
[ 6293.548488] pcan: Tx fifo full: frame 2b8 dropped, net queue stopped
[ 6525.591582] pcan: Tx fifo full: frame 3f6 dropped, net queue stopped
[ 9418.268696] vcan: Virtual CAN interface driver
[ 9761.425087] pcan: Tx fifo full: frame 201 dropped, net queue stopped
[10248.788250] pcan: Tx fifo full: frame 82 dropped, net queue stopped
uname -a

Code: Select all

Linux samvm-VirtualBox 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Any help would be appreciated! My cables are properly terminated and I've been able to use the hardware with Windows, but I need Linux support for my project.

Thank you!

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

Re: PCAN-USB stops receiving data on Ubuntu

Post by S.Grosjean » Thu 22. Feb 2018, 10:11

Hello,

If you want to run socket-CAN, why don't you use the peak_usb mainline driver instead?

Running a VM, it's the preferred method for getting access to the CAN bus through a USB adapter. Please uninstall pcan ($ sudo make uninstall). Then type:

Code: Select all

$ sudo modprobe peak_usb
Note that running a VM does not guarantee optimal conditions, especially if you need to handle high busload.

Regards,

Stéphane
— Stéphane

Post Reply