Use kvaser on xavier

Due to the limit of can channels on xavier, I need to use kvaser on xavier. My kvaser type is “Kvaser USBcan Light 4xHS”, which is not in kernel_src/kernel/kernel-4.4/drivers/net/can/usb/Kconfig. So I followed the below link to update kvsaser_usb.ko.

https://devtalk.nvidia.com/default/topic/1044805/jetson-tx2/need-kvaser-driver-that-is-not-available-in-latest-source-kernel/post/5365601/#5365601

When I ran “make”, it said “No rule to make target ‘modules’”. Looks like it is due to miss the kernel header files. My kernel version is 4.14.102-rt53-tegra. Can anyone tell me how to address this issue?

Here is my make file:
obj-m += kvaser_usb.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

Many thanks!

Hi Phil.Chen,

In your https://devtalk.nvidia.com/default/topic/1070277/-lib-modules-4-14-102-rt53-tegra-build-no-such-file-or-directory/, we discussed about DRIVE Software kernel source availability. So if you are still not able to install kvaser drivers, I would suggest you to get the support from kvaser or you can do internet search if any other kvaser users have relevant experience on this. Thanks!

Thank you Vick! It works.

Good to hear you fixing your problem!

If you can share in details how you fixed your issue and other developers may benefit from it, it will better. Thanks!

Sure thing.

  1. Download the corresponding Kvaser files.
    My Kvaser device is light 4xHS. So, need to use the Kvaser c file from this link
    can: kvaser_usb: Add support for Kvaser USB hydra family · torvalds/linux@aec5fb2 · GitHub. (Note, this is 2018 version, there is some compiling issue with the 2019 version).

  2. Follow the link provided in this discussion, replace the Kvaser file under /drive-oss-src/kernel/drivers/net/can/usb on the host.

  3. Follow the link provided in this discussion, compile the kernel on the host.

  4. Copy the new built Kvaser_usb.ko file to Xavier.

1 Like