Modprobe: FATAL: Module pcan not found in directory /lib/modules/4.9.140-tegra

I am trying to send messages using CanBus interface. I have PCAN-USB converter .

I am getting this error when I type sudo modprobe pcan:

modprobe: FATAL: Module pcan not found in directory /lib/modules/4.9.140-tegra

I see this URL, and wonder, are you using the USB version? Or PCI?

What do you see from:
zcat /proc/config.gz | egrep PEAK_

Basically, if you see the “=m” or “=y”, then you should have the driver already. If not, then you have to build the kernel module and copy it to the correct location.

Hi @linuxdev,
I use the USB version. I installed the Peak driver 2 days ago and could not see the can0 protocol in ifconfig. So I uninstalled the driver. Now I can see the can0 protocol when I plug the cable.
The output is :
I guess I have already the driver but when I need to load the driver every time after reboot with "sudo modprobe pcan" and it gives this error. Should I build the kernel entirely ?

Is there a relation to this following link with my problem?

I open the draft in peak system forums and they said you need to install linux driver I really confused.
Thanks for reply. Regards

Is the module back in place? The “=m” implies it was, but does not guarantee it is. Do you see the module in “lsmod”? A kernel module is the easiest way to work with it, but modules can have issues if they are not correctly built for the version of the kernel currently running. I would advise avoiding building the full kernel unless you need to.

The earlier URL you mentions seems to revolve around there being more than one dependency for that particular case, but not all dependencies were available. Something similar could be going on, but if you have CONFIG_CAN_PEAK_USB, and if the driver file is in place, and if the module is loaded, then this is probably not your case. I say this because loading a module with modprobe (or similar) will fail if there are missing dependencies. If we know the module file is in place, then we can look closer via things like manually loading the driver.

The “depmod” command is used for setting up such that you don’t have to manually insert the module each time. If the module is capable of being loaded, then “sudo depmod -a” should set up correctly to just “do the right thing” when the USB device is inserted (one reboot after this would be advised).

If the module/driver is in place, and you’ve run “sudo depmod -a”, then monitor “dmesg --follow” and examine what shows up at the moment you plug in the USB device. This will give valuable specific information.