Low PCAN-USB throughput versus PCAN-USB FD?

This forum covers PCAN-Linux and Linux development issues concerning our products

Low PCAN-USB throughput versus PCAN-USB FD?

Postby awilke » Wed 13. Feb 2019, 02:33

I have two PEAK CAN dongles: a regular grey PCAN-USB, and a black PCAN-USB FD. I am seeing big differences in max throughput between the two dongles and I'm not sure why.

Background: I am running Ubuntu 18.04 in a virtual machine, and I have a custom application which uses SocketCAN to transfer data as quickly as possible. I cannot achieve bus loads higher than ~20% or so with PCAN-USB, while PCAN-USB FD is easily able to reach ~85% bus load.

I then tried using cangen to generate maximum bus load:
Code: Select all
cangen can0 -g 0

This has a similar result: PCAN-USB maxes out at 20%, while PCAN-USB FD achieves 98% bus load. (The CAN bus only has one other node, and that node is only transmitting a single 1Hz frame.)

I also have a Windows 10 virtual machine on the same physical machine. Using PCAN Explorer 6, I can generate 100% bus load with PCAN-USB. So PCAN-USB itself is clearly capable of maximum throughput on this machine, but something on the Linux side seems to be preventing higher bus loads.

I'm not sure where to look to diagnose this. Is there a known cause for this sort of issue?

My /etc/network/interfaces contains this interface config:
Code: Select all
allow-hotplug can0
iface can0 can static
    restart-ms 100
    bitrate 500000
    up ip link set $IFACE txqueuelen 4000

Thanks!
Alex
awilke
 
Posts: 3
Joined: Wed 13. Feb 2019, 02:14

Re: Low PCAN-USB throughput versus PCAN-USB FD?

Postby M.Maidhof » Wed 13. Feb 2019, 09:46

Hi,

can you please test with a real Linux (no VM) on the same system, using an USB boot stick, just to see if it is a VM related problem. Sure you have installed all necessary VM extension in your Linux system?

BTW: PCAN-USB uses a USB1.1 controller, while PCAN-USB FD uses a USB2.0 controller

regards

Michael
M.Maidhof
Support
Support
 
Posts: 1140
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Re: Low PCAN-USB throughput versus PCAN-USB FD?

Postby awilke » Tue 19. Feb 2019, 20:13

Unfortunately the VMs are running on a Mac, so I can't run Linux natively. I was able to repeat this test on a different machine running the same version of Linux natively, and saw 100% bus load. So I suspect that the virtual machine software may not have good support for USB 1.1 devices. I'll pursue this avenue further. Thanks!
awilke
 
Posts: 3
Joined: Wed 13. Feb 2019, 02:14

Re: Low PCAN-USB throughput versus PCAN-USB FD?

Postby awilke » Fri 15. Mar 2019, 19:17

I'm following up on the solution for this, in case someone else has the same issue.

We are using Parallels Desktop virtual machines, and Parallels was not choosing the correct USB speed for the PCAN-USB device. Manually setting the speed in the VM boot flags fixed the issue: https://forum.parallels.com/threads/slow-usb-connection.346036/. In this case, the boot flag used was "devices.usb.speed.0c72:000c=3".

Thanks again!
awilke
 
Posts: 3
Joined: Wed 13. Feb 2019, 02:14


Return to Linux



cron

This website uses cookies for analytics, for logins to the online shop and the forum, and for the handling of an order. By browsing this website you agree to the use of cookies. Detailed information on their use can be found in our privacy policy.

OKPrivacy Policy