2 Channel CAN BUS FD Shield for Raspberry Pi install issue


I buy new one Raspi 4 and 2-Channe Can Bus shield from seeed.

I cant install shield . it gives error.
I setup last Raspbian version 2020.05.20
I didnt update or upgrade.

enable spi via sudo raspi-config and check
pi@raspberrypi:~/pi-hats/CAN-HAT $ lsmod | grep spi
spidev 20480 0
spi_bcm2835 20480 0
pi@raspberrypi:~/pi-hats/CAN-HAT $
and i checked sudo nano /boot/config.txt
i saw dtparam=spi=on

git clone https://github.com/seeed-Studio/pi-hats
cd pi-hats/CAN-HAT
sudo ./install.sh
and error:

Creating symlink /var/lib/dkms/mcp2517fd/0.1/source ->

DKMS: add completed.
Error! echo
Your kernel headers for kernel 4.19.118+ cannot be found at
/lib/modules/4.19.118+/build or /lib/modules/4.19.118+/source.
Error! echo
Your kernel headers for kernel 4.19.118-v7+ cannot be found at
/lib/modules/4.19.118-v7+/build or /lib/modules/4.19.118-v7+/source.
Error! echo
Your kernel headers for kernel 4.19.118-v7l+ cannot be found at
/lib/modules/4.19.118-v7l+/build or /lib/modules/4.19.118-v7l+/source.

Please reboot your raspberry pi to apply all settings

pi@raspberrypi:~/pi-hats/CAN-HAT $ make
make -C /lib/modules/4.19.118-v7l+/build M=/home/pi/pi-hats/CAN-HAT modules
make[1]: *** /lib/modules/4.19.118-v7l+/build: Böyle bir dosya ya da dizin yok. Durdu.
make: *** [Makefile:21: all] Error 2
pi@raspberrypi:~/pi-hats/CAN-HAT $ make install
sudo cp mcp25xxfd-can.ko /lib/modules/4.19.118-v7l+/kernel/drivers/net/can/spi/
cp: ‘mcp25xxfd-can.ko’ durumlanamadı: Böyle bir dosya ya da dizin yok
make: *** [Makefile:27: install] Error 1
pi@raspberrypi:~/pi-hats/CAN-HAT $ sudo modprobe mcp25xxfd-can
modprobe: FATAL: Module mcp25xxfd-can not found in directory /lib/modules/4.19.118-v7l+

when i type this code : dmesg | grep spi
return is blank. i cant see anything .
Nothing shows up and the next line is blank .

But thiss command works and shows
lsmod | grep spi
spi_bcm2835aux 16384 0
spi_bcm2835 20480 0

Please advice me how can i solve problem

I am working on hours but i didnt solve issue.
I am disappointment.

when i type ifconfig-a i saw just eth and wifi devices

in shield rpi power on or off i tried. spi is enabled.

Actuallty everything is ok. but paspi 4b doesnt meet 2 channel bus shield.

1 Like

There’s been a change to the software repo for this, try:

I wasnt having the same issues that you are having but I’m using the same hardware and my kernel version is “5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux”

Note: “dtparam=spi=on” isn’t enable in my “\boot\config.txt”

1 Like

Till date, none of those issues relating to CAN bus has been resolved. I spent the entire day working with it here, but no avail. Seeed is hopeless.