PCAN-USB driver installation issue

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
jerinj89
Posts: 3
Joined: Wed 5. Jun 2024, 09:55

PCAN-USB driver installation issue

Post by jerinj89 » Wed 5. Jun 2024, 10:18

Hi,
I am facing an error while installing PCAN-USB driver on KALI Linux.

(root㉿kali)-[~]# uname -a
Linux kali 6.6.9-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.6.9-1kali1 (2024-01-08) x86_64 GNU/Linux

(root㉿kali)-[~]# grep PEAK_ /boot/config-`uname -r`
CONFIG_CAN_PEAK_PCIEFD=m
CONFIG_CAN_PEAK_PCI=m
CONFIG_CAN_PEAK_PCIEC=y
CONFIG_CAN_PEAK_PCMCIA=m
CONFIG_CAN_PEAK_USB=m

Since the driver is a separate module, I am installing it as mentioned in documentation
https://www.peak-system.com/fileadmin/m ... an_eng.pdf

System Requirements are satisfied and on installing the binaries, downloaded driver version 8.18.0, extracted and on make clean command it throws error,

──(root㉿kali)-[~]
└─# cd Downloads/peak-linux-driver-8.18.0

┌──(root㉿kali)-[~/Downloads/peak-linux-driver-8.18.0]
└─# make clean
make[1]: Entering directory '/root/Downloads/peak-linux-driver-8.18.0/driver'
Makefile:131: *** "Unable to automatically find the Kernel headers. These are mandatory to build the pcan driver. Please set the KERNEL_LOCATION variable to the root directory of your own built Kernel.". Stop.
make[1]: Leaving directory '/root/Downloads/peak-linux-driver-8.18.0/driver'
make: *** [Makefile:95: clean] Error 2

Kindly help me to resolve this issue.

Note: I am a beginner in LINUX environment, tried PCAN-USB over windows and it works flawlessly. :)

Thank you in advance!

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-USB driver installation issue

Post by M.Heidemann » Wed 5. Jun 2024, 10:33

Hello!

Seems you are missing the kernel headers!

Try installing them first:

Code: Select all

sudo apt-get install –y linux-headers-$(uname -r)
And then try installation again.
Note: I am a beginner in LINUX environment, tried PCAN-USB over windows and it works flawlessly. :)
We all have been there, don't worry.

Please let me know if you need further assistance!

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

jerinj89
Posts: 3
Joined: Wed 5. Jun 2024, 09:55

Re: PCAN-USB driver installation issue

Post by jerinj89 » Wed 5. Jun 2024, 15:06

Hello!

thank you for the quick solution.
the kernel headers are now installed.

I could build and then install the drivers by following the documentation.
But on command dmesg | grep pcan, i find an issue.

└─$ dmesg | grep pcan
[ 46.832399] pcan: loading out-of-tree module taints kernel.
[ 46.832410] pcan: module verification failed: signature and/or required key missing - tainting kernel
[ 46.834534] pcan: Release_20240521_n (le)
[ 46.834535] pcan: driver config [mod] [isa] [pci] [pec] [usb] [net]
[ 46.834934] usbcore: registered new interface driver pcan
[ 46.834937] pcan: major 245.
[ 4488.255410] usbcore: deregistering interface driver pcan
[ 4488.255877] pcan: removed.
[ 4508.623111] pcan: Release_20240521_n (le)
[ 4508.623114] pcan: driver config [mod] [isa] [pci] [pec] [usb]
[ 4508.624270] usbcore: registered new interface driver pcan
[ 4508.624273] pcan: major 245.

Also command lsmod | grep ^peak returns no output when PCAN-USB is connected.

Please guide.

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-USB driver installation issue

Post by M.Heidemann » Wed 5. Jun 2024, 16:07

Hi,

Slow down ;)

This can be a bit confusing,

About using:

Code: Select all

lsmod | grep ^peak 
this section on the website talks about the drivers that are included in the Mainline-Kernel,
when you Install the one from the package this doesn't apply anymore, as it will remove the driver called 'peak'

Code: Select all

 module verification failed: signature and/or required key missing - tainting kernel
Is not the end of the world, it only tells you that the drivers aren't signed by Kernel module signing facility,
if you google this, you will also find how to automatically sign or disable verification...

Just to make sure, you have to load the driver after installation once, on the next reboot it will automatically do this

Code: Select all

sudo modprobe pcan
Then you should be able to see your PCAN-device using:

Code: Select all

ls /dev
What do you want to do next? Maybe i can give you some hints!

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

jerinj89
Posts: 3
Joined: Wed 5. Jun 2024, 09:55

Re: PCAN-USB driver installation issue

Post by jerinj89 » Thu 6. Jun 2024, 11:49

Hello,

Thank you for the quick response.

I am still stuck with below issue.
module verification failed: signature and/or required key missing - tainting kernel

Also found a solution in the post - viewtopic.php?f=59&t=7201/ (solution specific to Ubuntu)

On following this post, I am still face an issue with signing part.
$ sudo kmodsign sha512 /var/lib/shim-signed/mok/MOK.priv /var/lib/shim-signed/mok/MOK.der pcan.ko
sudo: kmodsign: command not found


Thanks again for your support! :)

Best Regards,
Jerin

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-USB driver installation issue

Post by M.Heidemann » Thu 6. Jun 2024, 15:04

Hi,

Kali is a debain based Distro too,
so the Forum post you have linked mostly applies here.

As to "kmodsign: command not found" -> Its a kernel module that isn't present in Kali,
a quick Google search will get you there however. this modules signs other modules
to be loaded into the kernel...

But this goes into specifics of Kali and is out of scope of support we can provide.

Like i mentioned before, the driver works just fine, it's just a notification
that the driver isn't signed.

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

Post Reply