SocketCAN Driver for Linux 20.04

In this post
ECI driver and SocketCAN driver - Ixxat Support / USB To CAN - hms.how (hms-networks.com)

it was indicated that the SocketCAN driver does not support the latest Linux Kernel version and that a Beta version was under development. I see in the release notes for the driver that it indicates it can’t be built for Kernel version 5.12 and above. Does this mean that a version of SocketCAN is still not available for use with Linux and if not do you have an idea when it might be? We would like to run on Ubuntu 20.04.

Thanks

1 Like

This version should work for kernel 5.10 and newer:

SocketCAN_2_0_378_Modified_PeWu_2022-02-11.tar (3.6 MB)

2 Likes

@kyle_HMS Thank you, this installer worked for me on Ubuntu 20.04.4, kernel version = 5.13.0-51-generic. Is this version of the installer officially supported?

Can you please make this installer more accessible/visible on the Ixxat website so that users with kernel 5.12+ can install a working driver?

The existing Socket-can driver link (available at https://www.ixxat.com/technical-support/support/linux-driver-software) is broken on 5.12+

Hi @kkuzemchak,

Thanks for your suggestion! I will let the folks who manage the website know about this and ask if they can include the new version. I will also ask if it’s now officially supported and let you know.

Best Regards,

Kyle

The developer is out this week, but we have submitted a bug report and this should be updated soon.

Thanks, @kyle_HMS!

Update: The Socketcan driver provided above does successfully compile and install on both Ubuntu 20.04 and 22.04. I was also able to confirm that it works as expected with the python-can library on a machine running Ubuntu 22.04.

However, there is still an issue actually using the driver on Ubuntu VM’s (both 20.04 and 22.04) - it causes a segfault when I try bringing the CAN device up.
I’m using VMWare Workstation 16 on a Windows 10 host machine. This is the behavior I’m seeing:

  • (good) Command ip link list - device appears as can0

  • (good I think?) Command sudo ip link set can0 type can bitrate 500000 - no message/effect, but this is just a configuration command so I think it’s working as intended

  • (BAD) Command sudo ip link set can0 up - causes segfault

  • (BAD) Combining 2 previous commands: sudo ip link set up can0 type can bitrate 500000 - causes segfault

What hardware are you using for the CAN interface?

Ixxat USB-to-CAN V2 compact

Sorry for the delay, I was traveling and didn’t see your post. Do you have VMWare Tools installed on the VMs?

Hello,

I have the same problem with my VM with ubuntu 20.04 and kernel 5.15.

I installed as you told in the last post: the VM tools, but when I up the can0 it’s appear a segmentation fault.

i installed the driver you post for the kernel 5.13.

The can0 appear when I do « ip link list », the configuration is ok.

Have you an idea to solve the segmentation fault?

Best regards

Can you try with this version of SocketCAN?

Thank you I will try this one tomorrow and tell you if it’s good or not.

Hi I’ve just tested and it works.

Thank you.

1 Like

Great! The fix will be included in the next “official” release.

1 Like

I am currently trying to write a c++ program to open port usb-can device for ubuntu linux.
I just realized that I need to enter below command everytime open port and write something to CAN bus.

sudo ip link set up can0 type can bitrate 500000
sudo ip link set can0 up

It works find however I need to embed this command into the program so that it automatically open the device with specific bitrate. How can I do that? Any example code available for this kind of operation?
Thanks,

This demo may be helpful:

Thanks for your help.
I will give it a try.

I also noticed that my old USB-to-CAN compact isn’t supported by the above linux driver.
My ubuntu 20.04 won’t recognize the device.

I attached a screen shot about the device when connected to windows 11.
Do you also have drivers for this good old device as well?

image

These old USB-to-CAN (V1 - obsolete since 2014) devices do not have firmware in the flash, only a bootloader, and it looks like you have the latest bootloader. I’m actually surprised that it is working with W11. They only officially support up to W8.